30 Double_t ptBins[] = {5, 10, 25, 60, 100, 200, 1000};
31 Double_t etaBins[] = {-2.7, -2.5, -1.7, -1.05, -0.1, 0.1, 1.05, 1.7, 2.5, 2.7};
34 const unsigned int nptBins =
sizeof(ptBins)/
sizeof(ptBins[0])-1;
35 const unsigned int netaBins =
sizeof(etaBins)/
sizeof(etaBins[0])-1;
51 if (!(muon.muonType()==xAOD::Muon::Combined || muon.muonType()==xAOD::Muon::SegmentTagged || muon.muonType()==xAOD::Muon::MuonStandAlone))
return;
54 if (!muPrimaryTrk)
return;
56 const xAOD::TrackParticle* msExtrapTrk = muon.trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
57 if (!msExtrapTrk) msExtrapTrk = muon.trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle);
60 float pt = 0.001*truthMu.
pt();
62 float pTruth = truthMu.
p4().P();
63 float pCB = muPrimaryTrk->
p4().P();
65 if (msExtrapTrk) pME = msExtrapTrk->
p4().P();
67 if (msTrk) pMS = msTrk->
p4().P();
70 if (muon.parameter(eloss,xAOD::Muon::MeasEnergyLoss)) {;}
81 pTruthMS = pvecTruthMS.mag();
84 if (muon.muonType()!=xAOD::Muon::SegmentTagged) {
86 float dpCB = 0.001*(pCB-pTruth);
91 float dpME = 0.001*(pME-pTruth);
95 if (pMS && pTruthMS) {
96 float dpMS = 0.001*(pME - pMS - pTruth + pTruthMS);
106 if (eloss>2000 && pTruthMS && pTruth) {
107 float dpEloss = 0.001*(pTruth - pTruthMS - eloss);
Scalar eta() const
pseudorapidity method
Helper class to provide constant type-safe access to aux data.
TH2 * dp_CB_truthIP_vs_pt
TH2 * dp_ME_truthIP_MS_truthMS_vs_pt
TH2 * dp_CB_truthIP_vs_eta
TH1 * dp_ME_truthIP_MS_truthMS
~MomentumTruthPullPlots()
TH2 * dp_ME_truthIP_MS_truthMS_vs_eta
MomentumTruthPullPlots(PlotBase *pParent, const std::string &sDir, std::string sType)
TH2 * dp_ME_truthIP_vs_pt
void fill(const xAOD::Muon &muon, const xAOD::TrackParticle *muontpIP, const xAOD::TruthParticle &truthprt, float weight=1.0)
TH2 * dp_ME_truthIP_vs_eta
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
PlotBase(PlotBase *parent, const std::string &sDir)
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.
Muon_v1 Muon
Reference the current persistent version: