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:
edm::EDAnalyzer MuonTrackValidatorBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Method called once per event. More...
 
void beginRun (edm::Run const &, edm::EventSetup const &)
 Method called before the event loop. More...
 
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 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
 
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 16 of file MuonTrackValidator.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 19 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.

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

127 { }

Member Function Documentation

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

Method called once per event.

Implements edm::EDAnalyzer.

Definition at line 230 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().

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

Method called before the event loop.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 28 of file MuonTrackValidator.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), DQMStore::cd(), dbe_, TrackerOfflineValidation_Dqm_cff::dirName, edm::EventSetup::get(), getTH1F(), getTH2F(), DQMStore::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::setCurrentFolder(), and w().

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

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

852  {
853 
854  int w=0;
855  for (unsigned int ww=0;ww<associators.size();ww++){
856  for (unsigned int www=0;www<label.size();www++){
857 
858  //chi2 and #hit vs eta: get mean from 2D histos
864 
866  //vs phi
870 
875 
880 
885 
890 
895 
900 
903 
906 
907  if (MABH) {
914  }
915 
916  w++;
917  }
918  }
919 
920  if ( out.size() != 0 && dbe_ ) dbe_->save(out);
921 }
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
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
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
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 925 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().

926  {
927  pt = track.pt();
928  ptError = track.ptError();
929  qoverp = track.qoverp();
930  qoverpError = track.qoverpError();
931  lambda = track.lambda();
932  lambdaError = track.lambdaError();
933  phi = track.phi();
934  phiError = track.phiError();
935 
936 }
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 939 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().

940  {
941 
942  pt = gsfTrack.ptMode();
943  ptError = gsfTrack.ptModeError();
944  qoverp = gsfTrack.qoverpMode();
945  qoverpError = gsfTrack.qoverpModeError();
946  lambda = gsfTrack.lambdaMode();
947  lambdaError = gsfTrack.lambdaModeError();
948  phi = gsfTrack.phiMode();
949  phiError = gsfTrack.phiModeError();
950 
951 }
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:93
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:44
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:40
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:80
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:78
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:56
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:89
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:48
Definition: DDAxes.h:10

Member Data Documentation

edm::InputTag MuonTrackValidator::associatormap
private

Definition at line 148 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

bool MuonTrackValidator::BiDirectional_RecoToSim_association
private

Definition at line 161 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 180 of file MuonTrackValidator.h.

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

Definition at line 169 of file MuonTrackValidator.h.

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

Definition at line 171 of file MuonTrackValidator.h.

CosmicTrackingParticleSelector MuonTrackValidator::cosmictpSelector
private

Definition at line 158 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 186 of file MuonTrackValidator.h.

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

Definition at line 187 of file MuonTrackValidator.h.

std::string MuonTrackValidator::dirName_
private

Definition at line 147 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 190 of file MuonTrackValidator.h.

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

Definition at line 186 of file MuonTrackValidator.h.

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

Definition at line 187 of file MuonTrackValidator.h.

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

Definition at line 190 of file MuonTrackValidator.h.

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

Definition at line 186 of file MuonTrackValidator.h.

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

Definition at line 187 of file MuonTrackValidator.h.

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

Definition at line 169 of file MuonTrackValidator.h.

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

Definition at line 177 of file MuonTrackValidator.h.

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

Definition at line 177 of file MuonTrackValidator.h.

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

Definition at line 183 of file MuonTrackValidator.h.

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

Definition at line 181 of file MuonTrackValidator.h.

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

Definition at line 183 of file MuonTrackValidator.h.

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

Definition at line 192 of file MuonTrackValidator.h.

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

Definition at line 192 of file MuonTrackValidator.h.

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

Definition at line 182 of file MuonTrackValidator.h.

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

Definition at line 166 of file MuonTrackValidator.h.

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

Definition at line 181 of file MuonTrackValidator.h.

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

Definition at line 166 of file MuonTrackValidator.h.

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

Definition at line 166 of file MuonTrackValidator.h.

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

Definition at line 192 of file MuonTrackValidator.h.

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

Definition at line 193 of file MuonTrackValidator.h.

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

Definition at line 192 of file MuonTrackValidator.h.

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

Definition at line 193 of file MuonTrackValidator.h.

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

Definition at line 170 of file MuonTrackValidator.h.

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

Definition at line 192 of file MuonTrackValidator.h.

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

Definition at line 193 of file MuonTrackValidator.h.

bool MuonTrackValidator::MABH
private

Definition at line 163 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

double MuonTrackValidator::maxPhi
private

Definition at line 152 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

double MuonTrackValidator::minPhi
private

Definition at line 152 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 171 of file MuonTrackValidator.h.

int MuonTrackValidator::nintPhi
private

Definition at line 153 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 180 of file MuonTrackValidator.h.

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

Definition at line 174 of file MuonTrackValidator.h.

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

Definition at line 190 of file MuonTrackValidator.h.

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

Definition at line 191 of file MuonTrackValidator.h.

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

Definition at line 186 of file MuonTrackValidator.h.

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

Definition at line 171 of file MuonTrackValidator.h.

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

Definition at line 187 of file MuonTrackValidator.h.

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

Definition at line 174 of file MuonTrackValidator.h.

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

Definition at line 190 of file MuonTrackValidator.h.

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

Definition at line 191 of file MuonTrackValidator.h.

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

Definition at line 186 of file MuonTrackValidator.h.

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

Definition at line 171 of file MuonTrackValidator.h.

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

Definition at line 187 of file MuonTrackValidator.h.

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

Definition at line 150 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 149 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

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

Definition at line 190 of file MuonTrackValidator.h.

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

Definition at line 191 of file MuonTrackValidator.h.

TrackingParticleSelector MuonTrackValidator::tpSelector
private

Definition at line 157 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

bool MuonTrackValidator::UseAssociators
private

Definition at line 151 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().

bool MuonTrackValidator::useGsf
private

Definition at line 154 of file MuonTrackValidator.h.

Referenced by MuonTrackValidator().