![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <FPGATrackSimMatrixGenAlgo.h>
|
| FPGATrackSimMatrixGenAlgo (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~FPGATrackSimMatrixGenAlgo ()=default |
|
StatusCode | initialize () override |
|
StatusCode | execute () override |
|
StatusCode | finalize () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
StatusCode | bookHistograms () |
|
std::vector< FPGATrackSimHit > | getLogicalHits () |
|
std::vector< FPGATrackSimTruthTrack > | filterTrainingTracks (std::vector< FPGATrackSimTruthTrack > const &truth_tracks) const |
|
std::map< int, std::vector< FPGATrackSimHit > > | makeBarcodeMap (std::vector< FPGATrackSimHit > const &hits, std::vector< FPGATrackSimTruthTrack > const &tracks) const |
|
selectHit_returnCode | selectHit (FPGATrackSimHit const &old_hit, FPGATrackSimHit const &new_hit) const |
|
bool | filterSectorHits (std::vector< FPGATrackSimHit > const &all_hits, std::vector< FPGATrackSimHit > §or_hits, FPGATrackSimTruthTrack const &t) const |
|
int | getRegion (std::vector< FPGATrackSimHit > const &hits) const |
|
StatusCode | makeAccumulator (std::vector< FPGATrackSimHit > const §or_hits, FPGATrackSimTruthTrack const &track, std::pair< std::vector< module_t >, FPGATrackSimMatrixAccumulator > &accumulator) const |
|
std::vector< TTree * > | createMatrixTrees () |
|
void | fillMatrixTrees (std::vector< TTree * > const &matrixTrees) |
|
void | writeSliceTree () |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
std::vector< AccumulateMap > | m_sector_cum |
|
ServiceHandle< IFPGATrackSimMappingSvc > | m_FPGATrackSimMapping {this,"FPGATrackSimMappingSvc","FPGATrackSimMappingSvc"} |
|
ServiceHandle< IFPGATrackSimEventSelectionSvc > | m_EvtSel {this,"FPGATrackSimEventSelectionSvc","FPGATrackSimEventSelectionSvc"} |
|
ServiceHandle< ITHistSvc > | m_tHistSvc {this,"THistSvc","THistSvc"} |
|
ToolHandle< IFPGATrackSimInputTool > | m_hitInputTool {this, "FPGATrackSimSGToRawHitsTool", "FPGATrackSimSGToRawHitsTool/FPGATrackSimSGToRawHits", "input handler"} |
|
ToolHandle< FPGATrackSimRawToLogicalHitsTool > | m_hitMapTool {this, "FPGATrackSimRawToLogicalHitsTool", "FPGATrackSimRawToLogicalHitsTool/FPGATrackSim_RawToLogicalHitsTool", "FPGATrackSim_RawToLogicalHitsTool"} |
|
ToolHandle< FPGATrackSimClusteringToolI > | m_clusteringTool { this, "FPGATrackSimClusteringFTKTool", "FPGATrackSimClusteringFTKTool/FPGATrackSimClusteringFTKTool", "FPGATrackSimClusteringFTKTool" } |
|
ToolHandle< FPGATrackSimSpacePointsToolI > | m_spacePointsTool { this, "SpacePointTool", "FPGATrackSimSpacePointsTool/FPGATrackSimSpacePointsTool", "FPGATrackSimSpacePointsTool" } |
|
ToolHandle< IFPGATrackSimRoadFinderTool > | m_roadFinderTool {this, "RoadFinder", "RoadFinder"} |
|
const FPGATrackSimPlaneMap * | m_pmap = nullptr |
|
Gaudi::Property< int > | m_nRegions {this, "NBanks", 0, "Number of banks to make"} |
|
Gaudi::Property< bool > | m_doClustering {this, "Clustering", true, "Do cluster?"} |
|
Gaudi::Property< bool > | m_doSpacePoints {this, "SpacePoints", true, "Do spacepoints?"} |
|
Gaudi::Property< int > | m_ideal_geom {this, "IdealiseGeometry", 0, "Ideal geo flag, 0 is non, 1 is 1st order, 2 is 2nd order"} |
|
Gaudi::Property< bool > | m_single {this, "SingleSector", false, "Run single sector"} |
|
Gaudi::Property< bool > | m_doHoughConstants {this, "HoughConstants", true, "If true will run Hough Transform to set q/pt and phi0"} |
|
Gaudi::Property< bool > | m_doDeltaPhiConsts {this, "DeltaPhiConstants", false, "If true will generate delta phi constants"} |
|
Gaudi::Property< int > | m_MaxWC {this, "WCmax", 0, "Max number of WCs"} |
|
Gaudi::Property< int > | m_minSpacePlusPixel {this, "minSpacePlusPixel", 4, "Require that tracks in training have a certain number of pixel hits + spacepoints" } |
|
Gaudi::Property< float > | m_PT_THRESHOLD {this, "PT_THRESHOLD", 0., "Min pt"} |
|
Gaudi::Property< float > | m_D0_THRESHOLD {this, "D0_THRESHOLD", 1., "Max d0"} |
|
Gaudi::Property< int > | m_TRAIN_PDG {this, "TRAIN_PDG", 0, "PDG of particles to train on"} |
|
Gaudi::Property< float > | m_temp_c_min {this, "par_c_min", -1, "Min curvature"} |
|
Gaudi::Property< float > | m_temp_c_max {this, "par_c_max", 1, "Max curvature"} |
|
Gaudi::Property< float > | m_temp_phi_min {this, "par_phi_min", -TMath::Pi(), "Min phi"} |
|
Gaudi::Property< float > | m_temp_phi_max {this, "par_phi_max", TMath::Pi(), "Max phi"} |
|
Gaudi::Property< float > | m_temp_d0_min {this, "par_d0_min", -2, "Min d0"} |
|
Gaudi::Property< float > | m_temp_d0_max {this, "par_d0_max", 2, "Max d0"} |
|
Gaudi::Property< float > | m_temp_z0_min {this, "par_z0_min", -200, "Min z0"} |
|
Gaudi::Property< float > | m_temp_z0_max {this, "par_z0_max", 200, "Max z0"} |
|
Gaudi::Property< float > | m_temp_eta_min {this, "par_eta_min", -5, "Min eta"} |
|
Gaudi::Property< float > | m_temp_eta_max {this, "par_eta_max", 5, "Max eta"} |
|
Gaudi::Property< int > | m_temp_c_slices {this, "par_c_slices", 100, "Number of c slides"} |
|
Gaudi::Property< int > | m_temp_phi_slices {this, "par_phi_slices", 100, "Number of phi slices"} |
|
Gaudi::Property< int > | m_temp_d0_slices {this, "par_d0_slices", 100, "Number of d0 slices"} |
|
Gaudi::Property< int > | m_temp_z0_slices {this, "par_z0_slices", 100, "Number of z0 slices"} |
|
Gaudi::Property< int > | m_temp_eta_slices {this, "par_eta_slices", 100, "Number of eta slices"} |
|
Gaudi::Property< bool > | m_absQOverPtBinning {this, "qptAbsBinning", false, "This property controls whether or not to interpret the bins as q/pt or |q/pt|"} |
|
Gaudi::Property< std::vector< double > > | m_qOverPtBins {this, "sectorQPtBins", {}, "q/pt bins for sector definition"} |
|
int | m_nLayers = 0 |
|
int | m_nDim = 0 |
|
int | m_nDim2 = 0 |
|
FPGATrackSimTrackPars | m_sliceMin = 0 |
|
FPGATrackSimTrackPars | m_sliceMax = 0 |
|
FPGATrackSimTrackParsI | m_nBins |
|
FPGATrackSimEventInputHeader * | m_eventHeader = nullptr |
|
size_t | m_nTracks = 0 |
|
size_t | m_nTracksUsed = 0 |
|
TH1I * | m_h_trainingTrack [FPGATrackSimTrackPars::NPARS] {} |
|
TH1I * | m_h_sectorPars [FPGATrackSimTrackPars::NPARS] {} |
|
TH1I * | m_h_SHfailure [FPGATrackSimTrackPars::NPARS] {} |
|
TH1I * | m_h_3hitsInLayer [FPGATrackSimTrackPars::NPARS] {} |
|
TH1I * | m_h_notEnoughHits [FPGATrackSimTrackPars::NPARS] {} |
|
TH1I * | m_h_trackQoP_okHits = nullptr |
|
TH1I * | m_h_trackQoP_okRegion = nullptr |
|
TH1I * | m_h_nHit = nullptr |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 52 of file FPGATrackSimMatrixGenAlgo.h.
◆ StoreGateSvc_t
◆ selectHit_returnCode
Enumerator |
---|
SH_FAILURE | |
SH_KEEP_OLD | |
SH_KEEP_NEW | |
Definition at line 136 of file FPGATrackSimMatrixGenAlgo.h.
136 { SH_FAILURE, SH_KEEP_OLD, SH_KEEP_NEW };
◆ FPGATrackSimMatrixGenAlgo()
FPGATrackSimMatrixGenAlgo::FPGATrackSimMatrixGenAlgo |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~FPGATrackSimMatrixGenAlgo()
virtual FPGATrackSimMatrixGenAlgo::~FPGATrackSimMatrixGenAlgo |
( |
| ) |
|
|
virtualdefault |
◆ bookHistograms()
StatusCode FPGATrackSimMatrixGenAlgo::bookHistograms |
( |
| ) |
|
|
private |
◆ createMatrixTrees()
std::vector<TTree*> FPGATrackSimMatrixGenAlgo::createMatrixTrees |
( |
| ) |
|
|
private |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode FPGATrackSimMatrixGenAlgo::execute |
( |
| ) |
|
|
override |
Definition at line 197 of file FPGATrackSimMatrixGenAlgo.cxx.
212 if (tracks.empty()) {
214 return StatusCode::SUCCESS;
218 std::map<int, std::vector<FPGATrackSimHit>> barcode_hits =
makeBarcodeMap(
hits, tracks);
225 std::vector<FPGATrackSimHit> & track_hits = barcode_hits[
track.getBarcode()];
228 std::vector<FPGATrackSimHit> sector_hits;
230 if (!success)
continue;
235 if (region < 0 || region >=
m_nRegions)
continue;
239 std::vector<FPGATrackSimRoad*> houghRoads;
242 std::vector<const FPGATrackSimHit*> phits;
243 std::vector<FPGATrackSimRoad*> roads;
252 houghRoads.push_back(
hr);
256 if (!houghRoads.empty()){
266 std::vector<module_t> modules(
m_nLayers);
268 acc.pars.qOverPt =
y;
280 return StatusCode::SUCCESS;
285 std::vector<module_t> modules(
m_nLayers);
296 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ fillMatrixTrees()
void FPGATrackSimMatrixGenAlgo::fillMatrixTrees |
( |
std::vector< TTree * > const & |
matrixTrees | ) |
|
|
private |
◆ filterSectorHits()
Definition at line 509 of file FPGATrackSimMatrixGenAlgo.cxx.
518 int layer = hit.getLayer();
520 if (layer_count[
layer] == 0){
521 layer_count[
layer]++;
522 sector_hits[
layer] = hit;
524 else if (layer_count[
layer] == 1) {
525 layer_count[
layer]++;
537 ATH_MSG_DEBUG(
"Too many hits on a plane, exiting filterHitsSec");
552 if (layer_count[
i] == 0)
562 if (sector_hits[
i].isPixel()) {
570 ATH_MSG_DEBUG(
"Found " << num_sp <<
" spacepoints after removing duplicates.");
582 if (num_sp < minSpacePlusPixel) {
583 ATH_MSG_DEBUG(
"Not enough pixel hits + spacepoints (" << num_sp <<
" < " << minSpacePlusPixel <<
")");
◆ filterTrainingTracks()
Definition at line 341 of file FPGATrackSimMatrixGenAlgo.cxx.
343 std::vector<FPGATrackSimTruthTrack> training_tracks;
350 double pt_GeV =
pt / 1000;
358 double eta = TMath::ASinH(
track.getPZ() /
pt);
364 <<
" pdgcode = " <<
track.getPDGCode());
369 return training_tracks;
◆ finalize()
StatusCode FPGATrackSimMatrixGenAlgo::finalize |
( |
| ) |
|
|
override |
Definition at line 832 of file FPGATrackSimMatrixGenAlgo.cxx.
837 for (
int region = 0; region <
m_nRegions; region++) {
839 std::stringstream
name;
840 std::stringstream
title;
841 name <<
"am" << region;
842 title <<
"Ambank " << region <<
" parameters";
843 TTree*
tree =
new TTree(
name.str().c_str(),
title.str().c_str());
851 double coverage = sector_info.second.track_bins.size();
860 return StatusCode::SUCCESS;
◆ getLogicalHits()
std::vector< FPGATrackSimHit > FPGATrackSimMatrixGenAlgo::getLogicalHits |
( |
| ) |
|
|
private |
Definition at line 302 of file FPGATrackSimMatrixGenAlgo.cxx.
304 std::vector<FPGATrackSimHit>
hits;
317 std::vector<FPGATrackSimCluster> clustered_hits;
323 std::vector<FPGATrackSimCluster> spacepoints;
329 std::vector<FPGATrackSimTowerInputHeader>
towers = logicalHeader.
towers();
330 for (
auto &tower :
towers) {
331 std::vector<FPGATrackSimHit>
const & towerHits = tower.hits();
◆ getRegion()
Definition at line 592 of file FPGATrackSimMatrixGenAlgo.cxx.
595 std::vector<bool> region_mask(
m_nRegions,
true);
599 for (
int region = 0; region <
m_nRegions; region++) {
602 region_mask[region] =
false;
606 region_mask[region] =
false;
613 for (
int region = 0; region <
m_nRegions; region++)
614 if (region_mask[region])
◆ initialize()
StatusCode FPGATrackSimMatrixGenAlgo::initialize |
( |
| ) |
|
|
override |
Definition at line 46 of file FPGATrackSimMatrixGenAlgo.cxx.
81 ATH_MSG_INFO(
"Hough constants method needs idealized geometry > 0, aborting.");
82 return StatusCode::FAILURE;
108 ATH_MSG_ERROR(
"q/pt bin information not set in matrix element job options!");
109 return StatusCode::FAILURE;
118 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ makeAccumulator()
Definition at line 623 of file FPGATrackSimMatrixGenAlgo.cxx.
625 std::vector<module_t> modules(
m_nLayers);
631 double qoverpt =
track.getQ() /
track.getPt();
639 std::string module_printout =
"";
643 if (
m_single) modules[
i] = sector_hits[
i].getIdentifierHash();
645 modules[
i] = sectorbin;
659 ATH_MSG_DEBUG(
"Generating track in sectorbin = " << sectorbin <<
" with modules: " << module_printout);
663 const int ToKeep[13] = {2200,2564,2861,3831,5368,14169,14173,20442,20446,29625,29629,42176,42180};
664 bool keepThis =
true;
665 for (
int i = 0;
i < 13;
i++) {
666 if (modules[
i] != ToKeep[
i] && modules[
i] != -1) {
672 for (
int i = 0;
i < 13;
i++) modules[
i] = -1;
675 for (
int i = 0;
i < 13;
i++) {
690 double const trackTwoRhoInv =
track.getQ() * 1.0 / ( 0.33 *
track.getPt() );
693 double y = accumulator.second.pars.qOverPt;
694 double x = accumulator.second.pars.phi;
695 double const houghRho = fpgatracksim::A *
y;
698 std::vector<double> coords;
699 std::vector<double> coordsG;
702 double hitGPhi = sector_hits[
i].getGPhi();
708 int other_layer = (sector_hits[
i].getSide() == 0) ?
i + 1 :
i - 1;
717 double expectedGPhi =
x;
719 hitGPhi += ( sector_hits[
i].getR() - target_r ) * houghRho;
720 expectedGPhi -= target_r * houghRho;
723 hitGPhi += (
pow( sector_hits[
i].
getR() * houghRho, 3.0 ) / 6.0 );
724 expectedGPhi -= (
pow( target_r * houghRho, 3.0 ) / 6.0 );
728 coords.push_back(hitGPhi - expectedGPhi);
729 coordsG.push_back(hitGPhi - expectedGPhi);
731 coords.push_back(hitGPhi);
732 coordsG.push_back(hitGPhi);
739 hitGPhi += ( sector_hits[
i].getR() - target_r ) * trackTwoRhoInv;
742 hitGPhi += (
pow( sector_hits[
i].
getR() * trackTwoRhoInv, 3.0 ) / 6.0 );
744 coords.push_back(hitGPhi);
745 coordsG.push_back(hitGPhi);
751 if (sector_hits[
i].getDim() == 2 || (sector_hits[
i].getHitType() ==
HitType::spacepoint && (sector_hits[
i].getPhysLayer() % 2) == 1)) {
752 double hitZ = sector_hits[
i].getZ();
755 hitZ -= sector_hits[
i].getGCotTheta() * (sector_hits[
i].getR() - target_r);
757 hitZ -= (sector_hits[
i].getGCotTheta() *
pow (sector_hits[
i].
getR(), 3.0) * houghRho * houghRho) / 6.0;
761 hitZ -= sector_hits[
i].getGCotTheta() * (sector_hits[
i].getR() - target_r);
764 hitZ -= sector_hits[
i].getGCotTheta() * (
pow (sector_hits[
i].
getR(), 3.0) * trackTwoRhoInv * trackTwoRhoInv) / 6.0;
768 coords.push_back(hitZ);
769 coordsG.push_back(hitZ);
776 coordsG.push_back(0);
781 assert(coords.size() == (
size_t)
m_nDim);
782 acc.hit_coords = coords;
783 acc.hit_coordsG = coordsG;
788 acc.pars.qOverPt = (
y / 1000.0) -
track.getQOverPt();
795 acc.track_bins.push_back(
bins);
799 while (
acc.pars.phi < 0)
acc.pars.phi += 2*
M_PI;
806 acc.hit_x_QoP[
i] = coords[
i] *
acc.pars.qOverPt;
807 acc.hit_xG_HIP[
i] = coordsG[
i] *
acc.pars.qOverPt;
808 acc.hit_x_d0[
i] = coords[
i] *
acc.pars.d0;
809 acc.hit_x_z0[
i] = coords[
i] *
acc.pars.z0;
810 acc.hit_x_eta[
i] = coords[
i] *
acc.pars.eta;
811 acc.hit_xG_eta[
i] = coordsG[
i] *
acc.pars.eta;
812 acc.hit_x_phi[
i] = coords[
i] *
acc.pars.phi;
814 for (
int j =
i; j <
m_nDim; j++)
815 acc.covariance[
i *
m_nDim + j] = coords[
i] * coords[j];
817 for (
int j =
i; j <
m_nDim; j++)
818 acc.covarianceG[
i *
m_nDim + j] = coordsG[
i] * coordsG[j];
821 accumulator = {modules,
acc};
822 return StatusCode::SUCCESS;
◆ makeBarcodeMap()
Definition at line 374 of file FPGATrackSimMatrixGenAlgo.cxx.
376 std::map<int, std::vector<FPGATrackSimHit>> map;
380 map[
track.getBarcode()] = std::vector<FPGATrackSimHit>();
385 int barcode = hit.getTruth().best_barcode();
389 if (
it != map.end()) (*it).second.push_back(hit);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ selectHit()
Definition at line 408 of file FPGATrackSimMatrixGenAlgo.cxx.
410 if ((new_hit.getSection() == old_hit.getSection()) && (new_hit.getLayer() == old_hit.getLayer())
411 && (new_hit.getEtaModule() == old_hit.getEtaModule()) && (new_hit.getPhiModule() == old_hit.getPhiModule())) {
424 int new_section = new_hit.getSection();
425 int old_section = old_hit.getSection();
427 if (old_section == new_section) {
429 if (old_hit.getEtaModule() == new_hit.getEtaModule()) {
434 int phi_max =
m_FPGATrackSimMapping->RegionMap_1st()->getRegionBoundaries(
reg, new_hit.getLayer(), new_section).phi_max;
435 int phi_min =
m_FPGATrackSimMapping->RegionMap_1st()->getRegionBoundaries(
reg, new_hit.getLayer(), new_section).phi_min;
437 rmax = phi_max - phi_min;
442 int phi_max =
m_FPGATrackSimMapping->RegionMap_2nd()->getRegionBoundaries(
reg, new_hit.getLayer(), new_section).phi_max;
443 int phi_min =
m_FPGATrackSimMapping->RegionMap_2nd()->getRegionBoundaries(
reg, new_hit.getLayer(), new_section).phi_min;
445 rmax = phi_max - phi_min;
448 int phi_diff = old_hit.getPhiModule() - new_hit.getPhiModule();
465 int layer = old_hit.getLayer();
483 if (old_isEC != new_isEC) {
489 else if (old_disk == new_disk) {
491 ATH_MSG_DEBUG(
"Two modules hit in same physical disk " << old_disk);
496 ATH_MSG_DEBUG(
"Keeping the lower-z of the two disks (" << old_disk <<
", " << new_disk <<
") hit");
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ writeSliceTree()
void FPGATrackSimMatrixGenAlgo::writeSliceTree |
( |
| ) |
|
|
private |
◆ m_absQOverPtBinning
Gaudi::Property<bool> FPGATrackSimMatrixGenAlgo::m_absQOverPtBinning {this, "qptAbsBinning", false, "This property controls whether or not to interpret the bins as q/pt or |q/pt|"} |
|
private |
◆ m_clusteringTool
ToolHandle<FPGATrackSimClusteringToolI> FPGATrackSimMatrixGenAlgo::m_clusteringTool { this, "FPGATrackSimClusteringFTKTool", "FPGATrackSimClusteringFTKTool/FPGATrackSimClusteringFTKTool", "FPGATrackSimClusteringFTKTool" } |
|
private |
◆ m_D0_THRESHOLD
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_D0_THRESHOLD {this, "D0_THRESHOLD", 1., "Max d0"} |
|
private |
◆ m_detStore
◆ m_doClustering
Gaudi::Property<bool> FPGATrackSimMatrixGenAlgo::m_doClustering {this, "Clustering", true, "Do cluster?"} |
|
private |
◆ m_doDeltaPhiConsts
Gaudi::Property<bool> FPGATrackSimMatrixGenAlgo::m_doDeltaPhiConsts {this, "DeltaPhiConstants", false, "If true will generate delta phi constants"} |
|
private |
◆ m_doHoughConstants
Gaudi::Property<bool> FPGATrackSimMatrixGenAlgo::m_doHoughConstants {this, "HoughConstants", true, "If true will run Hough Transform to set q/pt and phi0"} |
|
private |
◆ m_doSpacePoints
Gaudi::Property<bool> FPGATrackSimMatrixGenAlgo::m_doSpacePoints {this, "SpacePoints", true, "Do spacepoints?"} |
|
private |
◆ m_eventHeader
◆ m_EvtSel
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_FPGATrackSimMapping
◆ m_h_3hitsInLayer
◆ m_h_nHit
TH1I* FPGATrackSimMatrixGenAlgo::m_h_nHit = nullptr |
|
private |
◆ m_h_notEnoughHits
◆ m_h_sectorPars
◆ m_h_SHfailure
◆ m_h_trackQoP_okHits
TH1I* FPGATrackSimMatrixGenAlgo::m_h_trackQoP_okHits = nullptr |
|
private |
◆ m_h_trackQoP_okRegion
TH1I* FPGATrackSimMatrixGenAlgo::m_h_trackQoP_okRegion = nullptr |
|
private |
◆ m_h_trainingTrack
◆ m_hitInputTool
◆ m_hitMapTool
◆ m_ideal_geom
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_ideal_geom {this, "IdealiseGeometry", 0, "Ideal geo flag, 0 is non, 1 is 1st order, 2 is 2nd order"} |
|
private |
◆ m_MaxWC
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_MaxWC {this, "WCmax", 0, "Max number of WCs"} |
|
private |
◆ m_minSpacePlusPixel
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_minSpacePlusPixel {this, "minSpacePlusPixel", 4, "Require that tracks in training have a certain number of pixel hits + spacepoints" } |
|
private |
◆ m_nBins
◆ m_nDim
int FPGATrackSimMatrixGenAlgo::m_nDim = 0 |
|
private |
◆ m_nDim2
int FPGATrackSimMatrixGenAlgo::m_nDim2 = 0 |
|
private |
◆ m_nLayers
int FPGATrackSimMatrixGenAlgo::m_nLayers = 0 |
|
private |
◆ m_nRegions
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_nRegions {this, "NBanks", 0, "Number of banks to make"} |
|
private |
◆ m_nTracks
size_t FPGATrackSimMatrixGenAlgo::m_nTracks = 0 |
|
private |
◆ m_nTracksUsed
size_t FPGATrackSimMatrixGenAlgo::m_nTracksUsed = 0 |
|
private |
◆ m_pmap
◆ m_PT_THRESHOLD
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_PT_THRESHOLD {this, "PT_THRESHOLD", 0., "Min pt"} |
|
private |
◆ m_qOverPtBins
Gaudi::Property<std::vector<double> > FPGATrackSimMatrixGenAlgo::m_qOverPtBins {this, "sectorQPtBins", {}, "q/pt bins for sector definition"} |
|
private |
◆ m_roadFinderTool
◆ m_sector_cum
std::vector<AccumulateMap> FPGATrackSimMatrixGenAlgo::m_sector_cum |
|
private |
◆ m_single
Gaudi::Property<bool> FPGATrackSimMatrixGenAlgo::m_single {this, "SingleSector", false, "Run single sector"} |
|
private |
◆ m_sliceMax
◆ m_sliceMin
◆ m_spacePointsTool
◆ m_temp_c_max
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_c_max {this, "par_c_max", 1, "Max curvature"} |
|
private |
◆ m_temp_c_min
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_c_min {this, "par_c_min", -1, "Min curvature"} |
|
private |
◆ m_temp_c_slices
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_temp_c_slices {this, "par_c_slices", 100, "Number of c slides"} |
|
private |
◆ m_temp_d0_max
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_d0_max {this, "par_d0_max", 2, "Max d0"} |
|
private |
◆ m_temp_d0_min
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_d0_min {this, "par_d0_min", -2, "Min d0"} |
|
private |
◆ m_temp_d0_slices
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_temp_d0_slices {this, "par_d0_slices", 100, "Number of d0 slices"} |
|
private |
◆ m_temp_eta_max
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_eta_max {this, "par_eta_max", 5, "Max eta"} |
|
private |
◆ m_temp_eta_min
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_eta_min {this, "par_eta_min", -5, "Min eta"} |
|
private |
◆ m_temp_eta_slices
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_temp_eta_slices {this, "par_eta_slices", 100, "Number of eta slices"} |
|
private |
◆ m_temp_phi_max
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_phi_max {this, "par_phi_max", TMath::Pi(), "Max phi"} |
|
private |
◆ m_temp_phi_min
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_phi_min {this, "par_phi_min", -TMath::Pi(), "Min phi"} |
|
private |
◆ m_temp_phi_slices
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_temp_phi_slices {this, "par_phi_slices", 100, "Number of phi slices"} |
|
private |
◆ m_temp_z0_max
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_z0_max {this, "par_z0_max", 200, "Max z0"} |
|
private |
◆ m_temp_z0_min
Gaudi::Property<float> FPGATrackSimMatrixGenAlgo::m_temp_z0_min {this, "par_z0_min", -200, "Min z0"} |
|
private |
◆ m_temp_z0_slices
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_temp_z0_slices {this, "par_z0_slices", 100, "Number of z0 slices"} |
|
private |
◆ m_tHistSvc
ServiceHandle<ITHistSvc> FPGATrackSimMatrixGenAlgo::m_tHistSvc {this,"THistSvc","THistSvc"} |
|
private |
◆ m_TRAIN_PDG
Gaudi::Property<int> FPGATrackSimMatrixGenAlgo::m_TRAIN_PDG {this, "TRAIN_PDG", 0, "PDG of particles to train on"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
bool filterSectorHits(std::vector< FPGATrackSimHit > const &all_hits, std::vector< FPGATrackSimHit > §or_hits, FPGATrackSimTruthTrack const &t) const
selectHit_returnCode selectHit(FPGATrackSimHit const &old_hit, FPGATrackSimHit const &new_hit) const
ToolHandle< FPGATrackSimRawToLogicalHitsTool > m_hitMapTool
std::vector< FPGATrackSimHit > getLogicalHits()
Gaudi::Property< std::vector< double > > m_qOverPtBins
Gaudi::Property< float > m_temp_z0_max
Gaudi::Property< float > m_temp_d0_max
StatusCode makeAccumulator(std::vector< FPGATrackSimHit > const §or_hits, FPGATrackSimTruthTrack const &track, std::pair< std::vector< module_t >, FPGATrackSimMatrixAccumulator > &accumulator) const
Gaudi::Property< float > m_temp_phi_max
Gaudi::Property< float > m_temp_d0_min
Scalar phi() const
phi method
Gaudi::Property< int > m_minSpacePlusPixel
int getRegion(std::vector< FPGATrackSimHit > const &hits) const
std::map< int, std::vector< FPGATrackSimHit > > makeBarcodeMap(std::vector< FPGATrackSimHit > const &hits, std::vector< FPGATrackSimTruthTrack > const &tracks) const
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Gaudi::Property< int > m_temp_z0_slices
constexpr int SPACEPOINT_SECTOR_OFFSET
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
std::vector< FPGATrackSimTruthTrack > filterTrainingTracks(std::vector< FPGATrackSimTruthTrack > const &truth_tracks) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
Gaudi::Property< int > m_ideal_geom
Gaudi::Property< float > m_temp_phi_min
Gaudi::Property< float > m_D0_THRESHOLD
Gaudi::Property< float > m_temp_z0_min
reg
globals -----------------------------------------------------------------—
Gaudi::Property< int > m_temp_eta_slices
Gaudi::Property< float > m_temp_eta_min
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_EvtSel
const std::vector< FPGATrackSimTruthTrack > & getTruthTracks() const
virtual void setOwner(IDataHandleHolder *o)=0
uint32_t getDim(size_t logiLayer) const
Gaudi::Property< bool > m_doHoughConstants
void fillTree(AccumulateMap &map, TTree *tree, int nLayers, int nCoords)
Writes the contents of an AccumulateMap into the supplied tree (one entry per sector).
FPGATrackSimTrackPars m_sliceMax
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Gaudi::Property< float > m_temp_c_min
Gaudi::Property< int > m_nRegions
Gaudi::Property< bool > m_single
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< FPGATrackSimSpacePointsToolI > m_spacePointsTool
TH1I * m_h_sectorPars[FPGATrackSimTrackPars::NPARS]
ToolHandle< IFPGATrackSimInputTool > m_hitInputTool
Gaudi::Property< int > m_temp_d0_slices
TH1I * m_h_trackQoP_okHits
Gaudi::Property< bool > m_doDeltaPhiConsts
Gaudi::Property< float > m_PT_THRESHOLD
Gaudi::Property< int > m_temp_phi_slices
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Gaudi::Property< bool > m_doSpacePoints
Gaudi::Property< bool > m_absQOverPtBinning
Gaudi::Property< bool > m_doClustering
ToolHandle< FPGATrackSimClusteringToolI > m_clusteringTool
FPGATrackSimEventInputHeader * m_eventHeader
StatusCode bookHistograms()
TH1I * m_h_notEnoughHits[FPGATrackSimTrackPars::NPARS]
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
constexpr int QPT_SECTOR_OFFSET
std::string to_string(const DetectorType &type)
TH1I * m_h_3hitsInLayer[FPGATrackSimTrackPars::NPARS]
std::vector< AccumulateMap > m_sector_cum
TH1I * m_h_SHfailure[FPGATrackSimTrackPars::NPARS]
static std::string parName(unsigned i)
Gaudi::Property< float > m_temp_c_max
DataObjIDColl m_extendedExtraObjects
void fillTrackPars(TH1I *const hists[FPGATrackSimTrackPars::NPARS], FPGATrackSimTruthTrack const &track)
#define ATH_MSG_WARNING(x)
TH1I * m_h_trackQoP_okRegion
FPGATrackSimTrackPars m_sliceMin
TH1I * m_h_trainingTrack[FPGATrackSimTrackPars::NPARS]
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float getR(const xAOD::TrackParticle &)
Accessor utility function for getting the value of prodR.
Gaudi::Property< int > m_MaxWC
Gaudi::Property< int > m_TRAIN_PDG
FPGATrackSimTrackParsI m_nBins
AthAlgorithm()
Default constructor:
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
ServiceHandle< ITHistSvc > m_tHistSvc
Gaudi::Property< float > m_temp_eta_max
const FPGATrackSimPlaneMap * m_pmap
ToolHandle< IFPGATrackSimRoadFinderTool > m_roadFinderTool
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Gaudi::Property< int > m_temp_c_slices
void setHitType(HitType type)
GeoGenfun::FunctionNoop ATan2(GeoGenfun::GENFUNCTION y, GeoGenfun::GENFUNCTION x)