 |
ATLAS Offline Software
|
Go to the documentation of this file.
47 float emscale_ptEM = 0.;
48 float emscale_ptHad = 0.;
52 ATH_MSG_DEBUG(
"retrieval of tau detail failed. stopping calculation of further variables");
53 return StatusCode::SUCCESS;
58 ATH_MSG_DEBUG(
"retrieval of tau detail failed. stopping calculation of further variables");
59 return StatusCode::SUCCESS;
68 if (!tauTracks.empty()) {
70 TLorentzVector sumOfTrackVector;
74 sumOfTrackVector += tauTrk->p4();
79 if (tauTracks.size()> 1 && pTau.
nTracks()>0) {
82 double sumWeightedDR = 0.;
83 double sumWeightedDR2 = 0.;
89 ptSum += tauTrk->pt();
90 sumWeightedDR +=
deltaR * tauTrk->pt();
94 double trkWidth2 = (ptSum!=0.) ? (sumWeightedDR2/ptSum -
std::pow(sumWeightedDR/ptSum, 2.)) : 0.;
100 if (!tauTracks.empty()) {
103 double innerPtSum = 0;
104 double sumWeightedDR = 0;
105 double innerSumWeightedDR = 0;
106 double sumWeightedDR2 = 0;
112 ptSum += tauTrk->pt();
113 sumWeightedDR +=
deltaR * tauTrk->pt();
118 innerPtSum += tauTrk->pt();
119 innerSumWeightedDR +=
deltaR * tauTrk->pt();
128 double trkRmsDist2 = sumWeightedDR2 / ptSum -
pow(sumWeightedDR/ptSum, 2.);
129 if (trkRmsDist2 > 0.) {
144 if (innerPtSum > 0.) {
154 return StatusCode::SUCCESS;
TauTrackFlag
Enum for tau track flags.
@ trkRmsDist
Get the RMS of track distance to calorimeter seed.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
@ etHadAtEMScale
Get Hadronic energy at EM scale.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ trkAvgDist
Get calibrated EM transverse energy (DEPRECATED since r19)
Class describing a tau jet.
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
bool detail(TauJetParameters::Detail detail, int &value) const
Get and set values of common details variables via enum.
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual StatusCode execute(xAOD::TauJet &pTau) const override
Execute - called for each tau candidate.
Gaudi::Property< int > m_isolationTrackType
virtual FourMom_t p4() const
The full 4-momentum of the particle.
TauCommonCalcVars(const std::string &name="TauCommonCalcVars")
void setDetail(TauJetParameters::Detail detail, int value)
constexpr int pow(int base, int exp) noexcept
std::vector< const TauTrack * > tracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Get the v<const pointer> to a given tauTrack collection associated with this tau.
@ etEMAtEMScale
Get EM energy at EM scale.