ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Trk::AlignTrackCreator Class Reference

#include <AlignTrackCreator.h>

Inheritance diagram for Trk::AlignTrackCreator:
Collaboration diagram for Trk::AlignTrackCreator:

Public Member Functions

 AlignTrackCreator (const std::string &type, const std::string &name, const IInterface *parent)
 
StatusCode initialize ()
 
StatusCode finalize ()
 
bool processAlignTrack (AlignTrack *track)
 creates AlignTrack containing all TSOS on track More...
 
void setDoPixel (bool doPixel)
 Sets flags to indicate whether hits from particular detector elements are to be stored on the AlignTrack. More...
 
void setDoSCT (bool doSCT)
 
void setDoTRT (bool doTRT)
 
void setDoMDT (bool doMDT)
 
virtual void setLogStream (std::ostream *os)
 sets the output stream for the logfile 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 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, V, H > &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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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...
 

Protected Attributes

bool m_doPixel
 
bool m_doSCT
 
bool m_doTRT
 
bool m_doMDT
 
std::ostream * m_logStream = nullptr
 logfile output stream More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

PublicToolHandle< IAlignModuleToolm_alignModuleTool {this, "AlignModuleTool", "InDet::InDetAlignModuleTool/InDetAlignModuleTool"}
 
ToolHandle< IAlignResidualCalculatorm_residualCalculator
 
const AtlasDetectorIDm_idHelper = nullptr
 
MeasurementTypeIDm_measTypeIdHelper = nullptr
 
std::vector< std::pair< int, int > > m_goodEventList
 
StringProperty m_eventListName
 

good events read in from ASCII file

More...
 
BooleanProperty m_writeEventList
 
BooleanProperty m_requireOverlap
 
BooleanProperty m_removeATSOSNotInAlignModule
 
BooleanProperty m_includeScatterers
 
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 35 of file AlignTrackCreator.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

◆ AlignTrackCreator()

AlignTrackCreator::AlignTrackCreator ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 32 of file AlignTrackCreator.cxx.

36  {
37  declareInterface<IAlignTrackCreator>(this);
38  }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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; }

◆ 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

◆ finalize()

StatusCode AlignTrackCreator::finalize ( )

Definition at line 69 of file AlignTrackCreator.cxx.

70  {
71  ATH_MSG_DEBUG("finalize() in AlignTrackCreator");
72 
73  // write run/evt to ASCII file
74  if (m_writeEventList) {
75  std::ofstream output(m_eventListName.value().c_str());
76  for (std::vector<std::pair<int,int> >::iterator it=
77  m_goodEventList.begin(); it!=m_goodEventList.end(); ++it) {
78  int run=(*it).first;
79  int evt=(*it).second;
80  output << run << " " << evt << std::endl;
81  }
82 
83  // if no events, output dummy run and event number so file isn't empty
84  if (m_goodEventList.empty()) output<<"0 0"<<std::endl;
85  output.close();
86  }
87 
88  delete m_measTypeIdHelper;
89 
90  return StatusCode::SUCCESS;
91  }

◆ initialize()

StatusCode AlignTrackCreator::initialize ( )

Definition at line 41 of file AlignTrackCreator.cxx.

42  {
43  // Set up ATLAS ID helper
44  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
45  ATH_MSG_ERROR ("Could not get AtlasDetectorID helper" );
46  return StatusCode::FAILURE;
47  }
48  m_measTypeIdHelper=new MeasurementTypeID(m_idHelper);
49 
50  if (m_residualCalculator.retrieve().isFailure()) {
51  ATH_MSG_FATAL("Could not get " << m_residualCalculator);
52  return StatusCode::FAILURE;
53  }
54  ATH_MSG_INFO("Retrieved " << m_residualCalculator);
55 
56  // get AlignModuleTool
57  if (m_alignModuleTool.retrieve().isFailure()) {
58  ATH_MSG_FATAL("Could not get " << m_alignModuleTool);
59  return StatusCode::FAILURE;
60  }
61  ATH_MSG_INFO("Retrieved " << m_alignModuleTool);
62 
63  ATH_MSG_INFO("initialize() successful in " << name());
64 
65  return StatusCode::SUCCESS;
66  }

◆ 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.

◆ interfaceID()

const InterfaceID & IAlignTrackCreator::interfaceID ( )
inlinestaticinherited

Definition at line 62 of file IAlignTrackCreator.h.

63  { return IID_TRK_IAlignTrackCreator; }

◆ 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.

◆ processAlignTrack()

bool AlignTrackCreator::processAlignTrack ( AlignTrack track)
virtual

creates AlignTrack containing all TSOS on track

Implements Trk::IAlignTrackCreator.

Definition at line 94 of file AlignTrackCreator.cxx.

95  {
96  DataVector<AlignTSOS>* alignTSOSCollection=new DataVector<AlignTSOS>;
97 
98  bool goodtrack = false;
99  int ntsos(0);
100  double chi2(0.);
101 
102  AlignModule * lastModule(nullptr);
103  bool overlapTrack(false);
104 
105  ATH_MSG_DEBUG("nDoF: "<<at->fitQuality()->numberDoF()<<", tsos size: "<<at->trackStateOnSurfaces()->size());
106 
107  for (const TrackStateOnSurface* tsos : *at->trackStateOnSurfaces()) {
108 
109  AlignTSOS * atsos(nullptr);
110  AlignModule * module(nullptr);
111 
112  if (tsos->type(TrackStateOnSurface::Outlier) ||
113  tsos->type(TrackStateOnSurface::Perigee) ||
114  tsos->type(TrackStateOnSurface::Hole))
115  continue;
116  else if (tsos->type(TrackStateOnSurface::Measurement)) {
117 
118  ATH_MSG_DEBUG("checking ntsos: "<<ntsos);
119 
120  const MeasurementBase * mesb = tsos->measurementOnTrack();
121  const TrackParameters * tparp = tsos->trackParameters();
122  const RIO_OnTrack * rio = dynamic_cast<const RIO_OnTrack *>(mesb);
123  const CompetingRIOsOnTrack * crio = dynamic_cast<const CompetingRIOsOnTrack *>(mesb);
124 
125  if (!rio && crio) rio=&crio->rioOnTrack(0);
126 
127  if (rio && tparp) {
128  //get detector type
129  AlignModule::DetectorType detType = m_alignModuleTool->getDetectorType(rio->detectorElement());
130  ATH_MSG_DEBUG("detType: "<<detType);
131 
132  // see if track is good track
133  if (detType!=AlignModule::NDetectorTypes) {
134  ATH_MSG_DEBUG("calling findAlignModule");
135  module=m_alignModuleTool->findAlignModule(rio,detType);
136  }
137  if (module) {
138  ATH_MSG_DEBUG("found module");
139  goodtrack=true;
140  if (lastModule && module!=lastModule) {
141  overlapTrack=true;
142  ATH_MSG_DEBUG("have overlap track");
143  }
144  else
145  lastModule=module;
146  }
147  ATH_MSG_DEBUG("module not found");
148 
149  // see what kind of TSOS
151 
152  // create AlignTSOS using CompetingRIOsOnTrack or RIO_OnTrack
153  if (crio)
154  atsos = new AlignTSOS(*tsos,module,crio,measType);
155  else
156  atsos = new AlignTSOS(*tsos,module,rio,measType);
157 
158  if (module)
159  ATH_MSG_DEBUG("module id "<<module->identify());
160  else
161  ATH_MSG_VERBOSE("no module");
162 
163  atsos->setValid(true);
164  }
165  }
166 
167  // scatterer with no associated measurement
168  else if (tsos->type(TrackStateOnSurface::Scatterer) && m_includeScatterers) {
169  atsos=new AlignTSOS(*tsos,TrackState::unidentified);
170  atsos->setValid(true);
171  }
172 
173  if (!atsos) {
174  continue;
175  }
176 
178  delete atsos;
179  continue;
180  }
181 
182  // set detector specific properties (if needed)
183  m_alignModuleTool->setMeasurementProperties(atsos);
184 
185  alignTSOSCollection->push_back(atsos);
186  }
187 
188  ATH_MSG_DEBUG("goodtrack="<<goodtrack<<", alignTSOSCollection size: "<<alignTSOSCollection->size());
189 
190  if (goodtrack && (!m_requireOverlap||overlapTrack)) {
191 
192  // store run/evt number in vector
193  if (m_writeEventList) {
194  const xAOD::EventInfo * eventInfo;
195  StatusCode sc=evtStore()->retrieve(eventInfo);
196  if (sc.isFailure())
197  ATH_MSG_ERROR("Couldn't retrieve event info");
198 
199  int run=eventInfo->runNumber();
200  int evt=eventInfo->eventNumber();
201  m_goodEventList.emplace_back(run,evt);
202  }
203 
204  // set residuals on ATSOS and get local chi2
205  ATH_MSG_DEBUG("calling setResiduals");
206  chi2=m_residualCalculator->setResiduals(alignTSOSCollection);
207  ATH_MSG_DEBUG("done with setResiduals");
208 
209  // check that chi2 from fitter matches local chi2
210  if (std::fabs(chi2-at->fitQuality()->chiSquared())>.01) {
211  ATH_MSG_DEBUG("local chi2: "<<chi2<<", from fit: "<<at->fitQuality()->chiSquared());
212  }
213 
214  ATH_MSG_DEBUG("setting alignTrack");
215  at->setAlignTSOSCollection(alignTSOSCollection);
216  at->setChi2(chi2);
217 
218  if (msgLvl(MSG::DEBUG)) at->dump(msg());
219 
220  return true;
221  }
222 
223  ATH_MSG_DEBUG("failed to make AlignTrack");
224  delete alignTSOSCollection;
225  return false;
226  }

◆ 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  }

◆ setDoMDT()

void Trk::IAlignTrackCreator::setDoMDT ( bool  doMDT)
inlineinherited

Definition at line 45 of file IAlignTrackCreator.h.

45 { m_doMDT = doMDT; }

◆ setDoPixel()

void Trk::IAlignTrackCreator::setDoPixel ( bool  doPixel)
inlineinherited

Sets flags to indicate whether hits from particular detector elements are to be stored on the AlignTrack.

(Not used at the moment.)

Definition at line 42 of file IAlignTrackCreator.h.

42 { m_doPixel = doPixel; }

◆ setDoSCT()

void Trk::IAlignTrackCreator::setDoSCT ( bool  doSCT)
inlineinherited

Definition at line 43 of file IAlignTrackCreator.h.

43 { m_doSCT = doSCT; }

◆ setDoTRT()

void Trk::IAlignTrackCreator::setDoTRT ( bool  doTRT)
inlineinherited

Definition at line 44 of file IAlignTrackCreator.h.

44 { m_doTRT = doTRT; }

◆ setLogStream()

virtual void Trk::IAlignTrackCreator::setLogStream ( std::ostream *  os)
inlinevirtualinherited

sets the output stream for the logfile

Definition at line 48 of file IAlignTrackCreator.h.

48 { m_logStream = os; }

◆ 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_alignModuleTool

PublicToolHandle<IAlignModuleTool> Trk::AlignTrackCreator::m_alignModuleTool {this, "AlignModuleTool", "InDet::InDetAlignModuleTool/InDetAlignModuleTool"}
private

Definition at line 50 of file AlignTrackCreator.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_doMDT

bool Trk::IAlignTrackCreator::m_doMDT
protectedinherited

Definition at line 55 of file IAlignTrackCreator.h.

◆ m_doPixel

bool Trk::IAlignTrackCreator::m_doPixel
protectedinherited

Definition at line 52 of file IAlignTrackCreator.h.

◆ m_doSCT

bool Trk::IAlignTrackCreator::m_doSCT
protectedinherited

Definition at line 53 of file IAlignTrackCreator.h.

◆ m_doTRT

bool Trk::IAlignTrackCreator::m_doTRT
protectedinherited

Definition at line 54 of file IAlignTrackCreator.h.

◆ m_eventListName

StringProperty Trk::AlignTrackCreator::m_eventListName
private
Initial value:
{this, "EventList", "goodEvents.txt",
"name of event list ASCII file"}

good events read in from ASCII file

Definition at line 59 of file AlignTrackCreator.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_goodEventList

std::vector< std::pair<int,int> > Trk::AlignTrackCreator::m_goodEventList
private

Definition at line 57 of file AlignTrackCreator.h.

◆ m_idHelper

const AtlasDetectorID* Trk::AlignTrackCreator::m_idHelper = nullptr
private

Definition at line 54 of file AlignTrackCreator.h.

◆ m_includeScatterers

BooleanProperty Trk::AlignTrackCreator::m_includeScatterers
private
Initial value:
{this, "IncludeScatterers", true,
"includes scatterers on track"}

Definition at line 68 of file AlignTrackCreator.h.

◆ m_logStream

std::ostream* Trk::IAlignTrackCreator::m_logStream = nullptr
protectedinherited

logfile output stream

Definition at line 57 of file IAlignTrackCreator.h.

◆ m_measTypeIdHelper

MeasurementTypeID* Trk::AlignTrackCreator::m_measTypeIdHelper = nullptr
private

Definition at line 55 of file AlignTrackCreator.h.

◆ m_removeATSOSNotInAlignModule

BooleanProperty Trk::AlignTrackCreator::m_removeATSOSNotInAlignModule
private
Initial value:
{
this, "RemoveATSOSNotInAlignModule", true,
"remove AlignTSOS not in AlignModules"}

Definition at line 65 of file AlignTrackCreator.h.

◆ m_requireOverlap

BooleanProperty Trk::AlignTrackCreator::m_requireOverlap
private
Initial value:
{this, "RequireOverlap", false,
"keep only tracks that pass through 2 or more AlignModules"}

Definition at line 63 of file AlignTrackCreator.h.

◆ m_residualCalculator

ToolHandle<IAlignResidualCalculator> Trk::AlignTrackCreator::m_residualCalculator
private
Initial value:
{
this, "ResidualCalculator", "Trk::AlignResidualCalculator/ResidualCalculator"}

Definition at line 51 of file AlignTrackCreator.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.

◆ m_writeEventList

BooleanProperty Trk::AlignTrackCreator::m_writeEventList
private
Initial value:
{this, "WriteEventList", false,
"write selected events to event list ASCII file"}

Definition at line 61 of file AlignTrackCreator.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::TrackStateOnSurface::Perigee
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Definition: TrackStateOnSurface.h:117
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::IAlignTrackCreator::m_doPixel
bool m_doPixel
Definition: IAlignTrackCreator.h:52
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::IAlignTrackCreator::m_doTRT
bool m_doTRT
Definition: IAlignTrackCreator.h:54
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
skel.it
it
Definition: skel.GENtoEVGEN.py:407
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
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::AlignTrackCreator::m_writeEventList
BooleanProperty m_writeEventList
Definition: AlignTrackCreator.h:61
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::IAlignTrackCreator::IAlignTrackCreator
IAlignTrackCreator()
Definition: IAlignTrackCreator.h:61
Trk::AlignModule::NDetectorTypes
@ NDetectorTypes
Definition: AlignModule.h:57
Trk::TrackState::unidentified
@ unidentified
Definition: TrackStateDefs.h:27
Trk::IAlignTrackCreator::m_logStream
std::ostream * m_logStream
logfile output stream
Definition: IAlignTrackCreator.h:57
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
Trk::IAlignTrackCreator::m_doMDT
bool m_doMDT
Definition: IAlignTrackCreator.h:55
Trk::AlignTrackCreator::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: AlignTrackCreator.h:54
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AlignModule
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
python.PyAthena.module
module
Definition: PyAthena.py:131
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
Trk::AlignTrackCreator::m_includeScatterers
BooleanProperty m_includeScatterers
Definition: AlignTrackCreator.h:68
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
Trk::MeasurementBaseType::CompetingRIOsOnTrack
@ CompetingRIOsOnTrack
Definition: MeasurementBase.h:50
AlignTSOS
AlignTSOS is a TSOS with extra variables useful for alignment. It is created using an implementation ...
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
Trk::IAlignTrackCreator::m_doSCT
bool m_doSCT
Definition: IAlignTrackCreator.h:53
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:525
Trk::TrackState::MeasurementType
MeasurementType
enum describing the flavour of MeasurementBase
Definition: TrackStateDefs.h:26
test_pyathena.parent
parent
Definition: test_pyathena.py:15
run
Definition: run.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Trk::AlignTrackCreator::m_alignModuleTool
PublicToolHandle< IAlignModuleTool > m_alignModuleTool
Definition: AlignTrackCreator.h:50
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
merge.output
output
Definition: merge.py:16
Trk::AlignTrackCreator::m_goodEventList
std::vector< std::pair< int, int > > m_goodEventList
Definition: AlignTrackCreator.h:57
Trk::AlignTrackCreator::m_residualCalculator
ToolHandle< IAlignResidualCalculator > m_residualCalculator
Definition: AlignTrackCreator.h:51
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::AlignModule::DetectorType
DetectorType
Definition: AlignModule.h:57
Trk::TrackParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:27
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Trk::AlignTrackCreator::m_measTypeIdHelper
MeasurementTypeID * m_measTypeIdHelper
Definition: AlignTrackCreator.h:55
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
a
TList * a
Definition: liststreamerinfos.cxx:10
h
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::TrackStateOnSurface::Scatterer
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
Definition: TrackStateOnSurface.h:113
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
Trk::AlignTrackCreator::m_removeATSOSNotInAlignModule
BooleanProperty m_removeATSOSNotInAlignModule
Definition: AlignTrackCreator.h:65
Trk::AlignTrackCreator::m_requireOverlap
BooleanProperty m_requireOverlap
Definition: AlignTrackCreator.h:63
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::AlignTrackCreator::m_eventListName
StringProperty m_eventListName
good events read in from ASCII file
Definition: AlignTrackCreator.h:59
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
fitman.k
k
Definition: fitman.py:528
Trk::MeasurementTypeID::defineType
Trk::TrackState::MeasurementType defineType(const MeasurementBase *) const
createPerigee method - returned by object
Definition: MeasurementTypeID.cxx:20