ATLAS Offline Software
TauCommonExtraDetails.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
14 
15 //TauEvent includes
16 #include "tauEvent/TauCmp.h"
18 //Other includes
20 #include "AthenaKernel/ClassName.h"
21 #include "AthLinks/ElementLink.h"
22 //C/C++ includes
23 #include <string>
24 #include <vector>
25 
26 namespace Analysis {
27 
28  //Default constructor
29  //Initializes members to default values where applicable
31  TauDetails(),
32  //Applicable for track & calo seeded tau reconstruction
33  m_sumPtLooseTrk(),
34  m_sumPtTrk(),
35  //Applicable for calo seeded tau reconstruction
36  m_seedCalo_nEMCell(),
37  m_seedCalo_stripEt(),
38  m_seedCalo_EMCentFrac(),
39  m_seedCalo_sumCellEnergy(),
40  m_seedCalo_sumEMCellEnergy()
41  {
42  allocTracksAndSamplings( 10, 4 );
43  }
44 
45  //Copy constructor
47  const TauCommonExtraDetails &rhs ):
48  TauDetails(),
49  //Applicable for track & calo seeded tau reconstruction
50  m_sumPtLooseTrk(rhs.m_sumPtLooseTrk),
51  m_sumPtTrk(rhs.m_sumPtTrk),
52  m_closestEtaTrkVertCell(rhs.m_closestEtaTrkVertCell),
53  m_closestPhiTrkVertCell(rhs.m_closestPhiTrkVertCell),
54  m_closestEtaTrkCell(rhs.m_closestEtaTrkCell),
55  m_closestPhiTrkCell(rhs.m_closestPhiTrkCell),
56  m_etaTrkCaloSamp(rhs.m_etaTrkCaloSamp),
57  m_phiTrkCaloSamp(rhs.m_phiTrkCaloSamp),
58  m_etaLooseTrkCaloSamp(rhs.m_etaLooseTrkCaloSamp),
59  m_phiLooseTrkCaloSamp(rhs.m_phiLooseTrkCaloSamp),
60  //Applicable for calo seeded tau reconstruction
61  m_seedCalo_nEMCell(rhs.m_seedCalo_nEMCell),
62  m_seedCalo_stripEt(rhs.m_seedCalo_stripEt),
63  m_seedCalo_EMCentFrac(rhs.m_seedCalo_EMCentFrac),
64  m_seedCalo_sumCellEnergy(rhs.m_seedCalo_sumCellEnergy),
65  m_seedCalo_sumEMCellEnergy(rhs.m_seedCalo_sumEMCellEnergy)
66  {
67  }
68 
69  //Destructor
71  {
72  }
73 
74  //Assignment operator
76  const TauCommonExtraDetails &rhs )
77  {
78  if( this != &rhs )
79  {
90  //Applicable for calo seeded tau reconstruction
96  }
97  return *this;
98  }
99 
101  const TauCommonExtraDetails& rhs ) const
102  {
103  //Double comparisons
105  return false;
107  return false;
109  return false;
111  return false;
113  return false;
116  return false;
117  //Interger comparisons
118  if ( m_seedCalo_nEMCell != rhs.m_seedCalo_nEMCell) return false;
119  //Vector vector double comparisons
121  return false;
123  return false;
125  return false;
127  return false;
128  //Vector vector Element links
130  return false;
132  return false;
134  return false;
136  return false;
137  return true;
138  }
139 
141  const unsigned int tracks,
142  const unsigned int samplings )
143  {
144  if ( tracks == 0 || samplings == 0 )
145  return;
146  std::vector<ElementLink<CaloCellContainer> > initEL( samplings );
147  m_closestEtaTrkVertCell.clear();
148  m_closestEtaTrkVertCell.resize( tracks, initEL );
149  m_closestEtaTrkCell.clear();
150  m_closestEtaTrkCell.resize( tracks, initEL );
151  m_closestPhiTrkVertCell.clear();
152  m_closestPhiTrkVertCell.resize( tracks, initEL );
153  m_closestPhiTrkCell.clear();
154  m_closestPhiTrkCell.resize( tracks, initEL );
155  std::vector<double> initD( samplings, TauDetails::DEFAULT );
156  m_etaTrkCaloSamp.clear();
157  m_etaTrkCaloSamp.resize( tracks, initD );
158  m_phiTrkCaloSamp.clear();
159  m_phiTrkCaloSamp.resize( tracks, initD );
160  m_etaLooseTrkCaloSamp.clear();
161  m_etaLooseTrkCaloSamp.resize( tracks, initD );
162  m_phiLooseTrkCaloSamp.clear();
163  m_phiLooseTrkCaloSamp.resize( tracks, initD );
164  }
165 
166  //Class name
167  const std::string TauCommonExtraDetails::s_className =
169 
170  const std::string& TauCommonExtraDetails::className() const
171  {
172  return s_className;
173  }
174 
175 } //Namespace analysis
Analysis::TauCommonExtraDetails::m_closestPhiTrkCell
std::vector< std::vector< ElementLink< CaloCellContainer > > > m_closestPhiTrkCell
Closest cell to track position from extrapolation in phi.
Definition: TauCommonExtraDetails.h:450
Analysis::TauCommonExtraDetails::operator==
bool operator==(const TauCommonExtraDetails &rhs) const
Equality operator.
Definition: TauCommonExtraDetails.cxx:100
Analysis::TauCommonExtraDetails::m_closestPhiTrkVertCell
std::vector< std::vector< ElementLink< CaloCellContainer > > > m_closestPhiTrkVertCell
Closest cell to track position at vertex in phi.
Definition: TauCommonExtraDetails.h:438
Analysis::TauCommonExtraDetails::operator=
TauCommonExtraDetails & operator=(const TauCommonExtraDetails &rhs)
Assignment operator.
Definition: TauCommonExtraDetails.cxx:75
Analysis::TauCommonExtraDetails::TauCommonExtraDetails
TauCommonExtraDetails()
Default constructor.
Definition: TauCommonExtraDetails.cxx:30
TauCmp.h
Analysis::TauDetails::DEFAULT
static const float DEFAULT
Definition: TauDetails.h:34
Analysis::TauCmp::vvcmp
bool vvcmp(const std::vector< std::vector< T > > &a, const std::vector< std::vector< T > > &b)
Compare vectors using vcmp predicate.
Definition: TauCmp.h:46
Analysis::TauCmp::cmp
bool cmp(const double &a, const double &b)
Definition: TauCmp.cxx:34
Analysis::TauCommonExtraDetails::m_phiTrkCaloSamp
std::vector< std::vector< double > > m_phiTrkCaloSamp
Phi of extrapolation point in EM Calo.
Definition: TauCommonExtraDetails.h:460
Analysis::TauDetails
Definition: TauDetails.h:26
Analysis::TauCommonExtraDetails
Extra detail class containing information for track and calo seeded tau reconstruction algorithms.
Definition: TauCommonExtraDetails.h:31
Analysis::TauCommonExtraDetails::m_seedCalo_stripEt
double m_seedCalo_stripEt
Uncalibrated sum of ET in the strip layer within dR < 0.4.
Definition: TauCommonExtraDetails.h:486
Analysis::TauCommonExtraDetails::m_etaTrkCaloSamp
std::vector< std::vector< double > > m_etaTrkCaloSamp
Eta of extrapolation point in EM Calo.
Definition: TauCommonExtraDetails.h:455
Analysis::TauCommonExtraDetails::~TauCommonExtraDetails
virtual ~TauCommonExtraDetails()
Virtual destructor.
Definition: TauCommonExtraDetails.cxx:70
TauCommonExtraDetails.h
ClassName.h
An interface for getting the name of a class as a string.
Analysis::TauCommonExtraDetails::m_closestEtaTrkCell
std::vector< std::vector< ElementLink< CaloCellContainer > > > m_closestEtaTrkCell
Closest cell to track position from extrapolation in eta.
Definition: TauCommonExtraDetails.h:444
ClassName::name
static std::string name()
Return the name of class T as a string.
Analysis::TauCommonExtraDetails::className
virtual const std::string & className() const
Get name of class.
Definition: TauCommonExtraDetails.cxx:170
Analysis::TauCommonExtraDetails::allocTracksAndSamplings
void allocTracksAndSamplings(unsigned int tracks, unsigned int samplings)
Allocate data structures for given number of tracks and samplings.
Definition: TauCommonExtraDetails.cxx:140
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::TauCommonExtraDetails::m_closestEtaTrkVertCell
std::vector< std::vector< ElementLink< CaloCellContainer > > > m_closestEtaTrkVertCell
Closest cell to track position at vertex in eta.
Definition: TauCommonExtraDetails.h:432
Analysis::TauCommonExtraDetails::m_seedCalo_nEMCell
int m_seedCalo_nEMCell
Number of EM cells within dR < 0.4, with E > m_cellEthr.
Definition: TauCommonExtraDetails.h:481
CaloCellContainer.h
Analysis::TauCommonExtraDetails::m_phiLooseTrkCaloSamp
std::vector< std::vector< double > > m_phiLooseTrkCaloSamp
Phi of extrapolation point in EM Calo.
Definition: TauCommonExtraDetails.h:471
Analysis::TauCommonExtraDetails::m_sumPtLooseTrk
double m_sumPtLooseTrk
Sum of p_T for loose tracks.
Definition: TauCommonExtraDetails.h:423
Analysis::TauCommonExtraDetails::m_etaLooseTrkCaloSamp
std::vector< std::vector< double > > m_etaLooseTrkCaloSamp
Eta of extrapolation point in EM Calo.
Definition: TauCommonExtraDetails.h:466
Analysis::TauCommonExtraDetails::m_seedCalo_sumEMCellEnergy
double m_seedCalo_sumEMCellEnergy
Energy sum of all em cells within dR < 0.4 (Presampler + EM1 + EM2)
Definition: TauCommonExtraDetails.h:502
Analysis::TauCommonExtraDetails::m_seedCalo_EMCentFrac
double m_seedCalo_EMCentFrac
EM Centrality Fraction (ET(dr<0.1)/ET(dr<0.4) for EM calos only.
Definition: TauCommonExtraDetails.h:491
Analysis::TauCommonExtraDetails::s_className
static const std::string s_className
Name of class.
Definition: TauCommonExtraDetails.h:416
Analysis::TauCommonExtraDetails::m_seedCalo_sumCellEnergy
double m_seedCalo_sumCellEnergy
Energy sum of all cells within dR < 0.4.
Definition: TauCommonExtraDetails.h:496
Analysis::TauCommonExtraDetails::m_sumPtTrk
double m_sumPtTrk
Sum of p_T for tracks.
Definition: TauCommonExtraDetails.h:426