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

#include <TRT_DriftCircleToolCosmics.h>

Inheritance diagram for InDet::TRT_DriftCircleToolCosmics:
Collaboration diagram for InDet::TRT_DriftCircleToolCosmics:

Public Member Functions

 TRT_DriftCircleToolCosmics (const std::string &, const std::string &, const IInterface *)
 constructor More...
 
virtual ~TRT_DriftCircleToolCosmics ()
 constructor More...
 
virtual StatusCode initialize ()
 initialize needed services More...
 
virtual StatusCode finalize ()
 finalize More...
 
virtual InDet::TRT_DriftCircleCollectionconvert (int, const InDetRawDataCollection< TRT_RDORawData > *, const EventContext &ctx, DataPool< TRT_DriftCircle > *dataItemsPool, const bool CTBBadChannels) const
 make the conversion from RDOs to DriftCircles More...
 
virtual bool passValidityGate (unsigned int word, float lowGate, float highGate, float t0) const
 test validity gate for corrected drift times 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 ()
 Return method for the InterfaceID. More...
 

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

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

SG::ReadHandleKey< ComTimem_evtPhaseKey {this,"TRT_Phase","TRT_Phase","RHK to retrieve TRT Phase"}
 
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainerm_trtDetEleContKey {this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer for TRT"}
 
ToolHandle< ITRT_DriftFunctionToolm_driftFunctionTool
 DriftFunctionTool. More...
 
ToolHandle< ITRT_StrawStatusSummaryToolm_ConditionsSummary
 The ConditionsSummaryTool. More...
 
bool m_useConditionsStatus
 SHall the ConditionsSummaryTool be used? More...
 
const TRT_IDm_trtid
 TRT id helper handle. More...
 
float m_global_offset
 Global offset to TRT Phase to make TRT Calibration happy ... More...
 
bool m_useToTCorrection
 Shall the Time over Threshold correction be used? More...
 
bool m_useHTCorrection
 Shall the High Threshold correction be used? 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

Class for converting a RDO collection to a DriftCircle collection Performs trigger phase corrections for in-cavern cosmics

Definition at line 43 of file TRT_DriftCircleToolCosmics.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

◆ TRT_DriftCircleToolCosmics()

InDet::TRT_DriftCircleToolCosmics::TRT_DriftCircleToolCosmics ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

constructor

Definition at line 39 of file TRT_DriftCircleToolCosmics.cxx.

41  :
42  AthAlgTool(t,n,p),
43  m_driftFunctionTool("TRT_DriftFunctionTool"),
44  m_ConditionsSummary("TRT_StrawStatusSummaryTool",this),
45  m_useConditionsStatus(false),
46  m_trtid(nullptr),
47  m_global_offset(0),
48  m_useToTCorrection(false),
49  m_useHTCorrection(false)
50 
51 {
52  declareInterface<ITRT_DriftCircleTool>(this);
53  declareProperty("TRTDriftFunctionTool", m_driftFunctionTool);
54  declareProperty("ConditionsSummaryTool",m_ConditionsSummary);
55  declareProperty("UseConditionsStatus",m_useConditionsStatus);
56 
57  declareProperty("useDriftTimeToTCorrection",m_useToTCorrection);
58  declareProperty("useDriftTimeHTCorrection",m_useHTCorrection);
59  declareProperty("GlobalPhaseOffset",m_global_offset);
60 }

◆ ~TRT_DriftCircleToolCosmics()

InDet::TRT_DriftCircleToolCosmics::~TRT_DriftCircleToolCosmics ( )
virtualdefault

constructor

Member Function Documentation

◆ convert()

InDet::TRT_DriftCircleCollection * InDet::TRT_DriftCircleToolCosmics::convert ( int  Mode,
const InDetRawDataCollection< TRT_RDORawData > *  rdo,
const EventContext &  ctx,
DataPool< TRT_DriftCircle > *  dataItemsPool,
const bool  CTBBadChannels 
) const
virtual

make the conversion from RDOs to DriftCircles

Implements InDet::ITRT_DriftCircleTool.

Definition at line 144 of file TRT_DriftCircleToolCosmics.cxx.

149 {
150 
151  //Initialise a new TRT_DriftCircleCollection
152  InDet::TRT_DriftCircleCollection* rio = nullptr;
153 
154  if (!rdo) {
155  ATH_MSG_ERROR("empty collection at input");
156  return rio;
157  }
158 
159  SG::ReadHandle<ComTime> theComTime(m_evtPhaseKey, ctx);
160 
162  const InDetDD::TRT_DetElementCollection* elements(trtDetEleHandle->getElements());
163  if (not trtDetEleHandle.isValid() or elements==nullptr) {
164  ATH_MSG_FATAL(m_trtDetEleContKey.fullKey() << " is not available.");
165  return rio;
166  }
167 
168  float timecor=0.;
169  if (theComTime.isValid()) {
170  timecor = theComTime->getTime() + m_global_offset;
171  ATH_MSG_VERBOSE("Retrieved event phase with name "
172  << theComTime.key() <<" found! Time="<<timecor);
173  }else{
174  ATH_MSG_VERBOSE("Event phase not found with name "<<theComTime.key()<<"!!!");
175  timecor=m_global_offset; // cannot correct drifttime
176  }
177 
179  if(rb!=re) {
180 
181  //Get the BaseElement and the rio of the collection
182  IdentifierHash IHc = rdo ->identifyHash();
183  const InDetDD::TRT_BaseElement* pE = elements->getDetectorElement(IHc);
184  rio = new InDet::TRT_DriftCircleCollection(IHc);
185  rio->setIdentifier(rdo->identify());
186  rio->reserve( std::distance(rb, re) );
187 
188 
189  // Loop through all RDOs in the collection
190  //
191 
192  for(r=rb; r!=re; ++r) {
193 
194  Identifier id = (*r)->identify();
195  int LTbin = (*r)->driftTimeBin();
196  bool isOK =true;
197  double t0 =0.;
198  double rawTime = m_driftFunctionTool->rawTime(LTbin);
199  double radius =0.;
200  double driftTime =0.;
201  unsigned int word = (*r)->getWord();
202 
203  //
204  //Get straw status
205  int strawstat=1;
206 
208  if(m_ConditionsSummary->getStatus(id) != TRTCond::StrawStatus::Good) {
209  strawstat = 0;
210  }
211  if(!strawstat) continue;
212  }
213 
214  //correct for phase
215  rawTime-=timecor;
216 
217  // ToT and HT Corrections
218 
219  bool isArgonStraw=true;
220  if (m_useToTCorrection) rawTime -= m_driftFunctionTool->driftTimeToTCorrection((*r)->timeOverThreshold(), id, isArgonStraw);
221  if (m_useHTCorrection && (*r)->highLevel()) rawTime += m_driftFunctionTool->driftTimeHTCorrection(id, isArgonStraw);
222 
223  //make tube hit if first bin is high and no later LE appears
224  if( LTbin==0 || LTbin==24 ) {
225  isOK=false;
226  } else {
227  radius = m_driftFunctionTool->driftRadius(rawTime,id,t0,isOK);
228  driftTime = rawTime-t0;
229  }
230 
231  if(!isOK) word &= 0xF7FFFFFF;
232  else word |= 0x08000000;
233 
234 
235  //std::vector<Identifier> dvi // we dont need this ;
236  ATH_MSG_VERBOSE( " id " << m_trtid->layer_or_wheel(id)
237  << " " << m_trtid->straw_layer(id)
238  << " " << m_trtid->straw(id)
239  << " time bin " << LTbin
240  << " timecor " << timecor
241  << " corrected time " << rawTime );
242 
243  double error=0;
244  if(Mode<2) {
245  error = m_driftFunctionTool->errorOfDriftRadius(driftTime,id) ;
246  }
247 
248  ATH_MSG_VERBOSE(" hit OK " << isOK << " t0 " << t0
249  << " drifttime " << driftTime
250  << " radius " << radius << " error " << error);
251 
252  if( !isOK || (error==0.&&Mode<2) ) //Drifttime out of range. Make wirehit
253  {
254  ATH_MSG_VERBOSE(" Making wirehit.");
255  radius = 0.;
256  error = 4./sqrt(12.);
257  }
258 
259  auto errmat = Amg::MatrixX(1,1); ;
260  (errmat)(0,0) = error*error;
261 
262  Amg::Vector2D loc(radius,0.);
263 
264  // if(Mode<1) dvi.push_back(id); we dont need this
265 
267  new InDet::TRT_DriftCircle(id, loc, std::move(errmat), pE, word);
268 
269  if (tdc) {
270 
272  // setting the index (via -> size) has to be done just before the push_back! (for safety)
273  tdc->setHashAndIndex(rio->identifyHash(), rio->size());
274  rio->push_back(tdc);
275 
276  }else{
277  if(strawstat){
278  tdc->setHashAndIndex(rio->identifyHash(), rio->size());
279  rio->push_back(tdc);
280  } else {
281  ATH_MSG_VERBOSE(" Delete hit on bad channel ");
282  delete tdc;
283  }
284  }
285 
286  } else{
287  ATH_MSG_ERROR("Could not create InDet::TRT_DriftCircle object !");
288  }
289  }
290  }
291  return rio;
292 }

◆ 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 InDet::TRT_DriftCircleToolCosmics::finalize ( )
virtual

finalize

Definition at line 135 of file TRT_DriftCircleToolCosmics.cxx.

136 {
137  StatusCode sc = AthAlgTool::finalize(); return sc;
138 }

◆ initialize()

StatusCode InDet::TRT_DriftCircleToolCosmics::initialize ( )
virtual

initialize needed services

Definition at line 94 of file TRT_DriftCircleToolCosmics.cxx.

95 {
96 
98 
99  // Get DriftFunction tool
100  //
101  if ( m_driftFunctionTool.retrieve().isFailure() ) {
102  ATH_MSG_FATAL(m_driftFunctionTool.propertyName() << ": Failed to retrieve tool " << m_driftFunctionTool.type());
103  return StatusCode::FAILURE;
104  }
105  ATH_MSG_DEBUG(m_driftFunctionTool.propertyName() << ": Retrieved tool " << m_driftFunctionTool.type());
106 
107  // Get TRT ID helper
108  sc = detStore()->retrieve(m_trtid,"TRT_ID");
109  if ( sc.isFailure() ) {
110  ATH_MSG_FATAL( "Could not retrieve TRT ID helper." );
111  return sc;
112  }
113 
115  if ( m_ConditionsSummary.retrieve().isFailure() ) {
116  ATH_MSG_FATAL("Failed to retrieve "<< m_ConditionsSummary);
117  return StatusCode::FAILURE;
118  }
119  ATH_MSG_DEBUG( "Retrieved service " << m_ConditionsSummary);
120  }
121 
122  // Initialize Read handle key
124 
125  // Initialize readCondHandle key
127 
128  return sc;
129 }

◆ 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()

static const InterfaceID& InDet::ITRT_DriftCircleTool::interfaceID ( )
inlinestaticinherited

Return method for the InterfaceID.

Definition at line 44 of file ITRT_DriftCircleTool.h.

44 { return IID_ITRT_DriftCircleTool; };

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

◆ passValidityGate()

bool InDet::TRT_DriftCircleToolCosmics::passValidityGate ( unsigned int  word,
float  lowGate,
float  highGate,
float  t0 
) const
virtual

test validity gate for corrected drift times

Implements InDet::ITRT_DriftCircleTool.

Definition at line 71 of file TRT_DriftCircleToolCosmics.cxx.

72 {
73  bool foundInterval = false;
74  unsigned mask = 0x02000000;
75  int i = 0;
76  while ( !foundInterval && (i < 24) ) {
77  if (word & mask) {
78  float thisTime = ((0.5+i)*3.125)-t0;
79  if (thisTime >= lowGate && thisTime <= highGate) foundInterval = true;
80  }
81  mask >>= 1;
82  if (i == 7 || i == 15)
83  mask >>= 1;
84  i++;
85  }
86  return foundInterval;
87 }

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

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

ToolHandle<ITRT_StrawStatusSummaryTool> InDet::TRT_DriftCircleToolCosmics::m_ConditionsSummary
private

The ConditionsSummaryTool.

Definition at line 79 of file TRT_DriftCircleToolCosmics.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_driftFunctionTool

ToolHandle< ITRT_DriftFunctionTool > InDet::TRT_DriftCircleToolCosmics::m_driftFunctionTool
private

DriftFunctionTool.

Definition at line 78 of file TRT_DriftCircleToolCosmics.h.

◆ m_evtPhaseKey

SG::ReadHandleKey<ComTime> InDet::TRT_DriftCircleToolCosmics::m_evtPhaseKey {this,"TRT_Phase","TRT_Phase","RHK to retrieve TRT Phase"}
private

Definition at line 75 of file TRT_DriftCircleToolCosmics.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_global_offset

float InDet::TRT_DriftCircleToolCosmics::m_global_offset
private

Global offset to TRT Phase to make TRT Calibration happy ...

Definition at line 83 of file TRT_DriftCircleToolCosmics.h.

◆ m_trtDetEleContKey

SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> InDet::TRT_DriftCircleToolCosmics::m_trtDetEleContKey {this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer for TRT"}
private

Definition at line 76 of file TRT_DriftCircleToolCosmics.h.

◆ m_trtid

const TRT_ID* InDet::TRT_DriftCircleToolCosmics::m_trtid
private

TRT id helper handle.

Definition at line 82 of file TRT_DriftCircleToolCosmics.h.

◆ m_useConditionsStatus

bool InDet::TRT_DriftCircleToolCosmics::m_useConditionsStatus
private

SHall the ConditionsSummaryTool be used?

Definition at line 81 of file TRT_DriftCircleToolCosmics.h.

◆ m_useHTCorrection

bool InDet::TRT_DriftCircleToolCosmics::m_useHTCorrection
private

Shall the High Threshold correction be used?

Definition at line 85 of file TRT_DriftCircleToolCosmics.h.

◆ m_useToTCorrection

bool InDet::TRT_DriftCircleToolCosmics::m_useToTCorrection
private

Shall the Time over Threshold correction be used?

Definition at line 84 of file TRT_DriftCircleToolCosmics.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:
beamspotman.r
def r
Definition: beamspotman.py:676
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
WriteCellNoiseToCool.rb
rb
Definition: WriteCellNoiseToCool.py:229
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
InDet::TRT_DriftCircleToolCosmics::m_useConditionsStatus
bool m_useConditionsStatus
SHall the ConditionsSummaryTool be used?
Definition: TRT_DriftCircleToolCosmics.h:81
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
InDetRawDataCollection::identify
virtual Identifier identify() const override final
InDet::TRT_DriftCircleToolCosmics::m_trtid
const TRT_ID * m_trtid
TRT id helper handle.
Definition: TRT_DriftCircleToolCosmics.h:82
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDet::TRT_DriftCircle
Definition: TRT_DriftCircle.h:32
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
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
InDetRawDataCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
InDet::TRT_DriftCircleToolCosmics::m_evtPhaseKey
SG::ReadHandleKey< ComTime > m_evtPhaseKey
Definition: TRT_DriftCircleToolCosmics.h:75
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:902
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TRT::Hit::driftTime
@ driftTime
Definition: HitInfo.h:43
lumiFormat.i
int i
Definition: lumiFormat.py:92
Trk::PrepRawData::setHashAndIndex
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
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
InDet::TRT_DriftCircleToolCosmics::m_global_offset
float m_global_offset
Global offset to TRT Phase to make TRT Calibration happy ...
Definition: TRT_DriftCircleToolCosmics.h:83
InDet::TRT_DriftCircleToolCosmics::m_ConditionsSummary
ToolHandle< ITRT_StrawStatusSummaryTool > m_ConditionsSummary
The ConditionsSummaryTool.
Definition: TRT_DriftCircleToolCosmics.h:79
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:893
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TRTCond::StrawStatus::Good
@ Good
Definition: StrawStatus.h:18
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_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDet::TRT_DriftCircleCollection
Trk::PrepRawDataCollection< TRT_DriftCircle > TRT_DriftCircleCollection
Definition: TRT_DriftCircleCollection.h:26
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
DataVector< RawDataT >::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
a
TList * a
Definition: liststreamerinfos.cxx:10
InDet::TRT_DriftCircleToolCosmics::m_useHTCorrection
bool m_useHTCorrection
Shall the High Threshold correction be used?
Definition: TRT_DriftCircleToolCosmics.h:85
h
re
const boost::regex re(r_e)
InDet::TRT_DriftCircleToolCosmics::m_useToTCorrection
bool m_useToTCorrection
Shall the Time over Threshold correction be used?
Definition: TRT_DriftCircleToolCosmics.h:84
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
InDetDD::TRT_DetElementCollection
Class to hold collection of TRT detector elements.
Definition: TRT_DetElementCollection.h:28
InDet::TRT_DriftCircleToolCosmics::m_trtDetEleContKey
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
Definition: TRT_DriftCircleToolCosmics.h:76
IdentifierHash
Definition: IdentifierHash.h:38
InDet::TRT_DriftCircleToolCosmics::m_driftFunctionTool
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
DriftFunctionTool.
Definition: TRT_DriftCircleToolCosmics.h:78
get_generator_info.error
error
Definition: get_generator_info.py:40
error
Definition: IImpactPoint3dEstimator.h:70
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DataVector< RawDataT >::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57