|
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, int subregion) const |
|
bool | filterSectorHits (std::vector< FPGATrackSimHit > const &all_hits, std::vector< FPGATrackSimHit > §or_hits, FPGATrackSimTruthTrack const &t, int subregion) 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< FPGATrackSimRoadUnionTool > | 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 51 of file FPGATrackSimMatrixGenAlgo.h.
◆ StoreGateSvc_t
◆ selectHit_returnCode
Enumerator |
---|
SH_FAILURE | |
SH_KEEP_OLD | |
SH_KEEP_NEW | |
Definition at line 135 of file FPGATrackSimMatrixGenAlgo.h.
135 { 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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 198 of file FPGATrackSimMatrixGenAlgo.cxx.
212 if (tracks.empty()) {
214 return StatusCode::SUCCESS;
218 std::map<int, std::vector<FPGATrackSimHit>> barcode_hits =
makeBarcodeMap(
hits, tracks);
226 std::vector<FPGATrackSimHit> & track_hits = barcode_hits[
track.getBarcode()];
232 for (
int iSlice = 0; iSlice<nSlices; iSlice++){
234 for (
auto & iHit : track_hits) {
237 std::vector<FPGATrackSimHit> sector_hits;
239 if (!success)
continue;
244 if (region < 0 || region >=
m_nRegions)
continue;
248 std::vector<std::shared_ptr<const FPGATrackSimRoad>> houghRoads;
250 std::vector<std::shared_ptr<const FPGATrackSimHit>> phits;
252 for (
const FPGATrackSimHit& hit : sector_hits) phits.emplace_back(std::make_shared<const FPGATrackSimHit>(hit));
257 if (!houghRoads.empty()){
262 for (
auto const &
hr : houghRoads){
267 std::vector<module_t> modules(
m_nLayers);
269 acc.pars.qOverPt =
y;
280 return StatusCode::SUCCESS;
284 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 512 of file FPGATrackSimMatrixGenAlgo.cxx.
523 if (!hit.isMapped()){
531 int layer = hit.getLayer();
533 if (layer_count[
layer] == 0){
534 layer_count[
layer]++;
535 sector_hits[
layer] = hit;
537 else if (layer_count[
layer] == 1) {
538 layer_count[
layer]++;
551 ATH_MSG_DEBUG(
"Too many hits on a plane, exiting filterHitsSec");
566 if (layer_count[
i] == 0)
576 if (sector_hits[
i].isPixel()) {
584 ATH_MSG_DEBUG(
"Found " << num_sp <<
" spacepoints after removing duplicates.");
596 if (num_sp < minSpacePlusPixel) {
597 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 795 of file FPGATrackSimMatrixGenAlgo.cxx.
800 for (
int region = 0; region <
m_nRegions; region++) {
802 std::stringstream
name;
803 std::stringstream
title;
804 name <<
"am" << region;
805 title <<
"Ambank " << region <<
" parameters";
806 TTree*
tree =
new TTree(
name.str().c_str(),
title.str().c_str());
814 double coverage = sector_info.second.track_bins.size();
823 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 606 of file FPGATrackSimMatrixGenAlgo.cxx.
609 std::vector<bool> region_mask(
m_nRegions,
true);
613 for (
int region = 0; region <
m_nRegions; region++) {
616 region_mask[region] =
false;
620 region_mask[region] =
false;
627 for (
int region = 0; region <
m_nRegions; region++)
628 if (region_mask[region])
◆ initialize()
StatusCode FPGATrackSimMatrixGenAlgo::initialize |
( |
| ) |
|
|
override |
Definition at line 47 of file FPGATrackSimMatrixGenAlgo.cxx.
82 ATH_MSG_INFO(
"Hough constants method needs idealized geometry > 0, aborting.");
83 return StatusCode::FAILURE;
109 ATH_MSG_ERROR(
"q/pt bin information not set in matrix element job options!");
110 return StatusCode::FAILURE;
119 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 637 of file FPGATrackSimMatrixGenAlgo.cxx.
639 std::vector<module_t> modules(
m_nLayers);
645 double qoverpt =
track.getQ() /
track.getPt();
653 std::string module_printout =
"";
657 if (
m_single) modules[
i] = sector_hits[
i].getIdentifierHash();
659 modules[
i] = sectorbin;
673 ATH_MSG_DEBUG(
"Generating track in sectorbin = " << sectorbin <<
" with modules: " << module_printout);
677 const int ToKeep[13] = {2200,2564,2861,3831,5368,14169,14173,20442,20446,29625,29629,42176,42180};
678 bool keepThis =
true;
679 for (
int i = 0;
i < 13;
i++) {
680 if (modules[
i] != ToKeep[
i] && modules[
i] != -1) {
686 for (
int i = 0;
i < 13;
i++) modules[
i] = -1;
689 for (
int i = 0;
i < 13;
i++) {
696 double y = accumulator.second.pars.qOverPt;
697 double x = accumulator.second.pars.phi;
700 std::vector<float> coords;
710 int other_layer = (sector_hits[
i].getSide() == 0) ?
i + 1 :
i - 1;
714 std::vector<float> coords_tmp;
726 coords.push_back(coords_tmp[1]);
731 if (sector_hits[
i].getDim() == 2 || (sector_hits[
i].getHitType() ==
HitType::spacepoint && (sector_hits[
i].getPhysLayer() % 2) == 1)) {
733 coords.push_back(coords_tmp[0]);
744 assert(coords.size() == (
size_t)
m_nDim);
745 acc.hit_coords = coords;
746 acc.hit_coordsG = coords;
751 acc.pars.qOverPt = (
y / 1000.0) -
track.getQOverPt();
758 acc.track_bins.push_back(
bins);
762 while (
acc.pars.phi < 0)
acc.pars.phi += 2*
M_PI;
769 acc.hit_x_QoP[
i] = coords[
i] *
acc.pars.qOverPt;
770 acc.hit_xG_HIP[
i] = coords[
i] *
acc.pars.qOverPt;
771 acc.hit_x_d0[
i] = coords[
i] *
acc.pars.d0;
772 acc.hit_x_z0[
i] = coords[
i] *
acc.pars.z0;
773 acc.hit_x_eta[
i] = coords[
i] *
acc.pars.eta;
774 acc.hit_xG_eta[
i] = coords[
i] *
acc.pars.eta;
775 acc.hit_x_phi[
i] = coords[
i] *
acc.pars.phi;
777 for (
int j =
i; j <
m_nDim; j++)
778 acc.covariance[
i *
m_nDim + j] = coords[
i] * coords[j];
780 for (
int j =
i; j <
m_nDim; j++)
781 acc.covarianceG[
i *
m_nDim + j] = coords[
i] * coords[j];
784 accumulator = {modules,
acc};
785 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.
411 if ((new_hit.getSection() == old_hit.getSection()) && (new_hit.getLayer() == old_hit.getLayer())
412 && (new_hit.getEtaModule() == old_hit.getEtaModule()) && (new_hit.getPhiModule() == old_hit.getPhiModule())) {
425 int new_section = new_hit.getSection();
426 int old_section = old_hit.getSection();
428 if (old_section == new_section) {
430 if (old_hit.getEtaModule() == new_hit.getEtaModule()) {
434 int phi_max =
m_FPGATrackSimMapping->SubRegionMap()->getRegionBoundaries(subregion, new_hit.getLayer(), new_section).phi_max;
435 int phi_min =
m_FPGATrackSimMapping->SubRegionMap()->getRegionBoundaries(subregion, new_hit.getLayer(), new_section).phi_min;
437 rmax = phi_max - phi_min;
443 int phi_max =
m_FPGATrackSimMapping->RegionMap_2nd()->getRegionBoundaries(reg, new_hit.getLayer(), new_section).phi_max;
444 int phi_min =
m_FPGATrackSimMapping->RegionMap_2nd()->getRegionBoundaries(reg, new_hit.getLayer(), new_section).phi_min;
446 rmax = phi_max - phi_min;
449 int phi_diff = old_hit.getPhiModule() - new_hit.getPhiModule();
466 int layer = old_hit.getLayer();
485 if (old_isEC != new_isEC) {
491 else if (old_disk == new_disk) {
493 ATH_MSG_DEBUG(
"Two modules hit in same physical disk " << old_disk);
498 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:
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
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).
std::vector< float > computeIdealCoords(const FPGATrackSimHit &hit, const double hough_x, const double hough_y, const double target_r, const bool doDeltaGPhis, const TrackCorrType trackCorrType)
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
void map(FPGATrackSimHit &hit) const
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
std::vector< uint32_t > getRegions(const FPGATrackSimHit &hit) const
ToolHandle< FPGATrackSimClusteringToolI > m_clusteringTool
FPGATrackSimEventInputHeader * m_eventHeader
StatusCode bookHistograms()
bool filterSectorHits(std::vector< FPGATrackSimHit > const &all_hits, std::vector< FPGATrackSimHit > §or_hits, FPGATrackSimTruthTrack const &t, int subregion) const
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
selectHit_returnCode selectHit(FPGATrackSimHit const &old_hit, FPGATrackSimHit const &new_hit, int subregion) const
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.
Gaudi::Property< int > m_MaxWC
Gaudi::Property< int > m_TRAIN_PDG
ToolHandle< FPGATrackSimRoadUnionTool > m_roadFinderTool
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
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)