19#include "GaudiKernel/SystemOfUnits.h"
28 const std::string& name,
29 const IInterface* parent)
63 return StatusCode::FAILURE;
66 return StatusCode::SUCCESS;
88 NInputTaus, passedCuts,
89 PtAccepted, NTracksAccepted, NIsoTracksAccepted,
90 massTrkSysAccepted, massTrkSysKaonAccepted, massTrkSysKaonPiAccepted,
91 leadTrkPtAccepted, dRAccepted, etOverPtLeadTrkAccepted, EMOverTrkSysPAccepted);
99 ATH_MSG_DEBUG(
"AcceptAll property is set: taking all events");
103 ATH_MSG_DEBUG(
"Input RoI eta: " << input.roi->eta() <<
", phi: " << input.roi->phi() <<
", z: " << input.roi->zed());
106 NInputTaus = TauContainer->
size();
116 float pT =
Tau->pt();
121 PtAccepted = pT / Gaudi::Units::GeV;
127 int numTrack =
Tau->nTracks();
128 int numIsoTrack =
Tau->nTracksIsolation();
137 NTracksAccepted = numTrack;
138 NIsoTracksAccepted = numIsoTrack;
144 float leadTrkPt = -1;
146 ATH_MSG_DEBUG(
" leadTrkPt: " << leadTrkPt / Gaudi::Units::GeV);
149 leadTrkPtAccepted = leadTrkPt / Gaudi::Units::GeV;
155 float massTrkSys = -1.;
157 ATH_MSG_DEBUG(
" massTrkSys: " << massTrkSys / Gaudi::Units::GeV);
161 TLorentzVector my_kaons;
162 std::vector<TLorentzVector> my_trks;
163 for(
unsigned int i = 0; i <
Tau->nTracks(); ++i) {
165 TLorentzVector tmpKaon;;
168 trk =
Tau->track(i)->track();
169 }
catch(
const std::exception& e) {
175 my_trks.push_back(trk->
p4());
178 my_kaons = my_kaons + tmpKaon;
181 float massTrkSysKaon = my_kaons.M();
182 ATH_MSG_DEBUG(
" massTrkSys with kaon mass hypo: " << massTrkSysKaon / Gaudi::Units::GeV);
185 float finalKPiMass = 0;
186 if(my_trks.size() == 2) {
187 TLorentzVector tmpKaon;
190 TLorentzVector tmpPion = my_trks.at(1);
191 float kPiMass1 = (tmpKaon+tmpPion).M();
194 tmpPion = my_trks.at(0);
195 float kPiMass2 = (tmpKaon+tmpPion).M();
198 finalKPiMass = kPiMass1;
200 finalKPiMass = kPiMass2;
203 float massTrkSysKaonPi = finalKPiMass;
204 ATH_MSG_DEBUG(
" massTrkSys with kaon+pi mass hypo: " << massTrkSysKaonPi / Gaudi::Units::GeV);
208 massTrkSysAccepted = massTrkSys / Gaudi::Units::GeV;
212 massTrkSysKaonAccepted = massTrkSysKaon / Gaudi::Units::GeV;
217 massTrkSysKaonPiAccepted = massTrkSysKaonPi / Gaudi::Units::GeV;
223 float EMPOverTrkSysP = -1;
228 EMOverTrkSysPAccepted = EMPOverTrkSysP;
234 float etOverPtLeadTrk = -1;
239 etOverPtLeadTrkAccepted = etOverPtLeadTrk;
274 return StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
Header file to be included by clients of the Monitored infrastructure.
A number of constexpr particle constants to avoid hardcoding them directly in various places.
size_type size() const noexcept
Returns the number of elements in the collection.
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
constexpr double chargedKaonMassInMeV
the mass of the charged kaon (in MeV)
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
@ dRmax
Get maximal dR of tracks associated to calo-seeded tau.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TauJet_v3 TauJet
Definition of the current "tau version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".