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)
 
virtual ~AlignTrackCreator ()
 
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 > &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
 logfile output stream More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

ToolHandle< IAlignModuleToolm_alignModuleTool
 
ToolHandle< IAlignResidualCalculatorm_residualCalculator
 
const AtlasDetectorIDm_idHelper
 
MeasurementTypeIDm_measTypeIdHelper
 
std::vector< std::pair< int, int > > m_goodEventList
 
std::string m_eventListName
 

good events read in from ASCII file

More...
 
bool m_writeEventList
 

name of event list ASCII file

More...
 
bool m_requireOverlap
 

write selected events to event list ASCII file

More...
 
bool m_removeATSOSNotInAlignModule
 

keep only tracks that pass through 2 or more AlignModules

More...
 
bool m_includeScatterers
 

remove AlignTSOS not in AlignModules

More...
 
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 35 of file AlignTrackCreator.cxx.

39  , m_residualCalculator("Trk::AlignResidualCalculator/ResidualCalculator")
40  , m_idHelper{}
42  {
43  declareInterface<IAlignTrackCreator>(this);
44 
45  declareProperty("ResidualCalculator", m_residualCalculator);
46  declareProperty("AlignModuleTool", m_alignModuleTool);
47 
48  declareProperty("EventList", m_eventListName = "goodEvents.txt");
49  declareProperty("WriteEventList", m_writeEventList = false );
50  declareProperty("RequireOverlap", m_requireOverlap = false);
51  declareProperty("RemoveATSOSNotInAlignModule", m_removeATSOSNotInAlignModule=true);
52  declareProperty("IncludeScatterers", m_includeScatterers = true );
53 
54  m_logStream = nullptr;
55  }

◆ ~AlignTrackCreator()

AlignTrackCreator::~AlignTrackCreator ( )
virtual

Definition at line 58 of file AlignTrackCreator.cxx.

59  {
60  ATH_MSG_DEBUG("in AlignTrackCreator d'tor");
61  }

Member Function Documentation

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

◆ 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 92 of file AlignTrackCreator.cxx.

93  {
94  ATH_MSG_DEBUG("finalize() in AlignTrackCreator");
95 
96  // write run/evt to ASCII file
97  if (m_writeEventList) {
98  std::ofstream output(m_eventListName.c_str());
99  for (std::vector<std::pair<int,int> >::iterator it=
100  m_goodEventList.begin(); it!=m_goodEventList.end(); ++it) {
101  int run=(*it).first;
102  int evt=(*it).second;
103  output << run << " " << evt << std::endl;
104  }
105 
106  // if no events, output dummy run and event number so file isn't empty
107  if (m_goodEventList.empty()) output<<"0 0"<<std::endl;
108  output.close();
109  }
110 
111  delete m_measTypeIdHelper;
112 
113  return StatusCode::SUCCESS;
114  }

◆ initialize()

StatusCode AlignTrackCreator::initialize ( )

Definition at line 64 of file AlignTrackCreator.cxx.

65  {
66  // Set up ATLAS ID helper
67  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
68  ATH_MSG_ERROR ("Could not get AtlasDetectorID helper" );
69  return StatusCode::FAILURE;
70  }
71  m_measTypeIdHelper=new MeasurementTypeID(m_idHelper);
72 
73  if (m_residualCalculator.retrieve().isFailure()) {
74  msg(MSG::FATAL) << "Could not get " << m_residualCalculator << endmsg;
75  return StatusCode::FAILURE;
76  }
77  ATH_MSG_INFO("Retrieved " << m_residualCalculator);
78 
79  // get AlignModuleTool
80  if (m_alignModuleTool.retrieve().isFailure()) {
81  msg(MSG::FATAL) << "Could not get " << m_alignModuleTool << endmsg;
82  return StatusCode::FAILURE;
83  }
84  ATH_MSG_INFO("Retrieved " << m_alignModuleTool);
85 
86  ATH_MSG_INFO("initialize() successful in " << name());
87 
88  return StatusCode::SUCCESS;
89  }

◆ 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 117 of file AlignTrackCreator.cxx.

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

◆ 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

ToolHandle<IAlignModuleTool> Trk::AlignTrackCreator::m_alignModuleTool
private

Definition at line 51 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

std::string Trk::AlignTrackCreator::m_eventListName
private

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
private

Definition at line 54 of file AlignTrackCreator.h.

◆ m_includeScatterers

bool Trk::AlignTrackCreator::m_includeScatterers
private

remove AlignTSOS not in AlignModules

Definition at line 63 of file AlignTrackCreator.h.

◆ m_logStream

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

logfile output stream

Definition at line 57 of file IAlignTrackCreator.h.

◆ m_measTypeIdHelper

MeasurementTypeID* Trk::AlignTrackCreator::m_measTypeIdHelper
private

Definition at line 55 of file AlignTrackCreator.h.

◆ m_removeATSOSNotInAlignModule

bool Trk::AlignTrackCreator::m_removeATSOSNotInAlignModule
private

keep only tracks that pass through 2 or more AlignModules

Definition at line 62 of file AlignTrackCreator.h.

◆ m_requireOverlap

bool Trk::AlignTrackCreator::m_requireOverlap
private

write selected events to event list ASCII file

Definition at line 61 of file AlignTrackCreator.h.

◆ m_residualCalculator

ToolHandle<IAlignResidualCalculator> Trk::AlignTrackCreator::m_residualCalculator
private

Definition at line 52 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

bool Trk::AlignTrackCreator::m_writeEventList
private

name of event list ASCII file

Definition at line 60 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
Trk::IAlignTrackCreator::m_doPixel
bool m_doPixel
Definition: IAlignTrackCreator.h:52
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
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.
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::AlignTrackCreator::m_eventListName
std::string m_eventListName
good events read in from ASCII file
Definition: AlignTrackCreator.h:59
Trk::AlignTrackCreator::m_requireOverlap
bool m_requireOverlap
write selected events to event list ASCII file
Definition: AlignTrackCreator.h:61
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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_alignModuleTool
ToolHandle< IAlignModuleTool > m_alignModuleTool
Definition: AlignTrackCreator.h:51
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
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:27
AlignModule
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
python.PyAthena.module
module
Definition: PyAthena.py:131
Trk::AlignTrackCreator::m_includeScatterers
bool m_includeScatterers
remove AlignTSOS not in AlignModules
Definition: AlignTrackCreator.h:63
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
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
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 ...
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
Trk::IAlignTrackCreator::m_doSCT
bool m_doSCT
Definition: IAlignTrackCreator.h:53
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
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:581
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
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
merge.output
output
Definition: merge.py:17
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:52
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
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
Trk::AlignTrackCreator::m_writeEventList
bool m_writeEventList
name of event list ASCII file
Definition: AlignTrackCreator.h:60
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::AlignTrackCreator::m_removeATSOSNotInAlignModule
bool m_removeATSOSNotInAlignModule
keep only tracks that pass through 2 or more AlignModules
Definition: AlignTrackCreator.h:62
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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