Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FPGATrackSimLayerStudyTool Class Reference

#include <FPGATrackSimLayerStudyTool.h>

Inheritance diagram for FPGATrackSimLayerStudyTool:
Collaboration diagram for FPGATrackSimLayerStudyTool:

Public Member Functions

 FPGATrackSimLayerStudyTool (const std::string &, const std::string &, const IInterface *)
 
virtual StatusCode initialize () override
 
StatusCode registerHistograms (const FPGATrackSimBinnedHits *binnedhits, bool skipTruth)
 
void allocateDataFlowCounters ()
 
void resetDataFlowCounters ()
 
const std::string dir () const
 
void parseTruthInfo ATLAS_NOT_THREAD_SAFE (std::vector< FPGATrackSimTruthTrack > const &truthtracks)
 
void fillBinLevelOutput ATLAS_NOT_THREAD_SAFE (const FPGATrackSimBinUtil::IdxSet &idx, const FPGATrackSimBinnedHits::BinEntry &data)
 
void fillBinningSummary ATLAS_NOT_THREAD_SAFE (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
 
void sliceCheck ()
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void setBinPlotsActive (const FPGATrackSimBinUtil::IdxSet &idx)
 
StatusCode bookTree ()
 
void ClearTreeVectors ()
 
template<typename HistType , typename... HistDef>
StatusCode makeAndRegHist (HistType *&ptr, HistDef... histargs)
 
template<typename HistType , typename... HistDef>
StatusCode makeAndRegHistVector (std::vector< HistType * > &vec, unsigned len, const std::vector< std::string > *namevec, const char *namebase, HistDef... histargs)
 
StatusCode regGraph (TGraph *g) const
 
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...
 

Private Attributes

ServiceHandle< ITHistSvc > m_tHistSvc {this, "THistSvc", "THistSvc"}
 
Gaudi::Property< std::string > m_dir {this, "dir", {"/GENSCAN/"}, "String name of output directory"}
 
Gaudi::Property< double > m_phiScale {this, "phiScale", {}, "Scale for Delta Phi variable"}
 
Gaudi::Property< double > m_etaScale {this, "etaScale", {}, "Scale for Delta Eta variable"}
 
Gaudi::Property< double > m_drScale {this, "drScale", {}, "Scale for radius differences"}
 
const FPGATrackSimBinnedHitsm_binnedhits {nullptr}
 
bool m_isSingleParticle = false
 
bool m_truthIsValid = false
 
FPGATrackSimTrackPars m_truthpars
 
std::vector< FPGATrackSimBinUtil::IdxSetm_truthbin
 
FPGATrackSimBinUtil::ParSet m_truthparset
 
bool m_binPlotsActive = false
 
std::vector< TH2D * > m_rZ_allhits
 
TH1D * m_truthpars_hists [5] = {0, 0, 0, 0, 0}
 
TH1D * m_inputHits = 0
 
TH1D * m_phiShift_road = 0
 
TH1D * m_etaShift_road = 0
 
TH2D * m_phiShift2D_road = 0
 
TH2D * m_etaShift2D_road = 0
 
std::vector< TH1D * > m_hitsPerStepBin
 
TH1D * m_hitsPerLayer = 0
 
TH2D * m_hitsPerLayer2D = 0
 
TH2D * m_hitsPerLayer_bin = 0
 
TTree * m_bin_module_tree = nullptr
 
std::vector< unsigned > m_tree_bin
 
std::vector< float > m_tree_r
 
std::vector< float > m_tree_z
 
std::vector< int > m_tree_id
 
std::vector< int > m_tree_hash
 
std::vector< int > m_tree_layer
 
std::vector< int > m_tree_side
 
std::vector< int > m_tree_etamod
 
std::vector< int > m_tree_phimod
 
std::vector< int > m_tree_dettype
 
std::vector< int > m_tree_detzone
 
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
 

Detailed Description

Definition at line 39 of file FPGATrackSimLayerStudyTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FPGATrackSimLayerStudyTool()

FPGATrackSimLayerStudyTool::FPGATrackSimLayerStudyTool ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)

Definition at line 20 of file FPGATrackSimLayerStudyTool.cxx.

20  :
21  AthAlgTool(algname, name, ifc)
22 {
23 }

Member Function Documentation

◆ allocateDataFlowCounters()

void FPGATrackSimLayerStudyTool::allocateDataFlowCounters ( )

◆ ATLAS_NOT_THREAD_SAFE() [1/3]

void fillBinLevelOutput FPGATrackSimLayerStudyTool::ATLAS_NOT_THREAD_SAFE ( const FPGATrackSimBinUtil::IdxSet idx,
const FPGATrackSimBinnedHits::BinEntry data 
)

◆ ATLAS_NOT_THREAD_SAFE() [2/3]

void fillBinningSummary FPGATrackSimLayerStudyTool::ATLAS_NOT_THREAD_SAFE ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits)

◆ ATLAS_NOT_THREAD_SAFE() [3/3]

void parseTruthInfo FPGATrackSimLayerStudyTool::ATLAS_NOT_THREAD_SAFE ( std::vector< FPGATrackSimTruthTrack > const truthtracks)

◆ bookTree()

StatusCode FPGATrackSimLayerStudyTool::bookTree ( )
private

Definition at line 87 of file FPGATrackSimLayerStudyTool.cxx.

87  {
88  ATH_MSG_DEBUG("Booking Layers Study Tree");
89  m_bin_module_tree = new TTree("LayerStudy","LayerStudy");
90  m_bin_module_tree->Branch("bin", &m_tree_bin);
91  m_bin_module_tree->Branch("r", &m_tree_r);
92  m_bin_module_tree->Branch("z", &m_tree_z);
93  m_bin_module_tree->Branch("id", &m_tree_id);
94  m_bin_module_tree->Branch("hash", &m_tree_hash);
95  m_bin_module_tree->Branch("layer", &m_tree_layer);
96  m_bin_module_tree->Branch("side", &m_tree_side);
97  m_bin_module_tree->Branch("etamod", &m_tree_etamod);
98  m_bin_module_tree->Branch("phimod", &m_tree_phimod);
99  m_bin_module_tree->Branch("dettype", &m_tree_dettype);
100  m_bin_module_tree->Branch("detzone", &m_tree_detzone);
101 
103  return StatusCode::SUCCESS;
104 }

◆ ClearTreeVectors()

void FPGATrackSimLayerStudyTool::ClearTreeVectors ( )
private

Definition at line 105 of file FPGATrackSimLayerStudyTool.cxx.

106 {
107  m_tree_r.clear();
108  m_tree_z.clear();
109  m_tree_id.clear();
110  m_tree_hash.clear();
111  m_tree_layer.clear();
112  m_tree_side.clear();
113  m_tree_etamod.clear();
114  m_tree_phimod.clear();
115  m_tree_dettype.clear();
116  m_tree_detzone.clear();
117 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ dir()

const std::string FPGATrackSimLayerStudyTool::dir ( ) const
inline

Definition at line 57 of file FPGATrackSimLayerStudyTool.h.

57 {return m_dir;}

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ initialize()

StatusCode FPGATrackSimLayerStudyTool::initialize ( )
overridevirtual

Definition at line 25 of file FPGATrackSimLayerStudyTool.cxx.

26 {
27  // Dump the configuration to make sure it propagated through right
28  auto props = this->getProperties();
29  for( Gaudi::Details::PropertyBase* prop : props ) {
30  if (prop->ownerTypeName()==this->type()) {
31  ATH_MSG_DEBUG("Property:\t" << prop->name() << "\t : \t" << prop->toString());
32  }
33  }
34 
35  ATH_CHECK(m_tHistSvc.retrieve());
36 
38 
39  return StatusCode::SUCCESS;
40 
41 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ makeAndRegHist()

template<typename HistType , typename... HistDef>
StatusCode FPGATrackSimLayerStudyTool::makeAndRegHist ( HistType *&  ptr,
HistDef...  histargs 
)
inlineprivate

Definition at line 143 of file FPGATrackSimLayerStudyTool.h.

144  {
145  ptr = new HistType(histargs...);
146  ATH_CHECK(m_tHistSvc->regHist(m_dir + ptr->GetName(), ptr));
147  return StatusCode::SUCCESS;
148  }

◆ makeAndRegHistVector()

template<typename HistType , typename... HistDef>
StatusCode FPGATrackSimLayerStudyTool::makeAndRegHistVector ( std::vector< HistType * > &  vec,
unsigned  len,
const std::vector< std::string > *  namevec,
const char *  namebase,
HistDef...  histargs 
)
inlineprivate

Definition at line 152 of file FPGATrackSimLayerStudyTool.h.

153  {
154  if (vec.size()==0){
155  for (unsigned i = 0; i < len; i++) {
156  HistType *ptr = 0;
157  std::string name = std::string(namebase);
158  if (!namevec) {
159  name += std::to_string(i);
160  } else {
161  if (namevec->size()==len) {
162  name += (*namevec)[i];
163  } else {
164  return StatusCode::FAILURE;
165  }
166  }
167  ATH_CHECK(makeAndRegHist(ptr, name.c_str(), histargs...));
168  vec.push_back(ptr);
169  }
170  }
171  return StatusCode::SUCCESS;
172  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ regGraph()

StatusCode FPGATrackSimLayerStudyTool::regGraph ( TGraph *  g) const
inlineprivate

Definition at line 175 of file FPGATrackSimLayerStudyTool.h.

175 { return m_tHistSvc->regGraph(m_dir + g->GetName(), g);}

◆ registerHistograms()

StatusCode FPGATrackSimLayerStudyTool::registerHistograms ( const FPGATrackSimBinnedHits binnedhits,
bool  skipTruth 
)

Definition at line 43 of file FPGATrackSimLayerStudyTool.cxx.

44 {
45  m_binnedhits = binnedhits;
46  const FPGATrackSimBinTool &bintool = m_binnedhits->getBinTool();
47  const IFPGATrackSimBinDesc* bindesc = bintool.binDesc();
48  int nLyrs = m_binnedhits->getNLayers();
49 
50  // *Technically* this is a bit fragile. Since we are testing if the event selection service is set to
51  // the "skip truth" type rather than testing if it's set to the SingleMuon, SingleElectron, or SinglePion types.
52  // At the moment though we either set skip truth or we are running single particle, so it could be changed later.
54 
55  // This is because if you change the binning class you can change what axis
56  // ranges you need for the plotting
57  ATH_MSG_INFO("Hist scales phi: " << m_phiScale << " eta: " << m_etaScale << " dr:" << m_drScale);
58 
59  // Truth Parameter distributions, bounds should cover 3x nominal range
60  for (unsigned i = 0; i < FPGATrackSimTrackPars::NPARS; i++) {
62  m_truthpars_hists[i], ("truth" + bindesc->parNames(i)).c_str(),
63  (";" + m_binnedhits->getBinTool().binDesc()->parNames(i) + ";").c_str(), 200,
66  }
67 
68  // Data flow hists. We may not need these for the layer study.
69  ATH_CHECK(makeAndRegHist(m_inputHits, "InputHits", ";Input Hits", 200, 0, 100000));
71  &bintool.stepNames(), "hitsPerStep",
72  "; Hits per bin in step", 20, 0, m_isSingleParticle ? 50 : 10000));
73  ATH_CHECK(makeAndRegHist(m_hitsPerLayer, "hitsPerLayer", "; Layer ; Hits ", nLyrs, 0, nLyrs));
74  ATH_CHECK(makeAndRegHist(m_hitsPerLayer2D, "hitsPerLayer2D", "; Layer ; Hits ", nLyrs, 0, nLyrs, 20, 0, m_isSingleParticle ? 20 : 10000));
75 
76  // Road statistics
77  ATH_CHECK(makeAndRegHist(m_phiShift_road, "phiShift_road", ";Phi Shift", 2000, -m_phiScale, m_phiScale));
78  ATH_CHECK(makeAndRegHist(m_etaShift_road, "etaShift_road", ";Eta Shift", 2000, -m_etaScale, m_etaScale));
79  ATH_CHECK(makeAndRegHist(m_phiShift2D_road, "phiShift2D_road", ";Phi Shift; R", 400, -m_phiScale, m_phiScale, 100, 0, 400));
80  ATH_CHECK(makeAndRegHist(m_etaShift2D_road, "etaShift2D_road", ";Phi Shift; R", 400, -m_etaScale, m_etaScale, 100, 0, 400));
81 
82 
83  return StatusCode::SUCCESS;
84 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ resetDataFlowCounters()

void FPGATrackSimLayerStudyTool::resetDataFlowCounters ( )

◆ setBinPlotsActive()

void FPGATrackSimLayerStudyTool::setBinPlotsActive ( const FPGATrackSimBinUtil::IdxSet idx)
inlineprivate

Definition at line 97 of file FPGATrackSimLayerStudyTool.h.

97 {m_binPlotsActive = ((m_truthbin.back() == idx) || (!m_isSingleParticle));}

◆ sliceCheck()

void FPGATrackSimLayerStudyTool::sliceCheck ( )

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_bin_module_tree

TTree* FPGATrackSimLayerStudyTool::m_bin_module_tree = nullptr
private

Definition at line 127 of file FPGATrackSimLayerStudyTool.h.

◆ m_binnedhits

const FPGATrackSimBinnedHits* FPGATrackSimLayerStudyTool::m_binnedhits {nullptr}
private

Definition at line 84 of file FPGATrackSimLayerStudyTool.h.

◆ m_binPlotsActive

bool FPGATrackSimLayerStudyTool::m_binPlotsActive = false
private

Definition at line 99 of file FPGATrackSimLayerStudyTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dir

Gaudi::Property<std::string> FPGATrackSimLayerStudyTool::m_dir {this, "dir", {"/GENSCAN/"}, "String name of output directory"}
private

Definition at line 77 of file FPGATrackSimLayerStudyTool.h.

◆ m_drScale

Gaudi::Property<double> FPGATrackSimLayerStudyTool::m_drScale {this, "drScale", {}, "Scale for radius differences"}
private

Definition at line 80 of file FPGATrackSimLayerStudyTool.h.

◆ m_etaScale

Gaudi::Property<double> FPGATrackSimLayerStudyTool::m_etaScale {this, "etaScale", {}, "Scale for Delta Eta variable"}
private

Definition at line 79 of file FPGATrackSimLayerStudyTool.h.

◆ m_etaShift2D_road

TH2D* FPGATrackSimLayerStudyTool::m_etaShift2D_road = 0
private

Definition at line 114 of file FPGATrackSimLayerStudyTool.h.

◆ m_etaShift_road

TH1D* FPGATrackSimLayerStudyTool::m_etaShift_road = 0
private

Definition at line 112 of file FPGATrackSimLayerStudyTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hitsPerLayer

TH1D* FPGATrackSimLayerStudyTool::m_hitsPerLayer = 0
private

Definition at line 118 of file FPGATrackSimLayerStudyTool.h.

◆ m_hitsPerLayer2D

TH2D* FPGATrackSimLayerStudyTool::m_hitsPerLayer2D = 0
private

Definition at line 119 of file FPGATrackSimLayerStudyTool.h.

◆ m_hitsPerLayer_bin

TH2D* FPGATrackSimLayerStudyTool::m_hitsPerLayer_bin = 0
private

Definition at line 120 of file FPGATrackSimLayerStudyTool.h.

◆ m_hitsPerStepBin

std::vector<TH1D *> FPGATrackSimLayerStudyTool::m_hitsPerStepBin
private

Definition at line 117 of file FPGATrackSimLayerStudyTool.h.

◆ m_inputHits

TH1D* FPGATrackSimLayerStudyTool::m_inputHits = 0
private

Definition at line 109 of file FPGATrackSimLayerStudyTool.h.

◆ m_isSingleParticle

bool FPGATrackSimLayerStudyTool::m_isSingleParticle = false
private

Definition at line 88 of file FPGATrackSimLayerStudyTool.h.

◆ m_phiScale

Gaudi::Property<double> FPGATrackSimLayerStudyTool::m_phiScale {this, "phiScale", {}, "Scale for Delta Phi variable"}
private

Definition at line 78 of file FPGATrackSimLayerStudyTool.h.

◆ m_phiShift2D_road

TH2D* FPGATrackSimLayerStudyTool::m_phiShift2D_road = 0
private

Definition at line 113 of file FPGATrackSimLayerStudyTool.h.

◆ m_phiShift_road

TH1D* FPGATrackSimLayerStudyTool::m_phiShift_road = 0
private

Definition at line 111 of file FPGATrackSimLayerStudyTool.h.

◆ m_rZ_allhits

std::vector<TH2D *> FPGATrackSimLayerStudyTool::m_rZ_allhits
private

Definition at line 106 of file FPGATrackSimLayerStudyTool.h.

◆ m_tHistSvc

ServiceHandle<ITHistSvc> FPGATrackSimLayerStudyTool::m_tHistSvc {this, "THistSvc", "THistSvc"}
private

Definition at line 73 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_bin

std::vector<unsigned> FPGATrackSimLayerStudyTool::m_tree_bin
private

Definition at line 128 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_dettype

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_dettype
private

Definition at line 137 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_detzone

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_detzone
private

Definition at line 138 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_etamod

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_etamod
private

Definition at line 135 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_hash

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_hash
private

Definition at line 132 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_id

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_id
private

Definition at line 131 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_layer

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_layer
private

Definition at line 133 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_phimod

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_phimod
private

Definition at line 136 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_r

std::vector<float> FPGATrackSimLayerStudyTool::m_tree_r
private

Definition at line 129 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_side

std::vector<int> FPGATrackSimLayerStudyTool::m_tree_side
private

Definition at line 134 of file FPGATrackSimLayerStudyTool.h.

◆ m_tree_z

std::vector<float> FPGATrackSimLayerStudyTool::m_tree_z
private

Definition at line 130 of file FPGATrackSimLayerStudyTool.h.

◆ m_truthbin

std::vector<FPGATrackSimBinUtil::IdxSet> FPGATrackSimLayerStudyTool::m_truthbin
private

Definition at line 91 of file FPGATrackSimLayerStudyTool.h.

◆ m_truthIsValid

bool FPGATrackSimLayerStudyTool::m_truthIsValid = false
private

Definition at line 89 of file FPGATrackSimLayerStudyTool.h.

◆ m_truthpars

FPGATrackSimTrackPars FPGATrackSimLayerStudyTool::m_truthpars
private

Definition at line 90 of file FPGATrackSimLayerStudyTool.h.

◆ m_truthpars_hists

TH1D* FPGATrackSimLayerStudyTool::m_truthpars_hists[5] = {0, 0, 0, 0, 0}
private

Definition at line 107 of file FPGATrackSimLayerStudyTool.h.

◆ m_truthparset

FPGATrackSimBinUtil::ParSet FPGATrackSimLayerStudyTool::m_truthparset
private

Definition at line 92 of file FPGATrackSimLayerStudyTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
FPGATrackSimLayerStudyTool::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
Definition: FPGATrackSimLayerStudyTool.h:73
FPGATrackSimLayerStudyTool::m_phiScale
Gaudi::Property< double > m_phiScale
Definition: FPGATrackSimLayerStudyTool.h:78
FPGATrackSimLayerStudyTool::m_bin_module_tree
TTree * m_bin_module_tree
Definition: FPGATrackSimLayerStudyTool.h:127
FPGATrackSimLayerStudyTool::m_tree_etamod
std::vector< int > m_tree_etamod
Definition: FPGATrackSimLayerStudyTool.h:135
getMenu.algname
algname
Definition: getMenu.py:54
FPGATrackSimBinTool::steps
const ToolHandleArray< FPGATrackSimBinStep > & steps() const
Definition: FPGATrackSimBinTool.h:58
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
FPGATrackSimLayerStudyTool::m_binnedhits
const FPGATrackSimBinnedHits * m_binnedhits
Definition: FPGATrackSimLayerStudyTool.h:84
FPGATrackSimLayerStudyTool::m_tree_r
std::vector< float > m_tree_r
Definition: FPGATrackSimLayerStudyTool.h:129
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:9
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
FPGATrackSimBinTool
Definition: FPGATrackSimBinTool.h:44
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
FPGATrackSimLayerStudyTool::m_truthbin
std::vector< FPGATrackSimBinUtil::IdxSet > m_truthbin
Definition: FPGATrackSimLayerStudyTool.h:91
FPGATrackSimLayerStudyTool::m_isSingleParticle
bool m_isSingleParticle
Definition: FPGATrackSimLayerStudyTool.h:88
FPGATrackSimLayerStudyTool::m_etaShift2D_road
TH2D * m_etaShift2D_road
Definition: FPGATrackSimLayerStudyTool.h:114
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
IFPGATrackSimBinDesc::parNames
virtual const std::string & parNames(unsigned i) const =0
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimLayerStudyTool::m_phiShift_road
TH1D * m_phiShift_road
Definition: FPGATrackSimLayerStudyTool.h:111
FPGATrackSimLayerStudyTool::m_hitsPerStepBin
std::vector< TH1D * > m_hitsPerStepBin
Definition: FPGATrackSimLayerStudyTool.h:117
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimLayerStudyTool::m_etaShift_road
TH1D * m_etaShift_road
Definition: FPGATrackSimLayerStudyTool.h:112
FPGATrackSimLayerStudyTool::m_hitsPerLayer2D
TH2D * m_hitsPerLayer2D
Definition: FPGATrackSimLayerStudyTool.h:119
FPGATrackSimLayerStudyTool::m_drScale
Gaudi::Property< double > m_drScale
Definition: FPGATrackSimLayerStudyTool.h:80
FPGATrackSimLayerStudyTool::makeAndRegHist
StatusCode makeAndRegHist(HistType *&ptr, HistDef... histargs)
Definition: FPGATrackSimLayerStudyTool.h:143
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
FPGATrackSimLayerStudyTool::m_etaScale
Gaudi::Property< double > m_etaScale
Definition: FPGATrackSimLayerStudyTool.h:79
FPGATrackSimBinTool::binDesc
const IFPGATrackSimBinDesc * binDesc() const
Definition: FPGATrackSimBinTool.h:57
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
SampleType::skipTruth
@ skipTruth
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
FPGATrackSimLayerStudyTool::m_truthpars_hists
TH1D * m_truthpars_hists[5]
Definition: FPGATrackSimLayerStudyTool.h:107
FPGATrackSimLayerStudyTool::m_inputHits
TH1D * m_inputHits
Definition: FPGATrackSimLayerStudyTool.h:109
FPGATrackSimLayerStudyTool::m_tree_phimod
std::vector< int > m_tree_phimod
Definition: FPGATrackSimLayerStudyTool.h:136
FPGATrackSimLayerStudyTool::m_tree_bin
std::vector< unsigned > m_tree_bin
Definition: FPGATrackSimLayerStudyTool.h:128
FPGATrackSimLayerStudyTool::m_tree_dettype
std::vector< int > m_tree_dettype
Definition: FPGATrackSimLayerStudyTool.h:137
FPGATrackSimBinnedHits::getBinTool
const FPGATrackSimBinTool & getBinTool() const
Definition: FPGATrackSimBinnedHits.h:64
FPGATrackSimBinTool::parRange
double parRange(unsigned par) const
Definition: FPGATrackSimBinTool.h:73
FPGATrackSimLayerStudyTool::m_phiShift2D_road
TH2D * m_phiShift2D_road
Definition: FPGATrackSimLayerStudyTool.h:113
FPGATrackSimLayerStudyTool::m_tree_hash
std::vector< int > m_tree_hash
Definition: FPGATrackSimLayerStudyTool.h:132
FPGATrackSimLayerStudyTool::bookTree
StatusCode bookTree()
Definition: FPGATrackSimLayerStudyTool.cxx:87
a
TList * a
Definition: liststreamerinfos.cxx:10
h
FPGATrackSimLayerStudyTool::m_tree_side
std::vector< int > m_tree_side
Definition: FPGATrackSimLayerStudyTool.h:134
FPGATrackSimLayerStudyTool::m_dir
Gaudi::Property< std::string > m_dir
Definition: FPGATrackSimLayerStudyTool.h:77
FPGATrackSimTrackPars::NPARS
@ NPARS
Definition: FPGATrackSimTrackPars.h:49
IFPGATrackSimBinDesc
Definition: IFPGATrackSimBinDesc.h:50
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
FPGATrackSimLayerStudyTool::m_tree_layer
std::vector< int > m_tree_layer
Definition: FPGATrackSimLayerStudyTool.h:133
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
FPGATrackSimLayerStudyTool::m_tree_z
std::vector< float > m_tree_z
Definition: FPGATrackSimLayerStudyTool.h:130
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
FPGATrackSimLayerStudyTool::makeAndRegHistVector
StatusCode makeAndRegHistVector(std::vector< HistType * > &vec, unsigned len, const std::vector< std::string > *namevec, const char *namebase, HistDef... histargs)
Definition: FPGATrackSimLayerStudyTool.h:152
FPGATrackSimBinnedHits::getNLayers
unsigned getNLayers() const
Definition: FPGATrackSimBinnedHits.h:98
FPGATrackSimLayerStudyTool::m_tree_detzone
std::vector< int > m_tree_detzone
Definition: FPGATrackSimLayerStudyTool.h:138
FPGATrackSimBinTool::stepNames
const std::vector< std::string > & stepNames() const
Definition: FPGATrackSimBinTool.h:61
FPGATrackSimLayerStudyTool::m_tree_id
std::vector< int > m_tree_id
Definition: FPGATrackSimLayerStudyTool.h:131
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
FPGATrackSimLayerStudyTool::m_binPlotsActive
bool m_binPlotsActive
Definition: FPGATrackSimLayerStudyTool.h:99
FPGATrackSimLayerStudyTool::m_hitsPerLayer
TH1D * m_hitsPerLayer
Definition: FPGATrackSimLayerStudyTool.h:118