ATLAS Offline Software
Functions
HIJetRec Namespace Reference

Functions

constexpr const char * unsubtractedJetState ()
 
constexpr const char * subtractedJetState ()
 
constexpr const char * subtractedOriginCorrectedJetState ()
 
constexpr xAOD::JetConstitScale subtractedConstitState ()
 
constexpr xAOD::JetConstitScale subtractedOriginCorrectedConstitState ()
 
constexpr xAOD::CaloCluster::State unsubtractedClusterState ()
 
constexpr xAOD::CaloCluster::State subtractedClusterState ()
 
constexpr xAOD::CaloCluster::State subtractedOriginCorrectedClusterState ()
 
bool inTowerBoundary (float eta0, float phi0, float eta, float phi)
 
void setClusterP4 (const xAOD::CaloCluster::FourMom_t &p, xAOD::CaloCluster *cl, xAOD::CaloCluster::State s)
 
TLorentzVector getClusterP4 (const xAOD::CaloCluster *cl, xAOD::CaloCluster::State s)
 : getClusterP4 Added during Rel22 migration. More...
 

Function Documentation

◆ getClusterP4()

TLorentzVector HIJetRec::getClusterP4 ( const xAOD::CaloCluster cl,
xAOD::CaloCluster::State  s 
)
inline

: getClusterP4 Added during Rel22 migration.

We should never use CaloCluster_v1::p4() because this four vector can never have a negative energy. Therefore, if one tries to use setClusterP4 and then retrieve the cluster four momenta, must use this new method that keeps the cluster information as set in setClusterP4 (negative E and flipped eta phi)

Definition at line 73 of file HIJetRecDefs.h.

73  {
74  TLorentzVector correct_clusP4;
75  float energy=cl->e(s);
76  float eta=cl->eta(s);
77  float phi=cl->phi(s);
78  if(energy < 0.)
79  {
80  eta*=-1.;
81  if(phi > 0.) phi-=M_PI;
82  else phi+=M_PI;
83  }
84  float pt=energy/std::cosh(eta);
85  correct_clusP4.SetPtEtaPhiE(pt, eta,phi ,energy);
86  return correct_clusP4;
87  }

◆ inTowerBoundary()

bool HIJetRec::inTowerBoundary ( float  eta0,
float  phi0,
float  eta,
float  phi 
)
inline

Definition at line 29 of file HIJetRecDefs.h.

30  {
31  if( 2.*std::abs(eta-eta0) > HI::TowerBins::getBinSizeEta() ) return false;
32  if( 2.*std::abs(xAOD::P4Helpers::deltaPhi(phi0,phi)) > HI::TowerBins::getBinSizePhi() ) return false;
33  return true;
34  }

◆ setClusterP4()

void HIJetRec::setClusterP4 ( const xAOD::CaloCluster::FourMom_t p,
xAOD::CaloCluster cl,
xAOD::CaloCluster::State  s 
)
inline

Definition at line 36 of file HIJetRecDefs.h.

37  {
38  float energy=p.Energy();
39  float eta=p.Eta();
40  float phi=p.Phi();
41  if(energy < 0.)
42  {
43  eta*=-1.;
44  if(phi > 0.) phi-=M_PI;
45  else phi+=M_PI;
46  }
48  {
49  cl->setRawE(energy);
50  cl->setRawEta(eta);
51  cl->setRawPhi(phi);
52  cl->setRawM(0);
53  }
55  {
56  cl->setAltE(energy);
57  cl->setAltEta(eta);
58  cl->setAltPhi(phi);
59  cl->setAltM(0);
60  }
62  {
63  cl->setCalE(energy);
64  cl->setCalEta(eta);
65  cl->setCalPhi(phi);
66  cl->setCalM(0);
67  }
68  }

◆ subtractedClusterState()

constexpr xAOD::CaloCluster::State HIJetRec::subtractedClusterState ( )
constexpr

Definition at line 26 of file HIJetRecDefs.h.

◆ subtractedConstitState()

constexpr xAOD::JetConstitScale HIJetRec::subtractedConstitState ( )
constexpr

Definition at line 22 of file HIJetRecDefs.h.

◆ subtractedJetState()

constexpr const char* HIJetRec::subtractedJetState ( )
constexpr

Definition at line 19 of file HIJetRecDefs.h.

19 { return "JetSubtractedScaleMomentum";}

◆ subtractedOriginCorrectedClusterState()

constexpr xAOD::CaloCluster::State HIJetRec::subtractedOriginCorrectedClusterState ( )
constexpr

Definition at line 27 of file HIJetRecDefs.h.

◆ subtractedOriginCorrectedConstitState()

constexpr xAOD::JetConstitScale HIJetRec::subtractedOriginCorrectedConstitState ( )
constexpr

Definition at line 23 of file HIJetRecDefs.h.

◆ subtractedOriginCorrectedJetState()

constexpr const char* HIJetRec::subtractedOriginCorrectedJetState ( )
constexpr

Definition at line 20 of file HIJetRecDefs.h.

20 { return "JetSubtractedOriginCorrectedScaleMomentum";}

◆ unsubtractedClusterState()

constexpr xAOD::CaloCluster::State HIJetRec::unsubtractedClusterState ( )
constexpr

Definition at line 25 of file HIJetRecDefs.h.

◆ unsubtractedJetState()

constexpr const char* HIJetRec::unsubtractedJetState ( )
constexpr

Definition at line 18 of file HIJetRecDefs.h.

18 { return "JetUnsubtractedScaleMomentum";}
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
test_pyathena.pt
pt
Definition: test_pyathena.py:11
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::CaloCluster_v1::CALIBRATED
@ CALIBRATED
Definition: CaloCluster_v1.h:307
xAOD::CalibratedJetConstituent
@ CalibratedJetConstituent
Definition: JetTypes.h:22
xAOD::CaloCluster_v1::UNCALIBRATED
@ UNCALIBRATED
Definition: CaloCluster_v1.h:306
HI::TowerBins::getBinSizeEta
constexpr float getBinSizeEta()
Definition: HIEventDefs.h:31
xAOD::UncalibratedJetConstituent
@ UncalibratedJetConstituent
Definition: JetTypes.h:21
xAOD::CaloCluster_v1::ALTCALIBRATED
@ ALTCALIBRATED
Definition: CaloCluster_v1.h:308
HI::TowerBins::getBinSizePhi
constexpr float getBinSizePhi()
Definition: HIEventDefs.h:32
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26