20 double sumCellET = 0.;
21 double sumCellET01 = 0;
22 double sumCellET12 = 0.;
23 double sumEMCellET = 0.;
24 double sumHadCellET = 0.;
27 std::bitset<200000> cellSeen;
35 if (cellLinks ==
nullptr) {
36 ATH_MSG_DEBUG(
"NO Cell links found for cluster with pT " << cluster.
pt());
39 for (
const CaloCell* cell : *cellLinks) {
43 if (cellSeen.test(cell->caloDDE()->calo_hash())) {
47 cellSeen.set(cell->caloDDE()->calo_hash());
51 double cellPhi = cell->phi();
52 double cellEta = cell->eta();
53 double cellET = cell->et();
54 double cellEnergy = cell->energy();
59 cellPhi = vxCell.
phi();
60 cellEta = vxCell.
eta();
62 cellEnergy = vxCell.
energy();
65 TLorentzVector temp_cc_p4;
66 temp_cc_p4.SetPtEtaPhiE(cellET, cellEta, cellPhi, cellEnergy);
67 double dR = tauAxis.DeltaR(temp_cc_p4);
72 if (dR < 0.1) sumCellET01 += cellET;
73 if (dR > 0.1 && dR < 0.2) sumCellET12 += cellET;
81 sumEMCellET += cellET;
84 sumHadCellET += cellET;
98 if (std::abs(sumCellET) > 1e-6) {
107 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
@ etHadAtEMScale
Get Hadronic energy at EM scale.
@ isolFrac
Get isolation fraction.
@ etEMAtEMScale
Get EM energy at EM scale.
@ centFrac
Get centrality fraction.
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".