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::PixelToTPIDTool Class Reference

#include <PixelToTPIDTool.h>

Inheritance diagram for InDet::PixelToTPIDTool:
Collaboration diagram for InDet::PixelToTPIDTool:

Public Member Functions

 PixelToTPIDTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~PixelToTPIDTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual float dEdx (const EventContext &ctx, const Trk::Track &track, int &nUsedHits, int &nUsedIBLOverflowHits) const override final
 particle identification function returning a probability. More...
 
virtual std::vector< float > getLikelihoods (const EventContext &ctx, double dedx, double p, int nGoodPixels) const override final
 
virtual float getMass (const EventContext &ctx, double dedx, double p, int nGoodPixels) const override final
 
float dEdx (const Trk::Track &track, int &nUsedHits, int &nUsedIBLOverflowHits) const
 
std::vector< float > getLikelihoods (double dedx, double p, int nGoodPixels) const
 
float getMass (double dedx, double p, int nGoodPixels) const
 
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...
 

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

ServiceHandle< IIBLParameterSvcm_IBLParameterSvc
 
const PixelIDm_pixelid
 
double m_conversionfactor
 
SG::ReadCondHandleKey< PixelChargeCalibCondDatam_moduleDataKey {this, "PixelChargeCalibCondData", "PixelChargeCalibCondData", "ChargeCalibration data, for ToT overflow setting"}
 
SG::ReadCondHandleKey< PixeldEdxDatam_dedxKey {this, "PixeldEdxData", "PixeldEdxData", "Output key of pixel dEdx"}
 
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 34 of file PixelToTPIDTool.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

◆ PixelToTPIDTool()

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

Definition at line 35 of file PixelToTPIDTool.cxx.

36  :AthAlgTool(t,n,p),
37  m_IBLParameterSvc("IBLParameterSvc",n),
38  m_pixelid(nullptr)
39 {
40  declareInterface<IPixelToTPIDTool>(this);
41 
42  float energyPair = 3.68e-6; // Energy in MeV to create an electron-hole pair in silicon
43  float sidensity = 2.329; // silicon density in g cm^-3
44 
45  //conversion Factor
46  //{.025,.023,.020}; //{Old Planars,IBL_3Ds,IBL_Planars} the sensors thickness will be take into account in dEdx calculation
47 
48  m_conversionfactor=energyPair/sidensity;
49 
50 }

◆ ~PixelToTPIDTool()

InDet::PixelToTPIDTool::~PixelToTPIDTool ( )
virtualdefault

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  }

◆ dEdx() [1/2]

float InDet::PixelToTPIDTool::dEdx ( const EventContext &  ctx,
const Trk::Track track,
int &  nUsedHits,
int &  nUsedIBLOverflowHits 
) const
finaloverridevirtual

particle identification function returning a probability.

Parameters
[in]trackthe track to be identified
Returns
probability

Implements Trk::IPixelToTPIDTool.

Definition at line 84 of file PixelToTPIDTool.cxx.

88 {
89 
90  unsigned int pixelhits = 0;
91  nUsedHits=0;
92  nUsedIBLOverflowHits=0;
93  float Pixel_sensorthickness=.025; //250 microns Pixel Planars
94  float IBL_3D_sensorthickness=.023; //230 microns IBL 3D
95  float IBL_PLANAR_sensorthickness=.020;// 200 microns IBL Planars
96  float dEdxValue=0;
97 
98  //std::multimap<float,int> chargesMap;
100  std::multimap<float,int> dEdxMap;
101 
102  // Check for track states:
103  const Trk::TrackStates* recoTrackStates = track.trackStateOnSurfaces();
104  if (recoTrackStates) {
105  Trk::TrackStates::const_iterator tsosIter = recoTrackStates->begin();
106  Trk::TrackStates::const_iterator tsosIterEnd = recoTrackStates->end();
107 
108  // Loop over track states on surfaces (i.e. generalized hits):
109  for (; tsosIter != tsosIterEnd; ++tsosIter) {
110  const Trk::MeasurementBase *measurement = (*tsosIter)->measurementOnTrack();
111  if (measurement && !(*tsosIter)->type(Trk::TrackStateOnSurface::Outlier)) {
112  if (!(*tsosIter)->trackParameters()) {
113  msg(MSG::WARNING) << "No track parameters available for a state of type measurement, returning -1" << endmsg;
114  msg(MSG::WARNING) << "Don't run this tool on slimmed tracks!" << endmsg;
115  return -1;
116  }
117 
118  const InDet::PixelClusterOnTrack* pixclus = nullptr;
119  if (measurement->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
120  const Trk::RIO_OnTrack* tmpRio = static_cast<const Trk::RIO_OnTrack*>(measurement);
122  pixclus = static_cast<const InDet::PixelClusterOnTrack*>(tmpRio);
123  }
124  }
125  if (pixclus) {
126  //bool isok=false;
127  double locx=pixclus->localParameters()[Trk::locX];
128  double locy=pixclus->localParameters()[Trk::locY];
129  int bec=m_pixelid->barrel_ec(pixclus->identify());
130  int layer=m_pixelid->layer_disk(pixclus->identify());
131  int eta_module=m_pixelid->eta_module(pixclus->identify());//check eta module to select thickness
132 
133  float dotProd = (*tsosIter)->trackParameters()->momentum().dot(
134  (*tsosIter)->trackParameters()->associatedSurface().normal());
135  float cosalpha =
136  fabs(dotProd / (*tsosIter)->trackParameters()->momentum().mag());
137 
138  if (std::abs(cosalpha)<0.16) { continue; }
139 
140  float charge=pixclus->prepRawData()->totalCharge()*cosalpha;
141 
142  //keep track if this is an ibl cluster with overflow
143  int iblOverflow=0;
144  if ((m_IBLParameterSvc->containsIBL()) and (bec==0) and (layer==0)) { // check if IBL
145 
146  //loop over ToT and check if anyone is overflow (ToT==14) check for IBL cluster overflow
147  int overflowIBLToT =
149  ->getFEI4OverflowToT();
150  const std::vector<int>& ToTs = pixclus->prepRawData()->totList();
151 
152  for (int pixToT : ToTs) {
153  if (pixToT >= overflowIBLToT) {
154  //overflow pixel hit -- flag cluster
155  iblOverflow = 1;
156  break; //no need to check other hits of this cluster
157  }
158  }// end
159 
160  // this is IBL layer -- @todo: check using proper service (safe
161  // against geometries)
162  if (((eta_module >= -10 && eta_module <= -7) ||
163  (eta_module >= 6 && eta_module <= 9)) &&
164  (fabs(locy) < 10. &&
165  (locx > -8.33 &&
166  locx < 8.3))) { // check if IBL 3D and good cluster selection
167  dEdxValue = charge * m_conversionfactor / IBL_3D_sensorthickness;
168  dEdxMap.insert(std::pair<float, int>(dEdxValue, iblOverflow));
169  pixelhits++;
170  if (iblOverflow == 1) {
171  nUsedIBLOverflowHits++;
172  }
173  } else if ((eta_module >= -6 && eta_module <= 5) &&
174  (fabs(locy) < 20. &&
175  (locx > -8.33 &&
176  locx < 8.3))) { // check if IBL planar and good cluster
177  // selection
178  dEdxValue =
179  charge * m_conversionfactor / IBL_PLANAR_sensorthickness;
180  dEdxMap.insert(std::pair<float, int>(dEdxValue, iblOverflow));
181  pixelhits++;
182  if (iblOverflow == 1) {
183  nUsedIBLOverflowHits++;
184  }
185  } else {
186  dEdxValue=-1;
187  } // end check which IBL Module
188 
189  }
190  //PIXEL layer and ENDCAP
191  else if(bec==0 && fabs(locy)<30. && ((locx>-8.20 && locx<-0.60) || (locx>0.50 && locx<8.10))) {
192  dEdxValue=charge*m_conversionfactor/Pixel_sensorthickness;
193  dEdxMap.insert(std::pair<float,int>(dEdxValue, iblOverflow));
194  pixelhits++;
195  }
196  else if (std::abs(bec)==2 && fabs(locy)<30. && ((locx>-8.15 && locx<-0.55) || (locx>0.55 && locx<8.15))) {
197  dEdxValue=charge*m_conversionfactor/Pixel_sensorthickness;
198  dEdxMap.insert(std::pair<float,int>(dEdxValue, iblOverflow));
199  pixelhits++;
200  }
201  } //pixclus iterator
202  }
203  }
204  }
205 
206  //Now calculate dEdx, multimap is already sorted in ascending order
207  float averagedEdx=0.;
208  nUsedHits=0;
209  int IBLOverflow=0;
210 
211  for (std::pair<float,int> itdEdx : dEdxMap) {
212  if (itdEdx.second==0) {
213  averagedEdx += itdEdx.first;
214  nUsedHits++;
215  }
216  if (itdEdx.second>0) { IBLOverflow++; }
217 
218  //break, skipping last or the two last elements depending on total measurements
219  if (((int)pixelhits>=5) and ((int)nUsedHits>=(int)pixelhits-2)) { break; }
220 
221  //break, IBL Overflow case pixelhits==3 and 4
222  if ((int)IBLOverflow>0 and ((int)pixelhits==3) and (int)nUsedHits==1) { break; }
223  if ((int)IBLOverflow>0 and ((int)pixelhits==4) and (int)nUsedHits==2) { break; }
224 
225  if (((int)pixelhits > 1) and ((int)nUsedHits >=(int)pixelhits-1)) { break; }
226 
227  if ((int)IBLOverflow>0 and (int)pixelhits==1) { //only IBL in overflow
228  averagedEdx=itdEdx.first;
229  break;
230  }
231  }
232 
233  if (nUsedHits>0 or (nUsedHits==0 and(int)IBLOverflow>0 and (int)pixelhits==1)) {
234  if (nUsedHits>0) { averagedEdx=averagedEdx/nUsedHits; }
235 
236  ATH_MSG_DEBUG("NEW dEdx = " << averagedEdx);
237  ATH_MSG_DEBUG("Used hits: " << nUsedHits << ", IBL overflows: " << IBLOverflow );
238  ATH_MSG_DEBUG("Original number of measurements = " << pixelhits << "( map size = " << dEdxMap.size() << ")");
239  return averagedEdx;
240  }
241  return -1;
242 }

◆ dEdx() [2/2]

float Trk::IPixelToTPIDTool::dEdx ( const Trk::Track track,
int &  nUsedHits,
int &  nUsedIBLOverflowHits 
) const
inherited

◆ 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::PixelToTPIDTool::finalize ( )
overridevirtual

Definition at line 74 of file PixelToTPIDTool.cxx.

75 {
77  return sc;
78 }

◆ getLikelihoods() [1/2]

std::vector< float > InDet::PixelToTPIDTool::getLikelihoods ( const EventContext &  ctx,
double  dedx,
double  p,
int  nGoodPixels 
) const
finaloverridevirtual

Implements Trk::IPixelToTPIDTool.

Definition at line 245 of file PixelToTPIDTool.cxx.

249 {
251  ->getLikelihoods(dedx2, p2, nGoodPixels);
252 }

◆ getLikelihoods() [2/2]

std::vector<float> Trk::IPixelToTPIDTool::getLikelihoods ( double  dedx,
double  p,
int  nGoodPixels 
) const
inherited

◆ getMass() [1/2]

float InDet::PixelToTPIDTool::getMass ( const EventContext &  ctx,
double  dedx,
double  p,
int  nGoodPixels 
) const
finaloverridevirtual

Implements Trk::IPixelToTPIDTool.

Definition at line 255 of file PixelToTPIDTool.cxx.

259 {
261  ->getMass(dedx, p / 1000, nGoodPixels);
262 }

◆ getMass() [2/2]

float Trk::IPixelToTPIDTool::getMass ( double  dedx,
double  p,
int  nGoodPixels 
) const
inherited

◆ initialize()

StatusCode InDet::PixelToTPIDTool::initialize ( )
overridevirtual

Definition at line 54 of file PixelToTPIDTool.cxx.

54  {
55 
57 
58  ATH_CHECK(detStore()->retrieve(m_pixelid,"PixelID"));
59 
60  if (m_IBLParameterSvc.retrieve().isFailure()) {
61  ATH_MSG_FATAL("Could not retrieve IBLParameterSvc");
62  return StatusCode::FAILURE;
63  }
64 
66 
68 
69  return StatusCode::SUCCESS;
70 }

◆ 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 & Trk::IPixelToTPIDTool::interfaceID ( )
inlinestaticinherited

Definition at line 60 of file IPixelToTPIDTool.h.

61  {
62  return IID_IPixelToTPIDTool;
63  }

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

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

double InDet::PixelToTPIDTool::m_conversionfactor
private

Definition at line 61 of file PixelToTPIDTool.h.

◆ m_dedxKey

SG::ReadCondHandleKey<PixeldEdxData> InDet::PixelToTPIDTool::m_dedxKey {this, "PixeldEdxData", "PixeldEdxData", "Output key of pixel dEdx"}
private

Definition at line 66 of file PixelToTPIDTool.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_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_IBLParameterSvc

ServiceHandle<IIBLParameterSvc> InDet::PixelToTPIDTool::m_IBLParameterSvc
private

Definition at line 59 of file PixelToTPIDTool.h.

◆ m_moduleDataKey

SG::ReadCondHandleKey<PixelChargeCalibCondData> InDet::PixelToTPIDTool::m_moduleDataKey {this, "PixelChargeCalibCondData", "PixelChargeCalibCondData", "ChargeCalibration data, for ToT overflow setting"}
private

Definition at line 63 of file PixelToTPIDTool.h.

◆ m_pixelid

const PixelID* InDet::PixelToTPIDTool::m_pixelid
private

Definition at line 60 of file PixelToTPIDTool.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
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
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
InDet::PixelToTPIDTool::m_pixelid
const PixelID * m_pixelid
Definition: PixelToTPIDTool.h:60
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
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
Trk::RIO_OnTrack::rioType
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
InDet::PixelToTPIDTool::m_IBLParameterSvc
ServiceHandle< IIBLParameterSvc > m_IBLParameterSvc
Definition: PixelToTPIDTool.h:59
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDet::PixelCluster::totList
const std::vector< int > & totList() const
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:201
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
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
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
beamspotman.n
n
Definition: beamspotman.py:731
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
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
InDet::PixelToTPIDTool::m_conversionfactor
double m_conversionfactor
Definition: PixelToTPIDTool.h:61
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::MeasurementBase::type
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector< const Trk::TrackStateOnSurface >
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
Trk::MeasurementBase
Definition: MeasurementBase.h:58
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
charge
double charge(const T &p)
Definition: AtlasPID.h:538
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
InDet::PixelClusterOnTrack::prepRawData
virtual const PixelCluster * prepRawData() const override final
returns the PrepRawData - is a SiCluster in this scope
Definition: PixelClusterOnTrack.h:179
a
TList * a
Definition: liststreamerinfos.cxx:10
h
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
InDet::PixelCluster::totalCharge
float totalCharge() const
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:213
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDet::PixelToTPIDTool::m_dedxKey
SG::ReadCondHandleKey< PixeldEdxData > m_dedxKey
Definition: PixelToTPIDTool.h:67
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
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::RIO_OnTrackType::PixelCluster
@ PixelCluster
Definition: RIO_OnTrack.h:57
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDet::PixelToTPIDTool::m_moduleDataKey
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_moduleDataKey
Definition: PixelToTPIDTool.h:64
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528