122 theMuonCollectionLabel_ = consumes<edm::View<reco::Track> >(
parameters.getParameter<
edm::InputTag>(
"MuonCollection"));
124 nTrkBin =
parameters.getParameter<
int>(
"nTrkBin");
125 nTrkMax =
parameters.getParameter<
int>(
"nTrkMax");
126 nTrkMin =
parameters.getParameter<
int>(
"nTrkMin");
133 chi2Bin =
parameters.getParameter<
int>(
"chi2Bin");
139 thetaBin =
parameters.getParameter<
int>(
"thetaBin");
140 thetaMin =
parameters.getParameter<
double>(
"thetaMin");
141 thetaMax =
parameters.getParameter<
double>(
"thetaMax");
145 pResBin =
parameters.getParameter<
int>(
"pResBin");
146 pResMin =
parameters.getParameter<
double>(
"pResMin");
147 pResMax =
parameters.getParameter<
double>(
"pResMax");
149 hitsBin =
parameters.getParameter<
int>(
"hitsBin");
150 hitsMin =
parameters.getParameter<
int>(
"hitsMin");
151 hitsMax =
parameters.getParameter<
int>(
"hitsMax");
153 theFolder =
parameters.getParameter<
string>(
"folder");
169 nTracksSta = ibooker.
book1D(histname +
"_traks",
"#tracks", nTrkBin, nTrkMin, nTrkMax);
177 thetaStaTrack = ibooker.
book1D(histname +
"_theta",
"#theta_{STA}", thetaBin, thetaMin, thetaMax);
187 chi2OvDFStaTrack = ibooker.
book1D(histname +
"_chi2OverDf",
"#chi_{2}OverDF_{STA}", chi2Bin,
chi2Min,
chi2Max);
191 probchi2StaTrack = ibooker.
book1D(histname +
"_probchi",
"Prob #chi_{STA}", 120,
chi2Min, 1.20);
195 pStaTrack = ibooker.
book1D(histname +
"_p",
"p_{STA}", pBin,
pMin,
pMax);
198 qOverPStaTrack = ibooker.
book1D(histname +
"_qoverp",
"qoverp_{STA}", pResBin, pResMin, pResMax);
202 ibooker.
book2D(histname +
"_qoverp_p",
"qoverp_p_{STA}", pBin,
pMin,
pMax, pResBin, pResMin, pResMax);
211 qStaTrack = ibooker.
book1D(histname +
"_q",
"q_{STA}", 5, -2.5, 2.5);
216 phiVsetaStaTrack = ibooker.
book2D(
219 phiVsetaStaTrack->setAxisTitle(
"phi", 2);
222 nValidHitsStaTrack = ibooker.
book1D(histname +
"_nValidHits",
"#valid hits (STA)", hitsBin, hitsMin, hitsMax);
224 nValidHitsStaTrack_eta = ibooker.
book2D(
225 histname +
"_nValidHits_eta",
"#valid hits vs eta (STA)",
etaBin,
etaMin,
etaMax, hitsBin, hitsMin, hitsMax);
227 nValidHitsStaTrack_phi = ibooker.
book2D(
228 histname +
"_nValidHits_phi",
"#valid hits vs phi (STA)",
phiBin,
phiMin,
phiMax, hitsBin, hitsMin, hitsMax);
233 theService->update(iSetup);
237 iEvent.
getByToken(theMuonCollectionLabel_, muons);
251 etaStaTrack->Fill(
muon->eta());
252 thetaStaTrack->Fill(
muon->theta());
253 phiStaTrack->Fill(
muon->phi());
254 chi2OvDFStaTrack->Fill(
muon->normalizedChi2());
255 probchi2StaTrack->Fill(TMath::Prob(
muon->chi2(),
muon->ndof()));
256 pStaTrack->Fill(
muon->p());
257 ptStaTrack->Fill(
muon->pt());
258 qStaTrack->Fill(
muon->charge());
259 qOverPStaTrack->Fill(
muon->qoverp());
260 qOverPStaTrack_p->Fill(
muon->p(),
muon->qoverp());
261 phiVsetaStaTrack->Fill(
muon->eta(),
muon->phi());
263 nValidHitsStaTrack->Fill(
muon->numberOfValidHits());
264 nValidHitsStaTrack_eta->Fill(
muon->eta(),
muon->numberOfValidHits());
265 nValidHitsStaTrack_phi->Fill(
muon->phi(),
muon->numberOfValidHits());
268 nTracksSta->Fill(nTracks_);
MonitorElement * thetaStaTrack
void analyze(const edm::Event &, const edm::EventSetup &) override
Inizialize parameters for histo binning.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
MonitorElement * nTracksSta
MonitorElement * chi2OvDFStaTrack
edm::ParameterSet parameters
MonitorElement * nValidHitsStaTrack
MonitorElement * phiVsetaStaTrack
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * nValidHitsStaTrack_phi
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath)
MonitorElement * pStaTrack
MonitorElement * qOverPStaTrack
MonitorElement * qStaTrack
MonitorElement * qOverPStaTrack_p
MonitorElement * book1D(Args &&...args)
MonitorElement * probchi2StaTrack
MuonServiceProxy * theService
~CosmicMuonRecoAnalyzer() override
Destructor.
MonitorElement * etaStaTrack
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * phiStaTrack
MonitorElement * nValidHitsStaTrack_eta
MonitorElement * book2D(Args &&...args)
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
MonitorElement * ptStaTrack
CosmicMuonRecoAnalyzer(const edm::ParameterSet &)
Constructor.
edm::EDGetTokenT< edm::View< reco::Track > > theMuonCollectionLabel_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)