20 double sumCellET = 0.;
21 double sumCellET01 = 0;
22 double sumCellET12 = 0.;
23 double sumEMCellET = 0.;
24 double sumHadCellET = 0.;
26 double HadRadius = 0.;
28 std::vector<double> cellRingEnergys(7,0.);
31 std::bitset<200000> cellSeen;
39 if (cellLinks ==
nullptr) {
40 ATH_MSG_DEBUG(
"NO Cell links found for cluster with pT " << cluster.
pt());
43 for (
const CaloCell* cell : *cellLinks) {
47 if (cellSeen.test(cell->caloDDE()->calo_hash())) {
51 cellSeen.set(cell->caloDDE()->calo_hash());
55 double cellPhi = cell->phi();
56 double cellEta = cell->eta();
57 double cellET = cell->et();
58 double cellEnergy = cell->energy();
63 cellPhi = vxCell.
phi();
64 cellEta = vxCell.
eta();
66 cellEnergy = vxCell.
energy();
69 TLorentzVector temp_cc_p4;
70 temp_cc_p4.SetPtEtaPhiE(cellET, cellEta, cellPhi, cellEnergy);
71 double dR = tauAxis.DeltaR(temp_cc_p4);
76 if (dR < 0.1) sumCellET01 += cellET;
77 if (dR > 0.1 && dR < 0.2) sumCellET12 += cellET;
85 EMRadius += dR*cellET;
86 sumEMCellET += cellET;
89 HadRadius += dR*cellET;
90 sumHadCellET += cellET;
94 if (dR < 0.05) cellRingEnergys[0] += cellET;
95 if (dR >= 0.05 && dR < 0.075) cellRingEnergys[1] += cellET;
96 if (dR >= 0.075 && dR < 0.1) cellRingEnergys[2] += cellET;
97 if (dR >= 0.1 && dR < 0.125) cellRingEnergys[3] += cellET;
98 if (dR >= 0.125 && dR < 0.15) cellRingEnergys[4] += cellET;
99 if (dR >= 0.15 && dR < 0.2) cellRingEnergys[5] += cellET;
100 if (dR >= 0.2 && dR < 0.4) cellRingEnergys[6] += cellET;
119 if (std::abs(sumCellET) > 1e-6) {
129 if (std::abs(sumEMCellET) > 1e-6) {
130 EMRadius = EMRadius / sumEMCellET;
138 if (std::abs(sumHadCellET) > 1e-6) {
139 HadRadius = HadRadius / sumHadCellET;
146 return StatusCode::SUCCESS;
Evaluate cell kinematics with a different vertex.
Data object for each calorimeter readout cell.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Evaluate cell kinematics with a different vertex.
virtual double eta() const final
The pseudorapidity of the particle.
virtual double phi() const final
The aximuthal angle of the particle.
double energy() const
The energy of the particle.
virtual double et() const
transverse energy defined to be e*sin(theta)
bool isEMLayer(const CaloSampling::CaloSample &calo) const
Check whether the CaloSample is a EM layer.
Gaudi::Property< double > m_cellCone
Gaudi::Property< bool > m_doVertexCorrection
TauCellVariables(const std::string &name)
Constructor.
virtual StatusCode execute(xAOD::TauJet &pTau) const override
Perform the calculation of cell variables for each tau candidate.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Evaluate cluster kinematics with a different vertex / signal state.
std::vector< xAOD::CaloVertexedTopoCluster > vertexedClusters() const
void setDetail(TauJetParameters::Detail detail, int value)
const Vertex * vertex() const
@ hadRadius
Get hadron calorimeter radius.
@ EMRadius
Get E_T radius.
@ etHadAtEMScale
Get Hadronic energy at EM scale.
@ isolFrac
Get isolation fraction.
@ cellBasedEnergyRing4
Ring 4: 0.10 < R < 0.125.
@ cellBasedEnergyRing6
Ring 6: 0.15 < R < 0.2.
@ cellBasedEnergyRing5
Ring 5: 0.125 < R < 0.15.
@ cellBasedEnergyRing7
Ring 7: 0.2 < R < 0.4.
@ etEMAtEMScale
Get EM energy at EM scale.
@ centFrac
Get centrality fraction.
@ cellBasedEnergyRing2
Ring 2: 0.05 < R < 0.075.
@ cellBasedEnergyRing3
Ring 3: 0.075 < R < 0.10.
@ cellBasedEnergyRing1
EM+TES final scale.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauJet_v3 TauJet
Definition of the current "tau version".