ATLAS Offline Software
PFSubtractionTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
11 #include "eflowRec/eflowRecTrack.h"
15 #include "eflowRec/PFTrackFiller.h"
16 
20 
21 using namespace eflowSubtract;
22 
23 PFSubtractionTool::PFSubtractionTool(const std::string &type, const std::string &name, const IInterface *parent) : base_class(type, name, parent),
24  m_binnedParameters(std::make_unique<eflowEEtaBinnedParameters>())
25 {
26 }
27 
29 = default;
30 
32 {
33 
34  ATH_CHECK(m_theEOverPTool.retrieve());
35 
36  ATH_CHECK(m_theEOverPTool->fillBinnedParameters(m_binnedParameters.get()));
37 
39  if (!m_trkpos)
40  {
41  ATH_MSG_ERROR("Failed to get TrackPositionProvider for cluster preselection!");
42  return StatusCode::FAILURE;
43  }
44 
45  //Retrieve track-cluster matching tools
46  ATH_CHECK(m_theMatchingTool.retrieve());
49 
51 
52  //Set the level of the helpers to the same as the tool here
53  m_pfSubtractionStatusSetter.msg().setLevel(this->msg().level());
54  m_pfSubtractionEnergyRatioCalculator.msg().setLevel(this->msg().level());
55  m_subtractor.m_facilitator.msg().setLevel(this->msg().level());
56 
59  }
60 
62 
63  return StatusCode::SUCCESS;
64 }
65 
66 void PFSubtractionTool::execute(eflowCaloObjectContainer *theEflowCaloObjectContainer, eflowRecTrackContainer *recTrackContainer, eflowRecClusterContainer *recClusterContainer) const
67 {
68 
69  ATH_MSG_DEBUG("Executing");
70 
71  PFData data;
72  data.caloObjects = theEflowCaloObjectContainer;
73  const PFTrackFiller pfTrackFiller;
76 
77  const PFClusterFiller pfClusterFiller;
80 
81  ATH_MSG_DEBUG("This event has " << data.tracks.size() << " tracks " << data.clusters.size() << " clusters ");
82 
83  unsigned int numMatches = matchAndCreateEflowCaloObj(data);
84 
85  if (msgLvl(MSG::DEBUG)) printAllClusters(*recClusterContainer);
86 
87  if (!m_calcEOverP){
90  else performSubtraction(numMatches,data);
91  }
93  }
94  //eoverp mode calculation has been moved to a dedicated PFBaseTool.
95 
96 }
97 
99 
100  //Counts up how many tracks found at least 1 calorimeter cluster matched to it.
101  unsigned int nMatches(0);
102 
103  /* Cache the original number of eflowCaloObjects, if there were any */
104  const unsigned int nCaloObj = data.caloObjects->size();
105  const EventContext &ctx = Gaudi::Hive::currentContext();
106 
107  /* loop tracks in data.tracks and do matching */
108  for (auto *thisEfRecTrack : data.tracks)
109  {
111  if (!thisEfRecTrack->hasBin()) {
112  std::unique_ptr<eflowCaloObject> thisEflowCaloObject = std::make_unique<eflowCaloObject>();
113  thisEflowCaloObject->addTrack(thisEfRecTrack);
114  data.caloObjects->push_back(std::move(thisEflowCaloObject));
115  continue;
116  }
117 
118  if (msgLvl(MSG::DEBUG))
119  {
120  const xAOD::TrackParticle *track = thisEfRecTrack->getTrack();
121  ATH_MSG_DEBUG("Matching track with e,pt, eta and phi " << track->e() << ", " << track->pt() << ", " << track->eta() << " and " << track->phi());
122  }
123 
124  std::vector<eflowTrackClusterLink*> bestClusters;
125  std::vector<float> deltaRPrime;
126 
127  if (m_useTruthMatching){
128 
129  const xAOD::TruthParticle* trackMatchedTruthParticle = nullptr;
131 
132  const static SG::AuxElement::Accessor<TruthLink> truthLinkAccessor("truthParticleLink");
133 
134  TruthLink truthLink = truthLinkAccessor(*(thisEfRecTrack->getTrack()));
135  //if not valid don't print a WARNING because this is an expected condition as discussed here:
136  //https://indico.cern.ch/event/795039/contributions/3391771/attachments/1857138/3050771/TruthTrackFTAGWS.pdf
137  if (truthLink.isValid()) trackMatchedTruthParticle = *truthLink;
138 
139  if (trackMatchedTruthParticle){
140  double uniqueID = HepMC::uniqueID(trackMatchedTruthParticle);
141 
143  if (!caloClusterReadDecorHandleNLeadingTruthParticles.isValid()){
144  ATH_MSG_WARNING("Failed to retrieve CaloCluster decoration with key " << caloClusterReadDecorHandleNLeadingTruthParticles.key());
145  }
146 
147  for (auto * thisCluster : data.clusters){
148  //accessor for decoration
149  //split key into substring to get the name of the decoration
150 
151  std::string decorHandleName = m_caloClusterReadDecorHandleKeyNLeadingTruthParticles.key();
152  std::string::size_type pos = decorHandleName.find(".");
153  std::string decorName = decorHandleName.substr(pos+1);
154 
156 
157  std::vector<std::pair<unsigned int, double > > uniqueIDTruthPairs = accessor(*(thisCluster->getCluster()));
158 
159  for (auto &uniqueIDTruthPair : uniqueIDTruthPairs){
160  if (uniqueIDTruthPair.first == uniqueID){
161  eflowTrackClusterLink* thisLink = eflowTrackClusterLink::getInstance(thisEfRecTrack, thisCluster, ctx);
162  bestClusters.push_back(thisLink);
163  break;
164  }
165  }//loop over calocluster truth pair decorations
166  }//loop over caloclusters
167 
168  }//if have truth particle matched to track
169  else ATH_MSG_VERBOSE("Track with pt, eta and phi " << thisEfRecTrack->getTrack()->pt() << ", " << thisEfRecTrack->getTrack()->eta() << " and " << thisEfRecTrack->getTrack()->phi() << " does not have a valid truth pointer");
170  }
171  else if (!m_recoverSplitShowers){
176  std::vector<std::pair<eflowRecCluster *, float>> bestClusters_02 = m_theMatchingToolForPull_02->doMatches(thisEfRecTrack, data.clusters, -1);
177  for (auto &matchpair : bestClusters_02)
178  {
179  eflowRecCluster *theCluster = matchpair.first;
180  float distancesq = matchpair.second;
181  eflowTrackClusterLink *trackClusterLink = eflowTrackClusterLink::getInstance(thisEfRecTrack, theCluster, ctx);
182  if (distancesq < 0.15 * 0.15)
183  {
184  // Narrower cone is a subset of the selected clusters
185  // Distance returned is deltaR^2
186  thisEfRecTrack->addAlternativeClusterMatch(trackClusterLink, "cone_015");
187  }
188  thisEfRecTrack->addAlternativeClusterMatch(trackClusterLink, "cone_02");
189  }//loop over bestClusters_02
190 
191  //This matching scheme is used to match the calorimeter cluster(s) to be used in the charged showers subtraction for this track.
192  std::vector<std::pair<eflowRecCluster *, float>> matchedClusters = m_theMatchingTool->doMatches(thisEfRecTrack, data.clusters,m_nClusterMatchesToUse);
193  for (auto thePair : matchedClusters) {
194  bestClusters.push_back(eflowTrackClusterLink::getInstance(thisEfRecTrack, thePair.first, ctx));
195  if (m_addCPData) deltaRPrime.push_back(std::sqrt(thePair.second));
196  }
197  }
198  else {
199  const std::vector<eflowTrackClusterLink*>* matchedClusters_02 = thisEfRecTrack->getAlternativeClusterMatches("cone_02");
200  if (!matchedClusters_02) continue;
201  else bestClusters = *matchedClusters_02;
202  }
203 
204  if (bestClusters.empty()) continue;
205 
206  if (msgLvl(MSG::DEBUG))
207  {
208  for (auto *thisClusterLink : bestClusters ) {
209  xAOD::CaloCluster* thisCluster = thisClusterLink->getCluster()->getCluster();
210  ATH_MSG_DEBUG("Matched this track to cluster with e,pt, eta and phi " << thisCluster->e() << ", " << thisCluster->pt() << ", " << thisCluster->eta() << " and " << thisCluster->phi());
211  }
212  }
213 
214  nMatches++;
215 
216  //loop over the matched calorimeter clusters and associate tracks and clusters to each other as needed.
217  unsigned int linkIndex = 0;
218  for (auto *trkClusLink : bestClusters){
219 
220  eflowRecCluster *thisEFRecCluster = trkClusLink->getCluster();
221 
223  // Look up whether this cluster is intended for recovery
224  if (std::find(data.clusters.begin(), data.clusters.end(), trkClusLink->getCluster()) == data.clusters.end()) {
225  linkIndex++;
226  continue;
227  }
228  }
229 
230  eflowTrackClusterLink *trackClusterLink = eflowTrackClusterLink::getInstance(thisEfRecTrack, thisEFRecCluster, ctx);
231  thisEfRecTrack->addClusterMatch(trackClusterLink);
233  thisEfRecTrack->addDeltaRPrime(deltaRPrime[linkIndex]);
234  }
235  thisEFRecCluster->addTrackMatch(trackClusterLink);
236  }
237  linkIndex++;
238  }
239 
240  /* Create 3 types eflowCaloObjects: track-only, cluster-only, track-cluster-link */
241  std::vector<eflowRecCluster *> clusters(data.clusters.begin(), data.clusters.end());
243  unsigned int nCaloObjects = eflowCaloObjectMaker::makeTrkCluCaloObjects(data.tracks, clusters, data.caloObjects);
244  ATH_MSG_DEBUG("Created " << nCaloObjects << " eflowCaloObjects.");
245  if (msgLvl(MSG::DEBUG)){
246  for (auto thisEFlowCaloObject : *(data.caloObjects)){
247  ATH_MSG_DEBUG("This eflowCaloObject has " << thisEFlowCaloObject->nTracks() << " tracks and " << thisEFlowCaloObject->nClusters() << " clusters ");
248  for (unsigned int count = 0; count < thisEFlowCaloObject->nTracks(); count++){
249  const xAOD::TrackParticle* thisTrack = thisEFlowCaloObject->efRecTrack(count)->getTrack();
250  ATH_MSG_DEBUG("Have track with e, pt, eta and phi of " << thisTrack->e() << ", " << thisTrack->pt() << ", " << thisTrack->eta() << " and " << thisTrack->phi());
251  }
252  for (unsigned int count = 0; count < thisEFlowCaloObject->nClusters(); count++){
253  const xAOD::CaloCluster* thisCluster = thisEFlowCaloObject->efRecCluster(count)->getCluster();
254  ATH_MSG_DEBUG("Have cluster with e, pt, eta and phi of " << thisCluster->e() << ", " << thisCluster->pt() << ", " << thisCluster->eta() << " and " << thisCluster->phi());
255  }
256  }
257  }
258 
259  const double gaussianRadius = 0.032;
260  const double gaussianRadiusError = 1.0e-3;
261  const double maximumRadiusSigma = 3.0;
262 
263  eflowLayerIntegrator integrator(gaussianRadius, gaussianRadiusError, maximumRadiusSigma, m_isHLLHC);
264 
266  if (!m_recoverSplitShowers && 0 != nCaloObj) ATH_MSG_WARNING("Not in Split Showers Mode and already have " << nCaloObj << " eflowCaloObjects");
267 
268  //For each eflowCaloObject we calculate the expected energy deposit in the calorimeter and cell ordering for subtraction.
269  for (unsigned int iCalo = nCaloObj; iCalo < data.caloObjects->size(); ++iCalo) {
270  eflowCaloObject* thisEflowCaloObject = data.caloObjects->at(iCalo);
271  thisEflowCaloObject->simulateShower(&integrator, m_binnedParameters.get(), m_useNNEnergy ? &(*m_NNEnergyPredictorTool) : nullptr, m_useLegacyEBinIndex);
272  if (m_useTruthForChargedShowerSubtraction) m_theTruthShowerSimulator->simulateShower(*thisEflowCaloObject);
273 
274  }
275 
276  if (!m_recoverSplitShowers) return nMatches;
277  else return nCaloObj;
278 }
279 
280 void PFSubtractionTool::performSubtraction(const unsigned int& startingPoint,PFData &data) const{
281  unsigned int nEFCaloObs = data.caloObjects->size();
282  for (unsigned int iCalo = startingPoint; iCalo < nEFCaloObs; ++iCalo) {
283  eflowCaloObject* thisEflowCaloObject = data.caloObjects->at(iCalo);
284  this->performSubtraction(*thisEflowCaloObject);
285  }
286 }
287 
289 
290  ATH_MSG_DEBUG("In performSubtraction");
291 
292  unsigned int nClusters = thisEflowCaloObject.nClusters();
293  unsigned int nTrackMatches = thisEflowCaloObject.nTracks();
294 
295  ATH_MSG_DEBUG("Have got an eflowCaloObject with " << nClusters << " clusters and " << nTrackMatches << " track matches");
296 
297  if (msgLevel(MSG::DEBUG)){
298  for (unsigned int iTrack = 0; iTrack < nTrackMatches; ++iTrack){
299  eflowRecTrack* thisTrack = thisEflowCaloObject.efRecTrack(iTrack);
300  ATH_MSG_DEBUG("eflowCaloObject has track with E, pt and eta " << thisTrack->getTrack()->e() << ", " << thisTrack->getTrack()->pt() << " and " << thisTrack->getTrack()->eta());
301  }
302  }
303 
304  //To keep historical behaviour when in recover split showers mode allow tracks with no cluster matches to proceed.
305  if (!m_recoverSplitShowers && nClusters < 1) return;
306 
307  //Need at least one track in this eflowCaloObject to continue.
308  if (nTrackMatches < 1) return;
309 
310  double expectedEnergy = thisEflowCaloObject.getExpectedEnergy();
311  double clusterEnergy = thisEflowCaloObject.getClusterEnergy();
312  double expectedSigma = sqrt(thisEflowCaloObject.getExpectedVariance());
313 
314  /* Check e/p, if on first pass - return if e/p not consistent with expected e/p */
315  if (!m_recoverSplitShowers){
316  if (isEOverPFail(expectedEnergy, expectedSigma, clusterEnergy)) return;
317  }
318 
319  const std::vector<std::pair<eflowTrackClusterLink *, std::pair<float, float>>> &matchedTrackList = thisEflowCaloObject.efRecLink();
320 
321  ATH_MSG_DEBUG("Matched Track List has size " << matchedTrackList.size());
322 
323  if (msgLevel(MSG::DEBUG))
324  {
325  for (unsigned int iTrack = 0; iTrack < nTrackMatches; ++iTrack)
326  {
327  const xAOD::TrackParticle *thisTrack = thisEflowCaloObject.efRecTrack(iTrack)->getTrack();
328  ATH_MSG_DEBUG("eflowCaloObject has track match with E, pt and eta " << thisTrack->e() << ", " << thisTrack->pt() << " and " << thisTrack->eta());
329  }
330  }
331 
332  ATH_MSG_DEBUG("About to perform subtraction for this eflowCaloObject");
333 
334  bool wasAnnihilated = false;
335 
336  //First deal with non-split showers mode
337  if (!m_recoverSplitShowers){
338  /* Check if we can annihilate right away - true if matched cluster has only the expected energy deposit */
339  if (canAnnihilate(expectedEnergy, expectedSigma, clusterEnergy)){
340 
341  wasAnnihilated = true;
342 
343  std::vector<std::pair<xAOD::CaloCluster *, bool>> clusterList;
344  std::map<xAOD::CaloCluster *, double> clusterEnergyMap;
345  unsigned nCluster = thisEflowCaloObject.nClusters();
346  for (unsigned iCluster = 0; iCluster < nCluster; ++iCluster){
347  clusterList.emplace_back(thisEflowCaloObject.efRecCluster(iCluster)->getCluster(), false);
348  }
349 
350  ATH_MSG_DEBUG("We are going to annihilate. ExpectedEnergy, expectedSigma and clusterEnergy are " << expectedEnergy << ", " << expectedSigma << " and " << clusterEnergy);
351  if (msgLevel(MSG::DEBUG))
352  for (auto thisPair : clusterList)
353  ATH_MSG_DEBUG("Annihilating cluster with E and eta " << thisPair.first->e() << " and " << thisPair.first->eta());
354 
356 
357  //before we remove all the cells, we create a list of the removed cells if in doCPData mode
358  if (m_addCPData) this->addSubtractedCells(thisEflowCaloObject, clusterList);
359 
360  Subtractor::annihilateClusters(clusterList);
361 
362  if (msgLevel(MSG::DEBUG))
363  for (auto thisPair : clusterList)
364  ATH_MSG_DEBUG("Have Annihilated cluster with E and eta " << thisPair.first->e() << " and " << thisPair.first->eta());
365 
366  /* Flag all tracks in this system as subtracted */
367  for (unsigned iTrack = 0; iTrack < thisEflowCaloObject.nTracks(); ++iTrack){
368  eflowRecTrack *thisEfRecTrack = (matchedTrackList[iTrack].first)->getTrack();
369  if (!thisEfRecTrack->isSubtracted()) thisEfRecTrack->setSubtracted();
370  }
371 
372  }//if can annihilate this track-cluster systems matched cluster
373  }//split shower recovery mode or regular mode where above annihilation was not triggered
374  if (m_recoverSplitShowers || !wasAnnihilated){
375 
376  for (unsigned iTrack = 0; iTrack < thisEflowCaloObject.nTracks(); ++iTrack){
377 
378  eflowRecTrack *thisEfRecTrack = thisEflowCaloObject.efRecTrack(iTrack);
379 
380  ATH_MSG_DEBUG("About to subtract track with e, pt, eta and phi of " << thisEfRecTrack->getTrack()->e() << ", " << thisEfRecTrack->getTrack()->pt() << ", " << thisEfRecTrack->getTrack()->eta() << " and "
381  << thisEfRecTrack->getTrack()->eta());
382 
383  if (!thisEfRecTrack->hasBin()) continue;
384 
385  ATH_MSG_DEBUG("Have bin for this eflowCaloObject");
386 
387  if (thisEfRecTrack->isInDenseEnvironment() && !m_recoverSplitShowers) continue;
388 
389  ATH_MSG_DEBUG("Am not in dense environment for this eflowCaloObject");
390 
391  /* Get matched cluster via Links */
392  std::vector<eflowRecCluster *> matchedClusters;
393  std::vector<eflowTrackClusterLink *> links = thisEfRecTrack->getClusterMatches();
394  matchedClusters.reserve(links.size());
395  for (auto* thisEFlowTrackClusterLink : links)
396  matchedClusters.push_back(thisEFlowTrackClusterLink->getCluster());
398  std::sort(matchedClusters.begin(),
399  matchedClusters.end(),
401 
402  if (msgLvl(MSG::DEBUG)) {
403  for (auto* thisClus : matchedClusters)
405  "Haved matched cluster "
406  << thisClus->getCluster()->index() << " with e,pt, eta and phi of "
407  << thisClus->getCluster()->e() << ", "
408  << thisClus->getCluster()->pt() << ", "
409  << thisClus->getCluster()->eta() << " and "
410  << thisClus->getCluster()->phi() << " will be subtracted");
411  }
412 
413  /* Do subtraction */
414  std::vector<std::pair<xAOD::CaloCluster *, bool>> clusterSubtractionList;
415  clusterSubtractionList.reserve(matchedClusters.size());
416  std::map<xAOD::CaloCluster *, double> clusterEnergyMap;
417  for (auto *thisEFlowRecCluster : matchedClusters){
418  xAOD::CaloCluster *thisCluster = thisEFlowRecCluster->getCluster();
419  clusterSubtractionList.emplace_back(thisCluster, false);
420  clusterEnergyMap[thisCluster] = thisCluster->e();
421  }
422 
423  ATH_MSG_DEBUG("Have filled clusterSubtractionList for this eflowCaloObject");
424 
425  unsigned int trackIndex = thisEfRecTrack->getTrack()->index();
426 
427  //Previously we only checked this in recover split showers, but makes sense to check it in both passes.
428  auto sumClusEnergy = [](double accumulator, std::pair<xAOD::CaloCluster *, bool> thisPair){ return accumulator += thisPair.first->e();};
429  double totalClusterEnergy = std::accumulate(clusterSubtractionList.begin(),clusterSubtractionList.end(),0.0,sumClusEnergy);
430 
431  /* Check if we can annihilate right away - true if matched cluster has only the expected energy deposit */
432  if(canAnnihilate(thisEfRecTrack->getEExpect(),sqrt(thisEfRecTrack->getVarEExpect()),totalClusterEnergy)){
433 
434  if (msgLevel(MSG::DEBUG))
435  for (auto thisPair : clusterSubtractionList)
436  ATH_MSG_DEBUG("Annihilating cluster with E and eta " << thisPair.first->e() << " and " << thisPair.first->eta());
437 
438  //before we remove all the cells, we create a list of the removed cells if in doCPData mode
439  if (m_addCPData) this->addSubtractedCells(thisEflowCaloObject, clusterSubtractionList);
440 
441  Subtractor::annihilateClusters(clusterSubtractionList);
442  //Now we should mark all of these clusters as being subtracted
443  //Now need to mark which clusters were modified in the subtraction procedure
444  std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
445  m_pfSubtractionEnergyRatioCalculator.calculateSubtractedEnergyRatiosForAnnih(clusterSubtractionList, clusterEnergyMap, clusterSubtractedEnergyRatios);
446  m_pfSubtractionStatusSetter.markSubtractionStatus(clusterSubtractionList, clusterSubtractedEnergyRatios, thisEflowCaloObject, trackIndex);
447  }
448  else
449  {
450 
451  /* Subtract the track from all matched clusters */
452  m_subtractor.subtractTracksFromClusters(thisEfRecTrack, clusterSubtractionList, m_addCPData);
453 
454  //recalculate total cluster energy from the clusters afer subtraction
455  totalClusterEnergy = std::accumulate(clusterSubtractionList.begin(),clusterSubtractionList.end(),0.0,sumClusEnergy);
456 
457  /* Annihilate the cluster(s) if the remnant is small (i.e. below k*sigma) */
458  if (canAnnihilate(0.0,sqrt(thisEfRecTrack->getVarEExpect()), totalClusterEnergy)){
459 
460  if (msgLevel(MSG::DEBUG))
461  for (auto thisPair : clusterSubtractionList){
462  ATH_MSG_DEBUG("Annihilating remnant cluster with E and eta " << thisPair.first->e() << " and " << thisPair.first->eta());
463  }
464  eflowSubtract::Subtractor::annihilateClusters(clusterSubtractionList);
465  //Now we should mark all of these clusters as being subtracted
466  std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
467  m_pfSubtractionEnergyRatioCalculator.calculateSubtractedEnergyRatiosForAnnih(clusterSubtractionList, clusterEnergyMap, clusterSubtractedEnergyRatios);
468  m_pfSubtractionStatusSetter.markSubtractionStatus(clusterSubtractionList, clusterSubtractedEnergyRatios, thisEflowCaloObject, trackIndex);
469  }//if remove the remnant after cell by cell subtraction
470  else
471  {
472  std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
473  m_pfSubtractionEnergyRatioCalculator.calculateSubtractedEnergyRatios(clusterSubtractionList, clusterEnergyMap, clusterSubtractedEnergyRatios);
474  m_pfSubtractionStatusSetter.markSubtractionStatus(clusterSubtractionList, clusterSubtractedEnergyRatios, thisEflowCaloObject, trackIndex);
475  }//if don't remove the remnant after cell by cell subtraction
476 
477  }//if not annihilating, and instead subtracting cell by cell
478 
479  ATH_MSG_DEBUG("Have subtracted charged shower for this eflowRecTrack");
480 
481  /* Flag tracks as subtracted */
482  if (!thisEfRecTrack->isSubtracted()) thisEfRecTrack->setSubtracted();
483 
484  }//loop over tracks in eflowCaloObject
485  }//cell by cell subtraction
486 
487 }
488 
490 
491  ATH_MSG_DEBUG("In performTruthSubtraction");
492 
493  unsigned int nEFCaloObs = data.caloObjects->size();
494 
495  for (unsigned int iCalo = 0; iCalo < nEFCaloObs; ++iCalo) {
496  eflowCaloObject* thisEflowCaloObject = data.caloObjects->at(iCalo);
497  this->performTruthSubtraction(*thisEflowCaloObject);
498  }
499 
500 }
501 
503 
504  for (unsigned iTrack = 0; iTrack < thisEflowCaloObject.nTracks(); ++iTrack){
505  eflowRecTrack *thisEfRecTrack = thisEflowCaloObject.efRecTrack(iTrack);
506 
507  //although we are subtracting the truth, to be consistent we only do it if a reco
508  //e/p lookup bin exists for this track
509  if (!thisEfRecTrack->hasBin()) continue;
510 
511  //Similarly we skip tracks in a dense environment
512  if (thisEfRecTrack->isInDenseEnvironment()) continue;
513 
514  thisEfRecTrack->setSubtracted();
515 
516  //get the set of matched clusters
517  std::vector<eflowTrackClusterLink *> links = thisEfRecTrack->getClusterMatches();
518 
519  for (auto thisLink : links){
520  xAOD::CaloCluster *thisCluster = thisLink->getCluster()->getCluster();
521  CaloClusterCellLink* theCellLinks = thisCluster->getOwnCellLinks();
522  CaloClusterCellLink::iterator theCell = theCellLinks->begin();
523  CaloClusterCellLink::iterator lastCell = theCellLinks->end();
524 
525  //loop over the cells in this cluster and subtract shower using truth information
526  //We can either remove a cell entireley if it has any truth deposit (closer to what the real
527  //reco algorithm does) or reweight the cells contribution based on subtracting the truth
528  //energy from the reco cell energy
529  //We only advance the iterator, theCell, if we *dont* call removeCell to avoid issues with
530  //invalid iterators
531  //We also have to reset the lastCell iterator after each call to ensure the loop exits at the end,
532  //instead of being stuck in an infinite loop.
533  for (; theCell != lastCell;){
534  //get the truth energy for this cell
535  double truthEnergy = thisEfRecTrack->getCellTruthEnergy(*theCell);
536  //reweight the cell such that energy*weight gives the new energy
537  double oldCellEnergy = theCell->energy()*(theCell.weight());
538  double subtractedCellWeight = (oldCellEnergy - truthEnergy)/oldCellEnergy;
539 
540  if (0.0 != truthEnergy && m_useFullCellTruthSubtraction) {
541  thisCluster->removeCell(*theCell);
542  lastCell = theCellLinks->end();
543  }
544  else if (!m_useFullCellTruthSubtraction) {
545  theCell.reweight(subtractedCellWeight);
546  ++theCell;
547  }
548  else ++theCell;
549 
550  }//cell loop
551 
552  float oldEnergy = thisCluster->e();
553  CaloClusterKineHelper::calculateKine(thisCluster, true, true);
554  if (0.0 != oldEnergy) {
555  float energyAdjustment = thisCluster->e() / oldEnergy;
556  thisCluster->setRawE(thisCluster->rawE() * energyAdjustment);
557  thisCluster->setRawEta(thisCluster->eta());
558  thisCluster->setRawPhi(thisCluster->phi());
559  }
560  }
561 
562  }//eflowCaloObject track loop
563 
564 }
565 
566 bool PFSubtractionTool::isEOverPFail(double expectedEnergy, double sigma, double clusterEnergy) const
567 {
568  if ((expectedEnergy == 0) && (clusterEnergy > 0)) return false;
569  return clusterEnergy < expectedEnergy - m_consistencySigmaCut * sigma;
570 }
571 
572 bool PFSubtractionTool::canAnnihilate(double expectedEnergy, double sigma, double clusterEnergy) const
573 {
574  return clusterEnergy - expectedEnergy < m_subtractionSigmaCut * sigma;
575 }
576 
578  std::stringstream result;
579  result << " track with E, eta and phi "<< track->e() << ", " << track->eta() << " and " << track->phi();
580  return result.str();
581 }
582 
584  std::stringstream result;
585  result << " cluster with E, eta and phi of " << cluster->e() << ", " << cluster->eta() << " and " << cluster->phi();
586  return result.str();
587 }
588 
589 void PFSubtractionTool::printAllClusters(const eflowRecClusterContainer& recClusterContainer) const {
590 
591  for ( const auto *thisEFRecCluster : recClusterContainer){
592  if (thisEFRecCluster->getTrackMatches().empty()) {
593  ATH_MSG_DEBUG("Isolated" << printCluster(thisEFRecCluster->getCluster()));
594  } else {
595  ATH_MSG_DEBUG("Matched" << printCluster(thisEFRecCluster->getCluster()));
596  std::vector<eflowTrackClusterLink*> theTrackLinks = thisEFRecCluster->getTrackMatches();
597  for ( auto *thisTrack : theTrackLinks){
598  ATH_MSG_DEBUG("Matched" << printTrack(thisTrack->getTrack()->getTrack()));
599  }
600  }
601  }
602 }
603 
604 void PFSubtractionTool::addSubtractedCells(eflowCaloObject& thisEflowCaloObject, const std::vector<std::pair<xAOD::CaloCluster *, bool> >& clusterList) const{
605 
606  unsigned int numTracks = thisEflowCaloObject.nTracks();
607 
608  for (unsigned int iTrack = 0; iTrack < numTracks; ++iTrack){
609  eflowRecTrack* thisTrack = thisEflowCaloObject.efRecTrack(iTrack);
610  for (auto thisPair : clusterList){
611  xAOD::CaloCluster* thisCluster = thisPair.first;
612  const CaloClusterCellLink* theCellLink = thisCluster->getCellLinks();
613  CaloClusterCellLink::const_iterator theCell = theCellLink->begin();
614  CaloClusterCellLink::const_iterator lastCell = theCellLink->end();
615  for (; theCell != lastCell; ++theCell) thisTrack->addSubtractedCaloCell(ElementLink<CaloCellContainer>("AllCalo",theCell.index()),theCell.weight()/numTracks);
616  }
617  }
618 }
619 
620 StatusCode PFSubtractionTool::finalize() { return StatusCode::SUCCESS; }
eflowRecCluster
This class extends the information about a xAOD::CaloCluster.
Definition: eflowRecCluster.h:40
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
eflowRecCluster::SortDescendingPt
Definition: eflowRecCluster.h:124
CaloClusterKineHelper.h
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:75
xAOD::CaloCluster_v1::rawE
flt_t rawE() const
eflowCaloObject::nClusters
unsigned nClusters() const
Definition: eflowCaloObject.h:60
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
PFSubtractionTool::performTruthSubtraction
void performTruthSubtraction(PFData &data) const
Definition: PFSubtractionTool.cxx:489
eflowCaloObject::getExpectedEnergy
double getExpectedEnergy() const
Definition: eflowCaloObject.cxx:40
eflowEEtaBinnedParameters
Inherits from eflowEEtaBinBase.
Definition: eflowEEtaBinnedParameters.h:56
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
IEFlowCellEOverPTool.h
eflowLayerIntegrator
This class calculates the LHED (Layer of Highest Energy Density) in a cluster or group of clusters.
Definition: eflowLayerIntegrator.h:35
get_generator_info.result
result
Definition: get_generator_info.py:21
eflowCaloObject::efRecLink
const std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > & efRecLink() const
Definition: eflowCaloObject.h:65
PFSubtractionTool::m_isHLLHC
Gaudi::Property< bool > m_isHLLHC
Toggle whether we have the HLLHC setup.
Definition: PFSubtractionTool.h:84
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
PFSubtractionTool::m_useTruthMatching
Gaudi::Property< bool > m_useTruthMatching
Toggle whether to cheat and use truth information for track-cluster matching - only for performance s...
Definition: PFSubtractionTool.h:111
PFSubtractionTool::m_subtractor
eflowSubtract::Subtractor m_subtractor
Definition: PFSubtractionTool.h:101
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
eflowSubtract
Definition: eflowSubtractor.h:27
eflowRecTrack::isInDenseEnvironment
bool isInDenseEnvironment() const
Definition: eflowRecTrack.h:103
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
PFClusterFiller::fillClustersToRecover
static void fillClustersToRecover(PFData &data)
Definition: PFClusterFiller.cxx:5
eflowRecCluster::addTrackMatch
void addTrackMatch(eflowTrackClusterLink *trackMatch)
Definition: eflowRecCluster.h:69
PFSubtractionEnergyRatioCalculator::calculateSubtractedEnergyRatios
void calculateSubtractedEnergyRatios(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, std::map< xAOD::CaloCluster *, double > &clusterEnergyMap, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios) const
For each xAOD::CaloCluster in clusterSubtractionList we calculate the ratio of new to old energy afte...
Definition: PFSubtractionEnergyRatioCalculator.cxx:13
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:79
PFSubtractionTool::m_NNEnergyPredictorTool
ToolHandle< PFEnergyPredictorTool > m_NNEnergyPredictorTool
Tool for getting predictiing the energy using an ONNX model.
Definition: PFSubtractionTool.h:104
PFSubtractionStatusSetter::markAllTracksAnnihStatus
void markAllTracksAnnihStatus(eflowCaloObject &thisEflowCaloObject) const
Set the ratio of new to old cluster energy, to zero, for all cluster matched to all tracks attached t...
Definition: PFSubtractionStatusSetter.cxx:71
runITkAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runITkAlign.py:62
TruthParticleContainer.h
eflowRecClusterContainer
Definition: eflowRecCluster.h:275
eflowRecTrack::getCellTruthEnergy
double getCellTruthEnergy(const CaloCell *cell) const
Definition: eflowRecTrack.cxx:95
TruthLink
ElementLink< xAOD::TruthParticleContainer > TruthLink
Definition: TruthRelatedMuonPlotOrganizer.cxx:12
PFSubtractionTool::m_consistencySigmaCut
Gaudi::Property< double > m_consistencySigmaCut
Parameter that controls whether a track, in a track-cluster system, will be processed by the split sh...
Definition: PFSubtractionTool.h:90
PFSubtractionTool::m_useTruthForChargedShowerSubtraction
Gaudi::Property< bool > m_useTruthForChargedShowerSubtraction
Toggle whether we use truth information for the charged shower subtraction or not.
Definition: PFSubtractionTool.h:114
eflowRecTrack::hasBin
bool hasBin() const
Definition: eflowRecTrack.h:74
PFSubtractionTool::m_trkpos
std::unique_ptr< PFMatch::TrackEtaPhiInFixedLayersProvider > m_trkpos
Track position provider to be used to preselect clusters.
Definition: PFSubtractionTool.h:68
PFSubtractionTool.h
PFSubtractionTool::matchAndCreateEflowCaloObj
unsigned int matchAndCreateEflowCaloObj(PFData &data) const
This matches ID tracks and CaloClusters, and then creates eflowCaloObjects.
Definition: PFSubtractionTool.cxx:98
eflowCaloObject
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
Definition: eflowCaloObject.h:34
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
eflowSubtract::Subtractor::subtractTracksFromClusters
void subtractTracksFromClusters(eflowRecTrack *efRecTrack, std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, const bool &addCPData) const
Definition: eflowSubtractor.cxx:27
eflowCaloObjectMaker.h
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
PFMatch::TrackPositionFactory::Get
static std::unique_ptr< IPositionProvider > Get(const std::string &positionType)
Definition: PFMatchPositions.h:95
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:327
eflowRecTrack::addSubtractedCaloCell
void addSubtractedCaloCell(ElementLink< CaloCellContainer > theCellLink, const double &weight)
Definition: eflowRecTrack.h:115
eflowCaloObject::getExpectedVariance
double getExpectedVariance() const
Definition: eflowCaloObject.cxx:48
eflowCaloObject::addTrack
void addTrack(eflowRecTrack *track)
Definition: eflowCaloObject.h:40
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition: eflowRecTrack.h:46
PFTrackFiller
Definition: PFTrackFiller.h:7
PFSubtractionTool::m_pfSubtractionStatusSetter
PFSubtractionStatusSetter m_pfSubtractionStatusSetter
Definition: PFSubtractionTool.h:99
eflowRecTrack::setSubtracted
void setSubtracted()
Definition: eflowRecTrack.cxx:100
eflowRecTrack::getClusterMatches
const std::vector< eflowTrackClusterLink * > & getClusterMatches() const
Definition: eflowRecTrack.h:67
PFSubtractionTool::m_theEOverPTool
ToolHandle< IEFlowCellEOverPTool > m_theEOverPTool
Tool for getting e/p values and hadronic shower cell ordering principle parameters.
Definition: PFSubtractionTool.h:63
eflowLayerIntegrator.h
eflowRecTrack.h
PFSubtractionTool::m_useNNEnergy
Gaudi::Property< bool > m_useNNEnergy
Toggle whether we use the neural net energy.
Definition: PFSubtractionTool.h:107
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
eflowCaloObject::efRecTrack
const eflowRecTrack * efRecTrack(int i) const
Definition: eflowCaloObject.h:52
PFSubtractionTool::execute
void execute(eflowCaloObjectContainer *theEflowCaloObjectContainer, eflowRecTrackContainer *recTrackContainer, eflowRecClusterContainer *recClusterContainer) const
Definition: PFSubtractionTool.cxx:66
PFSubtractionTool::m_nClusterMatchesToUse
Gaudi::Property< int > m_nClusterMatchesToUse
Number of clusters to match to each track if not doing recover split shower subtraction.
Definition: PFSubtractionTool.h:81
xAOD::CaloCluster_v1::setRawE
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:284
PFSubtractionTool::printAllClusters
void printAllClusters(const eflowRecClusterContainer &recClusterContainer) const
Definition: PFSubtractionTool.cxx:589
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::CaloCluster_v1::removeCell
bool removeCell(const CaloCell *ptr)
Method to remove a cell to the cluster (slow!) (Beware: Kinematics not updated!)
Definition: CaloCluster_v1.cxx:847
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
PFSubtractionTool::isEOverPFail
bool isEOverPFail(double expectedEnergy, double sigma, double clusterEnergy) const
Definition: PFSubtractionTool.cxx:566
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
PFSubtractionTool::performSubtraction
void performSubtraction(const unsigned int &startingPoint, PFData &data) const
Definition: PFSubtractionTool.cxx:280
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
eflowRecTrack::isSubtracted
bool isSubtracted() const
Definition: eflowRecTrack.h:80
DMTest::links
links
Definition: CLinks_v1.cxx:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
PFSubtractionTool::initialize
StatusCode initialize()
Definition: PFSubtractionTool.cxx:31
PFSubtractionTool::PFSubtractionTool
PFSubtractionTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PFSubtractionTool.cxx:23
PFSubtractionTool::m_theMatchingToolForPull_02
ToolHandle< PFTrackClusterMatchingTool > m_theMatchingToolForPull_02
Definition: PFSubtractionTool.h:75
PFClusterFiller
Definition: PFClusterFiller.h:7
PFSubtractionStatusSetter::markSubtractionStatus
void markSubtractionStatus(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterList, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios, eflowCaloObject &thisEflowCaloObject, unsigned int trackIndex) const
Set the ratio of new to old cluster energy for each cluster matched to a track with trackIndex.
Definition: PFSubtractionStatusSetter.cxx:17
PFSubtractionEnergyRatioCalculator::calculateSubtractedEnergyRatiosForAnnih
void calculateSubtractedEnergyRatiosForAnnih(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, std::map< xAOD::CaloCluster *, double > &clusterEnergyMap, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios) const
If we have decided to annihiliate all clusters in clusterSubtractionList we use this function to set ...
Definition: PFSubtractionEnergyRatioCalculator.cxx:49
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
eflowRecTrack::getEExpect
double getEExpect() const
Definition: eflowRecTrack.h:84
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
PFSubtractionTool::m_calcEOverP
Gaudi::Property< bool > m_calcEOverP
Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed.
Definition: PFSubtractionTool.h:87
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::CaloCluster_v1::setRawEta
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:289
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
eflowRecCluster::getCluster
xAOD::CaloCluster * getCluster()
Definition: eflowRecCluster.h:49
eflowCaloObject::nTracks
unsigned nTracks() const
Definition: eflowCaloObject.h:54
PFSubtractionTool::~PFSubtractionTool
~PFSubtractionTool()
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
eflowSubtract::Subtractor::m_facilitator
eflowCellSubtractionFacilitator m_facilitator
Definition: eflowSubtractor.h:56
PFData
Definition: PFData.h:11
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:829
PFSubtractionTool::m_pfSubtractionEnergyRatioCalculator
PFSubtractionEnergyRatioCalculator m_pfSubtractionEnergyRatioCalculator
Definition: PFSubtractionTool.h:100
PFSubtractionTool::m_recoverSplitShowers
Gaudi::Property< bool > m_recoverSplitShowers
Toggle whether we are recovering split showers or not.
Definition: PFSubtractionTool.h:78
PFSubtractionTool::m_useLegacyEBinIndex
Gaudi::Property< bool > m_useLegacyEBinIndex
Further discussion about why this flag exists can be found in https://its.cern.ch/jira/browse/ATLJETM...
Definition: PFSubtractionTool.h:129
PFSubtractionTool::printTrack
static std::string printTrack(const xAOD::TrackParticle *track)
Definition: PFSubtractionTool.cxx:577
xAOD::CaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Definition: CaloCluster_v1.cxx:247
eflowRecTrack::getTrack
const xAOD::TrackParticle * getTrack() const
Definition: eflowRecTrack.h:54
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
PFSubtractionTool::m_caloClusterReadDecorHandleKeyNLeadingTruthParticles
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > m_caloClusterReadDecorHandleKeyNLeadingTruthParticles
Read handle key to decorate CaloCluster with threeN leading truth particle uniqueID and energy.
Definition: PFSubtractionTool.h:122
eflowCaloObject.h
eflowCaloObjectMaker::makeTrkCluCaloObjects
static unsigned int makeTrkCluCaloObjects(eflowRecTrackContainer *eflowTrackContainer, eflowRecClusterContainer *eflowClusterContainer, eflowCaloObjectContainer *caloObjectContainer)
Definition: eflowCaloObjectMaker.cxx:25
PFSubtractionTool::addSubtractedCells
void addSubtractedCells(eflowCaloObject &thisEflowCaloObject, const std::vector< std::pair< xAOD::CaloCluster *, bool > > &clusterList) const
Definition: PFSubtractionTool.cxx:604
PFSubtractionTool::m_subtractionSigmaCut
Gaudi::Property< double > m_subtractionSigmaCut
Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system,...
Definition: PFSubtractionTool.h:93
PFClusterFiller::fillClustersToConsider
static void fillClustersToConsider(PFData &data, eflowRecClusterContainer &recClusterContainer)
Definition: PFClusterFiller.cxx:25
xAOD::TrackParticle_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: TrackParticle_v1.cxx:111
PFSubtractionTool::canAnnihilate
bool canAnnihilate(double expectedEnergy, double sigma, double clusterEnergy) const
Definition: PFSubtractionTool.cxx:572
xAOD::JetAttributeAccessor::accessor
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Definition: JetAccessorMap.h:26
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
PFSubtractionTool::m_useFullCellTruthSubtraction
Gaudi::Property< bool > m_useFullCellTruthSubtraction
Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution...
Definition: PFSubtractionTool.h:117
eflowRecTrackContainer
Definition: eflowRecTrack.h:191
PFTrackFiller::fillTracksToConsider
static void fillTracksToConsider(PFData &data, eflowRecTrackContainer &recTrackContainer)
Definition: PFTrackFiller.cxx:57
PFSubtractionTool::m_theMatchingTool
ToolHandle< PFTrackClusterMatchingTool > m_theMatchingTool
Default track-cluster matching tool.
Definition: PFSubtractionTool.h:71
PFSubtractionTool::printCluster
static std::string printCluster(const xAOD::CaloCluster *cluster)
Definition: PFSubtractionTool.cxx:583
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
eflowCaloObject::efRecCluster
const eflowRecCluster * efRecCluster(int i) const
Definition: eflowCaloObject.h:58
PFSubtractionTool::m_theTruthShowerSimulator
ToolHandle< PFSimulateTruthShowerTool > m_theTruthShowerSimulator
Definition: PFSubtractionTool.h:119
eflowRecTrack::getVarEExpect
double getVarEExpect() const
Definition: eflowRecTrack.h:85
xAOD::CaloCluster_v1::getOwnCellLinks
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)
Definition: CaloCluster_v1.h:765
DEBUG
#define DEBUG
Definition: page_access.h:11
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
PFMatch::TrackEtaPhiInFixedLayersProvider
Definition: PFMatchPositions.h:76
CaloClusterKineHelper::calculateKine
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
Definition: CaloClusterKineHelper.cxx:223
PFSubtractionTool::m_binnedParameters
std::unique_ptr< eflowEEtaBinnedParameters > m_binnedParameters
Definition: PFSubtractionTool.h:65
PFSubtractionTool::m_theMatchingToolForPull_015
ToolHandle< PFTrackClusterMatchingTool > m_theMatchingToolForPull_015
Definition: PFSubtractionTool.h:74
ReadDecorHandle.h
Handle class for reading a decoration on an object.
PFSubtractionTool::finalize
StatusCode finalize()
Definition: PFSubtractionTool.cxx:620
eflowCaloObject::getClusterEnergy
double getClusterEnergy() const
Definition: eflowCaloObject.cxx:56
egammaParameters::linkIndex
@ linkIndex
link index for multiple track and vertex matches
Definition: egammaParamDefs.h:574
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:44
PFTrackFiller::fillTracksToRecover
static void fillTracksToRecover(PFData &data)
Definition: PFTrackFiller.cxx:5
PFClusterFiller.h
PFTrackFiller.h
eflowCaloObjectContainer
Definition: eflowCaloObject.h:101
PFSubtractionTool::m_addCPData
Gaudi::Property< bool > m_addCPData
Toggle whether to decorate eflowRecTrack with addutional data for Combined Performance studies.
Definition: PFSubtractionTool.h:96
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
eflowEEtaBinnedParameters.h
eflowCaloObject::simulateShower
void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters *binnedParameters, const PFEnergyPredictorTool *energyP, bool useLegacyEnergyBinIndexing)
Definition: eflowCaloObject.cxx:64
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
xAOD::CaloCluster_v1::setRawPhi
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:294
eflowSubtract::Subtractor::annihilateClusters
static void annihilateClusters(std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusters)
Definition: eflowSubtractor.cxx:78