|
|
Go to the documentation of this file.
38 ptMin_(
cfg.getUntrackedParameter<double>(
"ptMin")),
39 massMin_(
cfg.getUntrackedParameter<double>(
"massMin")),
40 massMax_(
cfg.getUntrackedParameter<double>(
"massMax")),
41 etaMin_(
cfg.getUntrackedParameter<double>(
"etaMin")),
42 etaMax_(
cfg.getUntrackedParameter<double>(
"etaMax")),
43 trkIso_(
cfg.getUntrackedParameter<double>(
"trkIso")),
44 chi2Cut_(
cfg.getUntrackedParameter<double>(
"chi2Cut")),
45 nHitCut_(
cfg.getUntrackedParameter<
int>(
"nHitCut")) {
50 h_GlbMuChi2_ = trackEffDir.
make<TH1D>(
"chi2 of GlobalMuon",
"chi2 of GlobalMuon", 100, 0, 10);
51 h_GlbMuDxy_ = trackEffDir.
make<TH1D>(
"Dxy of GlobalMuon",
"Dxy of GlobalMuon", 1000, -5., 5.);
63 cout <<
">> entries in " <<
src_ <<
": " <<
src->size() << endl;
68 if (dau1 ==
nullptr || dau2 ==
nullptr)
72 const pat::Muon* mu1 = dynamic_cast<const pat::Muon*>(
c1);
73 std::cout <<
" dimuon mass " <<
i->mass() << std::endl;
74 std::cout <<
"dau1.pt() " << dau1->
pt() << std::endl;
75 std::cout <<
"dau2.pt() " << dau2->
pt() << std::endl;
92 <<
"first of two daughter is neither a pat::Muon not pat::GenericParticle\n";
96 const pat::Muon* mu2 = dynamic_cast<const pat::Muon*>(c2);
104 <<
"first of two daughter is neither a pat::Muon not pat::GenericParticle\n";
107 int nOfHit_1 = 0, nOfHit_tk_1 = 0, nOfHit_2 = 0, nOfHit_tk_2 = 0;
110 std::cout <<
"n of hit of GlbMu1: " << nOfHit_1 << std::endl;
112 nOfHit_tk_1 = mu1->
innerTrack()->numberOfValidHits();
113 std::cout <<
"n of hit of TrkMu1: " << nOfHit_tk_1 << std::endl;
116 std::cout <<
"n of hit of GlbMu2: " << nOfHit_2 << std::endl;
118 nOfHit_tk_2 = mu2->
innerTrack()->numberOfValidHits();
119 std::cout <<
"n of hit of TrkMu2: " << nOfHit_tk_2 << std::endl;
124 double nChi2_1 = 0, nChi2_2 = 0;
127 std::cout <<
"chi2 of GlbMu1: " << nChi2_1 << std::endl;
130 std::cout <<
"chi2 of GlbMu2: " << nChi2_2 << std::endl;
133 double dxy_1 = mu1->
dB();
134 double dxy_2 = mu2->
dB();
139 std::cout <<
"found a GlbMuon with nOfHit " << nOfHit_tk_1 <<
", it has eta: " << mu1->
eta() << std::endl;
142 std::cout <<
"found a GlbMuon with nOfHit " << nOfHit_tk_2 <<
", it has eta: " << mu2->
eta() << std::endl;
145 std::cout <<
"found a GlbMuon with chi2 " << nChi2_1
146 <<
", it has chi2 of track: " << mu1->
innerTrack()->normalizedChi2()
147 <<
", and chi2 of Sta: " << mu1->
outerTrack()->normalizedChi2() <<
", eta: " << mu1->
eta()
148 <<
",pt: " << mu1->
pt() << std::endl;
151 std::cout <<
"found a GlbMuon with chi2 " << nChi2_2
152 <<
", it has chi2 of track: " << mu2->
innerTrack()->normalizedChi2()
153 <<
", and chi2 of Sta: " << mu2->
outerTrack()->normalizedChi2() <<
", eta: " << mu2->
eta()
154 <<
",pt: " << mu2->
pt() << std::endl;
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
std::vector< unsigned int > matched_
edm::EDGetTokenT< reco::CandidateView > srcToken_
std::vector< unsigned int > unMatched_
T * make(const Args &... args) const
make new ROOT object
virtual double pt() const =0
transverse momentum
double pt() const final
transverse momentum
Analysis-level muon class.
double dB(IPTYPE type) const
#define DEFINE_FWK_MODULE(type)
virtual int charge() const =0
electric charge
virtual bool isStandAloneMuon() const =0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
value_type const * get() const
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
bool isGlobalMuon() const override
reco::TrackRef outerTrack() const override
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
GlbMuQualityCutsAnalysis(const edm::ParameterSet &cfg)
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed)
double eta() const final
momentum pseudorapidity
TH1D * h_GlbMuNofHitsGlbMu_
bool isTrackerMuon() const override
virtual const CandidateBaseRef & masterClone() const =0
virtual bool isTrackerMuon() const =0
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
reco::TrackRef innerTrack() const override
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
virtual bool isGlobalMuon() const =0
void analyze(const edm::Event &, const edm::EventSetup &) override
TH1D * h_TrkMuNofHitsGlbMu_