14#include "GaudiKernel/StatusCode.h"
15#include "CLHEP/Units/PhysicalConstants.h"
29#include "CaloEvent/CaloClusterContainer.h"
38 const std::string& name,
39 const IInterface* parent) :
65 return StatusCode::SUCCESS;
70 double jetEMF =
jet->getAttribute<
float>(
"EMFrac");
77 else jetRatio = log10(
double(1./jetEMF - 1.));
83 auto jetPhi=
jet->phi();
84 auto jetEta=
jet->eta();
88 size_t nClusters =
jet->numConstituents();
89 double clusterPU_sumEEM = 0;
double clusterPU_sumE = 0;
90 for (
size_t clust = 0; clust < nClusters; clust++) {
93 clusEEM+=(aCluster)->eSample(CaloSampling::EMB1);
94 clusEEM+=(aCluster)->eSample(CaloSampling::EMB2);
95 clusEEM+=(aCluster)->eSample(CaloSampling::EMB3);
96 clusEEM+=(aCluster)->eSample(CaloSampling::EME1);
97 clusEEM+=(aCluster)->eSample(CaloSampling::EME2);
98 clusEEM+=(aCluster)->eSample(CaloSampling::EME3);
99 clusEEM+=(aCluster)->eSample(CaloSampling::FCAL1);
102 if (lambda > 500)
continue;
104 double d_eta = aCluster->
rawEta() - jetEta;
106 double d_R2 = d_eta*d_eta + d_phi*d_phi;
108 if (d_R2 < 0.15*0.15)
continue;
109 clusterPU_sumEEM+=clusEEM/1000.;
110 clusterPU_sumE+=aCluster->
rawE()/1000.;
113 double jetEEM_EMscale = 0;
double jetE_EMscale = 0;
114 std::vector<double> samplingEnergy =
jet->getAttribute<std::vector<double> >(
"EnergyPerSampling");
116 for(
size_t s=0; s<samplingEnergy.size(); s++) {
117 double samplingE = 0.001*(samplingEnergy.at(s));
118 if ( s < 8 || (s > 20 && s < 28) ) jetEEM_EMscale+=samplingE;
119 jetE_EMscale+=samplingE;
122 double pufixEMF = -999;
124 else pufixEMF = (jetEEM_EMscale - clusterPU_sumEEM)/(jetE_EMscale - clusterPU_sumE);
127 else pufixLR = log10(
double(1./pufixEMF - 1.));
144 auto jet = input.jet;
145 auto cellContainer = input.cells;
146 auto alltracks=
jet->getAttribute<std::vector<ElementLink<xAOD::IParticleContainer> >>(
"TracksForMinimalJetTag");
152 auto jetPhi=
jet->phi();
153 auto jetEta=
jet->eta();
159 double phi = track->p4().Phi();
160 double eta = track->p4().Eta() ;
167 double countCell_layer[4] = {0,0,0,0};
171 if((*celliter)->caloDDE()->is_tile() && (*celliter)->energy() >
m_minCellEt){
175 if(std::abs(d_phi) < 0.2 && d_R > 0.4){
177 float t = (*celliter)->time();
180 float x = (*celliter)->x();
181 float y = (*celliter)->y();
182 float z = (*celliter)->z();
183 float r = sqrt(
x*
x +
y*
y);
187 if(
r<2200){ countCell_layer[0]++;}
188 else if(
r>=2200 &&
r<2600){ countCell_layer[1]++;}
189 else if(
r>=2600 &&
r<3100){ countCell_layer[2]++;}
190 else if(
r>=3100){ countCell_layer[3]++;}
198 for(
int i=0; i<4; i++){
199 if(countCaloCell<countCell_layer[i]) countCaloCell=countCell_layer[i];
217 return StatusCode::SUCCESS;
221 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
DataModel_detail::const_iterator< DataVector > const_iterator
virtual std::string toString() const override
double getMomentValue(MomentType type) const
Retrieve individual moment - no check for existance! Returns -999 on error.
flt_t rawPhi() const
Get in signal state UNCALIBRATED.
flt_t rawEta() const
Get in signal state UNCALIBRATED.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
Class providing the definition of the 4-vector interface.
Workaround x86 precision issues for FP inequality comparisons.
std::vector< std::string > lineSplitter(const std::string &s, char delimiter)
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
bool greater_equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Helper for azimuthal angle calculations.