ATLAS Offline Software
CaloClusterVariables.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TAURECTOOLS_CALOCLUSTERVARIABLES_H
6 #define TAURECTOOLS_CALOCLUSTERVARIABLES_H
7 
8 #include "xAODTau/TauJet.h"
9 #include "CxxUtils/fpcompare.h"
10 
11 #include "TLorentzVector.h"
12 #include <vector>
13 
14 
17 public:
18 
19  static const double DEFAULT;
20 
22 
24  }
25 
26  bool update(const xAOD::TauJet& pTau);
27 
28  // ID Variables
29  unsigned int numConstituents() const { return (unsigned int) m_numConstit; }
30 
31 private:
33 };
34 
35 //-------------------------------------------------------------------------
37 //-------------------------------------------------------------------------
39  bool operator()(const TLorentzVector& left, const TLorentzVector& right) const {
40  //volatile double leftE = left.e();
41  //volatile double rightE = right.e();
42  return CxxUtils::fpcompare::greater (left.E(),right.E());
43  }
44 };
45 
47  bool operator()(const xAOD::CaloCluster* left, const xAOD::CaloCluster* right) const {
48  //volatile double leftE = left.e();
49  //volatile double rightE = right.e();
50  return CxxUtils::fpcompare::greater (left->e(),right->e());
51  }
52 };
53 
54 #endif // TAURECTOOLS_CALOCLUSTERVARIABLES_H
CaloClusterVariables
Provide calculations of cluster based variables using the clusters associated to the jet seed of the ...
Definition: CaloClusterVariables.h:16
CaloClusterVariables::CaloClusterVariables
CaloClusterVariables()
Definition: CaloClusterVariables.cxx:17
CaloClusterVariables::numConstituents
unsigned int numConstituents() const
Definition: CaloClusterVariables.h:29
CaloClusterVariables::DEFAULT
static const double DEFAULT
Definition: CaloClusterVariables.h:19
CxxUtils::fpcompare::greater
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:140
DefCaloClusterCompare::operator()
bool operator()(const xAOD::CaloCluster *left, const xAOD::CaloCluster *right) const
Definition: CaloClusterVariables.h:47
DefCaloClusterCompare
Definition: CaloClusterVariables.h:46
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
fpcompare.h
Workaround x86 precision issues for FP inequality comparisons.
CaloClusterVariables::~CaloClusterVariables
~CaloClusterVariables()
Definition: CaloClusterVariables.h:23
CaloClusterCompare::operator()
bool operator()(const TLorentzVector &left, const TLorentzVector &right) const
Definition: CaloClusterVariables.h:39
CaloClusterVariables::m_numConstit
int m_numConstit
Definition: CaloClusterVariables.h:32
TauJet.h
CaloClusterCompare
Descending order by energy.
Definition: CaloClusterVariables.h:38
CaloClusterVariables::update
bool update(const xAOD::TauJet &pTau)
update the internal variables for the given tau
Definition: CaloClusterVariables.cxx:25
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265