35 bool isFilled = CaloClusterVariablesTool.
update(tau);
38 ATH_MSG_DEBUG(
"problem in calculating calo cluster variables -> will be set to -1111");
60 float totalEnergy(0.);
64 TLorentzVector leadClusVec;
65 TLorentzVector subLeadClusVec;
66 TLorentzVector approxSubstructure4Vec;
74 std::vector<xAOD::CaloVertexedTopoCluster> vertexedClusterList = tau.
vertexedClusters();
76 TLorentzVector clusterP4 = vertexedCluster.p4();
78 totalEnergy += clusterP4.E();
80 dr = tauAxis.DeltaR(clusterP4);
82 if (0.2 <=
dr &&
dr < 0.4) {
83 calo_iso += clusterP4.Et();
89 if (clusEnergyBE > clusELead) {
91 clusESubLead = clusELead;
92 subLeadClusVec = leadClusVec;
95 clusELead = clusEnergyBE;
96 leadClusVec.SetPtEtaPhiM(clusELead/std::cosh(clusterP4.Eta()), clusterP4.Eta(), clusterP4.Phi(), 0.);
98 else if (clusEnergyBE > clusESubLead) {
100 clusESubLead = clusEnergyBE;
101 subLeadClusVec.SetPtEtaPhiM(clusESubLead/std::cosh(clusterP4.Eta()), clusterP4.Eta(), clusterP4.Phi(), 0.);
106 if (clusELead > 0.) {
107 approxSubstructure4Vec += leadClusVec;
109 if (clusESubLead > 0.) {
110 approxSubstructure4Vec += subLeadClusVec;
115 return left.
e() > right.e();
117 std::sort(vertexedClusterList.begin(), vertexedClusterList.end(),
compare);
120 float sum2LeadClusterE = 0.;
121 if(!vertexedClusterList.empty()) {
122 sum2LeadClusterE = vertexedClusterList.at(0).e();
123 if(vertexedClusterList.size()>1) sum2LeadClusterE += vertexedClusterList.at(1).e();
125 float sum3LeadClusterE = sum2LeadClusterE;
126 if(vertexedClusterList.size()>2) sum3LeadClusterE += vertexedClusterList.at(2).e();
128 if (totalEnergy != 0.) {
142 float clEnergy = vertexedCluster.e();
154 float EMF = PSSF + EM2F;
156 PSSEnergy += PSSF * clEnergy;
157 EMEnergy += EMF * clEnergy;
158 HADEnergy += (
Energy != 0.) ? (1 - EMF) * clEnergy : 0.;
162 float trkSysMomentum(0.);
167 approxSubstructure4Vec += tau.
track(
i)->
p4();
179 float fPSSFraction = (totalEnergy != 0.) ? PSSEnergy / totalEnergy :
DEFAULT;
180 float fChPIEMEOverCaloEME = (EMEnergy != 0.) ? (trkSysMomentum - HADEnergy) / EMEnergy :
DEFAULT;
181 float fEMPOverTrkSysP =
DEFAULT;
182 if (tau.
nTracks() > 0) fEMPOverTrkSysP = (trkSysMomentum != 0.) ? EMEnergy / trkSysMomentum :
DEFAULT;
189 size_t numTrack = tau.
nTracks();
194 for (
size_t i=0;
i < numTrack; ++
i) {
195 dR = tau.
track(
i)->
p4().DeltaR(tauAxis);
201 return StatusCode::SUCCESS;