CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonTrackValidator Class Reference

#include <MuonTrackValidator.h>

Inheritance diagram for MuonTrackValidator:
thread_unsafe::DQMEDAnalyzer MuonTrackValidatorBase edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Method called before the event loop. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
void endRun (edm::Run const &, edm::EventSetup const &)
 Method called at the end of the event loop. More...
 
 MuonTrackValidator (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~MuonTrackValidator ()
 Destructor. More...
 
- Public Member Functions inherited from thread_unsafe::DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void getRecoMomentum (const reco::Track &track, double &pt, double &ptError, double &qoverp, double &qoverpError, double &lambda, double &lambdaError, double &phi, double &phiError) const
 retrieval of reconstructed momentum components from reco::Track (== mean values for GSF) More...
 
void getRecoMomentum (const reco::GsfTrack &gsfTrack, double &pt, double &ptError, double &qoverp, double &qoverpError, double &lambda, double &lambdaError, double &phi, double &phiError) const
 retrieval of reconstructed momentum components based on the mode of a reco::GsfTrack More...
 

Private Attributes

edm::InputTag associatormap
 
bool BiDirectional_RecoToSim_association
 
std::vector< MonitorElement * > chi2_vs_eta
 
std::vector< MonitorElement * > chi2_vs_nhits
 
std::vector< MonitorElement * > chi2_vs_phi
 
CosmicTrackingParticleSelector cosmictpSelector
 
std::vector< MonitorElement * > cotThetares_vs_eta
 
std::vector< MonitorElement * > cotThetares_vs_pt
 
std::string dirName_
 
std::vector< MonitorElement * > dxypull_vs_eta
 
std::vector< MonitorElement * > dxyres_vs_eta
 
std::vector< MonitorElement * > dxyres_vs_pt
 
std::vector< MonitorElement * > dzpull_vs_eta
 
std::vector< MonitorElement * > dzres_vs_eta
 
std::vector< MonitorElement * > dzres_vs_pt
 
std::vector< MonitorElement * > etares_vs_eta
 
std::vector< MonitorElement * > h_assochi2
 
std::vector< MonitorElement * > h_assochi2_prob
 
std::vector< MonitorElement * > h_chi2mean_vs_phi
 
std::vector< MonitorElement * > h_chi2meanh
 
std::vector< MonitorElement * > h_chi2meanhitsh
 
std::vector< MonitorElement * > h_dxypulleta
 
std::vector< MonitorElement * > h_dzpulleta
 
std::vector< MonitorElement * > h_hits_phi
 
std::vector< MonitorElement * > h_losthits
 
std::vector< MonitorElement * > h_losthits_eta
 
std::vector< MonitorElement * > h_nchi2
 
std::vector< MonitorElement * > h_nchi2_prob
 
std::vector< MonitorElement * > h_phipulleta
 
std::vector< MonitorElement * > h_phipullphi
 
std::vector< MonitorElement * > h_ptpulleta
 
std::vector< MonitorElement * > h_ptpullphi
 
std::vector< MonitorElement * > h_ptshifteta
 
std::vector< MonitorElement * > h_thetapulleta
 
std::vector< MonitorElement * > h_thetapullphi
 
bool MABH
 
double maxPhi
 
double minPhi
 
std::vector< MonitorElement * > nhits_vs_phi
 
int nintPhi
 
std::vector< MonitorElement * > nlosthits_vs_eta
 
std::vector< MonitorElement * > phimean_vs_eta_phi
 
std::vector< MonitorElement * > phipull_vs_eta
 
std::vector< MonitorElement * > phipull_vs_phi
 
std::vector< MonitorElement * > phires_vs_eta
 
std::vector< MonitorElement * > phires_vs_phi
 
std::vector< MonitorElement * > phires_vs_pt
 
std::vector< MonitorElement * > ptmean_vs_eta_phi
 
std::vector< MonitorElement * > ptpull_vs_eta
 
std::vector< MonitorElement * > ptpull_vs_phi
 
std::vector< MonitorElement * > ptres_vs_eta
 
std::vector< MonitorElement * > ptres_vs_phi
 
std::vector< MonitorElement * > ptres_vs_pt
 
edm::EDGetTokenT
< reco::RecoToSimCollection
recoToSimCollection_Token
 
edm::EDGetTokenT
< reco::SimToRecoCollection
simToRecoCollection_Token
 
std::vector< MonitorElement * > thetapull_vs_eta
 
std::vector< MonitorElement * > thetapull_vs_phi
 
TrackingParticleSelector tpSelector
 
bool UseAssociators
 
bool useGsf
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Member Functions inherited from MuonTrackValidatorBase
void BinLogX (TH1 *h)
 
virtual void doProfileX (TH2 *th2, MonitorElement *me)
 
virtual void doProfileX (MonitorElement *th2m, MonitorElement *me)
 
void fillPlotFromVector (MonitorElement *h, std::vector< int > &vec)
 
void fillPlotFromVectors (MonitorElement *h, std::vector< int > &numerator, std::vector< int > &denominator, std::string type)
 
virtual double getEta (double eta)
 
virtual double getPt (double pt)
 
 MuonTrackValidatorBase (const edm::ParameterSet &pset, edm::ConsumesCollector iC)
 Constructor. More...
 
 MuonTrackValidatorBase (const edm::ParameterSet &pset)
 
void setUpVectors ()
 
virtual ~MuonTrackValidatorBase ()
 Destructor. More...
 
- Protected Attributes inherited from MuonTrackValidatorBase
std::vector< const
TrackAssociatorBase * > 
associator
 
std::vector< std::string > associators
 
edm::InputTag bsSrc
 
edm::EDGetTokenT< reco::BeamSpotbsSrc_Token
 
int cotThetaRes_nbin
 
double cotThetaRes_rangeMax
 
double cotThetaRes_rangeMin
 
DQMStoredbe_
 
std::vector< std::vector
< double > > 
dxyintervals
 
int dxyRes_nbin
 
double dxyRes_rangeMax
 
double dxyRes_rangeMin
 
std::vector< std::vector
< double > > 
dzintervals
 
int dzRes_nbin
 
double dzRes_rangeMax
 
double dzRes_rangeMin
 
std::vector< std::vector
< double > > 
etaintervals
 
std::vector< MonitorElement * > h_assoc2dxy
 
std::vector< MonitorElement * > h_assoc2dz
 
std::vector< MonitorElement * > h_assoc2eta
 
std::vector< MonitorElement * > h_assoc2hit
 
std::vector< MonitorElement * > h_assoc2phi
 
std::vector< MonitorElement * > h_assoc2pT
 
std::vector< MonitorElement * > h_assocdxy
 
std::vector< MonitorElement * > h_assocdz
 
std::vector< MonitorElement * > h_assoceta
 
std::vector< MonitorElement * > h_assoceta_Quality05
 
std::vector< MonitorElement * > h_assoceta_Quality075
 
std::vector< MonitorElement * > h_assocFraction
 
std::vector< MonitorElement * > h_assochit
 
std::vector< MonitorElement * > h_assocphi
 
std::vector< MonitorElement * > h_assocphi_Quality05
 
std::vector< MonitorElement * > h_assocphi_Quality075
 
std::vector< MonitorElement * > h_assocpT
 
std::vector< MonitorElement * > h_assocpT_Quality05
 
std::vector< MonitorElement * > h_assocpT_Quality075
 
std::vector< MonitorElement * > h_assocSharedHit
 
std::vector< MonitorElement * > h_assocvertpos
 
std::vector< MonitorElement * > h_assoczpos
 
std::vector< MonitorElement * > h_charge
 
std::vector< MonitorElement * > h_CSChits_eta
 
std::vector< MonitorElement * > h_DThits_eta
 
std::vector< MonitorElement * > h_eta
 
std::vector< MonitorElement * > h_etaSIM
 
std::vector< MonitorElement * > h_fakes
 
std::vector< MonitorElement * > h_hits
 
std::vector< MonitorElement * > h_hits_eta
 
std::vector< MonitorElement * > h_pt
 
std::vector< MonitorElement * > h_ptSIM
 
std::vector< MonitorElement * > h_pullDxy
 
std::vector< MonitorElement * > h_pullDz
 
std::vector< MonitorElement * > h_pullPhi
 
std::vector< MonitorElement * > h_pullQoverp
 
std::vector< MonitorElement * > h_pullTheta
 
std::vector< MonitorElement * > h_PurityVsQuality
 
std::vector< MonitorElement * > h_recodxy
 
std::vector< MonitorElement * > h_recodz
 
std::vector< MonitorElement * > h_recoeta
 
std::vector< MonitorElement * > h_recohit
 
std::vector< MonitorElement * > h_recophi
 
std::vector< MonitorElement * > h_recopT
 
std::vector< MonitorElement * > h_RPChits_eta
 
std::vector< MonitorElement * > h_simuldxy
 
std::vector< MonitorElement * > h_simuldz
 
std::vector< MonitorElement * > h_simuleta
 
std::vector< MonitorElement * > h_simulhit
 
std::vector< MonitorElement * > h_simulphi
 
std::vector< MonitorElement * > h_simulpT
 
std::vector< MonitorElement * > h_simulvertpos
 
std::vector< MonitorElement * > h_simulzpos
 
std::vector< MonitorElement * > h_tracks
 
std::vector< MonitorElement * > h_tracksSIM
 
std::vector< MonitorElement * > h_vertposSIM
 
bool ignoremissingtkcollection_
 
std::vector< edm::InputTaglabel
 
edm::InputTag label_tp_effic
 
edm::InputTag label_tp_fake
 
double max
 
double maxDxy
 
double maxDz
 
double maxHit
 
double maxPhi
 
double maxpT
 
double maxVertpos
 
double maxZpos
 
double min
 
double minDxy
 
double minDz
 
double minHit
 
double minPhi
 
double minpT
 
double minVertpos
 
double minZpos
 
std::vector< MonitorElement * > nCSChits_vs_eta
 
std::vector< MonitorElement * > nDThits_vs_eta
 
std::vector< MonitorElement * > nhits_vs_eta
 
int nint
 
int nintDxy
 
int nintDz
 
int nintHit
 
int nintPhi
 
int nintpT
 
int nintVertpos
 
int nintZpos
 
std::vector< MonitorElement * > nrec_vs_nsim
 
std::vector< MonitorElement * > nrecHit_vs_nsimHit_rec2sim
 
std::vector< MonitorElement * > nrecHit_vs_nsimHit_sim2rec
 
std::vector< MonitorElement * > nRPChits_vs_eta
 
std::string out
 
std::string parametersDefiner
 
std::vector< std::vector
< double > > 
phiintervals
 
int phiRes_nbin
 
double phiRes_rangeMax
 
double phiRes_rangeMin
 
std::vector< std::vector
< double > > 
pTintervals
 
int ptRes_nbin
 
double ptRes_rangeMax
 
double ptRes_rangeMin
 
edm::ESHandle< MagneticFieldtheMF
 
std::vector< std::vector< int > > totASS2_dxy
 
std::vector< std::vector< int > > totASS2_dz
 
std::vector< std::vector< int > > totASS2_hit
 
std::vector< std::vector< int > > totASS2_phi
 
std::vector< std::vector< int > > totASS2eta
 
std::vector< std::vector< int > > totASS2pT
 
std::vector< std::vector< int > > totASS_dxy
 
std::vector< std::vector< int > > totASS_dz
 
std::vector< std::vector< int > > totASS_hit
 
std::vector< std::vector< int > > totASS_phi
 
std::vector< std::vector< int > > totASS_phi_Quality05
 
std::vector< std::vector< int > > totASS_phi_Quality075
 
std::vector< std::vector< int > > totASS_vertpos
 
std::vector< std::vector< int > > totASS_zpos
 
std::vector< std::vector< int > > totASSeta
 
std::vector< std::vector< int > > totASSeta_Quality05
 
std::vector< std::vector< int > > totASSeta_Quality075
 
std::vector< std::vector< int > > totASSpT
 
std::vector< std::vector< int > > totASSpT_Quality05
 
std::vector< std::vector< int > > totASSpT_Quality075
 
std::vector< std::vector< int > > totREC_dxy
 
std::vector< std::vector< int > > totREC_dz
 
std::vector< std::vector< int > > totREC_hit
 
std::vector< std::vector< int > > totREC_phi
 
std::vector< std::vector< int > > totRECeta
 
std::vector< std::vector< int > > totRECpT
 
std::vector< std::vector< int > > totSIM_dxy
 
std::vector< std::vector< int > > totSIM_dz
 
std::vector< std::vector< int > > totSIM_hit
 
std::vector< std::vector< int > > totSIM_phi
 
std::vector< std::vector< int > > totSIM_vertpos
 
std::vector< std::vector< int > > totSIM_zpos
 
std::vector< std::vector< int > > totSIMeta
 
std::vector< std::vector< int > > totSIMpT
 
edm::EDGetTokenT
< TrackingParticleCollection
tp_effic_Token
 
edm::EDGetTokenT
< TrackingParticleCollection
tp_fake_Token
 
std::vector< edm::EDGetTokenT
< edm::View< reco::Track > > > 
track_Collection_Token
 
bool useFabs
 
bool useInvPt
 
bool useLogPt
 
bool usemuon
 
bool usetracker
 
std::vector< std::vector
< double > > 
vertposintervals
 
std::vector< std::vector
< double > > 
zposintervals
 

Detailed Description

Class that produces histograms to validate Muon Track Reconstruction performances

Definition at line 17 of file MuonTrackValidator.h.

Constructor & Destructor Documentation

MuonTrackValidator::MuonTrackValidator ( const edm::ParameterSet pset)
inline

Constructor.

Definition at line 20 of file MuonTrackValidator.h.

References associatormap, MuonTrackValidatorBase::associators, BiDirectional_RecoToSim_association, MuonTrackValidatorBase::bsSrc, MuonTrackValidatorBase::bsSrc_Token, edm::EDConsumerBase::consumes(), cosmictpSelector, dirName_, edm::ParameterSet::dump(), edm::ParameterSet::getParameter(), MuonTrackValidatorBase::label, MuonTrackValidatorBase::label_tp_effic, MuonTrackValidatorBase::label_tp_fake, MABH, maxPhi, minPhi, nintPhi, recoToSimCollection_Token, simToRecoCollection_Token, AlCaHLTBitMon_QueryRunRegistry::string, MuonTrackValidatorBase::tp_effic_Token, MuonTrackValidatorBase::tp_fake_Token, tpSelector, MuonTrackValidatorBase::track_Collection_Token, UseAssociators, useGsf, MuonTrackValidatorBase::usemuon, and MuonTrackValidatorBase::usetracker.

21  dirName_ = pset.getParameter<std::string>("dirName");
22  associatormap = pset.getParameter< edm::InputTag >("associatormap");
23  UseAssociators = pset.getParameter< bool >("UseAssociators");
24  tpSelector = TrackingParticleSelector(pset.getParameter<double>("ptMinTP"),
25  pset.getParameter<double>("minRapidityTP"),
26  pset.getParameter<double>("maxRapidityTP"),
27  pset.getParameter<double>("tipTP"),
28  pset.getParameter<double>("lipTP"),
29  pset.getParameter<int>("minHitTP"),
30  pset.getParameter<bool>("signalOnlyTP"),
31  pset.getParameter<bool>("chargedOnlyTP"),
32  pset.getParameter<bool>("stableOnlyTP"),
33  pset.getParameter<std::vector<int> >("pdgIdTP"));
35  pset.getParameter<double>("minRapidityTP"),
36  pset.getParameter<double>("maxRapidityTP"),
37  pset.getParameter<double>("tipTP"),
38  pset.getParameter<double>("lipTP"),
39  pset.getParameter<int>("minHitTP"),
40  pset.getParameter<bool>("chargedOnlyTP"),
41  pset.getParameter<std::vector<int> >("pdgIdTP"));
42 
43  minPhi = pset.getParameter<double>("minPhi");
44  maxPhi = pset.getParameter<double>("maxPhi");
45  nintPhi = pset.getParameter<int>("nintPhi");
46  useGsf = pset.getParameter<bool>("useGsf");
47  BiDirectional_RecoToSim_association = pset.getParameter<bool>("BiDirectional_RecoToSim_association");
48 
49  // dump cfg parameters
50  edm::LogVerbatim("MuonTrackValidator") << "constructing MuonTrackValidator: " << pset.dump();
51 
52  // Declare consumes (also for the base class)
53  bsSrc_Token = consumes<reco::BeamSpot>(bsSrc);
54  tp_effic_Token = consumes<TrackingParticleCollection>(label_tp_effic);
55  tp_fake_Token = consumes<TrackingParticleCollection>(label_tp_fake);
56  for (unsigned int www=0;www<label.size();www++){
58  }
59  simToRecoCollection_Token = consumes<reco::SimToRecoCollection>(associatormap);
60  recoToSimCollection_Token = consumes<reco::RecoToSimCollection>(associatormap);
61 
62  MABH = false;
63  if (!UseAssociators) {
64  // flag MuonAssociatorByHits
65  if (associators[0] == "MuonAssociationByHits") MABH = true;
66  // reset string associators to the map label
67  associators.clear();
68  associators.push_back(associatormap.label());
69  edm::LogVerbatim("MuonTrackValidator") << "--> associators reset to: " <<associators[0];
70  }
71 
72  // inform on which SimHits will be counted
73  if (usetracker) edm::LogVerbatim("MuonTrackValidator")
74  <<"\n usetracker = TRUE : Tracker SimHits WILL be counted";
75  else edm::LogVerbatim("MuonTrackValidator")
76  <<"\n usetracker = FALSE : Tracker SimHits WILL NOT be counted";
77  if (usemuon) edm::LogVerbatim("MuonTrackValidator")
78  <<" usemuon = TRUE : Muon SimHits WILL be counted";
79  else edm::LogVerbatim("MuonTrackValidator")
80  <<" usemuon = FALSE : Muon SimHits WILL NOT be counted"<<std::endl;
81 
82  // loop over the reco::Track collections to validate: check for inconsistent input settings
83  for (unsigned int www=0;www<label.size();www++) {
84  std::string recoTracksLabel = label[www].label();
85  std::string recoTracksInstance = label[www].instance();
86 
87  // tracks with hits only on tracker
88  if (recoTracksLabel=="generalTracks" ||
89  (recoTracksLabel.find("cutsRecoTracks") != std::string::npos) ||
90  recoTracksLabel=="ctfWithMaterialTracksP5LHCNavigation" ||
91  recoTracksLabel=="hltL3TkTracksFromL2" ||
92  (recoTracksLabel=="hltL3Muons" && recoTracksInstance=="L2Seeded"))
93  {
94  if (usemuon) {
95  edm::LogWarning("MuonTrackValidator")
96  <<"\n*** WARNING : inconsistent input tracksTag = "<<label[www]
97  <<"\n with usemuon == true"<<"\n ---> please change to usemuon == false ";
98  }
99  if (!usetracker) {
100  edm::LogWarning("MuonTrackValidator")
101  <<"\n*** WARNING : inconsistent input tracksTag = "<<label[www]
102  <<"\n with usetracker == false"<<"\n ---> please change to usetracker == true ";
103  }
104  }
105 
106  // tracks with hits only on muon detectors
107  else if (recoTracksLabel=="standAloneMuons" ||
108  recoTracksLabel=="standAloneSETMuons" ||
109  recoTracksLabel=="cosmicMuons" ||
110  recoTracksLabel=="hltL2Muons")
111  {
112  if (usetracker) {
113  edm::LogWarning("MuonTrackValidator")
114  <<"\n*** WARNING : inconsistent input tracksTag = "<<label[www]
115  <<"\n with usetracker == true"<<"\n ---> please change to usetracker == false ";
116  }
117  if (!usemuon) {
118  edm::LogWarning("MuonTrackValidator")
119  <<"\n*** WARNING : inconsistent input tracksTag = "<<label[www]
120  <<"\n with usemuon == false"<<"\n ---> please change to usemuon == true ";
121  }
122  }
123 
124  } // for (unsigned int www=0;www<label.size();www++)
125  }
T getParameter(std::string const &) const
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > track_Collection_Token
std::string dump(unsigned int indent=0) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
CosmicTrackingParticleSelector cosmictpSelector
edm::EDGetTokenT< TrackingParticleCollection > tp_fake_Token
std::vector< edm::InputTag > label
MuonTrackValidatorBase(const edm::ParameterSet &pset, edm::ConsumesCollector iC)
Constructor.
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimCollection_Token
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoCollection_Token
TrackingParticleSelector tpSelector
edm::InputTag associatormap
std::vector< std::string > associators
edm::EDGetTokenT< TrackingParticleCollection > tp_effic_Token
edm::EDGetTokenT< reco::BeamSpot > bsSrc_Token
virtual MuonTrackValidator::~MuonTrackValidator ( )
inlinevirtual

Destructor.

Definition at line 128 of file MuonTrackValidator.h.

128 { }

Member Function Documentation

void MuonTrackValidator::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
virtual

Method called before the event loop.

Method called once per event

Implements edm::EDAnalyzer.

Definition at line 232 of file MuonTrackValidator.cc.

References funct::abs(), asciidump::at, reco::TrackBase::charge(), reco::TrackBase::chi2(), funct::cos(), reco::TrackBase::dxy(), reco::TrackBase::dxyError(), reco::TrackBase::dz(), reco::TrackBase::dzError(), alignCSCRings::e, edm::AssociationMap< Tag >::end(), reco::TrackBase::eta(), f, edm::AssociationMap< Tag >::find(), reco::Track::found(), edm::EventSetup::get(), edm::Ref< C, T, F >::get(), edm::Event::getByToken(), reco::TrackBase::hitPattern(), i, edm::RefToBase< T >::key(), edm::Ref< C, T, F >::key(), diffTwoXMLs::label, LogTrace, M_PI, bookConverter::min, TrackingParticle::momentum(), reco::TrackBase::momentum(), reco::TrackBase::ndof(), reco::TrackBase::normalizedChi2(), reco::TrackBase::numberOfLostHits(), reco::TrackBase::numberOfValidHits(), reco::HitPattern::numberOfValidMuonCSCHits(), reco::HitPattern::numberOfValidMuonDTHits(), reco::HitPattern::numberOfValidMuonRPCHits(), reco::TrackBase::parameters(), edm::AssociationMap< Tag >::post_insert(), edm::Handle< T >::product(), reco::TrackBase::pt(), dt_dqm_sourceclient_common_cff::reco, funct::sin(), mathSSE::sqrt(), reco::TrackBase::theta(), tmp, TrackingParticle::vertex(), w(), and cms::Exception::what().

232  {
233  using namespace reco;
234 
235  edm::LogInfo("MuonTrackValidator") << "\n====================================================" << "\n"
236 << "Analyzing new event" << "\n"
237 << "====================================================\n" << "\n";
238  edm::ESHandle<ParametersDefinerForTP> parametersDefinerTP;
239  setup.get<TrackAssociatorRecord>().get(parametersDefiner,parametersDefinerTP);
240 
241  edm::Handle<TrackingParticleCollection> TPCollectionHeff ;
242  event.getByToken(tp_effic_Token,TPCollectionHeff);
243  const TrackingParticleCollection tPCeff = *(TPCollectionHeff.product());
244 
245  edm::Handle<TrackingParticleCollection> TPCollectionHfake ;
246  event.getByToken(tp_fake_Token,TPCollectionHfake);
247  const TrackingParticleCollection tPCfake = *(TPCollectionHfake.product());
248 
249  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
250  event.getByToken(bsSrc_Token,recoBeamSpotHandle);
251  reco::BeamSpot bs = *recoBeamSpotHandle;
252 
253  int w=0;
254  for (unsigned int ww=0;ww<associators.size();ww++){
255  for (unsigned int www=0;www<label.size();www++){
256  //
257  //get collections from the event
258  //
259  edm::Handle<edm::View<Track> > trackCollection;
260 
261  reco::RecoToSimCollection recSimColl;
262  reco::SimToRecoCollection simRecColl;
263  unsigned int trackCollectionSize = 0;
264 
265  if(!event.getByToken(track_Collection_Token[www], trackCollection)&&ignoremissingtkcollection_) {
266 
267 recSimColl.post_insert();
268 simRecColl.post_insert();
269 
270  }
271 
272  else {
273 
274 trackCollectionSize = trackCollection->size();
275 //associate tracks
276 if(UseAssociators){
277 edm::LogVerbatim("MuonTrackValidator") << "Analyzing "
278 << label[www].process()<<":"
279 << label[www].label()<<":"
280 << label[www].instance()<<" with "
281 << associators[ww].c_str() <<"\n";
282 
283 LogTrace("MuonTrackValidator") << "Calling associateRecoToSim method" << "\n";
284 recSimColl=associator[ww]->associateRecoToSim(trackCollection,
285 TPCollectionHfake,
286 &event,&setup);
287 LogTrace("MuonTrackValidator") << "Calling associateSimToReco method" << "\n";
288 simRecColl=associator[ww]->associateSimToReco(trackCollection,
289 TPCollectionHeff,
290 &event,&setup);
291 }
292 else{
293 edm::LogVerbatim("MuonTrackValidator") << "Analyzing "
294 << label[www].process()<<":"
295 << label[www].label()<<":"
296 << label[www].instance()<<" with "
297 << associatormap.process()<<":"
298 << associatormap.label()<<":"
299 << associatormap.instance()<<"\n";
300 
301 Handle<reco::SimToRecoCollection > simtorecoCollectionH;
302 event.getByToken(simToRecoCollection_Token,simtorecoCollectionH);
303 simRecColl= *(simtorecoCollectionH.product());
304 
305 Handle<reco::RecoToSimCollection > recotosimCollectionH;
306 event.getByToken(recoToSimCollection_Token,recotosimCollectionH);
307 recSimColl= *(recotosimCollectionH.product());
308 }
309 
310  }
311 
312 
313  //
314  //fill simulation histograms
315  //compute number of tracks per eta interval
316  //
317  edm::LogVerbatim("MuonTrackValidator") << "\n# of TrackingParticles: " << tPCeff.size() << "\n";
318  int ats = 0;
319  int st=0;
320  for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
321 bool TP_is_matched = false;
322 double quality = 0.;
323 bool Quality05 = false;
324 bool Quality075 = false;
325 
326 TrackingParticleRef tpr(TPCollectionHeff, i);
327 TrackingParticle* tp=const_cast<TrackingParticle*>(tpr.get());
328 TrackingParticle::Vector momentumTP;
329 TrackingParticle::Point vertexTP;
330 double dxySim = 0;
331 double dzSim = 0;
332 
333 //If the TrackingParticle is collison like, get the momentum and vertex at production state
334 if(parametersDefiner=="LhcParametersDefinerForTP")
335 {
336 if(! tpSelector(*tp)) continue;
337 momentumTP = tp->momentum();
338 vertexTP = tp->vertex();
339 //Calcualte the impact parameters w.r.t. PCA
340 TrackingParticle::Vector momentum = parametersDefinerTP->momentum(event,setup,tpr);
341 TrackingParticle::Point vertex = parametersDefinerTP->vertex(event,setup,tpr);
342 dxySim = (-vertex.x()*sin(momentum.phi())+vertex.y()*cos(momentum.phi()));
343 dzSim = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/sqrt(momentum.perp2()) * momentum.z()/sqrt(momentum.perp2());
344 }
345 //If the TrackingParticle is comics, get the momentum and vertex at PCA
346 if(parametersDefiner=="CosmicParametersDefinerForTP")
347 {
348 if(! cosmictpSelector(tpr,&bs,event,setup)) continue;
349 momentumTP = parametersDefinerTP->momentum(event,setup,tpr);
350 vertexTP = parametersDefinerTP->vertex(event,setup,tpr);
351 dxySim = (-vertexTP.x()*sin(momentumTP.phi())+vertexTP.y()*cos(momentumTP.phi()));
352 dzSim = vertexTP.z() - (vertexTP.x()*momentumTP.x()+vertexTP.y()*momentumTP.y())/sqrt(momentumTP.perp2()) * momentumTP.z()/sqrt(momentumTP.perp2());
353 }
354 edm::LogVerbatim("MuonTrackValidator") <<"--------------------Selected TrackingParticle #"<<tpr.key();
355 st++;
356 
357 h_ptSIM[w]->Fill(sqrt(momentumTP.perp2()));
358 h_etaSIM[w]->Fill(momentumTP.eta());
359 h_vertposSIM[w]->Fill(sqrt(vertexTP.perp2()));
360 
361 std::vector<std::pair<RefToBase<Track>, double> > rt;
362 if(simRecColl.find(tpr) != simRecColl.end()){
363 rt = (std::vector<std::pair<RefToBase<Track>, double> >) simRecColl[tpr];
364 if (rt.size()!=0) {
365 RefToBase<Track> assoc_recoTrack = rt.begin()->first;
366 edm::LogVerbatim("MuonTrackValidator")<<"-----------------------------associated Track #"<<assoc_recoTrack.key();
367 TP_is_matched = true;
368 ats++;
369 quality = rt.begin()->second;
370 edm::LogVerbatim("MuonTrackValidator") << "TrackingParticle #" <<tpr.key()
371 << " with pt=" << sqrt(momentumTP.perp2())
372 << " associated with quality:" << quality <<"\n";
373 if (MABH) {
374 if (quality > 0.75) {
375 Quality075 = true;
376 Quality05 = true;
377 }
378 else if (quality > 0.5) {
379 Quality05 = true;
380 }
381 }
382 }
383 }else{
384 edm::LogVerbatim("MuonTrackValidator")
385 << "TrackingParticle #" << tpr.key()
386 << " with pt,eta,phi: "
387 << sqrt(momentumTP.perp2()) << " , "
388 << momentumTP.eta() << " , "
389 << momentumTP.phi() << " , "
390 << " NOT associated to any reco::Track" << "\n";
391 }
392 
393 for (unsigned int f=0; f<etaintervals[w].size()-1; f++){
394 if (getEta(momentumTP.eta())>etaintervals[w][f]&&
395 getEta(momentumTP.eta())<etaintervals[w][f+1]) {
396 totSIMeta[w][f]++;
397 if (TP_is_matched) {
398 totASSeta[w][f]++;
399 
400 if (MABH) {
401 if (Quality075) {
404 }
405 else if (Quality05) {
407 }
408 }
409 }
410 }
411 } // END for (unsigned int f=0; f<etaintervals[w].size()-1; f++){
412 
413 for (unsigned int f=0; f<phiintervals[w].size()-1; f++){
414 if (momentumTP.phi() > phiintervals[w][f]&&
415 momentumTP.phi() <phiintervals[w][f+1]) {
416 totSIM_phi[w][f]++;
417 if (TP_is_matched) {
418 totASS_phi[w][f]++;
419 
420 if (MABH) {
421 if (Quality075) {
424 }
425 else if (Quality05) {
427 }
428 }
429 }
430 }
431 } // END for (unsigned int f=0; f<phiintervals[w].size()-1; f++){
432 
433 
434 for (unsigned int f=0; f<pTintervals[w].size()-1; f++){
435  if (getPt(sqrt(momentumTP.perp2()))>pTintervals[w][f]&&
436  getPt(sqrt(momentumTP.perp2()))<pTintervals[w][f+1]) {
437  totSIMpT[w][f]++;
438 if (TP_is_matched) {
439 totASSpT[w][f]++;
440 
441 if (MABH) {
442 if (Quality075) {
445 }
446 else if (Quality05) {
448 }
449 }
450 }
451 }
452 } // END for (unsigned int f=0; f<pTintervals[w].size()-1; f++){
453 
454  for (unsigned int f=0; f<dxyintervals[w].size()-1; f++){
455 if (dxySim>dxyintervals[w][f]&&
456 dxySim<dxyintervals[w][f+1]) {
457 totSIM_dxy[w][f]++;
458 if (TP_is_matched) {
459 totASS_dxy[w][f]++;
460 }
461 }
462 } // END for (unsigned int f=0; f<dxyintervals[w].size()-1; f++){
463 
464 for (unsigned int f=0; f<dzintervals[w].size()-1; f++){
465 if (dzSim>dzintervals[w][f]&&
466 dzSim<dzintervals[w][f+1]) {
467 totSIM_dz[w][f]++;
468 if (TP_is_matched) {
469  totASS_dz[w][f]++;
470  }
471  }
472  } // END for (unsigned int f=0; f<dzintervals[w].size()-1; f++){
473 
474 for (unsigned int f=0; f<vertposintervals[w].size()-1; f++){
475 if (sqrt(vertexTP.perp2())>vertposintervals[w][f]&&
476 sqrt(vertexTP.perp2())<vertposintervals[w][f+1]) {
477 totSIM_vertpos[w][f]++;
478 if (TP_is_matched) {
479 totASS_vertpos[w][f]++;
480 }
481 }
482 } // END for (unsigned int f=0; f<vertposintervals[w].size()-1; f++){
483 
484 for (unsigned int f=0; f<zposintervals[w].size()-1; f++){
485 if (vertexTP.z()>zposintervals[w][f]&&
486 vertexTP.z()<zposintervals[w][f+1]) {
487 totSIM_zpos[w][f]++;
488 if (TP_is_matched) {
489  totASS_zpos[w][f]++;
490  }
491  }
492  } // END for (unsigned int f=0; f<zposintervals[w].size()-1; f++){
493 
494 int nSimHits = 0;
495 if (usetracker && usemuon) {
496 nSimHits= tpr.get()->numberOfHits();
497 }
498 else if (!usetracker && usemuon) {
499 nSimHits= tpr.get()->numberOfHits() - tpr.get()->numberOfTrackerHits();
500 }
501 else if (usetracker && !usemuon) {
502 nSimHits=tpr.get()->numberOfTrackerHits();
503 }
504 
505 
506  int tmp = std::min(nSimHits,int(maxHit-1));
507 edm::LogVerbatim("MuonTrackValidator") << "\t N simhits = "<< nSimHits<<"\n";
508 
509 totSIM_hit[w][tmp]++;
510 if (TP_is_matched) totASS_hit[w][tmp]++;
511 
512 if (TP_is_matched)
513 {
514 RefToBase<Track> assoctrack = rt.begin()->first;
515 nrecHit_vs_nsimHit_sim2rec[w]->Fill( assoctrack->numberOfValidHits(),nSimHits);
516 }
517  } // End for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
518  if (st!=0) h_tracksSIM[w]->Fill(st);
519 
520 
521  //
522  //fill reconstructed track histograms
523  //
524  edm::LogVerbatim("MuonTrackValidator") << "\n# of reco::Tracks with "
525 << label[www].process()<<":"
526 << label[www].label()<<":"
527 << label[www].instance()
528 << ": " << trackCollectionSize << "\n";
529  int at=0;
530  int rT=0;
531  for(edm::View<Track>::size_type i=0; i<trackCollectionSize; ++i){
532  bool Track_is_matched = false;
533 RefToBase<Track> track(trackCollection, i);
534 rT++;
535 
536 std::vector<std::pair<TrackingParticleRef, double> > tp;
538 
539 // new logic (bidirectional)
541 edm::LogVerbatim("MuonTrackValidator")<<"----------------------------------------Track #"<< track.key();
542 
543 if(recSimColl.find(track) != recSimColl.end()) {
544 tp = recSimColl[track];
545 if (tp.size() != 0) {
546 tpr = tp.begin()->first;
547 // RtS and StR must associate the same pair !
548 if(simRecColl.find(tpr) != simRecColl.end()) {
549 std::vector<std::pair<RefToBase<Track>, double> > track_checkback = simRecColl[tpr];
550 RefToBase<Track> assoc_track_checkback;
551 assoc_track_checkback = track_checkback.begin()->first;
552 
553 if ( assoc_track_checkback.key() == track.key() ) {
554 edm::LogVerbatim("MuonTrackValidator")<<"------------------associated TrackingParticle #"<<tpr.key();
555 Track_is_matched = true;
556 at++;
557 double Purity = tp.begin()->second;
558 double Quality = track_checkback.begin()->second;
559 edm::LogVerbatim("MuonTrackValidator") << "reco::Track #" << track.key() << " with pt=" << track->pt()
560 << " associated with quality:" << Purity <<"\n";
561 if (MABH) h_PurityVsQuality[w]->Fill(Quality,Purity);
562 }
563 }
564 }
565 }
566 
567 if (!Track_is_matched) edm::LogVerbatim("MuonTrackValidator")
568 << "reco::Track #" << track.key() << " with pt=" << track->pt() << " NOT associated to any TrackingParticle" << "\n";
569 }
570 // old logic (bugged)
571 else {
572 if(recSimColl.find(track) != recSimColl.end()){
573 tp = recSimColl[track];
574 if (tp.size()!=0) {
575 Track_is_matched = true;
576 tpr = tp.begin()->first;
577 at++;
578 edm::LogVerbatim("MuonTrackValidator") << "reco::Track #" << track.key() << " with pt=" << track->pt()
579 << " associated with quality:" << tp.begin()->second <<"\n";
580 }
581 } else {
582 edm::LogVerbatim("MuonTrackValidator") << "reco::Track #" << track.key() << " with pt=" << track->pt()
583 << " NOT associated to any TrackingParticle" << "\n";
584 }
585 }
586 
587 //Compute fake rate vs eta
588 for (unsigned int f=0; f<etaintervals[w].size()-1; f++){
589 if (getEta(track->momentum().eta())>etaintervals[w][f]&&
590 getEta(track->momentum().eta())<etaintervals[w][f+1]) {
591 totRECeta[w][f]++;
592 if (Track_is_matched) {
593 totASS2eta[w][f]++;
594 }
595 }
596 } // End for (unsigned int f=0; f<etaintervals[w].size()-1; f++){
597 
598 for (unsigned int f=0; f<phiintervals[w].size()-1; f++){
599 if (track->momentum().phi()>phiintervals[w][f]&&
600 track->momentum().phi()<phiintervals[w][f+1]) {
601 totREC_phi[w][f]++;
602 if (Track_is_matched) {
603 totASS2_phi[w][f]++;
604 }
605 }
606 } // End for (unsigned int f=0; f<phiintervals[w].size()-1; f++){
607 
608 
609 for (unsigned int f=0; f<pTintervals[w].size()-1; f++){
610 if (getPt(sqrt(track->momentum().perp2()))>pTintervals[w][f]&&
611 getPt(sqrt(track->momentum().perp2()))<pTintervals[w][f+1]) {
612 totRECpT[w][f]++;
613 if (Track_is_matched) {
614 totASS2pT[w][f]++;
615 }
616 }
617 } // End for (unsigned int f=0; f<pTintervals[w].size()-1; f++){
618 
619 for (unsigned int f=0; f<dxyintervals[w].size()-1; f++){
620 if (track->dxy(bs.position())>dxyintervals[w][f]&&
621 track->dxy(bs.position())<dxyintervals[w][f+1]) {
622 totREC_dxy[w][f]++;
623 if (Track_is_matched) {
624 totASS2_dxy[w][f]++;
625 }
626 }
627 } // End for (unsigned int f=0; f<dxyintervals[w].size()-1; f++){
628 
629 for (unsigned int f=0; f<dzintervals[w].size()-1; f++){
630 if (track->dz(bs.position())>dzintervals[w][f]&&
631 track->dz(bs.position())<dzintervals[w][f+1]) {
632 totREC_dz[w][f]++;
633 if (Track_is_matched) {
634 totASS2_dz[w][f]++;
635 }
636 }
637 } // End for (unsigned int f=0; f<dzintervals[w].size()-1; f++){
638 
639 int tmp = std::min((int)track->found(),int(maxHit-1));
640  totREC_hit[w][tmp]++;
641 if (Track_is_matched) totASS2_hit[w][tmp]++;
642 
643 edm::LogVerbatim("MuonTrackValidator") << "\t N valid rechits = "<< (int)track->found() <<"\n";
644 
645 //Fill other histos
646  try{
647 if (!Track_is_matched) continue;
648 
649 if (associators[ww]=="TrackAssociatorByChi2"){
650 //association chi2
651 double assocChi2 = -tp.begin()->second;//in association map is stored -chi2
652 h_assochi2[www]->Fill(assocChi2);
653 h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5,5));
654 }
655 else if (associators[ww]=="TrackAssociatorByHits"){
656 double fraction = tp.begin()->second;
657 h_assocFraction[www]->Fill(fraction);
658 h_assocSharedHit[www]->Fill(fraction*track->numberOfValidHits());
659 }
660 
661 //nchi2 and hits global distributions
662 h_nchi2[w]->Fill(track->normalizedChi2());
663 h_nchi2_prob[w]->Fill(TMath::Prob(track->chi2(),(int)track->ndof()));
664 h_hits[w]->Fill(track->numberOfValidHits());
665 h_losthits[w]->Fill(track->numberOfLostHits());
666 chi2_vs_nhits[w]->Fill(track->numberOfValidHits(),track->normalizedChi2());
667 h_charge[w]->Fill( track->charge() );
668 
669 //Get tracking particle parameters at point of closest approach to the beamline
670 TrackingParticle::Vector momentumTP = parametersDefinerTP->momentum(event,setup,tpr) ;
671 TrackingParticle::Point vertexTP = parametersDefinerTP->vertex(event,setup,tpr);
672 double ptSim = sqrt(momentumTP.perp2());
673 double qoverpSim = tpr->charge()/sqrt(momentumTP.x()*momentumTP.x()+momentumTP.y()*momentumTP.y()+momentumTP.z()*momentumTP.z());
674 double thetaSim = momentumTP.theta();
675 double lambdaSim = M_PI/2-momentumTP.theta();
676 double phiSim = momentumTP.phi();
677 double dxySim = (-vertexTP.x()*sin(momentumTP.phi())+vertexTP.y()*cos(momentumTP.phi()));
678 double dzSim = vertexTP.z() - (vertexTP.x()*momentumTP.x()+vertexTP.y()*momentumTP.y())/sqrt(momentumTP.perp2()) * momentumTP.z()/sqrt(momentumTP.perp2());
679 
680 // removed unused variable, left this in case it has side effects
681 track->parameters();
682 
683 double qoverpRec(0);
684 double qoverpErrorRec(0);
685 double ptRec(0);
686 double ptErrorRec(0);
687 double lambdaRec(0);
688 double lambdaErrorRec(0);
689 double phiRec(0);
690 double phiErrorRec(0);
691 
692 
693 //loop to decide whether to take gsfTrack (utilisation of mode-function) or common track
694 const GsfTrack* gsfTrack(0);
695 if(useGsf){
696 gsfTrack = dynamic_cast<const GsfTrack*>(&(*track));
697 if (gsfTrack==0) edm::LogInfo("MuonTrackValidator") << "Trying to access mode for a non-GsfTrack";
698 }
699 
700 if (gsfTrack) {
701 // get values from mode
702 getRecoMomentum(*gsfTrack, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
703 lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
704 }
705 
706 else {
707 // get values from track (without mode)
708 getRecoMomentum(*track, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
709 lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
710 }
711 
712 double thetaRec = track->theta();
713 double ptError = ptErrorRec;
714 double ptres = ptRec - ptSim;
715 double etares = track->eta()-momentumTP.Eta();
716 double dxyRec = track->dxy(bs.position());
717 double dzRec = track->dz(bs.position());
718 // eta residue; pt, k, theta, phi, dxy, dz pulls
719 double qoverpPull=(qoverpRec-qoverpSim)/qoverpErrorRec;
720 double thetaPull=(lambdaRec-lambdaSim)/lambdaErrorRec;
721 double phiDiff = phiRec - phiSim;
722 if (abs(phiDiff) > M_PI) {
723 if (phiDiff >0.) phiDiff = phiDiff - 2.*M_PI;
724  else phiDiff = phiDiff + 2.*M_PI;
725 }
726 double phiPull=phiDiff/phiErrorRec;
727 double dxyPull=(dxyRec-dxySim)/track->dxyError();
728 double dzPull=(dzRec-dzSim)/track->dzError();
729 
730 double contrib_Qoverp = ((qoverpRec-qoverpSim)/qoverpErrorRec)*
731 ((qoverpRec-qoverpSim)/qoverpErrorRec)/5;
732 double contrib_dxy = ((dxyRec-dxySim)/track->dxyError())*((dxyRec-dxySim)/track->dxyError())/5;
733 double contrib_dz = ((dzRec-dzSim)/track->dzError())*((dzRec-dzSim)/track->dzError())/5;
734 double contrib_theta = ((lambdaRec-lambdaSim)/lambdaErrorRec)*
735 ((lambdaRec-lambdaSim)/lambdaErrorRec)/5;
736 double contrib_phi = (phiDiff/phiErrorRec)*(phiDiff/phiErrorRec)/5;
737 
738 LogTrace("MuonTrackValidator") << "assocChi2=" << tp.begin()->second << "\n"
739 << "" << "\n"
740 << "ptREC=" << ptRec << "\n"
741 << "etaREC=" << track->eta() << "\n"
742 << "qoverpREC=" << qoverpRec << "\n"
743 << "dxyREC=" << dxyRec << "\n"
744 << "dzREC=" << dzRec << "\n"
745 << "thetaREC=" << track->theta() << "\n"
746 << "phiREC=" << phiRec << "\n"
747 << "" << "\n"
748 << "qoverpError()=" << qoverpErrorRec << "\n"
749 << "dxyError()=" << track->dxyError() << "\n"
750 << "dzError()=" << track->dzError() << "\n"
751 << "thetaError()=" << lambdaErrorRec << "\n"
752 << "phiError()=" << phiErrorRec << "\n"
753 << "" << "\n"
754 << "ptSIM=" << ptSim << "\n"
755 << "etaSIM=" << momentumTP.Eta() << "\n"
756 << "qoverpSIM=" << qoverpSim << "\n"
757 << "dxySIM=" << dxySim << "\n"
758 << "dzSIM=" << dzSim << "\n"
759 << "thetaSIM=" << M_PI/2-lambdaSim << "\n"
760 << "phiSIM=" << phiSim << "\n"
761 << "" << "\n"
762 << "contrib_Qoverp=" << contrib_Qoverp << "\n"
763 << "contrib_dxy=" << contrib_dxy << "\n"
764 << "contrib_dz=" << contrib_dz << "\n"
765 << "contrib_theta=" << contrib_theta << "\n"
766 << "contrib_phi=" << contrib_phi << "\n"
767 << "" << "\n"
768 <<"chi2PULL="<<contrib_Qoverp+contrib_dxy+contrib_dz+contrib_theta+contrib_phi<<"\n";
769 
770 h_pullQoverp[w]->Fill(qoverpPull);
771 h_pullTheta[w]->Fill(thetaPull);
772 h_pullPhi[w]->Fill(phiPull);
773 h_pullDxy[w]->Fill(dxyPull);
774 h_pullDz[w]->Fill(dzPull);
775 
776 
777 h_pt[w]->Fill(ptres/ptError);
778 h_eta[w]->Fill(etares);
779 etares_vs_eta[w]->Fill(getEta(track->eta()),etares);
780 
781 
782 //chi2 and #hit vs eta: fill 2D histos
783 chi2_vs_eta[w]->Fill(getEta(track->eta()),track->normalizedChi2());
784 nhits_vs_eta[w]->Fill(getEta(track->eta()),track->numberOfValidHits());
785 nDThits_vs_eta[w]->Fill(getEta(track->eta()),track->hitPattern().numberOfValidMuonDTHits());
786 nCSChits_vs_eta[w]->Fill(getEta(track->eta()),track->hitPattern().numberOfValidMuonCSCHits());
787 nRPChits_vs_eta[w]->Fill(getEta(track->eta()),track->hitPattern().numberOfValidMuonRPCHits());
788 
789 nlosthits_vs_eta[w]->Fill(getEta(track->eta()),track->numberOfLostHits());
790 
791 //resolution of track params: fill 2D histos
792 dxyres_vs_eta[w]->Fill(getEta(track->eta()),dxyRec-dxySim);
793 ptres_vs_eta[w]->Fill(getEta(track->eta()),(ptRec-ptSim)/ptRec);
794 dzres_vs_eta[w]->Fill(getEta(track->eta()),dzRec-dzSim);
795 phires_vs_eta[w]->Fill(getEta(track->eta()),phiDiff);
796 cotThetares_vs_eta[w]->Fill(getEta(track->eta()), cos(thetaRec)/sin(thetaRec) - cos(thetaSim)/sin(thetaSim));
797 
798 //same as before but vs pT
799 dxyres_vs_pt[w]->Fill(getPt(ptRec),dxyRec-dxySim);
800 ptres_vs_pt[w]->Fill(getPt(ptRec),(ptRec-ptSim)/ptRec);
801 dzres_vs_pt[w]->Fill(getPt(ptRec),dzRec-dzSim);
802 phires_vs_pt[w]->Fill(getPt(ptRec),phiDiff);
803  cotThetares_vs_pt[w]->Fill(getPt(ptRec), cos(thetaRec)/sin(thetaRec) - cos(thetaSim)/sin(thetaSim));
804 
805 //pulls of track params vs eta: fill 2D histos
806 dxypull_vs_eta[w]->Fill(getEta(track->eta()),dxyPull);
807 ptpull_vs_eta[w]->Fill(getEta(track->eta()),ptres/ptError);
808 dzpull_vs_eta[w]->Fill(getEta(track->eta()),dzPull);
809 phipull_vs_eta[w]->Fill(getEta(track->eta()),phiPull);
810 thetapull_vs_eta[w]->Fill(getEta(track->eta()),thetaPull);
811 
812 //plots vs phi
813 nhits_vs_phi[w]->Fill(phiRec,track->numberOfValidHits());
814 chi2_vs_phi[w]->Fill(phiRec,track->normalizedChi2());
815 ptmean_vs_eta_phi[w]->Fill(phiRec,getEta(track->eta()),ptRec);
816 phimean_vs_eta_phi[w]->Fill(phiRec,getEta(track->eta()),phiRec);
817 ptres_vs_phi[w]->Fill(phiRec,(ptRec-ptSim)/ptRec);
818 phires_vs_phi[w]->Fill(phiRec,phiDiff);
819 ptpull_vs_phi[w]->Fill(phiRec,ptres/ptError);
820 phipull_vs_phi[w]->Fill(phiRec,phiPull);
821 thetapull_vs_phi[w]->Fill(phiRec,thetaPull);
822 
823 int nSimHits = 0;
824 if (usetracker && usemuon) {
825 nSimHits= tpr.get()->numberOfHits();
826 }
827 else if (!usetracker && usemuon) {
828 nSimHits= tpr.get()->numberOfHits() - tpr.get()->numberOfTrackerHits();
829 }
830 else if (usetracker && !usemuon) {
831 nSimHits=tpr.get()->numberOfTrackerHits();
832 }
833 
834 nrecHit_vs_nsimHit_rec2sim[w]->Fill(track->numberOfValidHits(), nSimHits);
835 
836 } // End of try{
837 catch (cms::Exception e){
838 LogTrace("MuonTrackValidator") << "exception found: " << e.what() << "\n";
839 }
840  } // End of for(View<Track>::size_type i=0; i<trackCollectionSize; ++i){
841  if (at!=0) h_tracks[w]->Fill(at);
842  h_fakes[w]->Fill(rT-at);
843  edm::LogVerbatim("MuonTrackValidator") << "Total Simulated: " << st << "\n"
844 << "Total Associated (simToReco): " << ats << "\n"
845 << "Total Reconstructed: " << rT << "\n"
846 << "Total Associated (recoToSim): " << at << "\n"
847 << "Total Fakes: " << rT-at << "\n";
848  nrec_vs_nsim[w]->Fill(rT,st);
849  w++;
850  } // End of for (unsigned int www=0;www<label.size();www++){
851  } //END of for (unsigned int ww=0;ww<associators.size();ww++){
852 }
virtual char const * what() const
Definition: Exception.cc:141
std::vector< MonitorElement * > nrecHit_vs_nsimHit_sim2rec
std::vector< std::vector< int > > totASS_zpos
int i
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > h_PurityVsQuality
std::vector< std::vector< int > > totASSeta_Quality05
std::vector< std::vector< int > > totREC_phi
std::vector< MonitorElement * > etares_vs_eta
std::vector< MonitorElement * > nrecHit_vs_nsimHit_rec2sim
std::vector< MonitorElement * > ptres_vs_phi
std::vector< std::vector< int > > totASS2_hit
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > track_Collection_Token
std::vector< std::vector< int > > totRECpT
std::vector< TrackingParticle > TrackingParticleCollection
std::vector< std::vector< int > > totREC_dz
std::vector< MonitorElement * > nrec_vs_nsim
const_iterator end() const
last iterator over the map (read only)
std::vector< MonitorElement * > h_pullDz
std::vector< MonitorElement * > h_etaSIM
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< MonitorElement * > h_fakes
std::vector< MonitorElement * > ptres_vs_eta
std::vector< MonitorElement * > cotThetares_vs_eta
virtual double getEta(double eta)
std::vector< MonitorElement * > h_eta
std::vector< MonitorElement * > phimean_vs_eta_phi
Point vertex() const
Parent vertex position.
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< std::vector< int > > totASS_dz
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< std::vector< double > > etaintervals
std::vector< MonitorElement * > h_pt
std::vector< MonitorElement * > phires_vs_pt
std::vector< MonitorElement * > h_pullQoverp
std::vector< MonitorElement * > h_assochi2_prob
std::vector< std::vector< int > > totSIM_zpos
std::vector< std::vector< int > > totASS2_dz
std::vector< MonitorElement * > cotThetares_vs_pt
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< std::vector< int > > totASS_phi_Quality05
std::vector< MonitorElement * > dzres_vs_pt
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > dzres_vs_eta
void getRecoMomentum(const reco::Track &track, double &pt, double &ptError, double &qoverp, double &qoverpError, double &lambda, double &lambdaError, double &phi, double &phiError) const
retrieval of reconstructed momentum components from reco::Track (== mean values for GSF) ...
std::vector< std::vector< double > > dxyintervals
uint16_t size_type
std::vector< MonitorElement * > nDThits_vs_eta
std::vector< std::vector< int > > totASS_phi
std::vector< MonitorElement * > thetapull_vs_phi
std::vector< std::vector< int > > totASS_dxy
std::vector< MonitorElement * > h_assochi2
std::vector< MonitorElement * > chi2_vs_phi
std::vector< std::vector< int > > totSIM_dxy
std::vector< MonitorElement * > chi2_vs_nhits
math::XYZPointD Point
point in the space
std::vector< std::vector< int > > totASSeta_Quality075
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > phires_vs_phi
virtual double getPt(double pt)
CosmicTrackingParticleSelector cosmictpSelector
std::vector< MonitorElement * > nhits_vs_phi
std::vector< std::vector< int > > totASS2pT
std::vector< MonitorElement * > h_vertposSIM
edm::EDGetTokenT< TrackingParticleCollection > tp_fake_Token
std::vector< MonitorElement * > dxyres_vs_pt
std::vector< edm::InputTag > label
std::vector< MonitorElement * > h_assocSharedHit
std::vector< MonitorElement * > h_nchi2
std::vector< std::vector< double > > pTintervals
void post_insert()
post insert action
std::vector< std::vector< int > > totASS2eta
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< std::vector< int > > totSIMpT
std::vector< std::vector< int > > totREC_dxy
std::vector< MonitorElement * > h_pullPhi
std::vector< std::vector< int > > totSIM_hit
std::vector< MonitorElement * > h_nchi2_prob
std::vector< MonitorElement * > ptpull_vs_eta
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< std::vector< int > > totASSpT
std::vector< MonitorElement * > dxypull_vs_eta
unsigned int size_type
Definition: View.h:85
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< std::vector< int > > totASS_phi_Quality075
double f[11][100]
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:230
std::vector< MonitorElement * > h_pullTheta
std::vector< std::vector< int > > totSIM_vertpos
std::vector< std::vector< int > > totASSpT_Quality05
std::vector< std::vector< int > > totREC_hit
std::vector< MonitorElement * > phipull_vs_eta
std::vector< std::vector< int > > totSIMeta
std::vector< std::vector< int > > totASS2_dxy
std::vector< MonitorElement * > thetapull_vs_eta
std::vector< MonitorElement * > h_charge
size_t key() const
Definition: RefToBase.h:228
#define LogTrace(id)
#define M_PI
std::vector< MonitorElement * > ptmean_vs_eta_phi
std::vector< std::vector< int > > totASS2_phi
std::vector< std::vector< double > > phiintervals
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimCollection_Token
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoCollection_Token
std::vector< std::vector< int > > totASSpT_Quality075
std::vector< MonitorElement * > h_pullDxy
std::vector< MonitorElement * > h_tracksSIM
const T & get() const
Definition: EventSetup.h:55
key_type key() const
Accessor for product key.
Definition: Ref.h:266
std::vector< MonitorElement * > chi2_vs_eta
TrackingParticleSelector tpSelector
T const * product() const
Definition: Handle.h:81
std::vector< std::vector< int > > totSIM_phi
std::string const & label() const
Definition: InputTag.h:42
std::vector< MonitorElement * > h_hits
std::vector< MonitorElement * > h_losthits
std::vector< MonitorElement * > ptpull_vs_phi
std::string const & process() const
Definition: InputTag.h:46
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
edm::InputTag associatormap
std::vector< std::vector< int > > totASSeta
std::vector< MonitorElement * > ptres_vs_pt
std::vector< const TrackAssociatorBase * > associator
std::vector< std::vector< int > > totRECeta
std::vector< std::vector< double > > vertposintervals
std::vector< std::vector< double > > dzintervals
std::vector< MonitorElement * > phires_vs_eta
std::vector< MonitorElement * > h_ptSIM
Vector momentum() const
spatial momentum vector
Monte Carlo truth information used for tracking validation.
std::vector< std::vector< double > > zposintervals
T w() const
std::vector< MonitorElement * > h_assocFraction
math::XYZVectorD Vector
point in the space
std::vector< std::vector< int > > totSIM_dz
std::vector< std::string > associators
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
std::vector< MonitorElement * > nlosthits_vs_eta
std::vector< MonitorElement * > dzpull_vs_eta
edm::EDGetTokenT< TrackingParticleCollection > tp_effic_Token
std::string const & instance() const
Definition: InputTag.h:43
std::vector< MonitorElement * > nRPChits_vs_eta
std::vector< std::vector< int > > totASS_vertpos
std::vector< std::vector< int > > totASS_hit
std::vector< MonitorElement * > nCSChits_vs_eta
list at
Definition: asciidump.py:428
std::vector< MonitorElement * > phipull_vs_phi
edm::EDGetTokenT< reco::BeamSpot > bsSrc_Token
void MuonTrackValidator::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &  setup 
)
virtual

this are needed to calculate efficiency during tha harvesting for the automated validation

Implements thread_unsafe::DQMEDAnalyzer.

Definition at line 29 of file MuonTrackValidator.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), DQMStore::IBooker::bookProfile2D(), DQMStore::IBooker::cd(), TrackerOfflineValidation_Dqm_cff::dirName, edm::EventSetup::get(), getTH1F(), getTH2F(), DQMStore::IBooker::goUp(), edm::InputTag::instance(), j, diffTwoXMLs::label, edm::InputTag::label(), max(), gather_cfg::maxDxy, bookConverter::min, nint(), edm::InputTag::process(), edm::ESHandle< class >::product(), python.rootplot.root2matplotlib::replace(), DQMStore::IBooker::setCurrentFolder(), and w().

29  {
30 
31 
32  int j=0;
33  for (unsigned int ww=0;ww<associators.size();ww++){
34  for (unsigned int www=0;www<label.size();www++){
35 
36  ibooker.cd();
37  InputTag algo = label[www];
38  string dirName=dirName_;
39  if (algo.process()!="")
40  dirName+=algo.process()+"_";
41  if(algo.label()!="")
42  dirName+=algo.label();
43  if(algo.instance()!="")
44  dirName+=("_"+algo.instance());
45  if (dirName.find("Tracks")<dirName.length()){
46  dirName.replace(dirName.find("Tracks"),6,"Trks");
47  }
48  if (dirName.find("UpdatedAtVtx")<dirName.length()){
49  dirName.replace(dirName.find("UpdatedAtVtx"),12,"UpdAtVtx");
50  }
51  string assoc= associators[ww];
52  if (assoc.find("tpToTkmuTrackAssociation")<assoc.length()){
53  dirName+="_TkAsso";
54  }
55  std::replace(dirName.begin(), dirName.end(), ':', '_');
56  ibooker.setCurrentFolder(dirName.c_str());
57 
58  setUpVectors();
59 
60  ibooker.goUp();
61  string subDirName = dirName + "/simulation";
62  ibooker.setCurrentFolder(subDirName.c_str());
63  h_ptSIM.push_back( ibooker.book1D("ptSIM", "generated p_{t}", 5500, 0, 110 ) );
64  h_etaSIM.push_back( ibooker.book1D("etaSIM", "generated pseudorapidity", 500, -2.5, 2.5 ) );
65  h_tracksSIM.push_back( ibooker.book1D("tracksSIM","number of simulated tracks",200,-0.5,99.5) );
66  h_vertposSIM.push_back( ibooker.book1D("vertposSIM","Transverse position of sim vertices",100,0.,120.) );
67 
68  ibooker.cd();
69  ibooker.setCurrentFolder(dirName.c_str());
70  h_tracks.push_back( ibooker.book1D("tracks","number of reconstructed tracks",200,-0.5,19.5) );
71  h_fakes.push_back( ibooker.book1D("fakes","number of fake reco tracks",20,-0.5,19.5) );
72  h_charge.push_back( ibooker.book1D("charge","charge",3,-1.5,1.5) );
73  h_hits.push_back( ibooker.book1D("hits", "number of hits per track", nintHit,minHit,maxHit ) );
74  h_losthits.push_back( ibooker.book1D("losthits", "number of lost hits per track", nintHit,minHit,maxHit) );
75  h_nchi2.push_back( ibooker.book1D("chi2", "normalized #chi^{2}", 200, 0, 20 ) );
76  h_nchi2_prob.push_back( ibooker.book1D("chi2_prob", "normalized #chi^{2} probability",100,0,1));
77 
79  h_recoeta.push_back( ibooker.book1D("num_reco_eta","N of reco track vs eta",nint,min,max) );
80  h_assoceta.push_back( ibooker.book1D("num_assoc(simToReco)_eta","N of associated tracks (simToReco) vs eta",nint,min,max) );
81  h_assoc2eta.push_back( ibooker.book1D("num_assoc(recoToSim)_eta","N of associated (recoToSim) tracks vs eta",nint,min,max) );
82  h_simuleta.push_back( ibooker.book1D("num_simul_eta","N of simulated tracks vs eta",nint,min,max) );
83  h_recopT.push_back( ibooker.book1D("num_reco_pT","N of reco track vs pT",nintpT,minpT,maxpT) );
84  h_assocpT.push_back( ibooker.book1D("num_assoc(simToReco)_pT","N of associated tracks (simToReco) vs pT",nintpT,minpT,maxpT) );
85  h_assoc2pT.push_back( ibooker.book1D("num_assoc(recoToSim)_pT","N of associated (recoToSim) tracks vs pT",nintpT,minpT,maxpT) );
86  h_simulpT.push_back( ibooker.book1D("num_simul_pT","N of simulated tracks vs pT",nintpT,minpT,maxpT) );
87  //
88  h_recohit.push_back( ibooker.book1D("num_reco_hit","N of reco track vs hit",nintHit,minHit,maxHit) );
89  h_assochit.push_back( ibooker.book1D("num_assoc(simToReco)_hit","N of associated tracks (simToReco) vs hit",nintHit,minHit,maxHit) );
90  h_assoc2hit.push_back( ibooker.book1D("num_assoc(recoToSim)_hit","N of associated (recoToSim) tracks vs hit",nintHit,minHit,maxHit) );
91  h_simulhit.push_back( ibooker.book1D("num_simul_hit","N of simulated tracks vs hit",nintHit,minHit,maxHit) );
92  //
93  h_recophi.push_back( ibooker.book1D("num_reco_phi","N of reco track vs phi",nintPhi,minPhi,maxPhi) );
94  h_assocphi.push_back( ibooker.book1D("num_assoc(simToReco)_phi","N of associated tracks (simToReco) vs phi",nintPhi,minPhi,maxPhi) );
95  h_assoc2phi.push_back( ibooker.book1D("num_assoc(recoToSim)_phi","N of associated (recoToSim) tracks vs phi",nintPhi,minPhi,maxPhi) );
96  h_simulphi.push_back( ibooker.book1D("num_simul_phi","N of simulated tracks vs phi",nintPhi,minPhi,maxPhi) );
97 
98  h_recodxy.push_back( ibooker.book1D("num_reco_dxy","N of reco track vs dxy",nintDxy,minDxy,maxDxy) );
99  h_assocdxy.push_back( ibooker.book1D("num_assoc(simToReco)_dxy","N of associated tracks (simToReco) vs dxy",nintDxy,minDxy,maxDxy) );
100  h_assoc2dxy.push_back( ibooker.book1D("num_assoc(recoToSim)_dxy","N of associated (recoToSim) tracks vs dxy",nintDxy,minDxy,maxDxy) );
101  h_simuldxy.push_back( ibooker.book1D("num_simul_dxy","N of simulated tracks vs dxy",nintDxy,minDxy,maxDxy) );
102 
103  h_recodz.push_back( ibooker.book1D("num_reco_dz","N of reco track vs dz",nintDz,minDz,maxDz) );
104  h_assocdz.push_back( ibooker.book1D("num_assoc(simToReco)_dz","N of associated tracks (simToReco) vs dz",nintDz,minDz,maxDz) );
105  h_assoc2dz.push_back( ibooker.book1D("num_assoc(recoToSim)_dz","N of associated (recoToSim) tracks vs dz",nintDz,minDz,maxDz) );
106  h_simuldz.push_back( ibooker.book1D("num_simul_dz","N of simulated tracks vs dz",nintDz,minDz,maxDz) );
107 
108  h_assocvertpos.push_back( ibooker.book1D("num_assoc(simToReco)_vertpos","N of associated tracks (simToReco) vs transverse vert position",nintVertpos,minVertpos,maxVertpos) );
109  h_simulvertpos.push_back( ibooker.book1D("num_simul_vertpos","N of simulated tracks vs transverse vert position",nintVertpos,minVertpos,maxVertpos) );
110 
111  h_assoczpos.push_back( ibooker.book1D("num_assoc(simToReco)_zpos","N of associated tracks (simToReco) vs z vert position",nintZpos,minZpos,maxZpos) );
112  h_simulzpos.push_back( ibooker.book1D("num_simul_zpos","N of simulated tracks vs z vert position",nintZpos,minZpos,maxZpos) );
113 
114 
116 
117  h_eta.push_back( ibooker.book1D("eta", "pseudorapidity residue", 1000, -0.1, 0.1 ) );
118  h_pt.push_back( ibooker.book1D("pullPt", "pull of p_{t}", 100, -10, 10 ) );
119  h_pullTheta.push_back( ibooker.book1D("pullTheta","pull of #theta parameter",250,-25,25) );
120  h_pullPhi.push_back( ibooker.book1D("pullPhi","pull of #phi parameter",250,-25,25) );
121  h_pullDxy.push_back( ibooker.book1D("pullDxy","pull of dxy parameter",250,-25,25) );
122  h_pullDz.push_back( ibooker.book1D("pullDz","pull of dz parameter",250,-25,25) );
123  h_pullQoverp.push_back( ibooker.book1D("pullQoverp","pull of qoverp parameter",250,-25,25) );
124 
125  if (associators[ww]=="TrackAssociatorByChi2"){
126  h_assochi2.push_back( ibooker.book1D("assocChi2","track association #chi^{2}",1000000,0,100000) );
127  h_assochi2_prob.push_back(ibooker.book1D("assocChi2_prob","probability of association #chi^{2}",100,0,1));
128  } else if (associators[ww]=="TrackAssociatorByHits"){
129  h_assocFraction.push_back( ibooker.book1D("assocFraction","fraction of shared hits",200,0,2) );
130  h_assocSharedHit.push_back(ibooker.book1D("assocSharedHit","number of shared hits",20,0,20));
131  }
132 
133  chi2_vs_nhits.push_back( ibooker.book2D("chi2_vs_nhits","#chi^{2} vs nhits",25,0,25,100,0,10) );
134  h_chi2meanhitsh.push_back( ibooker.bookProfile("chi2mean_vs_nhits","mean #chi^{2} vs nhits",25,0,25,100,0,10) );
135 
136  etares_vs_eta.push_back( ibooker.book2D("etares_vs_eta","etaresidue vs eta",nint,min,max,200,-0.1,0.1) );
137  nrec_vs_nsim.push_back( ibooker.book2D("nrec_vs_nsim","nrec vs nsim",20,-0.5,19.5,20,-0.5,19.5) );
138 
139  chi2_vs_eta.push_back( ibooker.book2D("chi2_vs_eta","chi2_vs_eta",nint,min,max, 200, 0, 20 ));
140  h_chi2meanh.push_back( ibooker.bookProfile("chi2mean","mean #chi^{2} vs #eta",nint,min,max, 200, 0, 20) );
141  chi2_vs_phi.push_back( ibooker.book2D("chi2_vs_phi","#chi^{2} vs #phi",nintPhi,minPhi,maxPhi, 200, 0, 20 ) );
142  h_chi2mean_vs_phi.push_back( ibooker.bookProfile("chi2mean_vs_phi","mean of #chi^{2} vs #phi",nintPhi,minPhi,maxPhi, 200, 0, 20) );
143 
144  nhits_vs_eta.push_back( ibooker.book2D("nhits_vs_eta","nhits vs eta",nint,min,max,nintHit,minHit,maxHit) );
145  nDThits_vs_eta.push_back( ibooker.book2D("nDThits_vs_eta","# DT hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
146  nCSChits_vs_eta.push_back( ibooker.book2D("nCSChits_vs_eta","# CSC hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
147  nRPChits_vs_eta.push_back( ibooker.book2D("nRPChits_vs_eta","# RPC hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
148 
149  h_DThits_eta.push_back( ibooker.bookProfile("DThits_eta","mean # DT hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
150  h_CSChits_eta.push_back( ibooker.bookProfile("CSChits_eta","mean # CSC hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
151  h_RPChits_eta.push_back( ibooker.bookProfile("RPChits_eta","mean # RPC hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
152  h_hits_eta.push_back( ibooker.bookProfile("hits_eta","mean #hits vs eta",nint,min,max,nintHit,minHit,maxHit) );
153  nhits_vs_phi.push_back( ibooker.book2D("nhits_vs_phi","#hits vs #phi",nintPhi,minPhi,maxPhi,nintHit,minHit,maxHit) );
154  h_hits_phi.push_back( ibooker.bookProfile("hits_phi","mean #hits vs #phi",nintPhi,minPhi,maxPhi, nintHit,minHit,maxHit) );
155 
156  nlosthits_vs_eta.push_back( ibooker.book2D("nlosthits_vs_eta","nlosthits vs eta",nint,min,max,nintHit,minHit,maxHit) );
157  h_losthits_eta.push_back( ibooker.bookProfile("losthits_eta","losthits_eta",nint,min,max,nintHit,minHit,maxHit) );
158 
159  ptres_vs_eta.push_back(ibooker.book2D("ptres_vs_eta","ptres_vs_eta",nint,min,max, ptRes_nbin, ptRes_rangeMin, ptRes_rangeMax));
160  ptres_vs_phi.push_back( ibooker.book2D("ptres_vs_phi","p_{t} res vs #phi",nintPhi,minPhi,maxPhi, ptRes_nbin, ptRes_rangeMin, ptRes_rangeMax));
161  ptres_vs_pt.push_back(ibooker.book2D("ptres_vs_pt","ptres_vs_pt",nintpT,minpT,maxpT, ptRes_nbin, ptRes_rangeMin, ptRes_rangeMax));
162 
163  cotThetares_vs_eta.push_back(ibooker.book2D("cotThetares_vs_eta","cotThetares_vs_eta",nint,min,max,cotThetaRes_nbin, cotThetaRes_rangeMin, cotThetaRes_rangeMax));
164  cotThetares_vs_pt.push_back(ibooker.book2D("cotThetares_vs_pt","cotThetares_vs_pt",nintpT,minpT,maxpT, cotThetaRes_nbin, cotThetaRes_rangeMin, cotThetaRes_rangeMax));
165 
166  phires_vs_eta.push_back(ibooker.book2D("phires_vs_eta","phires_vs_eta",nint,min,max, phiRes_nbin, phiRes_rangeMin, phiRes_rangeMax));
167  phires_vs_pt.push_back(ibooker.book2D("phires_vs_pt","phires_vs_pt",nintpT,minpT,maxpT, phiRes_nbin, phiRes_rangeMin, phiRes_rangeMax));
168  phires_vs_phi.push_back(ibooker.book2D("phires_vs_phi","#phi res vs #phi",nintPhi,minPhi,maxPhi,phiRes_nbin, phiRes_rangeMin, phiRes_rangeMax));
169 
170  dxyres_vs_eta.push_back(ibooker.book2D("dxyres_vs_eta","dxyres_vs_eta",nint,min,max,dxyRes_nbin, dxyRes_rangeMin, dxyRes_rangeMax));
171  dxyres_vs_pt.push_back( ibooker.book2D("dxyres_vs_pt","dxyres_vs_pt",nintpT,minpT,maxpT,dxyRes_nbin, dxyRes_rangeMin, dxyRes_rangeMax));
172 
173  dzres_vs_eta.push_back(ibooker.book2D("dzres_vs_eta","dzres_vs_eta",nint,min,max,dzRes_nbin, dzRes_rangeMin, dzRes_rangeMax));
174  dzres_vs_pt.push_back(ibooker.book2D("dzres_vs_pt","dzres_vs_pt",nintpT,minpT,maxpT,dzRes_nbin, dzRes_rangeMin, dzRes_rangeMax));
175 
176  ptmean_vs_eta_phi.push_back(ibooker.bookProfile2D("ptmean_vs_eta_phi","mean p_{t} vs #eta and #phi",nintPhi,minPhi,maxPhi,nint,min,max,1000,0,1000));
177  phimean_vs_eta_phi.push_back(ibooker.bookProfile2D("phimean_vs_eta_phi","mean #phi vs #eta and #phi",nintPhi,minPhi,maxPhi,nint,min,max,nintPhi,minPhi,maxPhi));
178 
179  //pulls of track params vs eta: to be used with fitslicesytool
180  dxypull_vs_eta.push_back(ibooker.book2D("dxypull_vs_eta","dxypull_vs_eta",nint,min,max,100,-10,10));
181  ptpull_vs_eta.push_back(ibooker.book2D("ptpull_vs_eta","ptpull_vs_eta",nint,min,max,100,-10,10));
182  dzpull_vs_eta.push_back(ibooker.book2D("dzpull_vs_eta","dzpull_vs_eta",nint,min,max,100,-10,10));
183  phipull_vs_eta.push_back(ibooker.book2D("phipull_vs_eta","phipull_vs_eta",nint,min,max,100,-10,10));
184  thetapull_vs_eta.push_back(ibooker.book2D("thetapull_vs_eta","thetapull_vs_eta",nint,min,max,100,-10,10));
185 
186  //pulls of track params vs phi
187  ptpull_vs_phi.push_back(ibooker.book2D("ptpull_vs_phi","p_{t} pull vs #phi",nintPhi,minPhi,maxPhi,100,-10,10));
188  phipull_vs_phi.push_back(ibooker.book2D("phipull_vs_phi","#phi pull vs #phi",nintPhi,minPhi,maxPhi,100,-10,10));
189  thetapull_vs_phi.push_back(ibooker.book2D("thetapull_vs_phi","#theta pull vs #phi",nintPhi,minPhi,maxPhi,100,-10,10));
190 
191  nrecHit_vs_nsimHit_sim2rec.push_back( ibooker.book2D("nrecHit_vs_nsimHit_sim2rec","nrecHit vs nsimHit (Sim2RecAssoc)",nintHit,minHit,maxHit, nintHit,minHit,maxHit ));
192  nrecHit_vs_nsimHit_rec2sim.push_back( ibooker.book2D("nrecHit_vs_nsimHit_rec2sim","nrecHit vs nsimHit (Rec2simAssoc)",nintHit,minHit,maxHit, nintHit,minHit,maxHit ));
193 
194  if (MABH) {
195 h_PurityVsQuality.push_back( ibooker.book2D("PurityVsQuality","Purity vs Quality (MABH)",20,0.01,1.01,20,0.01,1.01) );
196 h_assoceta_Quality05.push_back( ibooker.book1D("num_assoc(simToReco)_eta_Q05","N of associated tracks (simToReco) vs eta (Quality>0.5)",nint,min,max) );
197 h_assoceta_Quality075.push_back( ibooker.book1D("num_assoc(simToReco)_eta_Q075","N of associated tracks (simToReco) vs eta (Quality>0.75)",nint,min,max) );
198 h_assocpT_Quality05.push_back( ibooker.book1D("num_assoc(simToReco)_pT_Q05","N of associated tracks (simToReco) vs pT (Quality>0.5)",nintpT,minpT,maxpT) );
199 h_assocpT_Quality075.push_back( ibooker.book1D("num_assoc(simToReco)_pT_Q075","N of associated tracks (simToReco) vs pT (Quality>0.75)",nintpT,minpT,maxpT) );
200 h_assocphi_Quality05.push_back( ibooker.book1D("num_assoc(simToReco)_phi_Q05","N of associated tracks (simToReco) vs phi (Quality>0.5)",nintPhi,minPhi,maxPhi) );
201 h_assocphi_Quality075.push_back( ibooker.book1D("num_assoc(simToReco)_phi_Q075","N of associated tracks (simToReco) vs phi (Quality>0.75)",nintPhi,minPhi,maxPhi) );
202  }
203 
204  if(useLogPt){
210 BinLogX(h_recopT[j]->getTH1F());
211 BinLogX(h_assocpT[j]->getTH1F());
212 BinLogX(h_assoc2pT[j]->getTH1F());
213 BinLogX(h_simulpT[j]->getTH1F());
214 if (MABH) {
217 }
218  j++;
219  }
220 
221  }
222  }
223  if (UseAssociators) {
225  for (unsigned int w=0;w<associators.size();w++) {
226  setup.get<TrackAssociatorRecord>().get(associators[w],theAssociator);
227  associator.push_back( theAssociator.product() );
228  }
229  }
230 }
std::vector< MonitorElement * > h_assoc2phi
std::vector< MonitorElement * > h_recoeta
std::vector< MonitorElement * > nrecHit_vs_nsimHit_sim2rec
std::vector< MonitorElement * > h_DThits_eta
std::vector< MonitorElement * > h_assoc2hit
std::vector< MonitorElement * > h_PurityVsQuality
std::vector< MonitorElement * > h_recopT
std::vector< MonitorElement * > etares_vs_eta
std::vector< MonitorElement * > h_assoc2dxy
std::vector< MonitorElement * > nrecHit_vs_nsimHit_rec2sim
std::vector< MonitorElement * > ptres_vs_phi
std::vector< MonitorElement * > h_losthits_eta
std::vector< MonitorElement * > h_assocpT_Quality075
std::vector< MonitorElement * > nrec_vs_nsim
std::vector< MonitorElement * > h_pullDz
std::vector< MonitorElement * > h_recohit
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
std::vector< MonitorElement * > h_etaSIM
std::vector< MonitorElement * > h_assocvertpos
void cd(void)
Definition: DQMStore.cc:266
std::vector< MonitorElement * > h_fakes
std::vector< MonitorElement * > ptres_vs_eta
std::vector< MonitorElement * > cotThetares_vs_eta
std::vector< MonitorElement * > h_eta
std::vector< MonitorElement * > phimean_vs_eta_phi
std::vector< MonitorElement * > h_pt
std::vector< MonitorElement * > phires_vs_pt
std::vector< MonitorElement * > h_pullQoverp
std::vector< MonitorElement * > h_assochi2_prob
std::vector< MonitorElement * > h_CSChits_eta
std::vector< MonitorElement * > cotThetares_vs_pt
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< MonitorElement * > dzres_vs_pt
std::vector< MonitorElement * > h_assoceta
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > dzres_vs_eta
std::vector< MonitorElement * > h_assoceta_Quality075
std::vector< MonitorElement * > nDThits_vs_eta
std::vector< MonitorElement * > thetapull_vs_phi
std::vector< MonitorElement * > h_assochi2
std::vector< MonitorElement * > chi2_vs_phi
std::vector< MonitorElement * > h_simuldxy
std::vector< MonitorElement * > h_simuldz
std::vector< MonitorElement * > chi2_vs_nhits
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > phires_vs_phi
std::vector< MonitorElement * > h_chi2mean_vs_phi
std::vector< MonitorElement * > h_assoczpos
std::vector< MonitorElement * > nhits_vs_phi
std::vector< MonitorElement * > h_simulphi
std::vector< MonitorElement * > h_vertposSIM
std::vector< MonitorElement * > dxyres_vs_pt
std::vector< edm::InputTag > label
std::vector< MonitorElement * > h_assocSharedHit
std::vector< MonitorElement * > h_nchi2
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:161
std::vector< MonitorElement * > h_assoc2dz
std::vector< MonitorElement * > h_pullPhi
std::vector< MonitorElement * > h_nchi2_prob
std::vector< MonitorElement * > ptpull_vs_eta
std::vector< MonitorElement * > h_recophi
std::vector< MonitorElement * > dxypull_vs_eta
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
int j
Definition: DBlmapReader.cc:9
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
std::vector< MonitorElement * > h_pullTheta
std::vector< MonitorElement * > h_simulhit
std::vector< MonitorElement * > phipull_vs_eta
std::vector< MonitorElement * > thetapull_vs_eta
std::vector< MonitorElement * > h_charge
std::vector< MonitorElement * > h_assocphi
std::vector< MonitorElement * > ptmean_vs_eta_phi
std::vector< MonitorElement * > h_assocpT
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
void goUp(void)
Definition: DQMStore.cc:278
std::vector< MonitorElement * > h_pullDxy
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:131
std::vector< MonitorElement * > h_simulpT
std::vector< MonitorElement * > h_tracksSIM
std::vector< MonitorElement * > h_assocphi_Quality05
std::vector< MonitorElement * > h_simulzpos
T const * product() const
Definition: ESHandle.h:62
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > chi2_vs_eta
std::vector< MonitorElement * > h_assocphi_Quality075
std::vector< MonitorElement * > h_hits_eta
std::string const & label() const
Definition: InputTag.h:42
std::vector< MonitorElement * > h_hits
std::vector< MonitorElement * > h_losthits
std::vector< MonitorElement * > ptpull_vs_phi
std::string const & process() const
Definition: InputTag.h:46
std::vector< MonitorElement * > h_simulvertpos
std::vector< MonitorElement * > ptres_vs_pt
std::vector< const TrackAssociatorBase * > associator
std::vector< MonitorElement * > h_chi2meanhitsh
std::vector< MonitorElement * > h_recodxy
std::vector< MonitorElement * > phires_vs_eta
std::vector< MonitorElement * > h_ptSIM
TH2F * getTH2F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
std::vector< MonitorElement * > h_assocdz
std::vector< MonitorElement * > h_hits_phi
std::vector< MonitorElement * > h_assocpT_Quality05
std::vector< MonitorElement * > h_RPChits_eta
std::vector< MonitorElement * > h_assoc2pT
T w() const
std::vector< MonitorElement * > h_assocFraction
std::vector< std::string > associators
std::vector< MonitorElement * > nlosthits_vs_eta
std::vector< MonitorElement * > h_assoceta_Quality05
std::vector< MonitorElement * > dzpull_vs_eta
std::vector< MonitorElement * > h_assocdxy
std::string const & instance() const
Definition: InputTag.h:43
std::vector< MonitorElement * > nRPChits_vs_eta
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< MonitorElement * > h_assochit
std::vector< MonitorElement * > h_chi2meanh
std::vector< MonitorElement * > nCSChits_vs_eta
std::vector< MonitorElement * > h_simuleta
std::vector< MonitorElement * > h_assoc2eta
std::vector< MonitorElement * > phipull_vs_phi
void MuonTrackValidator::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
virtual

Method called at the end of the event loop.

Reimplemented from edm::EDAnalyzer.

Definition at line 854 of file MuonTrackValidator.cc.

References dbe_, diffTwoXMLs::label, dbtoconf::out, DQMStore::save(), and w().

854  {
855 
856  int w=0;
857  for (unsigned int ww=0;ww<associators.size();ww++){
858  for (unsigned int www=0;www<label.size();www++){
859 
860  //chi2 and #hit vs eta: get mean from 2D histos
866 
868  //vs phi
872 
877 
882 
887 
892 
897 
902 
905 
908 
909  if (MABH) {
916  }
917 
918  w++;
919  }
920  }
921 
922  if ( out.size() != 0 && dbe_ ) dbe_->save(out);
923 }
std::vector< MonitorElement * > h_assoc2phi
std::vector< MonitorElement * > h_recoeta
std::vector< MonitorElement * > h_DThits_eta
std::vector< MonitorElement * > h_assoc2hit
std::vector< std::vector< int > > totASS_zpos
std::vector< std::vector< int > > totASSeta_Quality05
std::vector< MonitorElement * > h_recopT
std::vector< std::vector< int > > totREC_phi
std::vector< MonitorElement * > h_assoc2dxy
std::vector< std::vector< int > > totASS2_hit
std::vector< MonitorElement * > h_losthits_eta
std::vector< MonitorElement * > h_assocpT_Quality075
std::vector< std::vector< int > > totRECpT
std::vector< std::vector< int > > totREC_dz
std::vector< MonitorElement * > h_recohit
std::vector< MonitorElement * > h_assocvertpos
std::vector< std::vector< int > > totASS_dz
std::vector< std::vector< int > > totSIM_zpos
std::vector< MonitorElement * > h_CSChits_eta
std::vector< std::vector< int > > totASS2_dz
std::vector< std::vector< int > > totASS_phi_Quality05
std::vector< MonitorElement * > h_assoceta
std::vector< MonitorElement * > h_assoceta_Quality075
std::vector< MonitorElement * > nDThits_vs_eta
std::vector< std::vector< int > > totASS_phi
std::vector< std::vector< int > > totASS_dxy
std::vector< MonitorElement * > chi2_vs_phi
std::vector< MonitorElement * > h_simuldxy
std::vector< std::vector< int > > totSIM_dxy
std::vector< MonitorElement * > h_simuldz
std::vector< MonitorElement * > chi2_vs_nhits
std::vector< std::vector< int > > totASSeta_Quality075
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > h_chi2mean_vs_phi
std::vector< MonitorElement * > h_assoczpos
std::vector< MonitorElement * > nhits_vs_phi
std::vector< MonitorElement * > h_simulphi
std::vector< std::vector< int > > totASS2pT
virtual void doProfileX(TH2 *th2, MonitorElement *me)
std::vector< edm::InputTag > label
std::vector< std::vector< int > > totASS2eta
std::vector< std::vector< int > > totSIMpT
std::vector< std::vector< int > > totREC_dxy
std::vector< MonitorElement * > h_assoc2dz
std::vector< std::vector< int > > totSIM_hit
std::vector< MonitorElement * > h_recophi
std::vector< std::vector< int > > totASSpT
std::vector< std::vector< int > > totASS_phi_Quality075
std::vector< std::vector< int > > totSIM_vertpos
std::vector< std::vector< int > > totASSpT_Quality05
std::vector< std::vector< int > > totREC_hit
std::vector< MonitorElement * > h_simulhit
std::vector< std::vector< int > > totSIMeta
std::vector< std::vector< int > > totASS2_dxy
std::vector< MonitorElement * > h_assocphi
std::vector< std::vector< int > > totASS2_phi
std::vector< std::vector< int > > totASSpT_Quality075
std::vector< MonitorElement * > h_assocpT
std::vector< MonitorElement * > h_simulpT
std::vector< MonitorElement * > h_assocphi_Quality05
std::vector< MonitorElement * > h_simulzpos
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > chi2_vs_eta
std::vector< MonitorElement * > h_assocphi_Quality075
std::vector< std::vector< int > > totSIM_phi
void fillPlotFromVector(MonitorElement *h, std::vector< int > &vec)
std::vector< MonitorElement * > h_hits_eta
std::vector< std::vector< int > > totASSeta
std::vector< MonitorElement * > h_simulvertpos
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540
std::vector< std::vector< int > > totRECeta
std::vector< MonitorElement * > h_chi2meanhitsh
std::vector< MonitorElement * > h_recodxy
std::vector< MonitorElement * > h_assocdz
std::vector< MonitorElement * > h_hits_phi
std::vector< MonitorElement * > h_assocpT_Quality05
std::vector< MonitorElement * > h_RPChits_eta
std::vector< MonitorElement * > h_assoc2pT
T w() const
std::vector< std::vector< int > > totSIM_dz
std::vector< std::string > associators
std::vector< MonitorElement * > nlosthits_vs_eta
std::vector< MonitorElement * > h_assoceta_Quality05
std::vector< MonitorElement * > h_assocdxy
std::vector< MonitorElement * > nRPChits_vs_eta
std::vector< std::vector< int > > totASS_vertpos
std::vector< MonitorElement * > h_assochit
std::vector< std::vector< int > > totASS_hit
std::vector< MonitorElement * > h_chi2meanh
std::vector< MonitorElement * > nCSChits_vs_eta
std::vector< MonitorElement * > h_simuleta
std::vector< MonitorElement * > h_assoc2eta
void MuonTrackValidator::getRecoMomentum ( const reco::Track track,
double &  pt,
double &  ptError,
double &  qoverp,
double &  qoverpError,
double &  lambda,
double &  lambdaError,
double &  phi,
double &  phiError 
) const
private

retrieval of reconstructed momentum components from reco::Track (== mean values for GSF)

Definition at line 927 of file MuonTrackValidator.cc.

References reco::TrackBase::lambda(), reco::TrackBase::lambdaError(), reco::TrackBase::phi(), reco::TrackBase::phiError(), reco::TrackBase::pt(), reco::TrackBase::ptError(), reco::TrackBase::qoverp(), and reco::TrackBase::qoverpError().

928  {
929  pt = track.pt();
930  ptError = track.ptError();
931  qoverp = track.qoverp();
932  qoverpError = track.qoverpError();
933  lambda = track.lambda();
934  lambdaError = track.lambdaError();
935  phi = track.phi();
936  phiError = track.phiError();
937 
938 }
double qoverp() const
q/p
Definition: TrackBase.h:113
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:137
double pt() const
track transverse momentum
Definition: TrackBase.h:129
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:192
double phiError() const
error on phi
Definition: TrackBase.h:205
double lambda() const
Lambda angle.
Definition: TrackBase.h:117
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:190
double lambdaError() const
error on lambda
Definition: TrackBase.h:201
Definition: DDAxes.h:10
void MuonTrackValidator::getRecoMomentum ( const reco::GsfTrack gsfTrack,
double &  pt,
double &  ptError,
double &  qoverp,
double &  qoverpError,
double &  lambda,
double &  lambdaError,
double &  phi,
double &  phiError 
) const
private

retrieval of reconstructed momentum components based on the mode of a reco::GsfTrack

Definition at line 941 of file MuonTrackValidator.cc.

References reco::GsfTrack::lambdaMode(), reco::GsfTrack::lambdaModeError(), reco::GsfTrack::phiMode(), reco::GsfTrack::phiModeError(), reco::GsfTrack::ptMode(), reco::GsfTrack::ptModeError(), reco::GsfTrack::qoverpMode(), and reco::GsfTrack::qoverpModeError().

942  {
943 
944  pt = gsfTrack.ptMode();
945  ptError = gsfTrack.ptModeError();
946  qoverp = gsfTrack.qoverpMode();
947  qoverpError = gsfTrack.qoverpModeError();
948  lambda = gsfTrack.lambdaMode();
949  lambdaError = gsfTrack.lambdaModeError();
950  phi = gsfTrack.phiMode();
951  phiError = gsfTrack.phiModeError();
952 
953 }
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:94
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:45
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:41
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:81
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:79
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:57
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:90
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:49
Definition: DDAxes.h:10

Member Data Documentation

edm::InputTag MuonTrackValidator::associatormap
private

Definition at line 150 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

bool MuonTrackValidator::BiDirectional_RecoToSim_association
private

Definition at line 163 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

std::vector<MonitorElement*> MuonTrackValidator::chi2_vs_eta
private

Definition at line 182 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::chi2_vs_nhits
private

Definition at line 171 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::chi2_vs_phi
private

Definition at line 173 of file MuonTrackValidator.h.

CosmicTrackingParticleSelector MuonTrackValidator::cosmictpSelector
private

Definition at line 160 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

std::vector<MonitorElement*> MuonTrackValidator::cotThetares_vs_eta
private

Definition at line 188 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::cotThetares_vs_pt
private

Definition at line 189 of file MuonTrackValidator.h.

std::string MuonTrackValidator::dirName_
private

Definition at line 149 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

std::vector<MonitorElement*> MuonTrackValidator::dxypull_vs_eta
private

Definition at line 192 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::dxyres_vs_eta
private

Definition at line 188 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::dxyres_vs_pt
private

Definition at line 189 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::dzpull_vs_eta
private

Definition at line 192 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::dzres_vs_eta
private

Definition at line 188 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::dzres_vs_pt
private

Definition at line 189 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::etares_vs_eta
private

Definition at line 171 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_assochi2
private

Definition at line 179 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_assochi2_prob
private

Definition at line 179 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_chi2mean_vs_phi
private

Definition at line 185 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_chi2meanh
private

Definition at line 183 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_chi2meanhitsh
private

Definition at line 185 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_dxypulleta
private

Definition at line 194 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_dzpulleta
private

Definition at line 194 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_hits_phi
private

Definition at line 184 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_losthits
private

Definition at line 168 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_losthits_eta
private

Definition at line 183 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_nchi2
private

Definition at line 168 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_nchi2_prob
private

Definition at line 168 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_phipulleta
private

Definition at line 194 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_phipullphi
private

Definition at line 195 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_ptpulleta
private

Definition at line 194 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_ptpullphi
private

Definition at line 195 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_ptshifteta
private

Definition at line 172 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_thetapulleta
private

Definition at line 194 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::h_thetapullphi
private

Definition at line 195 of file MuonTrackValidator.h.

bool MuonTrackValidator::MABH
private

Definition at line 165 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

double MuonTrackValidator::maxPhi
private

Definition at line 154 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

double MuonTrackValidator::minPhi
private

Definition at line 154 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

std::vector<MonitorElement*> MuonTrackValidator::nhits_vs_phi
private

Definition at line 173 of file MuonTrackValidator.h.

int MuonTrackValidator::nintPhi
private

Definition at line 155 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

std::vector<MonitorElement*> MuonTrackValidator::nlosthits_vs_eta
private

Definition at line 182 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::phimean_vs_eta_phi
private

Definition at line 176 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::phipull_vs_eta
private

Definition at line 192 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::phipull_vs_phi
private

Definition at line 193 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::phires_vs_eta
private

Definition at line 188 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::phires_vs_phi
private

Definition at line 173 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::phires_vs_pt
private

Definition at line 189 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::ptmean_vs_eta_phi
private

Definition at line 176 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::ptpull_vs_eta
private

Definition at line 192 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::ptpull_vs_phi
private

Definition at line 193 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::ptres_vs_eta
private

Definition at line 188 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::ptres_vs_phi
private

Definition at line 173 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::ptres_vs_pt
private

Definition at line 189 of file MuonTrackValidator.h.

edm::EDGetTokenT<reco::RecoToSimCollection> MuonTrackValidator::recoToSimCollection_Token
private

Definition at line 152 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

edm::EDGetTokenT<reco::SimToRecoCollection> MuonTrackValidator::simToRecoCollection_Token
private

Definition at line 151 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

std::vector<MonitorElement*> MuonTrackValidator::thetapull_vs_eta
private

Definition at line 192 of file MuonTrackValidator.h.

std::vector<MonitorElement*> MuonTrackValidator::thetapull_vs_phi
private

Definition at line 193 of file MuonTrackValidator.h.

TrackingParticleSelector MuonTrackValidator::tpSelector
private

Definition at line 159 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

bool MuonTrackValidator::UseAssociators
private

Definition at line 153 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

bool MuonTrackValidator::useGsf
private

Definition at line 156 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().