ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EMExtrapolationTools Class Referencefinal

#include <EMExtrapolationTools.h>

Inheritance diagram for EMExtrapolationTools:
Collaboration diagram for EMExtrapolationTools:

Public Types

enum  TrkExtrapDef { fromLastMeasurement, fromPerigee, fromPerigeeRescaled, fromCaloToPerigee }
 Enum for track extrapolation to calo. More...
 

Public Member Functions

 EMExtrapolationTools (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor with parameters. More...
 
virtual ~EMExtrapolationTools ()=default
 Destructor. More...
 
virtual StatusCode initialize () override final
 initialize method More...
 
virtual std::pair< std::vector< CaloSampling::CaloSample >, std::vector< std::unique_ptr< Trk::Surface > > > getClusterLayerSurfaces (const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDD) const override final
 
virtual StatusCode getMatchAtCalo (const EventContext &ctx, const xAOD::CaloCluster &cluster, const xAOD::TrackParticle &trkPB, const std::vector< CaloSampling::CaloSample > &samples, const std::vector< std::unique_ptr< Trk::Surface >> &surfaces, std::array< double, 4 > &eta, std::array< double, 4 > &phi, std::array< double, 4 > &deltaEta, std::array< double, 4 > &deltaPhi, unsigned int extrapFrom=fromPerigee) const override final
 get eta, phi, deltaEta, and deltaPhi at the four calorimeter layers given the Trk::ParametersBase. More...
 
virtual bool matchesAtCalo (const xAOD::CaloCluster *cluster, const xAOD::Vertex *vertex, float etaAtCalo, float phiAtCalo) const override final
 test for vertex-to-cluster match given also the positions at the calorimeter from the vertex extrapolation
More...
 
virtual bool getEtaPhiAtCalo (const EventContext &ctx, const xAOD::Vertex *vertex, float *etaAtCalo, float *phiAtCalo) const override final
 get eta, phi at EM2 given a vertex which is converted to NeutralParameters. More...
 
virtual bool getEtaPhiAtCalo (const EventContext &ctx, const Trk::TrackParameters *trkPar, float *etaAtCalo, float *phiAtCalo) const override final
 get eta, phi at EM2 given NeutralParameters. More...
 
Amg::Vector3D getMomentumAtVertex (const EventContext &ctx, const xAOD::Vertex &, unsigned int) const override final
 get the momentum of the i-th trackParticle assiciated to the vertex at vertex (designed for conversions) More...
 
Amg::Vector3D getMomentumAtVertex (const EventContext &ctx, const xAOD::Vertex &, bool reuse=true) const override final
 get sum of the momenta at the vertex (designed for conversions). 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 ()
 AlgTool interface methods. 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

int getTRTsection (const xAOD::TrackParticle *trkPB) const
 Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap) More...
 
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< Trk::IParticleCaloExtensionToolm_ParticleCaloExtensionTool
 
ToolHandle< Trk::IExtrapolatorm_extrapolator
 
Gaudi::Property< double > m_narrowDeltaPhi { this, "NarrowDeltaPhi", 0.05 }
 
Gaudi::Property< double > m_narrowDeltaPhiTRTbarrel
 
Gaudi::Property< double > m_narrowDeltaPhiTRTendcap
 
Gaudi::Property< double > m_narrowDeltaEta { this, "NarrowDeltaEta", 0.05 }
 
Gaudi::Property< double > m_TRTbarrelDeltaEta
 
Gaudi::Property< double > m_TRTendcapDeltaEta { this, "TRTendcapDeltaEta", 0.2 }
 
const TRT_IDm_trtId
 
Gaudi::Property< bool > m_enableTRT { this, "EnableTRT", true }
 
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

Tools for track extrapolation to the calorimeter

Author
Thomas Koffas, Christos Anastopoulos

Definition at line 44 of file EMExtrapolationTools.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TrkExtrapDef

Enum for track extrapolation to calo.

Enumerator
fromLastMeasurement 

from the last measurement of TrackParticle

fromPerigee 

from the perigee of TrackParticle

fromPerigeeRescaled 

from the perigee of TrackParticle recaled by Ecluster

fromCaloToPerigee 

from the calo to the perigee - fast extrapolation

Definition at line 32 of file IEMExtrapolationTools.h.

Constructor & Destructor Documentation

◆ EMExtrapolationTools()

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

Constructor with parameters.

Definition at line 61 of file EMExtrapolationTools.cxx.

65  , m_trtId(nullptr)
66 {
67  declareInterface<IEMExtrapolationTools>(this);
68 }

◆ ~EMExtrapolationTools()

virtual EMExtrapolationTools::~EMExtrapolationTools ( )
virtualdefault

Destructor.

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

◆ getClusterLayerSurfaces()

std::pair< std::vector< CaloSampling::CaloSample >, std::vector< std::unique_ptr< Trk::Surface > > > EMExtrapolationTools::getClusterLayerSurfaces ( const xAOD::CaloCluster cluster,
const CaloDetDescrManager caloDD 
) const
finaloverridevirtual

Implements IEMExtrapolationTools.

Definition at line 96 of file EMExtrapolationTools.cxx.

99 {
100  // figure which layer we need
101  // based on the where most of the energy of the cluster
102  // is we might want to do EM barrel, EM endCap
103  // or forward calo layers/samplings
104  constexpr std::array<CaloSampling::CaloSample, 4> barrelLayers = {
109  };
110  constexpr std::array<CaloSampling::CaloSample, 4> endcapLayers = {
115  };
116  constexpr std::array<CaloSampling::CaloSample, 4> endcapLayersAboveEta2p5 = {
119  };
120  constexpr std::array<CaloSampling::CaloSample, 1> forwardLayers = {
122  };
123 
124  std::vector<CaloSampling::CaloSample> clusterLayers;
125  clusterLayers.reserve(4);
126 
127  if (cluster.inBarrel() && (!cluster.inEndcap() ||
128  cluster.eSample(CaloSampling::EMB2) >=
129  cluster.eSample(CaloSampling::EME2))) {
130  getClusterLayers(barrelLayers, clusterLayers, cluster);
131  }
132  else if (cluster.eSample(CaloSampling::EME2) >
133  cluster.eSample(CaloSampling::FCAL0)) {
134  if(std::abs(cluster.eta()) < 2.5){
135  getClusterLayers(endcapLayers, clusterLayers, cluster);
136  }
137  else {
138  getClusterLayers(endcapLayersAboveEta2p5, clusterLayers, cluster);
139  }
140  }
141  else {
142  getClusterLayers(forwardLayers, clusterLayers, cluster);
143  }
144 
145  std::vector<std::unique_ptr<Trk::Surface>> caloSurfaces =
146  m_ParticleCaloExtensionTool->caloSurfacesFromLayers(
147  clusterLayers, cluster.eta(), caloDD);
148 
149  return { std::move(clusterLayers), std::move(caloSurfaces) };
150 }

◆ getEtaPhiAtCalo() [1/2]

bool EMExtrapolationTools::getEtaPhiAtCalo ( const EventContext &  ctx,
const Trk::TrackParameters trkPar,
float *  etaAtCalo,
float *  phiAtCalo 
) const
finaloverridevirtual

get eta, phi at EM2 given NeutralParameters.

Return false if the extrapolation fails

Implements IEMExtrapolationTools.

Definition at line 357 of file EMExtrapolationTools.cxx.

361 {
362  if (!trkPar)
363  return false;
365  if (fabs(trkPar->eta()) < 1.425) {
366  // Barrel
367  layersToSelect.insert(CaloSampling::EMB2);
368  } else {
369  // Endcap
370  layersToSelect.insert(CaloSampling::EME2);
371  }
372 
373  std::unique_ptr<Trk::CaloExtension> extension = nullptr;
374  extension = m_ParticleCaloExtensionTool->caloExtension(
375  ctx, *trkPar, Trk::alongMomentum, Trk::muon);
376  if (!extension) {
377  ATH_MSG_WARNING("Could not create an extension from getEtaPhiAtCalo ");
378  return false;
379  }
382  *extension, intersections, &layersToSelect);
383  bool hitEM2(false);
384  for (const auto& p : intersections) {
385  int i(0);
386  auto sample = std::get<0>(p);
388  *etaAtCalo = std::get<1>(p);
389  *phiAtCalo = std::get<2>(p);
390  hitEM2 = true;
391  ++i;
392  ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi : "
393  << i << " " << std::get<1>(p) << " " << std::get<2>(p));
394  }
395  }
396  return hitEM2;
397 }

◆ getEtaPhiAtCalo() [2/2]

bool EMExtrapolationTools::getEtaPhiAtCalo ( const EventContext &  ctx,
const xAOD::Vertex vertex,
float *  etaAtCalo,
float *  phiAtCalo 
) const
finaloverridevirtual

get eta, phi at EM2 given a vertex which is converted to NeutralParameters.

Return false if the extrapolation fails

Implements IEMExtrapolationTools.

Definition at line 332 of file EMExtrapolationTools.cxx.

336 {
337  if (!vertex) {
338  return false;
339  }
341  if (momentum.mag() < 1e-5) {
342  ATH_MSG_DEBUG("Intersection failed");
343  return false;
344  }
345  /*
346  * Create high pt track parameters to mimic a neutral particle.
347  * This in principle is an approximation
348  */
349  Trk::PerigeeSurface surface(vertex->position());
350  Trk::Perigee trkPar(
351  vertex->position(), momentum.unit() * 1.e10, +1, surface, std::nullopt);
352  bool success = getEtaPhiAtCalo(ctx, &trkPar, etaAtCalo, phiAtCalo);
353  return success;
354 }

◆ getMatchAtCalo()

StatusCode EMExtrapolationTools::getMatchAtCalo ( const EventContext &  ctx,
const xAOD::CaloCluster cluster,
const xAOD::TrackParticle trkPB,
const std::vector< CaloSampling::CaloSample > &  samples,
const std::vector< std::unique_ptr< Trk::Surface >> &  surfaces,
std::array< double, 4 > &  eta,
std::array< double, 4 > &  phi,
std::array< double, 4 > &  deltaEta,
std::array< double, 4 > &  deltaPhi,
unsigned int  extrapFrom = fromPerigee 
) const
finaloverridevirtual

get eta, phi, deltaEta, and deltaPhi at the four calorimeter layers given the Trk::ParametersBase.


Implements IEMExtrapolationTools.

Definition at line 157 of file EMExtrapolationTools.cxx.

168 {
169  /* Extrapolate track to calo and return
170  * the extrapolated eta/phi and
171  * the deta/dphi between cluster and track
172  * We allow different ways to extrapolate:
173  * 1) from the last measurement track parameters (this is always the case for
174  * TRT standalone)
175  * 2) from the perigee track parameters
176  * 3) from the perigee
177  * with the track momentum rescaled by the cluster energy
178  */
179  if (cluster.e() < 10 && trkPB.pt() < 10) { // This is 10 MeV
180  ATH_MSG_WARNING("Too small cluster E :"
181  << cluster.e() << " , or too small track pt" << trkPB.pt());
182  return StatusCode::FAILURE;
183  }
184 
185  bool didExtension = false;
187  intersections.reserve(samples.size());
188 
189  switch (extrapFrom) {
190  case fromPerigeeRescaled: {
191  Trk::Perigee trkPar = getRescaledPerigee(trkPB, cluster);
192  const auto extension = m_ParticleCaloExtensionTool->surfaceCaloExtension(
193  ctx, trkPar, samples, surfaces, Trk::nonInteracting);
194  didExtension = !extension.empty();
195  for (const auto& i : extension) {
196  intersections.emplace_back(
197  i.first, i.second->position().eta(), i.second->position().phi());
198  }
199  } break;
200 
201  case fromPerigee: {
202  const auto extension = m_ParticleCaloExtensionTool->surfaceCaloExtension(
203  ctx, trkPB.perigeeParameters(), samples, surfaces, Trk::nonInteracting);
204  didExtension = !extension.empty();
205  for (const auto& i : extension) {
206  intersections.emplace_back(
207  i.first, i.second->position().eta(), i.second->position().phi());
208  }
209  } break;
210 
211  case fromLastMeasurement: {
212  unsigned int index(0);
214  const Trk::CurvilinearParameters& lastParams =
216  const Amg::Vector3D& position = lastParams.position();
217  // Calo entry around z EME1 3750 and r EMB1 1550
218  if (position.perp() > 1550. || std::abs(position.z()) > 3750.) {
219  ATH_MSG_WARNING("Probematic last parameters : " << lastParams);
220  didExtension = false;
221  } else {
222  const auto extension =
223  m_ParticleCaloExtensionTool->surfaceCaloExtension(
224  ctx, lastParams, samples, surfaces, Trk::nonInteracting);
225  didExtension = !extension.empty();
226  for (const auto& i : extension) {
227  intersections.emplace_back(
228  i.first, i.second->position().eta(), i.second->position().phi());
229  }
230  }
231  }
232  } break;
233 
234  default: {
235  ATH_MSG_ERROR("Invalid ExtrapolateFrom " << extrapFrom);
236  }
237  }
238  /*
239  * Given the extension calculate the deta/dphi for the layers
240  */
241  if (!didExtension) {
242  ATH_MSG_DEBUG("Could not create an extension from "
243  << extrapFrom << " for a track with : "
244  << " Track Pt " << trkPB.pt() << " Track Eta " << trkPB.eta()
245  << " Track Phi " << trkPB.phi() << " Track Fitter "
246  << trkPB.trackFitter());
247  return StatusCode::FAILURE;
248  }
249  // Negative tracks bend to the positive direction.
250  // flip sign for positive ones
251  const bool flipSign = trkPB.charge() > 0;
252 
253  for (const auto& p : intersections) {
254  int i(0);
255  CaloSampling::CaloSample sample = std::get<0>(p);
258  i = 0;
259  } else if (sample == CaloSampling::EME1 || sample == CaloSampling::EMB1) {
260  i = 1;
262  i = 2;
263  } else if (sample == CaloSampling::EME3 || sample == CaloSampling::EMB3) {
264  i = 3;
265  } else {
266  continue;
267  }
268  eta[i] = std::get<1>(p);
269  phi[i] = std::get<2>(p);
270  deltaEta[i] = cluster.etaSample(sample) - std::get<1>(p);
271  deltaPhi[i] =
272  P4Helpers::deltaPhi(cluster.phiSample(sample), std::get<2>(p));
273  // Should we flip the sign for deltaPhi?
274  if (flipSign) {
275  deltaPhi[i] = -deltaPhi[i];
276  }
277  ATH_MSG_DEBUG("getMatchAtCalo: i, eta, phi, deta, dphi: "
278  << i << " " << eta[i] << " " << phi[i] << " " << deltaEta[i]
279  << " " << deltaPhi[i]);
280  }
281  return StatusCode::SUCCESS;
282 }

◆ getMomentumAtVertex() [1/2]

Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex ( const EventContext &  ctx,
const xAOD::Vertex vertex,
bool  reuse = true 
) const
finaloverridevirtual

get sum of the momenta at the vertex (designed for conversions).

Retrieve from auxdata if available and <reuse> is true

Implements IEMExtrapolationTools.

Definition at line 454 of file EMExtrapolationTools.cxx.

457 {
458  Amg::Vector3D momentum(0., 0., 0.);
459  const static SG::AuxElement::Accessor<float> accPx("px");
460  const static SG::AuxElement::Accessor<float> accPy("py");
461  const static SG::AuxElement::Accessor<float> accPz("pz");
462  if (vertex.nTrackParticles() == 0) {
463  ATH_MSG_WARNING("getMomentumAtVertex : vertex has no track particles!");
464  return momentum;
465  }
466  if (reuse && accPx.isAvailable(vertex) && accPy.isAvailable(vertex) &&
467  accPz.isAvailable(vertex)) {
468  // Already decorated with parameters at vertex
469  ATH_MSG_DEBUG("getMomentumAtVertex : getting from auxdata");
470  return { accPx(vertex), accPy(vertex), accPz(vertex) };
471  }
472  for (unsigned int i = 0; i < vertex.nTrackParticles(); ++i) {
474  }
475 
476  return momentum;
477 }

◆ getMomentumAtVertex() [2/2]

Amg::Vector3D EMExtrapolationTools::getMomentumAtVertex ( const EventContext &  ctx,
const xAOD::Vertex vertex,
unsigned int  index 
) const
finaloverridevirtual

get the momentum of the i-th trackParticle assiciated to the vertex at vertex (designed for conversions)

Implements IEMExtrapolationTools.

Definition at line 401 of file EMExtrapolationTools.cxx.

404 {
405  Amg::Vector3D momentum(0., 0., 0.);
406  if (vertex.nTrackParticles() <= index) {
407  ATH_MSG_WARNING("Invalid track index");
408  } else if (vertex.vxTrackAtVertexAvailable() &&
409  !vertex.vxTrackAtVertex().empty()) {
410  // Use the parameters at the vertex
411  // (the tracks should be parallel but we will do the sum anyway)
412  ATH_MSG_DEBUG("getMomentumAtVertex : getting from vxTrackAtVertex");
413  const auto& trkAtVertex = vertex.vxTrackAtVertex()[index];
414  const Trk::TrackParameters* paramAtVertex = trkAtVertex.perigeeAtVertex();
415  if (!paramAtVertex) {
416  ATH_MSG_WARNING("VxTrackAtVertex does not have perigee at vertex");
417  } else {
418  return paramAtVertex->momentum();
419  }
420  } else if (vertex.nTrackParticles() == 1) {
421  // Use the first measurement
423  "getMomentumAtVertex : 1 track only, getting from first measurement");
424  const xAOD::TrackParticle* tp = vertex.trackParticle(0);
425  unsigned int paramindex(0);
426  if (!tp ||
427  !tp->indexOfParameterAtPosition(paramindex, xAOD::FirstMeasurement)) {
428  ATH_MSG_WARNING("No TrackParticle or no have first measurement");
429  } else {
430  momentum += tp->curvilinearParameters(paramindex).momentum();
431  }
432  } else {
433  // Extrapolate track particle to vertex
434  ATH_MSG_DEBUG("getMomentumAtVertex : extrapolating to perigee surface");
435  const xAOD::TrackParticle* tp = vertex.trackParticle(index);
436  if (!tp) {
437  ATH_MSG_WARNING("NULL pointer to TrackParticle in vertex");
438  } else {
439  Trk::PerigeeSurface surface(vertex.position());
440  std::unique_ptr<const Trk::TrackParameters> params =
441  m_extrapolator->extrapolate(ctx, tp->perigeeParameters(), surface,
443  if (!params) {
444  ATH_MSG_DEBUG("Extrapolation to vertex (perigee) failed");
445  } else {
446  momentum += params->momentum();
447  }
448  }
449  }
450  return momentum;
451 }

◆ getTRTsection()

int EMExtrapolationTools::getTRTsection ( const xAOD::TrackParticle trkPB) const
private

Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap)

Definition at line 482 of file EMExtrapolationTools.cxx.

483 {
484  if (!trkPB) {
485  ATH_MSG_DEBUG("Null pointer to TrackParticle");
486  return 0;
487  }
488  if (!m_trtId) {
490  "No trt ID guessing TRT section based on eta: " << trkPB->eta());
491  return (trkPB->eta() > 0 ? 1 : -1) * (fabs(trkPB->eta()) < 0.6 ? 1 : 2);
492  }
493  const Trk::MeasurementBase* trkPar = nullptr;
494  if (trkPB->trackLink().isValid() && trkPB->track() != nullptr) {
495  ATH_MSG_DEBUG("Will get TrackParameters from Trk::Track");
496  const Trk::TrackStates* trackStates =
497  trkPB->track()->trackStateOnSurfaces();
498  if (!trackStates) {
499  ATH_MSG_WARNING("NULL pointer to trackStateOnSurfaces");
500  return 0;
501  }
502  // Loop over the TrkStateOnSurfaces search last valid TSOS first
504  rItTSoS = trackStates->rbegin();
505  rItTSoS != trackStates->rend();
506  ++rItTSoS) {
507  if ((*rItTSoS)->type(Trk::TrackStateOnSurface::Measurement) &&
508  !((*rItTSoS)->type(Trk::TrackStateOnSurface::Outlier)) &&
509  (*rItTSoS)->measurementOnTrack() != nullptr &&
510  !((*rItTSoS)->measurementOnTrack()->type(
512  trkPar = (*rItTSoS)->measurementOnTrack();
513  break;
514  }
515  }
516  } else {
517  ATH_MSG_WARNING("Track particle without Trk::Track");
518  }
519  if (!trkPar) {
520  return 0;
521  }
522  const Trk::Surface& sf = trkPar->associatedSurface();
523  const Identifier tid = sf.associatedDetectorElementIdentifier();
524  return m_trtId->barrel_ec(tid);
525 }

◆ initialize()

StatusCode EMExtrapolationTools::initialize ( )
finaloverridevirtual

initialize method

Implements IEMExtrapolationTools.

Definition at line 71 of file EMExtrapolationTools.cxx.

72 {
73 
74  ATH_MSG_DEBUG("Initializing " << name() << "...");
75  // Retrieve tools
77  ATH_CHECK(m_extrapolator.retrieve());
78 
79  // retrieve TRT-ID helper
80  if (m_enableTRT && detStore()->contains<TRT_ID>("TRT_ID")) {
81  StatusCode sc = detStore()->retrieve(m_trtId, "TRT_ID");
82  if (sc.isFailure() || !m_trtId->is_valid()) {
83  // TRT is not present for sLHC
84  ATH_MSG_DEBUG("Could not get TRT_ID helper !");
85  m_trtId = nullptr;
86  }
87  ATH_MSG_DEBUG("m_trtId initialization successful");
88  } else {
89  ATH_MSG_DEBUG("Could not get TRT_ID helper !");
90  }
91  return StatusCode::SUCCESS;
92 }

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

AlgTool interface methods.

Definition at line 108 of file IEMExtrapolationTools.h.

109 {
110  return IID_IEMExtrapolationTools;
111 }

◆ matchesAtCalo()

bool EMExtrapolationTools::matchesAtCalo ( const xAOD::CaloCluster cluster,
const xAOD::Vertex vertex,
float  etaAtCalo,
float  phiAtCalo 
) const
finaloverridevirtual

test for vertex-to-cluster match given also the positions at the calorimeter from the vertex extrapolation

Implements IEMExtrapolationTools.

Definition at line 290 of file EMExtrapolationTools.cxx.

294 {
295  if (!cluster || !vertex) {
296  return false;
297  }
298  float deltaEta = fabs(etaAtCalo - cluster->etaBE(2));
299  float deltaPhi = fabs(P4Helpers::deltaPhi(cluster->phi(), phiAtCalo));
300 
301  int TRTsection = 0;
303  TRTsection = getTRTsection(vertex->trackParticle(0));
304 
305  // First pass on TRT tracks, skip barrel tracks matching endcap clusters and
306  // vice-versa
307  if ((TRTsection == 2 && (cluster->eta() <= 0.6 || cluster->eta() >= 2.4)) ||
308  (TRTsection == -2 &&
309  (cluster->eta() >= -0.6 || cluster->eta() <= -2.4)) ||
310  (TRTsection == 1 && (cluster->eta() <= -0.1 || cluster->eta() >= 1.3)) ||
311  (TRTsection == -1 && (cluster->eta() >= 0.1 || cluster->eta() <= -1.3))) {
312  return false;
313  }
314 
315  // The maximum deltaEta/deltaPhi for Si, TRT barrel, TRT endcap
316  static const std::vector<double> dEtaV{ m_narrowDeltaEta,
319  static const std::vector<double> dPhiV{ m_narrowDeltaPhi,
322 
323  return (deltaEta < dEtaV[abs(TRTsection)] &&
324  deltaPhi < dPhiV[abs(TRTsection)]);
325 }

◆ 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_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_enableTRT

Gaudi::Property<bool> EMExtrapolationTools::m_enableTRT { this, "EnableTRT", true }
private

Definition at line 145 of file EMExtrapolationTools.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_extrapolator

ToolHandle<Trk::IExtrapolator> EMExtrapolationTools::m_extrapolator
private
Initial value:
{
this,
"Extrapolator",
"Trk::Extrapolator/AtlasExtrapolator"
}

Definition at line 123 of file EMExtrapolationTools.h.

◆ m_narrowDeltaEta

Gaudi::Property<double> EMExtrapolationTools::m_narrowDeltaEta { this, "NarrowDeltaEta", 0.05 }
private

Definition at line 137 of file EMExtrapolationTools.h.

◆ m_narrowDeltaPhi

Gaudi::Property<double> EMExtrapolationTools::m_narrowDeltaPhi { this, "NarrowDeltaPhi", 0.05 }
private

Definition at line 130 of file EMExtrapolationTools.h.

◆ m_narrowDeltaPhiTRTbarrel

Gaudi::Property<double> EMExtrapolationTools::m_narrowDeltaPhiTRTbarrel
private
Initial value:
{ this,
"NarrowDeltaPhiTRTbarrel",
0.02 }

Definition at line 131 of file EMExtrapolationTools.h.

◆ m_narrowDeltaPhiTRTendcap

Gaudi::Property<double> EMExtrapolationTools::m_narrowDeltaPhiTRTendcap
private
Initial value:
{ this,
"NarrowDeltaPhiTRTendcap",
0.02 }

Definition at line 134 of file EMExtrapolationTools.h.

◆ m_ParticleCaloExtensionTool

ToolHandle<Trk::IParticleCaloExtensionTool> EMExtrapolationTools::m_ParticleCaloExtensionTool
private
Initial value:
{
this,
"CaloExtensionTool",
"Trk::ParticleCaloExtensionTool/EMParticleCaloExtensionTool"
}

Definition at line 117 of file EMExtrapolationTools.h.

◆ m_TRTbarrelDeltaEta

Gaudi::Property<double> EMExtrapolationTools::m_TRTbarrelDeltaEta
private
Initial value:
{ this,
"TRTbarrelDeltaEta",
0.35 }

Definition at line 138 of file EMExtrapolationTools.h.

◆ m_TRTendcapDeltaEta

Gaudi::Property<double> EMExtrapolationTools::m_TRTendcapDeltaEta { this, "TRTendcapDeltaEta", 0.2 }
private

Definition at line 141 of file EMExtrapolationTools.h.

◆ m_trtId

const TRT_ID* EMExtrapolationTools::m_trtId
private

Definition at line 144 of file EMExtrapolationTools.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:
xAOD::TrackParticle_v1::curvilinearParameters
const Trk::CurvilinearParameters curvilinearParameters(unsigned int index) const
Returns a curvilinear representation of the parameters at 'index'.
Definition: TrackParticle_v1.cxx:673
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
EMExtrapolationTools::m_narrowDeltaPhiTRTendcap
Gaudi::Property< double > m_narrowDeltaPhiTRTendcap
Definition: EMExtrapolationTools.h:134
IEMExtrapolationTools::fromCaloToPerigee
@ fromCaloToPerigee
from the calo to the perigee - fast extrapolation
Definition: IEMExtrapolationTools.h:41
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
CaloExtensionHelpers::midPointEtaPhiPerLayerVector
void midPointEtaPhiPerLayerVector(const Trk::CaloExtension &extension, EtaPhiPerLayerVector &result, const LayersToSelect *selection=nullptr)
Definition: CaloExtensionHelpers.h:273
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
EMExtrapolationTools::m_ParticleCaloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_ParticleCaloExtensionTool
Definition: EMExtrapolationTools.h:117
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
DataVector::rend
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
EMExtrapolationTools::m_TRTendcapDeltaEta
Gaudi::Property< double > m_TRTendcapDeltaEta
Definition: EMExtrapolationTools.h:141
EMExtrapolationTools::getTRTsection
int getTRTsection(const xAOD::TrackParticle *trkPB) const
Return +/- 1 (2) if track is in positive/negative TRT barrel (endcap)
Definition: EMExtrapolationTools.cxx:482
EMExtrapolationTools::m_narrowDeltaPhiTRTbarrel
Gaudi::Property< double > m_narrowDeltaPhiTRTbarrel
Definition: EMExtrapolationTools.h:131
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
ParticleTest.tp
tp
Definition: ParticleTest.py:25
TRT_ID::is_valid
bool is_valid() const
Definition: TRT_ID.h:391
EMExtrapolationTools::m_TRTbarrelDeltaEta
Gaudi::Property< double > m_TRTbarrelDeltaEta
Definition: EMExtrapolationTools.h:138
EMExtrapolationTools::m_narrowDeltaPhi
Gaudi::Property< double > m_narrowDeltaPhi
Definition: EMExtrapolationTools.h:130
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
IEMExtrapolationTools::fromPerigee
@ fromPerigee
from the perigee of TrackParticle
Definition: IEMExtrapolationTools.h:37
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::LastMeasurement
@ LastMeasurement
Parameter defined at the position of the last measurement.
Definition: TrackingPrimitives.h:215
EMExtrapolationTools::m_trtId
const TRT_ID * m_trtId
Definition: EMExtrapolationTools.h:144
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::TrackParticle_v1::indexOfParameterAtPosition
bool indexOfParameterAtPosition(unsigned int &index, ParameterPosition position) const
Function to determine if this TrackParticle contains track parameters at a certain position,...
Definition: TrackParticle_v1.cxx:653
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
xAOD::CaloCluster_v1::etaSample
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:532
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
xAOD::TrackParticle_v1::perigeeParameters
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
Definition: TrackParticle_v1.cxx:485
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:29
xAOD::CaloCluster_v1::inEndcap
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
Definition: CaloCluster_v1.h:901
xAOD::EgammaHelpers::numberOfSiTracks
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
Definition: PhotonxAODHelpers.cxx:57
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:53
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
xAOD::TrackParticle_v1::trackFitter
TrackFitter trackFitter() const
Returns the fitter.
Definition: TrackParticle_v1.cxx:698
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
xAOD::FirstMeasurement
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
Definition: TrackingPrimitives.h:213
EMExtrapolationTools::m_narrowDeltaEta
Gaudi::Property< double > m_narrowDeltaEta
Definition: EMExtrapolationTools.h:137
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
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
xAOD::CaloCluster_v1::inBarrel
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
Definition: CaloCluster_v1.h:896
test_pyathena.parent
parent
Definition: test_pyathena.py:15
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IEMExtrapolationTools::fromPerigeeRescaled
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
Definition: IEMExtrapolationTools.h:39
CaloExtensionHelpers::EtaPhiPerLayerVector
std::vector< std::tuple< CaloSampling::CaloSample, double, double > > EtaPhiPerLayerVector
Definition: CaloExtensionHelpers.h:25
xAOD::CaloCluster_v1::phiSample
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:547
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
DataVector< const Trk::TrackStateOnSurface >
DataVector::rbegin
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
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
EMExtrapolationTools::m_enableTRT
Gaudi::Property< bool > m_enableTRT
Definition: EMExtrapolationTools.h:145
Trk::MeasurementBase
Definition: MeasurementBase.h:58
EMExtrapolationTools::getMomentumAtVertex
Amg::Vector3D getMomentumAtVertex(const EventContext &ctx, const xAOD::Vertex &, unsigned int) const override final
get the momentum of the i-th trackParticle assiciated to the vertex at vertex (designed for conversio...
Definition: EMExtrapolationTools.cxx:401
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
DataVector< const Trk::TrackStateOnSurface >::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
Definition: DataVector.h:846
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
Trk::nonInteracting
@ nonInteracting
Definition: ParticleHypothesis.h:25
xAOD::TrackParticle_v1::trackLink
const ElementLink< TrackCollection > & trackLink() const
Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:779
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DeMoScan.index
string index
Definition: DeMoScan.py:362
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
h
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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
Trk::MeasurementBaseType::PseudoMeasurementOnTrack
@ PseudoMeasurementOnTrack
Definition: MeasurementBase.h:51
Trk::ParametersBase::eta
double eta() const
Access method for pseudorapidity - from momentum.
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
EMExtrapolationTools::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: EMExtrapolationTools.h:123
xAOD::TrackParticle_v1::track
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:805
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
EMExtrapolationTools::getEtaPhiAtCalo
virtual bool getEtaPhiAtCalo(const EventContext &ctx, const xAOD::Vertex *vertex, float *etaAtCalo, float *phiAtCalo) const override final
get eta, phi at EM2 given a vertex which is converted to NeutralParameters.
Definition: EMExtrapolationTools.cxx:332
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
IEMExtrapolationTools::fromLastMeasurement
@ fromLastMeasurement
from the last measurement of TrackParticle
Definition: IEMExtrapolationTools.h:35
CaloExtensionHelpers::LayersToSelect
std::set< CaloSampling::CaloSample > LayersToSelect
Definition: CaloExtensionHelpers.h:27
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528