24 return StatusCode::SUCCESS;
36 ATH_MSG_WARNING (
"EventInfo decoration not available! Will set mu=0." );
40 mu =
static_cast<int>(eventInfoDecorHandle(0));
48 if (!vertexInHandle.
isValid()) {
49 ATH_MSG_WARNING (
"Could not retrieve HiveDataObj with key " << vertexInHandle.
key() <<
", will set nVtxPU=0.");
53 for (
const auto *xVertex : *vertexContainer){
59 acc_nVtxPU(xTau) = nVtxPU;
72 acc_rho(xTau) =
static_cast<float>(
rho);
75 double center_lambda=0. , first_eng_dens=0. , em_probability=0. , second_lambda=0. ;
76 double mean_center_lambda=0. , mean_first_eng_dens=0. , mean_em_probability=0. , mean_second_lambda=0. ;
77 double mean_presampler_frac=0., lead_cluster_frac=0. , second_cluster_frac=0. , third_cluster_frac=0. ;
78 double clE=0., Etot=0.;
81 TLorentzVector clusters_EM_P4;
82 clusters_EM_P4.SetPtEtaPhiM(0,0,0,0);
83 TLorentzVector clusters_had_P4;
84 clusters_had_P4.SetPtEtaPhiM(0,0,0,0);
85 TLorentzVector tauIntermediateAxisEM;
86 tauIntermediateAxisEM.SetPtEtaPhiM(0,0,0,0);
101 if (clusterP4.DeltaR(tauAxis) > 0.2)
continue;
105 clE = cluster.
calE();
108 if (clE > lead_cluster_frac) {
109 third_cluster_frac = second_cluster_frac;
110 second_cluster_frac = lead_cluster_frac;
111 lead_cluster_frac = clE;
113 else if (clE > second_cluster_frac) {
114 third_cluster_frac = second_cluster_frac;
115 second_cluster_frac = clE;
117 else if (clE > third_cluster_frac) {
118 third_cluster_frac = clE;
122 mean_center_lambda += clE*center_lambda;
126 mean_first_eng_dens += clE*first_eng_dens;
130 mean_em_probability += clE*em_probability;
134 if (em_probability>0.5) clusters_EM_P4 += cluster.
p4(xAOD::CaloCluster::State::CALIBRATED);
135 else clusters_had_P4 += cluster.
p4(xAOD::CaloCluster::State::CALIBRATED);
140 mean_second_lambda += clE*second_lambda;
148 tauIntermediateAxisEM += vertexedClusterEM.
p4();
151 tauIntermediateAxisEM += cluster.
p4(xAOD::CaloCluster::State::UNCALIBRATED);
157 mean_center_lambda /= Etot;
158 mean_first_eng_dens /= Etot;
159 mean_em_probability /= Etot;
160 mean_second_lambda /= Etot;
161 mean_presampler_frac /= Etot;
162 lead_cluster_frac /= Etot;
163 second_cluster_frac /= Etot;
164 third_cluster_frac /= Etot;
166 if (mean_first_eng_dens>0.) mean_first_eng_dens = TMath::Log10(mean_first_eng_dens/Etot);
170 double upsilon_cluster = -2.;
171 if (clusters_had_P4.E()+clusters_EM_P4.E()!=0.)
172 upsilon_cluster = (clusters_had_P4.E()-clusters_EM_P4.E())/(clusters_had_P4.E()+clusters_EM_P4.E());
181 acc_ClusterTotalEnergy(xTau) =
static_cast<float>(Etot);
184 acc_ptIntermediateAxisEM(xTau) =
static_cast<float>(tauIntermediateAxisEM.Pt());
189 acc_LeadClusterFrac(xTau) =
static_cast<float>(lead_cluster_frac);
190 acc_UpsilonCluster(xTau) =
static_cast<float>(upsilon_cluster);
196 acc_SecondClusterFrac(xTau) =
static_cast<float>(second_cluster_frac);
197 acc_ThirdClusterFrac(xTau) =
static_cast<float>(third_cluster_frac);
199 return StatusCode::SUCCESS;
205 if (jetSeed ==
nullptr) {
207 return StatusCode::FAILURE;
211 if (!jetSeed->
getAttribute<
int>(
"GhostMuonSegmentCount", nMuSeg)) nMuSeg=0;
217 TLorentzVector Pi0_totalP4;
218 Pi0_totalP4.SetPtEtaPhiM(0,0,0,0);
224 double Pi0_totalE = Pi0_totalP4.E();
227 TLorentzVector charged_totalP4;
228 charged_totalP4.SetPtEtaPhiM(0,0,0,0);
231 charged_totalP4 +=
track->p4();
234 double charged_totalE = charged_totalP4.E();
238 if (Pi0_totalE+charged_totalE != 0.){
239 relDiff = (charged_totalE - Pi0_totalE) / (charged_totalE + Pi0_totalE) ;
243 return StatusCode::SUCCESS;