ATLAS Offline Software
TrackCaloClusterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
5 
7 
10 
11 
12 #include "CxxUtils/sincos.h"
13 
16 
17 
18 namespace {
19  // helper functions needed only in this file are defined in this anonymous namespace
20 
21  using FourMom_t = xAOD::IParticle::FourMom_t; // this is actually
22 
23  // update the given eta and phi coordinates by shifting the origin to the position of vertex
24  void computeVertexCorr(double& eta, double& phi, const Amg::Vector3D& vertex, double radius) {
25 
26  if (radius<1.) return;
27 
28  if (std::fabs(eta)>10. || std::fabs(phi)>10.) return;
29 
31  double iradius = 1 / radius;
32  eta += (-vertex[2]/std::cosh(eta) + sc.apply (vertex[1], vertex[0])*std::tanh(eta)) * iradius;
33  phi += sc.apply (vertex[0], -vertex[1]) * iradius;
34  }
35 
36 
37 
38  template<typename T>
39  void setParameters(xAOD::FlowElement* fe, float pt, float eta, float phi, float m,
42  const std::vector<ElementLink<T> >& neutralLinks){
43  std::vector<ElementLink<xAOD::IParticleContainer> > ipLinks(neutralLinks.size());
44  for(size_t i=0;i<neutralLinks.size();i++) ipLinks[i] = neutralLinks[i];
45  setParameters(fe,pt,eta,phi, m, stype,trackLink, ipLinks);
46  }
47 
48  template<>
49  void setParameters<xAOD::IParticleContainer>(xAOD::FlowElement* fe, float pt, float eta, float phi, float m,
52  const std::vector<ElementLink<xAOD::IParticleContainer> >& neutralLinks){
53  fe->setP4(pt,eta,phi,m);
54  fe->setSignalType(stype);
55  fe->setChargedObjectLinks( {trackLink} );
56  fe->setOtherObjectLinks( neutralLinks);
57  }
58 
59 
61  template<typename DTYPE, typename CTYPE>
63  static const std::string ts = typeid(DTYPE).name();
64  if(wh.empty() ) return SG::AuxElement::ConstAccessor<DTYPE>( typeid(DTYPE).name() );
65  const auto split = wh.key().rfind ('.');
66  if (split == std::string::npos)
67  throw std::runtime_error ("decor key does not contain a .: " + wh.key());
68  return SG::AuxElement::ConstAccessor<DTYPE>( wh.key().substr (split + 1) );
69  }
70 
71 
72 
73 }
74 
75 
76 //*******************************************************************************
77 
78 TrackCaloClusterBaseTool::TrackCaloClusterBaseTool(const std::string& t, const std::string& n, const IInterface* p )
79  : AthAlgTool(t,n,p)
80 {
81  declareInterface<ITrackCaloClusterTool>(this);
82 }
84 
85 
87  if(!m_trackVertexAssoTool.empty()) ATH_CHECK(m_trackVertexAssoTool.retrieve());
88 
89  ATH_CHECK(m_assoClustersKey.initialize());
90 
92  return StatusCode::SUCCESS;
93 }
94 
95 
96 
97 
98 
99 
100 
101 //*******************************************************************************
102 
103 TCCCombinedTool::TCCCombinedTool(const std::string& t, const std::string& n, const IInterface* p )
105 
106 
108 
109  if(tccInfo.pv0==nullptr){
110  ATH_MSG_ERROR ("No PV0 available ! ");
111  return StatusCode::FAILURE;
112  }
113 
114  // declare Decorator in case we want to save out corrected positions
115  static const SG::AuxElement::Decorator<int> dec_isCorrected("Corrected");
116  static const SG::AuxElement::Decorator<float> dec_calEntryEta("CaloEntryPosEtaCorr") ;
117  static const SG::AuxElement::Decorator<float> dec_calEntryPhi("CaloEntryPosPhiCorr") ;
118  static const SG::AuxElement::Decorator<float> dec_detEta("DetectorEta") ;
119 
120  // it is not possible to prepare a blank ReadDecorHandle (which we need if !m_caloEntryParsDecor.empty()), so instead or re-instantiating a ReadDecorHandle on each
121  // track in the loop below, we just instantiate a ConstAccessor
123  auto caloEntryParams = asConstAccessor<const Trk::TrackParameters*>(m_caloEntryParsDecor);
124 
125 
126  for ( const xAOD::TrackParticle* trk : *tccInfo.allTracks ) {
127 
128  if (! m_trackVertexAssoTool->isCompatible(*trk, *tccInfo.pv0) ) continue ;
129 
130  const auto & clusterLinks = clusterLinksH(*trk);
131  if( clusterLinks.empty() ) continue;
132 
133  FourMom_t tcc_4p(0.,0.,0.,0.); // will be the TCC 4-vector
134 
135  // Loop over associated clusters to sum the 4-vectors x weigths
136  for( const ElementLink<xAOD::CaloClusterContainer> & clLink : clusterLinks){
137  const xAOD::CaloCluster* cluster = *clLink;
138 
139  double cluster_pt = m_useEnergy ? cluster->e() : cluster->pt();
140  double totalcluster_pt = m_useEnergy ? tccInfo.trackTotalClusterPt.at(trk).E() : tccInfo.trackTotalClusterPt.at(trk).Pt();
141 
142  tcc_4p += cluster->p4()*(( trk->pt() * cluster_pt / totalcluster_pt) / ((tccInfo.clusterToTracksWeightMap.at(cluster)).Pt()));
143 
144  ATH_MSG_VERBOSE ("cluster->pt() " << cluster_pt << " cluster->eta() " << cluster->eta() << " cluster->phi() "
145  << cluster->phi() << " track pt " << trk->pt() << " (tccInfo.clusterToTracksWeightMap.at(cluster)).Pt() " << (tccInfo.clusterToTracksWeightMap.at(cluster)).Pt());
146  } // for caloClusterLinks
147 
148 
149  // get angular position from tracks
150  double eta = trk->eta();
151  double phi = trk->phi();
152 
153  if (m_doOriginCorrection) {
154  // retrieve the caloExtensionContainer to get the track direction at the calo entrance
155 
156  const Trk::TrackParameters* pars = caloEntryParams(*trk);
157  eta = pars->position().eta();
158  phi = pars->position().phi();
159 
160  computeVertexCorr(eta, phi, tccInfo.pv0->position(), pars->position().perp());
162  dec_isCorrected(*trk) = 1;
163  dec_calEntryEta(*trk) = eta;
164  dec_calEntryPhi(*trk) = phi;
165  }
166  }
167 
168  // Build the final TCC
170  tccContainer->push_back(tcc);
171  setParameters(tcc, tcc_4p.Pt(),eta,phi,tcc_4p.M(),xAOD::FlowElement::SignalType::Combined,
172  ElementLink<xAOD::TrackParticleContainer>(*tccInfo.allTracks, trk->index() ),clusterLinks);
173 
174  ATH_MSG_VERBOSE ("Created TCC with pt " << tcc->pt() << " eta " << tcc->eta() << " phi " << tcc->phi() << " mass " << tcc->m() << " signalType= " << tcc->signalType());
175 
176  if(m_saveDetectorEta) {
177  const Trk::TrackParameters* pars = caloEntryParams(*trk);
178  double det_eta = pars->position().eta();
179  dec_detEta(*tcc) = det_eta;
180  }
181  } // for assoc clusters
182 
183 
184  return StatusCode::SUCCESS;
185 }
186 
187 
188 
189 
190 
191 
192 
193 //*******************************************************************************
194 
195 TCCChargedTool::TCCChargedTool(const std::string& t, const std::string& n, const IInterface* p )
197 
198 
199 
201 
202 
203  // it is not possible to prepare a blank ReadDecorHandle (which we need if !m_caloEntryParsDecor.empty()), so instead or re-instantiating a ReadDecorHandle on each
204  // track in the loop below, we just instantiate a ConstAccessor
205  auto caloEntryParams = asConstAccessor<const Trk::TrackParameters*>(m_caloEntryParsDecor);
206 
208 
209  // declare Decorator in case we want to save out corrected positions
210  static const SG::AuxElement::Decorator<float> dec_detEta("DetectorEta") ;
211 
212  unsigned int i = 0;
213  // Loop over ALL tracks at the source of TCC
214  for ( const xAOD::TrackParticle* track : *tccInfo.allTracks ) {
215  if( ! clusterLinksH(*track).empty() ) continue; // because if not empty, it is matched to a cluster
216  // considre ONLY tracks NOT matched to a cluster :
217  if(tccInfo.trackTotalClusterPt.find(track)==tccInfo.trackTotalClusterPt.end()){
218  bool isMatched = m_trackVertexAssoTool->isCompatible(*track, *tccInfo.pv0 );
219  if (!isMatched) continue;
220 
222  tccContainer->push_back(tcc);
225  ATH_MSG_VERBOSE ("Created TCC with pt " << tcc->pt() << " eta " << tcc->eta() << " phi " << tcc->phi() << " mass " << tcc->m() << " taste " << tcc->signalType());
226 
227  if(m_saveDetectorEta) {
228  // retrieve the caloExtensionContainer to get the track direction at the calo entrance
229  double det_eta = track->eta();
230  const Trk::TrackParameters* pars = caloEntryParams(*track);
231  if(pars) det_eta = pars->position().eta();
232  dec_detEta(*tcc) = det_eta;
233  }
234  }
235  i++;
236  }
237  return StatusCode::SUCCESS;
238 }
239 
240 
241 
242 
243 
244 //*******************************************************************************
245 
246 TCCNeutralTool::TCCNeutralTool(const std::string& t, const std::string& n, const IInterface* p )
248 
251  if (!m_clusterFilterTool.empty()){
252  ATH_CHECK(m_clusterFilterTool.retrieve());
253  m_applyFilter=true;
254  } else m_applyFilter=false;
255  return StatusCode::SUCCESS;
256 }
257 
258 
259 
261 
262  unsigned int i = 0;
263  // declare Decorator in case we want to save out corrected positions
264  static const SG::AuxElement::Decorator<float> dec_detEta("DetectorEta") ;
265 
266  // Loop over ALL clusters
267  for ( const xAOD::CaloCluster* cluster : *tccInfo.allClusters ) {
268  // consider only clusters NOT matched to a track :
269  if(tccInfo.clusterToTracksWeightMap.find(cluster)==tccInfo.clusterToTracksWeightMap.end()){
270  if (m_applyFilter and m_clusterFilterTool->rejectCluster(*cluster)) continue;
271 
272  // create a neutral TCC
274  tccContainer->push_back(tcc);
276  const std::vector< ElementLink<xAOD::CaloClusterContainer> > ClusterLink {clusterLink};
277  setParameters(tcc, cluster->pt(),cluster->eta(),cluster->phi(),cluster->m(),xAOD::FlowElement::SignalType::Neutral,ElementLink<xAOD::TrackParticleContainer>(),ClusterLink);
278  ATH_MSG_VERBOSE ("Created TCC with pt " << tcc->pt() << " eta " << tcc->eta() << " phi " << tcc->phi() << " mass " << tcc->m() << " taste " << tcc->signalType());
279 
280  static const SG::AuxElement::Accessor< float > acc_det_eta ( "DetectorEta" );
281  if(m_saveDetectorEta && acc_det_eta.isAvailable(*cluster)) {
282  dec_detEta(*tcc) = dec_detEta(*cluster);
283  }
284  }
285  i++;
286  } // for all clusters
287  return StatusCode::SUCCESS;
288 }
289 
290 
291 
292 
293 
294 
295 
296 
297 
298 
299 //*******************************************************************************
300 
301 
302 
303 namespace TCCHelpers{
307  struct UFOBuilder : public CombinedUFOLoop {
308 
310  const TrackCaloClusterInfo* m_tccInfo = nullptr;
312 
313  std::vector<ElementLink< xAOD::FlowElementContainer > > m_pfoLinks;
314  FourMom_t m_tcc_4p = {0.,0.,0.,0.};
315 
316  virtual void processPFO(const xAOD::TrackParticle* trk, const xAOD::FlowElement* pfo) {
318 
320  m_pfoLinks.push_back(pfoLink);
321  double pfo_pt = m_useEnergy ? pfo->e() : pfo->pt();
322  const FourMom_t & totalP = m_tccInfo->trackTotalClusterPt.at(trk);
323  double totalpfo_pt = m_useEnergy ? totalP.E() : totalP.Pt();
324  m_tcc_4p += pfo->p4()*(( trk->pt() * pfo_pt / totalpfo_pt) / ((m_tccInfo->clusterToTracksWeightMap.at(pfo)).Pt()));
325  }
326 
327  virtual void processTrk(const xAOD::TrackParticle* trk ) {
328  // build the actual combined UFO
329  if(m_tcc_4p.Pt() <=0) return;
330 
335 
336  // reset accumulators for next track :
337  m_pfoLinks.clear();
338  m_tcc_4p = {0.,0.,0.,0.};
339  }
340  };
341 }
342 
343 
344 
345 UFOTool::UFOTool(const std::string& t, const std::string& n, const IInterface* p )
347 
349  //override parent class because of additional requirements on the PFOHandles etc
350  ATH_CHECK(m_trackVertexAssoTool.retrieve());
351 
352  ATH_CHECK(m_assoClustersKey.initialize());
353 
354  ATH_CHECK(m_caloEntryParsDecor.initialize(!m_caloEntryParsDecor.empty()) );
355  ATH_CHECK(m_inputPFOHandle.initialize(!m_inputPFOHandle.empty()));
356  return StatusCode::SUCCESS;
357 }
358 
360 
362  const EventContext& ctx=Gaudi::Hive::currentContext();
363 
365 
366  // We use a dedicated helper to build the combined UFO. Initialize it :
368  ufoB.m_orig_pfoK = m_orig_pfo;
372  ufoB.m_useEnergy = m_useEnergy;
373 
374  ufoB.m_pfoContainer = pfos.ptr();
375  ufoB.m_tccInfo = &tccInfo;
376  ufoB.m_tccContainer = tccContainer;
378 
379  // create a combined UFO for each track matched to some PFO
381  ufoB.combinedUFOLoop(&tccInfo, pfos.cptr());
382 
383  // Create a UFO for all neutral and charged PFO which are not matched to any tracks
384  unsigned int i = -1;
385  for ( const xAOD::FlowElement* pfo : *pfos ) {
386  i++;
387  if(pfo->pt() <= 0) continue;
388  if(tccInfo.clusterToTracksWeightMap.find(pfo)!=tccInfo.clusterToTracksWeightMap.end())
389  {
390  // If the pfo is part of clusterToTracksWeightMap, this means it will be included as part of a combined UFO
391  continue;
392  }
393 
394  if(pfo->isCharged()) {
395  // this decoration is set by JetRecTools/Root/ChargedHadronSubtractionTool.cxx !
396  const static SG::AuxElement::Accessor<char> PVMatchedAcc("matchedToPV");
397  if(!PVMatchedAcc(*pfo)) continue;
398  }
399 
401  const std::vector< ElementLink<xAOD::FlowElementContainer> > PFOLink {pfoLink};
403  tccContainer->push_back(tcc);
404 
405  if(pfo->isCharged()) {
406  //retrieve the track from the charged PFO
407  const xAOD::IParticle* pfo_chargedobj=pfo->chargedObjects().at(0);
408  const xAOD::TrackParticle* pfo_track=dynamic_cast<const xAOD::TrackParticle*>(pfo_chargedobj);
409 
410  setParameters(tcc, pfo->pt(), pfo->eta(), pfo->phi(), pfo->m(), xAOD::FlowElement::SignalType::Charged, ElementLink<xAOD::TrackParticleContainer>(*tccInfo.allTracks, pfo_track->index()), PFOLink);
411  }else{
412  setParameters(tcc, pfo->pt(),pfo->eta(),pfo->phi(),pfo->m(),xAOD::FlowElement::SignalType::Neutral,ElementLink<xAOD::TrackParticleContainer>(),PFOLink);
413  }
414  } // PFO
415 
416  return StatusCode::SUCCESS;
417 }
TCCCombinedTool::m_doOriginCorrection
Gaudi::Property< bool > m_doOriginCorrection
Definition: TrackCaloClusterTool.h:78
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
TrackCaloClusterInfo.h
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
TrackCaloClusterBaseTool::m_saveDetectorEta
Gaudi::Property< bool > m_saveDetectorEta
flag to add dectetor eta decoration onto the produced TrackCaloClusters
Definition: TrackCaloClusterTool.h:59
TCCNeutralTool::fillTCC
virtual StatusCode fillTCC(xAOD::FlowElementContainer *container, const TrackCaloClusterInfo &tccInfo) const override
Definition: TrackCaloClusterTool.cxx:260
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TCCChargedTool::TCCChargedTool
TCCChargedTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackCaloClusterTool.cxx:195
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::FlowElement_v1::m
virtual double m() const override
The invariant mass of the particle.
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
SG::decorKeyFromKey
std::string decorKeyFromKey(const std::string &key)
Extract the decoration part of key.
Definition: DecorKeyHelpers.cxx:41
xAOD::FlowElement_v1::setSignalType
void setSignalType(signal_t t)
TCCHelpers::CombinedUFOLoop::m_orig_pfoK
std::string m_orig_pfoK
Definition: TCCHelpers.h:40
TCCHelpers::UFOBuilder::m_tccContainer
xAOD::FlowElementContainer * m_tccContainer
Definition: TrackCaloClusterTool.cxx:311
TCCNeutralTool::TCCNeutralTool
TCCNeutralTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackCaloClusterTool.cxx:246
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::CaloCluster_v1::m
virtual double m() const
The invariant mass of the particle.
Definition: CaloCluster_v1.cxx:261
sincos.h
Helper to simultaneously calculate sin and cos of the same angle.
TCCNeutralTool::initialize
virtual StatusCode initialize() override
Definition: TrackCaloClusterTool.cxx:249
UFOTool::m_inputPFOHandle
SG::ReadHandleKey< xAOD::FlowElementContainer > m_inputPFOHandle
Definition: TrackCaloClusterTool.h:134
xAOD::FlowElement_v1::SignalType
SignalType
Enum to encode the nature of the object this FlowElement represents.
Definition: FlowElement_v1.h:35
TrackCaloClusterInfo::allTracks
const xAOD::TrackParticleContainer * allTracks
Definition: TrackCaloClusterInfo.h:32
TrackCaloClusterInfo::trackTotalClusterPt
std::map< const xAOD::TrackParticle *, FourMom_t > trackTotalClusterPt
Definition: TrackCaloClusterInfo.h:29
InDetSecVtxTruthMatchUtils::isMatched
bool isMatched(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:48
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
xAOD::FlowElement_v1::phi
virtual double phi() const override
The azimuthal angle ( ) of the particle.
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
xAOD::FlowElement_v1::pt
virtual double pt() const override
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TCCCombinedTool::fillTCC
virtual StatusCode fillTCC(xAOD::FlowElementContainer *container, const TrackCaloClusterInfo &tccInfo) const override
Definition: TrackCaloClusterTool.cxx:107
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::FlowElement_v1::setOtherObjectLinks
void setOtherObjectLinks(const std::vector< ElementLink< IParticleContainer >> &elV)
TCCHelpers::UFOBuilder::m_tccInfo
const TrackCaloClusterInfo * m_tccInfo
Definition: TrackCaloClusterTool.cxx:310
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
DecorKeyHelpers.h
Some common helper functions used by decoration handles.
TrackCaloClusterBaseTool::m_trackVertexAssoTool
ToolHandle< CP::ITrackVertexAssociationTool > m_trackVertexAssoTool
The tool used to make sure a track is associated to PV0.
Definition: TrackCaloClusterTool.h:46
PUClassification.Charged
Charged
Definition: PUClassification.py:16
TCCHelpers::UFOBuilder::processTrk
virtual void processTrk(const xAOD::TrackParticle *trk)
Definition: TrackCaloClusterTool.cxx:327
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TCCHelpers::UFOBuilder::m_pfoContainer
const xAOD::FlowElementContainer * m_pfoContainer
Definition: TrackCaloClusterTool.cxx:309
TCCHelpers::CombinedUFOLoop::m_trackVertexAssoTool
const CP::ITrackVertexAssociationTool * m_trackVertexAssoTool
Definition: TCCHelpers.h:46
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:69
TCCChargedTool::fillTCC
virtual StatusCode fillTCC(xAOD::FlowElementContainer *container, const TrackCaloClusterInfo &tccInfo) const override
Definition: TrackCaloClusterTool.cxx:200
UFOTool::m_clusterEcut
Gaudi::Property< float > m_clusterEcut
cluster with E below this cut won't be considered in the TCC alg. WARNING cut must be configured as i...
Definition: TrackCaloClusterTool.h:139
TrackCaloClusterInfo
Definition: TrackCaloClusterInfo.h:23
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrackCaloClusterBaseTool::m_useEnergy
Gaudi::Property< bool > m_useEnergy
use cluster energy or pt?
Definition: TrackCaloClusterTool.h:49
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
UFOTool::initialize
virtual StatusCode initialize() override
Definition: TrackCaloClusterTool.cxx:348
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
TCCHelpers::UFOBuilder::m_tcc_4p
FourMom_t m_tcc_4p
Definition: TrackCaloClusterTool.cxx:314
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrackCaloClusterBaseTool
Definition: TrackCaloClusterTool.h:34
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
setParameters
void setParameters(T *h, TGraphAsymmErrors *tg)
Definition: computils.h:432
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
TCCHelpers::UFOBuilder::processPFO
virtual void processPFO(const xAOD::TrackParticle *trk, const xAOD::FlowElement *pfo)
Definition: TrackCaloClusterTool.cxx:316
met::ClusterLink
@ ClusterLink
Definition: METRecoCommon.h:12
xAOD::FlowElement_v1::signalType
signal_t signalType() const
UFOTool::UFOTool
UFOTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackCaloClusterTool.cxx:345
parseDir.wh
wh
Definition: parseDir.py:46
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::ParametersBase
Definition: ParametersBase.h:55
Prompt::FourMom_t
TLorentzVector FourMom_t
Definition: DecoratePLIT.h:31
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
TCCHelpers::CombinedUFOLoop::combinedUFOLoop
virtual void combinedUFOLoop(const TrackCaloClusterInfo *tccInfo, const xAOD::FlowElementContainer *pfos)
Definition: TCCHelpers.h:54
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TCCHelpers::UFOBuilder::m_pfoLinks
std::vector< ElementLink< xAOD::FlowElementContainer > > m_pfoLinks
Definition: TrackCaloClusterTool.cxx:313
TCCHelpers::CombinedUFOLoop::m_clustersLinkK
std::string m_clustersLinkK
Definition: TCCHelpers.h:42
TCCCombinedTool::TCCCombinedTool
TCCCombinedTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackCaloClusterTool.cxx:103
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
xAOD::CaloCluster_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CaloCluster_v1.cxx:465
xAOD::CaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Definition: CaloCluster_v1.cxx:247
TCCHelpers::CombinedUFOLoop::m_useEnergy
bool m_useEnergy
Definition: TCCHelpers.h:48
TCCHelpers.h
xAOD::FlowElement_v1::setChargedObjectLinks
void setChargedObjectLinks(const std::vector< ElementLink< IParticleContainer >> &elV)
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TCCNeutralTool::m_clusterFilterTool
ToolHandle< IClusterFilterTool > m_clusterFilterTool
optionnal tool to filter cluster we don't want to consider as TCC
Definition: TrackCaloClusterTool.h:114
xAOD::FlowElement_v1::e
virtual double e() const override
The total energy of the particle.
Definition: FlowElement_v1.cxx:25
TCCHelpers
\bried Internal helper class for TCC & UFO building.
Definition: TrackCaloClusterInfoAlg.cxx:103
TrackCaloClusterBaseTool::m_caloEntryParsDecor
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_caloEntryParsDecor
Definition: TrackCaloClusterTool.h:56
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
TrackCaloClusterInfo::clusterToTracksWeightMap
std::map< const xAOD::IParticle *, FourMom_t > clusterToTracksWeightMap
Definition: TrackCaloClusterInfo.h:30
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
UFOTool::fillTCC
virtual StatusCode fillTCC(xAOD::FlowElementContainer *container, const TrackCaloClusterInfo &tccInfo) const override
Definition: TrackCaloClusterTool.cxx:359
TrackCaloClusterBaseTool::TrackCaloClusterBaseTool
TrackCaloClusterBaseTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackCaloClusterTool.cxx:78
TrackCaloClusterInfo::pv0
const xAOD::Vertex * pv0
Definition: TrackCaloClusterInfo.h:34
SG::ReadHandle::ptr
const_pointer_type ptr()
Dereference the pointer.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::FlowElement_v1::eta
virtual double eta() const override
The pseudorapidity ( ) of the particle.
TrackCaloClusterBaseTool::initialize
virtual StatusCode initialize() override
Definition: TrackCaloClusterTool.cxx:86
xAOD::FlowElement_v1::p4
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Definition: FlowElement_v1.cxx:33
TCCHelpers::UFOBuilder
Implement a concrete CombinedUFOLoop dedicated to building UFO see TCCHelpers.h in TrackCaloClusterRe...
Definition: TrackCaloClusterTool.cxx:307
TCCHelpers::CombinedUFOLoop::m_clusterEcut
float m_clusterEcut
Definition: TCCHelpers.h:47
UFOTool::m_orig_pfo
Gaudi::Property< std::string > m_orig_pfo
Definition: TrackCaloClusterTool.h:136
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:76
xAOD::FlowElement_v1::setP4
void setP4(float pt, float eta, float phi, float m)
Definition: FlowElement_v1.cxx:39
ReadDecorHandle.h
Handle class for reading a decoration on an object.
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
TrackCaloClusterBaseTool::~TrackCaloClusterBaseTool
virtual ~TrackCaloClusterBaseTool()
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
python.CaloScaleNoiseConfig.ts
ts
Definition: CaloScaleNoiseConfig.py:86
TCCNeutralTool::m_applyFilter
bool m_applyFilter
Definition: TrackCaloClusterTool.h:115
TrackCaloClusterTool.h
TCCHelpers::CombinedUFOLoop
Implements a loop over tracks and pflow object to build UFOs.
Definition: TCCHelpers.h:34
TrackCaloClusterInfo::allClusters
const xAOD::CaloClusterContainer * allClusters
Definition: TrackCaloClusterInfo.h:33
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
TCCHelpers::CombinedUFOLoop::m_linkdecorkey
const SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > * m_linkdecorkey
Definition: TCCHelpers.h:49
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
TrackCaloClusterBaseTool::m_assoClustersKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_assoClustersKey
Definition: TrackCaloClusterTool.h:52
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25
TCCCombinedTool::m_storeCorrectedPosition
Gaudi::Property< bool > m_storeCorrectedPosition
Definition: TrackCaloClusterTool.h:79