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

#include <EMTrackMatchBuilder.h>

Inheritance diagram for EMTrackMatchBuilder:
Collaboration diagram for EMTrackMatchBuilder:

Classes

struct  TrackMatch
 A structure for keeping track match information. More...
 
class  TrackMatchSorter
 function object to sort track matches based on quality More...
 

Public Member Functions

 EMTrackMatchBuilder (const std::string &type, const std::string &name, const IInterface *parent)
 Default constructor. More...
 
virtual ~EMTrackMatchBuilder ()=default
 Destructor. More...
 
StatusCode initialize () override final
 Gaudi algorithm hooks. More...
 
virtual StatusCode executeRec (const EventContext &ctx, EgammaRecContainer *egammas) const override final
 execute method 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

StatusCode trackExecute (const EventContext &ctx, egammaRec *eg, const xAOD::TrackParticleContainer *trackPC, const CaloDetDescrManager &caloDD) const
 execute method More...
 
bool inBroadWindow (const EventContext &ctx, std::vector< TrackMatch > &trackMatches, const xAOD::CaloCluster &cluster, int trackNumber, const xAOD::TrackParticle &trkPB, const CaloDetDescrManager &caloDD) const
 Compute for tracks passing the loose matching the distance between track extrapolated to 2nd sampling and cluster. More...
 
bool isCandidateMatch (const xAOD::CaloCluster *cluster, const xAOD::TrackParticle *track, bool flip) const
 Loose track-cluster matching. 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

SG::ReadHandleKey< xAOD::TrackParticleContainerm_TrackParticlesKey
 name of TrackParticle container in TDS More...
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloDetDescrMgrKey
 
Gaudi::Property< double > m_broadDeltaEta
 broad cut on deltaEta More...
 
Gaudi::Property< double > m_broadDeltaPhi
 broad cut on deltaPhi More...
 
Gaudi::Property< double > m_narrowDeltaEta
 narrow cut on deltaEta More...
 
Gaudi::Property< double > m_narrowDeltaPhi
 narrow cut on deltaPhiRescale More...
 
Gaudi::Property< double > m_narrowDeltaPhiBrem
 narrow cut on deltaPhi for electrons More...
 
Gaudi::Property< double > m_narrowDeltaPhiRescale
 narrow cut on deltaPhiRescale More...
 
Gaudi::Property< double > m_narrowDeltaPhiRescaleBrem
 narrow cut on deltaPhiRescale for electrons More...
 
Gaudi::Property< double > m_MaxDeltaPhiRescale
 @Maximum deltaPhi (Res) allowed for a match More...
 
Gaudi::Property< bool > m_useCandidateMatch
 flag to turn on/off use of isCandidateMatch More...
 
Gaudi::Property< bool > m_useScoring
 Boolean to apply heuristic when tracks have close deltaR. More...
 
Gaudi::Property< bool > m_useRescaleMetric
 Boolean to use Rescale in the metric. More...
 
Gaudi::Property< bool > m_SecondPassRescale
 Boolean to do second pass with Rescale. More...
 
Gaudi::Property< float > m_deltaEtaResolution
 The resolutions: might be good to split in barrel/end-cap in the future. More...
 
Gaudi::Property< float > m_deltaPhiResolution
 
Gaudi::Property< float > m_deltaPhiRescaleResolution
 
Gaudi::Property< float > m_distanceForScore
 The distance from which one goes from using better deltaR to using score. More...
 
ToolHandle< IEMExtrapolationToolsm_extrapolationTool
 
Gaudi::Property< bool > m_isCosmics
 
double m_deltaEtaWeight {}
 
double m_deltaPhiWeight {}
 
double m_deltaPhiRescaleWeight {}
 
TrackMatchSorter m_sorter
 
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

EMTrackMatch data object builder.

Author
H. Ma
RD schaffer
Thomas Koffas
Christos Anastopoulos The matching of a track to a cluster is driven by the EMTrackMatchBuilder tool located in the Reconstruction/egamma/egammaTools package.

Definition at line 39 of file EMTrackMatchBuilder.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

◆ EMTrackMatchBuilder()

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

Default constructor.

Definition at line 29 of file EMTrackMatchBuilder.cxx.

33 {
34  // declare interface
35  declareInterface<IEMTrackMatchBuilder>(this);
36 }

◆ ~EMTrackMatchBuilder()

virtual EMTrackMatchBuilder::~EMTrackMatchBuilder ( )
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; }

◆ executeRec()

StatusCode EMTrackMatchBuilder::executeRec ( const EventContext &  ctx,
EgammaRecContainer egammas 
) const
finaloverridevirtual

execute method

Implements IEMTrackMatchBuilder.

Definition at line 56 of file EMTrackMatchBuilder.cxx.

58 {
59  // protection against bad pointers
60  if (egammas == nullptr) {
61  return StatusCode::SUCCESS;
62  }
63  // retrieve the trackparticle container
65  ctx);
66 
67  SG::ReadCondHandle<CaloDetDescrManager> caloDetDescrMgrHandle{
69  };
70  ATH_CHECK(caloDetDescrMgrHandle.isValid());
71 
72  const CaloDetDescrManager* caloDD = *caloDetDescrMgrHandle;
73 
74  // check is only used for serial running; remove when MT scheduler used
75  ATH_CHECK(trackPC.isValid());
76  // Loop over calling the trackExecute method
77  for (egammaRec* eg : *egammas) {
78  // retrieve the cluster
79  ATH_CHECK(trackExecute(ctx, eg, trackPC.cptr(), *caloDD));
80  }
81  return StatusCode::SUCCESS;
82 }

◆ 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

◆ inBroadWindow()

bool EMTrackMatchBuilder::inBroadWindow ( const EventContext &  ctx,
std::vector< TrackMatch > &  trackMatches,
const xAOD::CaloCluster cluster,
int  trackNumber,
const xAOD::TrackParticle trkPB,
const CaloDetDescrManager caloDD 
) const
private

Compute for tracks passing the loose matching the distance between track extrapolated to 2nd sampling and cluster.

Definition at line 152 of file EMTrackMatchBuilder.cxx.

158 {
159 
162 
163  // Now get the delta eta/phi and eta correction at the calorimeter
164  // final arrays that we will write
165  // Save the value of deltaPhiRescale. If we do not use rescaled
166  // perigee, we recalculate deltaPhi using rescaled momentum. This
167  // will be saved in EMTrackMatch
168  std::array<double, 4> eta = { -999.0, -999.0, -999.0, -999.0 };
169  std::array<double, 4> phi = { -999.0, -999.0, -999.0, -999.0 };
170  std::array<double, 4> deltaEta = { -999.0, -999.0, -999.0, -999.0 };
171  std::array<double, 4> deltaPhi = { -999.0, -999.0, -999.0, -999.0 };
172 
173  /*
174  * Try both from perigee
175  * and from perigee Rescale.
176  *
177  * We need anyhow both to be there at the end.
178  */
179  std::pair<std::vector<CaloSampling::CaloSample>,
180  std::vector<std::unique_ptr<Trk::Surface>>>
181  layersAndSurfaces =
182  m_extrapolationTool->getClusterLayerSurfaces(cluster, caloDD);
184  ->getMatchAtCalo(ctx,
185  cluster,
186  trkPB,
187  layersAndSurfaces.first,
188  layersAndSurfaces.second,
189  eta,
190  phi,
191  deltaEta,
192  deltaPhi,
193  extrapFrom)
194  .isFailure()) {
195  return false;
196  }
197 
200  std::array<double, 4> etaRes = { -999.0, -999.0, -999.0, -999.0 };
201  std::array<double, 4> phiRes = { -999.0, -999.0, -999.0, -999.0 };
202  std::array<double, 4> deltaEtaRes = { -999.0, -999.0, -999.0, -999.0 };
203  std::array<double, 4> deltaPhiRes = { -999.0, -999.0, -999.0, -999.0 };
204 
206  ->getMatchAtCalo(ctx,
207  cluster,
208  trkPB,
209  layersAndSurfaces.first,
210  layersAndSurfaces.second,
211  etaRes,
212  phiRes,
213  deltaEtaRes,
214  deltaPhiRes,
215  extrapFromRes)
216  .isFailure()) {
217  return false;
218  }
219 
220  double deltaPhiRescale = deltaPhiRes[2];
221  /*
222  * Sanity check for very far away matches
223  * The assumption is when we rescale we should be in the
224  * correct neighborhood for a valid track-cluster pair.
225  */
226  if (std::abs(deltaPhiRes[2]) > m_MaxDeltaPhiRescale) {
227  ATH_MSG_DEBUG("DeltaPhiRescaled above maximum: "
228  << deltaPhiRes[2] << " (max: " << m_MaxDeltaPhiRescale
229  << ")");
230  return false;
231  }
232  /*
233  * Try to match : First standard way.
234  * If this fails and the cluster Et is larger than the track Pt
235  * it might get matched only under the rescaled assumption that
236  * should be less sensitive to radiative losses.
237  */
238  if (std::abs(deltaEta[2]) < m_narrowDeltaEta && deltaPhi[2] < m_narrowDeltaPhi &&
240  ATH_MSG_DEBUG("Matched with Perigee");
241  } else if (m_SecondPassRescale && cluster.et() > trkPB.pt() &&
242  std::abs(deltaEtaRes[2]) < m_narrowDeltaEta &&
243  deltaPhiRes[2] < m_narrowDeltaPhiRescale &&
244  deltaPhiRes[2] > -m_narrowDeltaPhiRescaleBrem) {
245  ATH_MSG_DEBUG("Not Perigee but matched with Rescale");
246  } else {
247  ATH_MSG_DEBUG("Normal matched Failed deltaPhi/deltaEta "
248  << deltaPhi[2] << " / " << deltaEta[2]);
249  ATH_MSG_DEBUG("Rescaled matched Failed deltaPhi/deltaEta "
250  << deltaPhiRes[2] << " / " << deltaEtaRes[2]);
251  return false;
252  }
253 
254  // Always the deltaPhiLast will be from the last measurement
257  std::array<double, 4> eta1 = { -999.0, -999.0, -999.0, -999.0 };
258  std::array<double, 4> phi1 = { -999.0, -999.0, -999.0, -999.0 };
259  std::array<double, 4> deltaEta1 = { -999.0, -999.0, -999.0, -999.0 };
260  std::array<double, 4> deltaPhi1 = { -999.0, -999.0, -999.0, -999.0 };
261 
263  ->getMatchAtCalo(ctx,
264  cluster,
265  trkPB,
266  layersAndSurfaces.first,
267  layersAndSurfaces.second,
268  eta1,
269  phi1,
270  deltaEta1,
271  deltaPhi1,
272  extrapFrom1)
273  .isFailure()) {
274  ATH_MSG_DEBUG("Extrapolation from last measurement failed");
275  return false;
276  }
277  double deltaPhiLast = deltaPhi1[2];
278  ATH_MSG_DEBUG("Rescale dPhi " << deltaPhiRescale);
279  ATH_MSG_DEBUG("dPhi Last measurement " << deltaPhiLast);
280  /*
281  * Done with extrapolation
282  * Lets do the matching logic
283  */
284  TrackMatch trkmatch{};
285  // Add the matching variable to the TrackMAtch
286  trkmatch.deltaEta = deltaEta;
287  trkmatch.deltaPhi = deltaPhi;
288  trkmatch.deltaPhiRescaled = deltaPhiRes;
289  trkmatch.deltaPhiLast = deltaPhiLast;
290 
291  // Variables used for the sorting. Note both dPhi's will be used.
292  trkmatch.trackNumber = trackNumber;
293  if (m_useRescaleMetric) {
294  trkmatch.dR = sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
295  std::pow(m_deltaPhiRescaleWeight * deltaPhiRescale, 2));
296  trkmatch.seconddR = sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
298  } else {
299  trkmatch.dR = sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
301  trkmatch.seconddR =
302  sqrt(std::pow(m_deltaEtaWeight * deltaEta[2], 2) +
303  std::pow(m_deltaPhiRescaleWeight * deltaPhiRescale, 2));
304  }
305  ATH_MSG_DEBUG(" DR " << trkmatch.dR << " deltaPhi " << deltaPhi[2]
306  << " deltaEta " << deltaEta[2]);
307  /*
308  * The first thing is
309  * Prefer pixel over SCT only
310  */
311  // Check number of pixel hits
312  int nPixel = summaryValueInt(trkPB, xAOD::numberOfPixelDeadSensors, 0);
313  nPixel += summaryValueInt(trkPB, xAOD::numberOfPixelHits, 0);
314  trkmatch.hasPix = (nPixel > 0);
315 
316  /*
317  * Seconday hitsScore score based on hits to be used
318  * for track that are very close
319  * to each other at the calo i.e similar dR with cluster,
320  * pick the longest possible one
321  */
322  trkmatch.hitsScore = 0;
323  if (m_useScoring) {
324  // Check the 2 innermost layers
325  int nInnerMost = summaryValueInt(trkPB, xAOD::numberOfInnermostPixelLayerHits, 0);
327  int nNextToInnerMost = summaryValueInt(trkPB, xAOD::numberOfNextToInnermostPixelLayerHits, 0);
329 
330  // Secondary score , find the longest track possible,
331  // i.e the one with the most inner hists in the pixel
332  // npixel*5
333  trkmatch.hitsScore += (nPixel * 5);
334  // Extra points for NextToInnermost
335  if (!expectNextToInnermostPixelLayerHit || nNextToInnerMost > 0) {
336  trkmatch.hitsScore += 5;
337  }
338  // Extra points for Innermost
339  if (!expectInnermostPixelLayerHit || nInnerMost > 0) {
340  trkmatch.hitsScore += 10;
341  }
342  }
343  ATH_MSG_DEBUG("hasPix : " << trkmatch.hasPix
344  << " hitsScore : " << trkmatch.hitsScore);
345 
346  trackMatches.push_back(trkmatch);
347  return true;
348 }

◆ initialize()

StatusCode EMTrackMatchBuilder::initialize ( )
finaloverridevirtual

Gaudi algorithm hooks.

Implements IEMTrackMatchBuilder.

Definition at line 39 of file EMTrackMatchBuilder.cxx.

40 {
43  // the extrapolation tool
44  ATH_CHECK(m_extrapolationTool.retrieve());
45 
46  // set things up for the sorting
47  m_sorter = TrackMatchSorter(m_distanceForScore);
51 
52  return StatusCode::SUCCESS;
53 }

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

AlgTool interface methods.

Definition at line 50 of file IEMTrackMatchBuilder.h.

51 {
52  return IID_IEMTrackMatchBuilder;
53 }

◆ isCandidateMatch()

bool EMTrackMatchBuilder::isCandidateMatch ( const xAOD::CaloCluster cluster,
const xAOD::TrackParticle track,
bool  flip 
) const
private

Loose track-cluster matching.

Definition at line 351 of file EMTrackMatchBuilder.cxx.

354 {
355  // loose cluster-track matching
356  if (!m_useCandidateMatch) {
357  return true;
358  }
359 
360  // Tracking
361  const Trk::Perigee& candidatePerigee = track->perigeeParameters();
362  // Decide whether to try the opposite direction (cosmics)
363  const double trkPhi = (!flip) ? candidatePerigee.parameters()[Trk::phi]
364  : -candidatePerigee.parameters()[Trk::phi];
365  const double trkEta =
366  (!flip) ? candidatePerigee.eta() : -candidatePerigee.eta();
367  const double z_perigee = candidatePerigee.position().z();
368  const double r_perigee = candidatePerigee.position().perp();
369  const Amg::Vector3D PerigeeXYZPosition(candidatePerigee.position().x(),
370  candidatePerigee.position().y(),
371  z_perigee);
372  // Cluster variables
373  const double clusterEta = cluster->eta();
374  const bool isEndCap = !xAOD::EgammaHelpers::isBarrel(cluster);
375  const double Et = cluster->e() / cosh(trkEta);
376  const double clusterPhi = cluster->phi();
377 
378  // Avoid clusters with |eta| > 10 or Et less than 10 MeV
379  if (std::abs(clusterEta) > 10.0 || Et < 10) {
380  return false;
381  }
382  // Calculate the eta/phi of the cluster as would be seen from the perigee
383  // position of the Track
384  const Amg::Vector3D XYZClusterWrtTrackPerigee =
386  *cluster, PerigeeXYZPosition, isEndCap);
387 
388  const double clusterEtaCorrected = XYZClusterWrtTrackPerigee.eta();
389  // check eta match . Both metrics need to fail in order to disgard the track
390  if ((std::abs(clusterEta - trkEta) > 2. * m_broadDeltaEta) &&
391  (std::abs(clusterEtaCorrected - trkEta) > 2. * m_broadDeltaEta)) {
392  ATH_MSG_DEBUG(" Fails broad window eta match (track eta, cluster eta, "
393  "cluster eta corrected): ( "
394  << trkEta << ", " << clusterEta << ", " << clusterEtaCorrected
395  << ")");
396  return false;
397  }
398  // Calculate the possible rotation of the track
399  // Once assuming the cluster Et being the better estimate (e.g big brem)
400  const double phiRotRescaled = CandidateMatchHelpers::PhiROT(
401  Et, trkEta, track->charge(), r_perigee, isEndCap);
402  // And also assuming the track Pt being correct
403  const double phiRotTrack = CandidateMatchHelpers::PhiROT(
404  track->pt(), trkEta, track->charge(), r_perigee, isEndCap);
405  //
406  const double clusterPhiCorrected = XYZClusterWrtTrackPerigee.phi();
407  // deltaPhi between the track and the cluster
408  const double deltaPhiStd = P4Helpers::deltaPhi(clusterPhiCorrected, trkPhi);
409  // deltaPhi between the track and the cluster accounting for rotation assuming
410  // cluster Et is a better estimator
411  const double trkPhiRescaled = P4Helpers::deltaPhi(trkPhi, phiRotRescaled);
412  const double deltaPhiRescaled =
413  P4Helpers::deltaPhi(clusterPhiCorrected, trkPhiRescaled);
414  // deltaPhi between the track and the cluster accounting for rotation
415  const double trkPhiCorrTrack = P4Helpers::deltaPhi(trkPhi, phiRotTrack);
416  const double deltaPhiTrack =
417  P4Helpers::deltaPhi(clusterPhiCorrected, trkPhiCorrTrack);
418 
419  // It has to fail all phi metrics in order to be disgarded
420  if ((std::abs(deltaPhiRescaled) > 2. * m_broadDeltaPhi) &&
421  (std::abs(deltaPhiTrack) > 2. * m_broadDeltaPhi) &&
422  (std::abs(deltaPhiStd) > 2. * m_broadDeltaPhi)) {
423 
425  "FAILS broad window phi match (track phi, phirotCluster , phiRotTrack , "
426  << "cluster phi corrected, cluster phi): ( " << trkPhi << ", "
427  << phiRotRescaled << ", " << phiRotTrack << ", " << clusterPhiCorrected
428  << ", " << clusterPhi << ")");
429 
430  return false;
431  }
432  // if not false returned we end up here
433  return true;
434 }

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

◆ trackExecute()

StatusCode EMTrackMatchBuilder::trackExecute ( const EventContext &  ctx,
egammaRec eg,
const xAOD::TrackParticleContainer trackPC,
const CaloDetDescrManager caloDD 
) const
private

execute method

Definition at line 85 of file EMTrackMatchBuilder.cxx.

89 {
90  if (!eg || !trackPC) {
92  "trackExecute: NULL pointer to egammaRec or TrackParticleContainer");
93  return StatusCode::SUCCESS;
94  }
95  // retrieve corresponding cluster
96  const xAOD::CaloCluster* cluster = eg->caloCluster();
97  // check if the cluster is sane
98  if (cluster && cluster->e() == 0.0) {
99  ATH_MSG_WARNING("trackExecute: cluster energy is 0.0! Ignoring cluster.");
100  return StatusCode::SUCCESS;
101  }
102 
103  // Loop over tracks and fill TrackMatch vector
104  std::vector<TrackMatch> trkMatches;
106  for (unsigned int trackNumber = 0; trkIt != trackPC->end();
107  ++trkIt, ++trackNumber) {
108  // Avoid TRT alone
109  if (xAOD::EgammaHelpers::numberOfSiHits(*trkIt) < 4) {
110  continue;
111  }
112  /*
113  * Try with normal directions.
114  * For cosmics allow a retry with inverted direction.
115  */
116  if (isCandidateMatch(cluster, (*trkIt), false)) {
117  inBroadWindow(ctx, trkMatches, *cluster, trackNumber, (**trkIt), caloDD);
118  }
119  }
120 
121  if (!trkMatches.empty()) {
122  // sort the track matches
123  std::sort(trkMatches.begin(), trkMatches.end(), m_sorter);
124  // set the matching values
125  TrackMatch bestTrkMatch = trkMatches.at(0);
126  eg->setDeltaEta(bestTrkMatch.deltaEta);
127  eg->setDeltaPhi(bestTrkMatch.deltaPhi);
128  eg->setDeltaPhiRescaled(bestTrkMatch.deltaPhiRescaled);
129  eg->setDeltaPhiLast(bestTrkMatch.deltaPhiLast);
130 
131  // set the element Links
133  std::vector<EL> trackParticleLinks;
134  trackParticleLinks.reserve(trkMatches.size());
135  const std::string key = EL(*trackPC, 0, ctx).dataID();
136  for (const TrackMatch& m : trkMatches) {
137  ATH_MSG_DEBUG("Match dR: " << m.dR << " second dR: " << m.seconddR
138  << " hasPix: " << m.hasPix
139  << " hitsScore: " << m.hitsScore);
140  if (key.empty()) {
141  trackParticleLinks.emplace_back(*trackPC, m.trackNumber, ctx);
142  } else {
143  trackParticleLinks.emplace_back(key, m.trackNumber, ctx);
144  }
145  }
146  eg->setTrackParticles(trackParticleLinks);
147  }
148  return StatusCode::SUCCESS;
149 }

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

Gaudi::Property<double> EMTrackMatchBuilder::m_broadDeltaEta
private
Initial value:
{ this,
"broadDeltaEta",
0.1,
"Value of broad cut for delta eta" }

broad cut on deltaEta

Definition at line 125 of file EMTrackMatchBuilder.h.

◆ m_broadDeltaPhi

Gaudi::Property<double> EMTrackMatchBuilder::m_broadDeltaPhi
private
Initial value:
{ this,
"broadDeltaPhi",
0.1,
"Value of broad cut for delta phi" }

broad cut on deltaPhi

Definition at line 131 of file EMTrackMatchBuilder.h.

◆ m_caloDetDescrMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> EMTrackMatchBuilder::m_caloDetDescrMgrKey
private
Initial value:
{
this,
"CaloDetDescrManager",
"CaloDetDescrManager",
"SG Key for CaloDetDescrManager in the Condition Store"
}

Definition at line 117 of file EMTrackMatchBuilder.h.

◆ m_deltaEtaResolution

Gaudi::Property<float> EMTrackMatchBuilder::m_deltaEtaResolution
private
Initial value:
{ this,
"DeltaEtaResolution",
1.0,
"The deltaEta resolution" }

The resolutions: might be good to split in barrel/end-cap in the future.

Definition at line 213 of file EMTrackMatchBuilder.h.

◆ m_deltaEtaWeight

double EMTrackMatchBuilder::m_deltaEtaWeight {}
private

Definition at line 256 of file EMTrackMatchBuilder.h.

◆ m_deltaPhiRescaleResolution

Gaudi::Property<float> EMTrackMatchBuilder::m_deltaPhiRescaleResolution
private
Initial value:
{
this,
"DeltaPhiRescaleResolution",
1.0,
"The deltaPhiRescale resolution"
}

Definition at line 223 of file EMTrackMatchBuilder.h.

◆ m_deltaPhiRescaleWeight

double EMTrackMatchBuilder::m_deltaPhiRescaleWeight {}
private

Definition at line 258 of file EMTrackMatchBuilder.h.

◆ m_deltaPhiResolution

Gaudi::Property<float> EMTrackMatchBuilder::m_deltaPhiResolution
private
Initial value:
{ this,
"DeltaPhiResolution",
1.0,
"The deltaPhi resolution" }

Definition at line 218 of file EMTrackMatchBuilder.h.

◆ m_deltaPhiWeight

double EMTrackMatchBuilder::m_deltaPhiWeight {}
private

Definition at line 257 of file EMTrackMatchBuilder.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_distanceForScore

Gaudi::Property<float> EMTrackMatchBuilder::m_distanceForScore
private
Initial value:
{
this,
"DistanceForScore",
0.01,
"The distance from which one goes from using better deltaR to using score."
}

The distance from which one goes from using better deltaR to using score.

Note that this distance varies depending on the resolutions entered above. If you don't use resolutions (resolution = 1.0) this becomes deltaR distance.

Definition at line 235 of file EMTrackMatchBuilder.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_extrapolationTool

ToolHandle<IEMExtrapolationTools> EMTrackMatchBuilder::m_extrapolationTool
private
Initial value:
{
this,
"ExtrapolationTool",
"EMExtrapolationTools",
"Name of the extrapolation tool"
}

Definition at line 242 of file EMTrackMatchBuilder.h.

◆ m_isCosmics

Gaudi::Property<bool> EMTrackMatchBuilder::m_isCosmics
private
Initial value:
{ this,
"isCosmics",
false,
"Boolean for use of cosmics" }

Definition at line 250 of file EMTrackMatchBuilder.h.

◆ m_MaxDeltaPhiRescale

Gaudi::Property<double> EMTrackMatchBuilder::m_MaxDeltaPhiRescale
private
Initial value:
{
this,
"MaxDeltaPhiRescale",
0.25,
"Maximum Value of the deltaPhi rescale"
}

@Maximum deltaPhi (Res) allowed for a match

Definition at line 177 of file EMTrackMatchBuilder.h.

◆ m_narrowDeltaEta

Gaudi::Property<double> EMTrackMatchBuilder::m_narrowDeltaEta
private
Initial value:
{
this,
"narrowDeltaEta",
0.05,
"Value of narrow cut for delta eta"
}

narrow cut on deltaEta

Definition at line 137 of file EMTrackMatchBuilder.h.

◆ m_narrowDeltaPhi

Gaudi::Property<double> EMTrackMatchBuilder::m_narrowDeltaPhi
private
Initial value:
{
this,
"narrowDeltaPhi",
0.05,
"Value of the narrowd cut for delta phi"
}

narrow cut on deltaPhiRescale

Definition at line 145 of file EMTrackMatchBuilder.h.

◆ m_narrowDeltaPhiBrem

Gaudi::Property<double> EMTrackMatchBuilder::m_narrowDeltaPhiBrem
private
Initial value:
{
this,
"narrowDeltaPhiBrem",
0.1,
"Value of the narrow cut for delta phi Brem"
}

narrow cut on deltaPhi for electrons

Definition at line 153 of file EMTrackMatchBuilder.h.

◆ m_narrowDeltaPhiRescale

Gaudi::Property<double> EMTrackMatchBuilder::m_narrowDeltaPhiRescale
private
Initial value:
{
this,
"narrowDeltaPhiRescale",
0.05,
"Value of the narrow cut for delta phi Rescale"
}

narrow cut on deltaPhiRescale

Definition at line 161 of file EMTrackMatchBuilder.h.

◆ m_narrowDeltaPhiRescaleBrem

Gaudi::Property<double> EMTrackMatchBuilder::m_narrowDeltaPhiRescaleBrem
private
Initial value:
{
this,
"narrowDeltaPhiRescaleBrem",
0.1,
"Value of the narrow cut for delta phi Rescale Brem"
}

narrow cut on deltaPhiRescale for electrons

Definition at line 169 of file EMTrackMatchBuilder.h.

◆ m_SecondPassRescale

Gaudi::Property<bool> EMTrackMatchBuilder::m_SecondPassRescale
private
Initial value:
{ this,
"SecondPassRescale",
true,
"Do second pass with rescale" }

Boolean to do second pass with Rescale.

Definition at line 207 of file EMTrackMatchBuilder.h.

◆ m_sorter

TrackMatchSorter EMTrackMatchBuilder::m_sorter
private

Definition at line 260 of file EMTrackMatchBuilder.h.

◆ m_TrackParticlesKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> EMTrackMatchBuilder::m_TrackParticlesKey
private
Initial value:
{
this,
"TrackParticlesName",
"",
"Name of the input track particle container"
}

name of TrackParticle container in TDS

Definition at line 110 of file EMTrackMatchBuilder.h.

◆ m_useCandidateMatch

Gaudi::Property<bool> EMTrackMatchBuilder::m_useCandidateMatch
private
Initial value:
{
this,
"useCandidateMatch",
true,
"Boolean to use candidate matching"
}

flag to turn on/off use of isCandidateMatch

Definition at line 185 of file EMTrackMatchBuilder.h.

◆ m_useRescaleMetric

Gaudi::Property<bool> EMTrackMatchBuilder::m_useRescaleMetric
private
Initial value:
{ this,
"UseRescaleMetric",
true,
"Use Rescale Metric" }

Boolean to use Rescale in the metric.

Definition at line 201 of file EMTrackMatchBuilder.h.

◆ m_useScoring

Gaudi::Property<bool> EMTrackMatchBuilder::m_useScoring
private
Initial value:
{
this,
"useScoring",
true,
"Boolean to apply heuristic when tracks have close deltaR"
}

Boolean to apply heuristic when tracks have close deltaR.

Definition at line 193 of file EMTrackMatchBuilder.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:
CandidateMatchHelpers::approxXYZwrtPoint
Amg::Vector3D approxXYZwrtPoint(const xAOD::CaloCluster &cluster, const Amg::Vector3D &point, const bool isEndCap)
Function to get the (x,y,z) of the cluster wrt to a point (x0,y0,z0)
Definition: CandidateMatchHelpers.cxx:10
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
egammaParameters::deltaPhiRescaled
@ deltaPhiRescaled
difference between the cluster phi (sampling 2) and the phi of the track extrapolated from the perige...
Definition: egammaParamDefs.h:595
IEMExtrapolationTools::TrkExtrapDef
TrkExtrapDef
Enum for track extrapolation to calo.
Definition: IEMExtrapolationTools.h:33
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
EMTrackMatchBuilder::m_deltaPhiWeight
double m_deltaPhiWeight
Definition: EMTrackMatchBuilder.h:257
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
EMTrackMatchBuilder::inBroadWindow
bool inBroadWindow(const EventContext &ctx, std::vector< TrackMatch > &trackMatches, const xAOD::CaloCluster &cluster, int trackNumber, const xAOD::TrackParticle &trkPB, const CaloDetDescrManager &caloDD) const
Compute for tracks passing the loose matching the distance between track extrapolated to 2nd sampling...
Definition: EMTrackMatchBuilder.cxx:152
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ParticleTest.eg
eg
Definition: ParticleTest.py:29
EMTrackMatchBuilder::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Definition: EMTrackMatchBuilder.h:117
EMTrackMatchBuilder::m_useRescaleMetric
Gaudi::Property< bool > m_useRescaleMetric
Boolean to use Rescale in the metric.
Definition: EMTrackMatchBuilder.h:201
EMTrackMatchBuilder::m_TrackParticlesKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackParticlesKey
name of TrackParticle container in TDS
Definition: EMTrackMatchBuilder.h:110
EMTrackMatchBuilder::trackExecute
StatusCode trackExecute(const EventContext &ctx, egammaRec *eg, const xAOD::TrackParticleContainer *trackPC, const CaloDetDescrManager &caloDD) const
execute method
Definition: EMTrackMatchBuilder.cxx:85
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
EMTrackMatchBuilder::m_deltaEtaResolution
Gaudi::Property< float > m_deltaEtaResolution
The resolutions: might be good to split in barrel/end-cap in the future.
Definition: EMTrackMatchBuilder.h:213
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CandidateMatchHelpers::PhiROT
double PhiROT(const double pt, const double eta, const int charge, const double r_start, const bool isEndCap)
Function to calculate the approximate rotation in phi/bending of a track until it reaches the calo.
Definition: CandidateMatchHelpers.cxx:56
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
xAOD::CaloCluster_v1::et
double et() const
Definition: CaloCluster_v1.h:856
EMTrackMatchBuilder::m_deltaPhiRescaleResolution
Gaudi::Property< float > m_deltaPhiRescaleResolution
Definition: EMTrackMatchBuilder.h:223
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
EMTrackMatchBuilder::m_deltaEtaWeight
double m_deltaEtaWeight
Definition: EMTrackMatchBuilder.h:256
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
xAOD::expectInnermostPixelLayerHit
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
Definition: TrackingPrimitives.h:236
IEMExtrapolationTools::fromPerigee
@ fromPerigee
from the perigee of TrackParticle
Definition: IEMExtrapolationTools.h:37
EMTrackMatchBuilder::m_SecondPassRescale
Gaudi::Property< bool > m_SecondPassRescale
Boolean to do second pass with Rescale.
Definition: EMTrackMatchBuilder.h:207
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
EMTrackMatchBuilder::m_sorter
TrackMatchSorter m_sorter
Definition: EMTrackMatchBuilder.h:260
EMTrackMatchBuilder::m_narrowDeltaPhiRescale
Gaudi::Property< double > m_narrowDeltaPhiRescale
narrow cut on deltaPhiRescale
Definition: EMTrackMatchBuilder.h:161
EMTrackMatchBuilder::m_narrowDeltaPhiBrem
Gaudi::Property< double > m_narrowDeltaPhiBrem
narrow cut on deltaPhi for electrons
Definition: EMTrackMatchBuilder.h:153
EMTrackMatchBuilder::m_deltaPhiResolution
Gaudi::Property< float > m_deltaPhiResolution
Definition: EMTrackMatchBuilder.h:218
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::EgammaParameters::deltaPhi1
@ deltaPhi1
difference between the cluster eta (1st sampling) and the eta of the track extrapolated to the 1st sa...
Definition: EgammaEnums.h:196
xAOD::EgammaHelpers::isBarrel
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
Definition: EgammaxAODHelpers.cxx:34
EMTrackMatchBuilder::m_deltaPhiRescaleWeight
double m_deltaPhiRescaleWeight
Definition: EMTrackMatchBuilder.h:258
Muon::nsw::STGTPSegments::MergedSegmentProperty::phiRes
@ phiRes
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:29
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::expectNextToInnermostPixelLayerHit
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
Definition: TrackingPrimitives.h:247
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::TauHelpers::trackParticleLinks
std::vector< ElementLink< xAOD::TrackParticleContainer > > trackParticleLinks(const xAOD::TauJet *tau, xAOD::TauJetParameters::TauTrackFlag flag=xAOD::TauJetParameters::TauTrackFlag::classifiedCharged)
Definition: TauxAODHelpers.cxx:22
EMTrackMatchBuilder::m_MaxDeltaPhiRescale
Gaudi::Property< double > m_MaxDeltaPhiRescale
@Maximum deltaPhi (Res) allowed for a match
Definition: EMTrackMatchBuilder.h:177
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EMTrackMatchBuilder::m_broadDeltaPhi
Gaudi::Property< double > m_broadDeltaPhi
broad cut on deltaPhi
Definition: EMTrackMatchBuilder.h:131
IEMExtrapolationTools::fromPerigeeRescaled
@ fromPerigeeRescaled
from the perigee of TrackParticle recaled by Ecluster
Definition: IEMExtrapolationTools.h:39
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
DMTest::EL
ElementLink< CVec > EL
Definition: xAODTestReadCLinks.cxx:20
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
xAOD::EgammaHelpers::summaryValueInt
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
Definition: EgammaxAODHelpers.cxx:162
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
EMTrackMatchBuilder::m_narrowDeltaPhiRescaleBrem
Gaudi::Property< double > m_narrowDeltaPhiRescaleBrem
narrow cut on deltaPhiRescale for electrons
Definition: EMTrackMatchBuilder.h:169
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:248
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
egammaParameters::deltaPhiLast
@ deltaPhiLast
deltaPhi from the las point
Definition: egammaParamDefs.h:724
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
xAOD::EgammaHelpers::numberOfSiHits
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
Definition: ElectronxAODHelpers.cxx:66
EMTrackMatchBuilder::isCandidateMatch
bool isCandidateMatch(const xAOD::CaloCluster *cluster, const xAOD::TrackParticle *track, bool flip) const
Loose track-cluster matching.
Definition: EMTrackMatchBuilder.cxx:351
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
EMTrackMatchBuilder::m_narrowDeltaEta
Gaudi::Property< double > m_narrowDeltaEta
narrow cut on deltaEta
Definition: EMTrackMatchBuilder.h:137
EMTrackMatchBuilder::m_useScoring
Gaudi::Property< bool > m_useScoring
Boolean to apply heuristic when tracks have close deltaR.
Definition: EMTrackMatchBuilder.h:193
EMTrackMatchBuilder::m_distanceForScore
Gaudi::Property< float > m_distanceForScore
The distance from which one goes from using better deltaR to using score.
Definition: EMTrackMatchBuilder.h:235
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TRT::Track::trackNumber
@ trackNumber
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:75
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
EMTrackMatchBuilder::m_useCandidateMatch
Gaudi::Property< bool > m_useCandidateMatch
flag to turn on/off use of isCandidateMatch
Definition: EMTrackMatchBuilder.h:185
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
egammaRec
Definition: egammaRec.h:31
Trk::phi
@ phi
Definition: ParamDefs.h:81
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:266
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::EgammaParameters::deltaEta1
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
Definition: EgammaEnums.h:184
EMTrackMatchBuilder::m_narrowDeltaPhi
Gaudi::Property< double > m_narrowDeltaPhi
narrow cut on deltaPhiRescale
Definition: EMTrackMatchBuilder.h:145
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
EMTrackMatchBuilder::m_extrapolationTool
ToolHandle< IEMExtrapolationTools > m_extrapolationTool
Definition: EMTrackMatchBuilder.h:242
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
IEMExtrapolationTools::fromLastMeasurement
@ fromLastMeasurement
from the last measurement of TrackParticle
Definition: IEMExtrapolationTools.h:35
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
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
EMTrackMatchBuilder::m_broadDeltaEta
Gaudi::Property< double > m_broadDeltaEta
broad cut on deltaEta
Definition: EMTrackMatchBuilder.h:125
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37