ATLAS Offline Software
Loading...
Searching...
No Matches
TauClusterVars Namespace Reference

Typedefs

using MomentType = xAOD::CaloCluster::MomentType

Functions

bool et_log (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool pt_tau_log (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &, float &out)
bool pt_jetseed_log (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &, float &out)
bool dEta (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dPhi (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool SECOND_R (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool SECOND_LAMBDA (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool CENTER_LAMBDA (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool SECOND_LAMBDAOverClustersMeanSecondLambda (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool CENTER_LAMBDAOverClustersMeanCenterLambda (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool FirstEngDensOverClustersMeanFirstEngDens (const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool e (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool et (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool FIRST_ENG_DENS (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool EM_PROBABILITY (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool CENTER_MAG (const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

Typedef Documentation

◆ MomentType

Function Documentation

◆ CENTER_LAMBDA()

bool TauClusterVars::CENTER_LAMBDA ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 138 of file ConstituentLoaderTauCluster.cxx.

138 {
139 double double_out;
140 const auto success = cluster.clust().retrieveMoment(MomentType::CENTER_LAMBDA, double_out);
141 out = static_cast<float>(double_out);
142 return success;
143}
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
const CaloCluster & clust() const
Return the cluster being proxied,.

◆ CENTER_LAMBDAOverClustersMeanCenterLambda()

bool TauClusterVars::CENTER_LAMBDAOverClustersMeanCenterLambda ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 154 of file ConstituentLoaderTauCluster.cxx.

154 {
155 static const SG::ConstAccessor<float> acc_ClustersMeanCenterLambda("ClustersMeanCenterLambda");
156 float ClustersMeanCenterLambda = acc_ClustersMeanCenterLambda(tau);
157 double centerLambda(0);
158 const auto success = cluster.clust().retrieveMoment(MomentType::CENTER_LAMBDA, centerLambda);
159 if (ClustersMeanCenterLambda == 0.){
160 out = 250.;
161 }else {
162 out = centerLambda/ClustersMeanCenterLambda;
163 }
164
165 out = std::min(out, 250.0f);
166
167 return success;
168}
Helper class to provide constant type-safe access to aux data.

◆ CENTER_MAG()

bool TauClusterVars::CENTER_MAG ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 216 of file ConstituentLoaderTauCluster.cxx.

216 {
217 double clusterCenterMag = 0.0;
218 bool status = cluster.clust().retrieveMoment(MomentType::CENTER_MAG, clusterCenterMag);
219 out = clusterCenterMag;
220 return status;
221}

◆ dEta()

bool TauClusterVars::dEta ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 114 of file ConstituentLoaderTauCluster.cxx.

114 {
115 out = cluster.eta() - tau.eta();
116 return true;
117}
virtual double eta() const final
The pseudorapidity ( ) of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.

◆ dPhi()

bool TauClusterVars::dPhi ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 119 of file ConstituentLoaderTauCluster.cxx.

119 {
120 out = cluster.p4().DeltaPhi(tau.p4());
121 return true;
122}
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition TauJet_v3.cxx:96

◆ e()

bool TauClusterVars::e ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 192 of file ConstituentLoaderTauCluster.cxx.

192 {
193 out = cluster.p4().E();
194 return true;
195}

◆ EM_PROBABILITY()

bool TauClusterVars::EM_PROBABILITY ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 209 of file ConstituentLoaderTauCluster.cxx.

209 {
210 double clusterEMprob = 0.0;
211 bool status = cluster.clust().retrieveMoment(MomentType::EM_PROBABILITY, clusterEMprob);
212 out = clusterEMprob;
213 return status;
214}

◆ et()

bool TauClusterVars::et ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 197 of file ConstituentLoaderTauCluster.cxx.

197 {
198 out = cluster.p4().Et();
199 return true;
200}

◆ et_log()

bool TauClusterVars::et_log ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 99 of file ConstituentLoaderTauCluster.cxx.

99 {
100 out = std::log10(cluster.p4().Et());
101 return true;
102}

◆ FIRST_ENG_DENS()

bool TauClusterVars::FIRST_ENG_DENS ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 202 of file ConstituentLoaderTauCluster.cxx.

202 {
203 double clusterFirstEngDens = 0.0;
204 bool status = cluster.clust().retrieveMoment(MomentType::FIRST_ENG_DENS, clusterFirstEngDens);
205 out = clusterFirstEngDens;
206 return status;
207}

◆ FirstEngDensOverClustersMeanFirstEngDens()

bool TauClusterVars::FirstEngDensOverClustersMeanFirstEngDens ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 171 of file ConstituentLoaderTauCluster.cxx.

171 {
172 // the ClustersMeanFirstEngDens is the log10 of the energy weighted average of the First_ENG_DENS
173 // divided by ETot to make it dimension-less,
174 // so we need to evaluate the difference of log10(clusterFirstEngDens/clusterTotalEnergy) and the ClustersMeanFirstEngDens
175 double clusterFirstEngDens = 0.0;
176 bool status = cluster.clust().retrieveMoment(MomentType::FIRST_ENG_DENS, clusterFirstEngDens);
177 if (clusterFirstEngDens < 1e-6) clusterFirstEngDens = 1e-6;
178
179 static const SG::ConstAccessor<float> acc_ClusterTotalEnergy("ClusterTotalEnergy");
180 float clusterTotalEnergy = acc_ClusterTotalEnergy(tau);
181 if (clusterTotalEnergy < 1e-6) clusterTotalEnergy = 1e-6;
182
183 static const SG::ConstAccessor<float> acc_ClustersMeanFirstEngDens("ClustersMeanFirstEngDens");
184 float clustersMeanFirstEngDens = acc_ClustersMeanFirstEngDens(tau);
185
186 out = std::log10(clusterFirstEngDens/clusterTotalEnergy) - clustersMeanFirstEngDens;
187
188 return status;
189}
bool e(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

◆ pt_jetseed_log()

bool TauClusterVars::pt_jetseed_log ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & ,
float & out )

Definition at line 109 of file ConstituentLoaderTauCluster.cxx.

109 {
110 out = std::log10(tau.ptJetSeed());
111 return true;
112}
double ptJetSeed() const

◆ pt_tau_log()

bool TauClusterVars::pt_tau_log ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & ,
float & out )

Definition at line 104 of file ConstituentLoaderTauCluster.cxx.

104 {
105 out = std::log10(std::max(tau.pt(), 1e-6));
106 return true;
107}
virtual double pt() const
The transverse momentum ( ) of the particle.

◆ SECOND_LAMBDA()

bool TauClusterVars::SECOND_LAMBDA ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 131 of file ConstituentLoaderTauCluster.cxx.

131 {
132 double double_out;
133 const auto success = cluster.clust().retrieveMoment(MomentType::SECOND_LAMBDA, double_out);
134 out = static_cast<float>(double_out);
135 return success;
136}

◆ SECOND_LAMBDAOverClustersMeanSecondLambda()

bool TauClusterVars::SECOND_LAMBDAOverClustersMeanSecondLambda ( const xAOD::TauJet & tau,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 145 of file ConstituentLoaderTauCluster.cxx.

145 {
146 static const SG::ConstAccessor<float> acc_ClustersMeanSecondLambda("ClustersMeanSecondLambda");
147 float ClustersMeanSecondLambda = acc_ClustersMeanSecondLambda(tau);
148 double secondLambda(0);
149 const auto success = cluster.clust().retrieveMoment(MomentType::SECOND_LAMBDA, secondLambda);
150 out = (ClustersMeanSecondLambda != 0.) ? secondLambda/ClustersMeanSecondLambda : 0.;
151 return success;
152}

◆ SECOND_R()

bool TauClusterVars::SECOND_R ( const xAOD::TauJet & ,
const xAOD::CaloVertexedTopoCluster & cluster,
float & out )

Definition at line 124 of file ConstituentLoaderTauCluster.cxx.

124 {
125 double double_out;
126 const auto success = cluster.clust().retrieveMoment(MomentType::SECOND_R, double_out);
127 out = static_cast<float>(double_out);
128 return success;
129}