14 #include "CaloGeoHelpers/CaloSampling.h"
17 #include "TLorentzVector.h"
33 if(
inTrigger())
return StatusCode::SUCCESS;
59 std::vector<CaloSampling::CaloSample> EMSamps = {
64 std::vector<CaloSampling::CaloSample> HadSamps = {
70 std::vector<CaloSampling::CaloSample> Had1Samps = {
73 float eEMAtEMScaleFixed = 0.;
74 float eHadAtEMScaleFixed = 0.;
75 float eHad1AtEMScaleFixed = 0.;
79 std::vector<xAOD::CaloVertexedTopoCluster> vertexedClusterList = tau.
vertexedClusters();
81 TLorentzVector clusterP4 = vertexedCluster.p4();
83 if( clusterP4.DeltaR(tauAxis) > 0.2 )
continue;
86 for(
auto samp : EMSamps )
87 eEMAtEMScaleFixed += cluster.
eSample(samp);
88 for(
auto samp : HadSamps )
89 eHadAtEMScaleFixed += cluster.
eSample(samp);
90 for(
auto samp : Had1Samps )
91 eHad1AtEMScaleFixed += cluster.
eSample(samp);
93 acc_EMFracFixed(tau) = ( eEMAtEMScaleFixed + eHadAtEMScaleFixed ) != 0. ?
94 eEMAtEMScaleFixed / ( eEMAtEMScaleFixed + eHadAtEMScaleFixed ) :
LOW_NUMBER;
98 acc_absEtaLead(tau) = std::abs(
track->eta() );
99 acc_absDeltaEta(tau) = std::abs(
track->eta() - tau.
eta() );
100 acc_absDeltaPhi(tau) = std::abs(
track->p4().DeltaPhi(tau.
p4()) );
102 float etEMScale1 = acc_etEMAtEMScale(tau);
103 float etEMScale2 = acc_etHadAtEMScale(tau);
104 float tau_sumETCellsLAr = acc_sumEMCellEtOverLeadTrkPt(tau) *
track->pt();
105 float tau_E3 = tau_sumETCellsLAr - etEMScale1;
106 float tau_seedCalo_etHadAtEMScale_noE3 = etEMScale2 - tau_E3;
107 float tau_seedCalo_etEMAtEMScale_yesE3 = etEMScale1 + tau_E3;
108 acc_EMFractionAtEMScaleMOVEE3(tau) = tau_seedCalo_etEMAtEMScale_yesE3 / (tau_seedCalo_etEMAtEMScale_yesE3 + tau_seedCalo_etHadAtEMScale_noE3);
110 acc_seedTrkSecMaxStripEtOverPt(tau) = (
track->pt() != 0.) ? acc_secMaxStripEt(tau) /
track->pt() :
LOW_NUMBER;
113 acc_hadLeakFracFixed(tau) = (
track->p4().P() != 0.) ? eHad1AtEMScaleFixed /
track->p4().P() :
LOW_NUMBER;
119 float etaCalo = -10.0;
120 float phiCalo = -10.0;
125 ATH_MSG_DEBUG(
"track EM " <<
", eta: " << etaCalo <<
", phi: " << phiCalo );
128 float etHotShotDR1 = 0.;
129 float etHotShotWin = 0.;
131 if( not shotLink.isValid() ){
141 etHotShotDR1 = etShot;
144 if(std::abs(shot->
eta() - etaCalo) > 0.012 )
continue;
146 if(etShot > etHotShotWin) etHotShotWin = etShot;
148 acc_etHotShotDR1(tau) = etHotShotDR1;
149 acc_etHotShotWin(tau) = etHotShotWin;
150 acc_etHotShotDR1OverPtLeadTrk(tau) = (
track->pt() != 0.) ? etHotShotDR1 /
track->pt() :
LOW_NUMBER;
151 acc_etHotShotWinOverPtLeadTrk(tau) = (
track->pt() != 0.) ? etHotShotWin /
track->pt() :
LOW_NUMBER;
158 acc_EMFractionAtEMScaleMOVEE3(tau) =
LOW_NUMBER;
159 acc_seedTrkSecMaxStripEtOverPt(tau) =
LOW_NUMBER;
163 acc_etHotShotDR1OverPtLeadTrk(tau) =
LOW_NUMBER;
164 acc_etHotShotWinOverPtLeadTrk(tau) =
LOW_NUMBER;
167 return StatusCode::SUCCESS;