66 for(
unsigned int iEtaRegion=0;iEtaRegion<4;iEtaRegion++){
67 if (iEtaRegion==0) EtaName =
"Barrel_";
68 if (iEtaRegion==1) EtaName =
"EndCap_";
69 if (iEtaRegion==2) EtaName =
"Overlap_";
70 if (iEtaRegion==3) EtaName =
"_";
74 etaTrack.push_back(dbe->
book1D(
"TkMuon_eta_"+EtaName,
"#eta_{TK} "+EtaName,
etaBin, etaMin, etaMax));
79 phiGlbTrack.push_back(dbe->
book1D(
"GlbMuon_phi_"+EtaName,
"#phi_{GLB} "+EtaName+
"(rad)", phiBin, phiMin, phiMax));
80 phiTrack.push_back(dbe->
book1D(
"TkMuon_phi_"+EtaName,
"#phi_{TK}" +EtaName +
"(rad)", phiBin, phiMin, phiMax));
81 phiStaTrack.push_back(dbe->
book1D(
"StaMuon_phi_"+EtaName,
"#phi_{STA}"+EtaName+
" (rad)", phiBin, phiMin, phiMax));
82 phiTightTrack.push_back(dbe->
book1D(
"TightMuon_phi_"+EtaName,
"#phi_{Tight}_"+EtaName, phiBin, phiMin, phiMax));
85 pGlbTrack.push_back(dbe->
book1D(
"GlbMuon_p_"+EtaName,
"p_{GLB} "+EtaName, pBin, pMin, pMax));
86 pTrack.push_back(dbe->
book1D(
"TkMuon_p"+EtaName,
"p_{TK} "+EtaName, pBin, pMin, pMax));
87 pStaTrack.push_back(dbe->
book1D(
"StaMuon_p"+EtaName,
"p_{STA} "+EtaName, pBin, pMin, pMax));
88 pTightTrack.push_back(dbe->
book1D(
"TightMuon_p_"+EtaName,
"p_{Tight} "+EtaName, pBin, pMin, pMax));
91 ptGlbTrack.push_back(dbe->
book1D(
"GlbMuon_pt_" +EtaName,
"pt_{GLB} "+EtaName, ptBin, ptMin, ptMax));
92 ptTrack.push_back(dbe->
book1D(
"TkMuon_pt_"+EtaName,
"pt_{TK} "+EtaName, ptBin, ptMin, ptMax));
93 ptStaTrack.push_back(dbe->
book1D(
"StaMuon_pt_"+EtaName,
"pt_{STA} "+EtaName, ptBin, ptMin, pMax));
94 ptTightTrack.push_back(dbe->
book1D(
"TightMuon_pt_"+EtaName,
"pt_{Tight} "+EtaName, ptBin, ptMin, ptMax));
105 iEvent.
getByLabel(
"offlineBeamSpot", beamSpotHandle);
106 beamSpot = *beamSpotHandle;
108 LogTrace(
metname)<<
"[MuonKinVsEtaAnalyzer] Analyze the mu in different eta regions";
110 for(
unsigned int iEtaRegion=0;iEtaRegion<4;iEtaRegion++){
117 LogTrace(
metname)<<
"[MuonKinVsEtaAnalyzer] The mu is global - filling the histos";
120 if(fabs(recoCombinedGlbTrack->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack->eta())<
EtaCutMax){
121 etaGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->eta());
122 phiGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->phi());
123 pGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->p());
124 ptGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->pt());
129 LogTrace(
metname)<<
"[MuonKinVsEtaAnalyzer] The mu is tracker - filling the histos";
133 etaTrack[iEtaRegion]->Fill(recoTrack->eta());
134 phiTrack[iEtaRegion]->Fill(recoTrack->phi());
135 pTrack[iEtaRegion]->Fill(recoTrack->p());
136 ptTrack[iEtaRegion]->Fill(recoTrack->pt());
141 LogTrace(
metname)<<
"[MuonKinVsEtaAnalyzer] The mu is standalone - filling the histos";
145 etaStaTrack[iEtaRegion]->Fill(recoStaTrack->eta());
146 phiStaTrack[iEtaRegion]->Fill(recoStaTrack->phi());
147 pStaTrack[iEtaRegion]->Fill(recoStaTrack->p());
148 ptStaTrack[iEtaRegion]->Fill(recoStaTrack->pt());
154 LogTrace(
metname)<<
"[MuonKinVsEtaAnalyzer] The mu is Tight - filling the histos";
159 pTightTrack[iEtaRegion]->Fill(recoTightTrack->p());
T getParameter(std::string const &) const
std::vector< MonitorElement * > etaTrack
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< MonitorElement * > phiStaTrack
bool isTrackerMuon() const
virtual TrackRef track() const
reference to a Track
bool isGlobalMuon() const
bool isStandAloneMuon() const
void analyze(const edm::Event &, const edm::EventSetup &, const reco::Muon &recoMu)
Get the analysis.
std::vector< MonitorElement * > ptTrack
void beginJob(DQMStore *dbe)
Inizialize parameters for histo binning.
MuonKinVsEtaAnalyzer(const edm::ParameterSet &, MuonServiceProxy *theService)
Constructor.
std::vector< MonitorElement * > pTrack
std::vector< MonitorElement * > ptTightTrack
std::vector< MonitorElement * > etaTightTrack
edm::ParameterSet parameters
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
std::vector< MonitorElement * > phiTightTrack
virtual TrackRef combinedMuon() const
reference to a stand-alone muon Track
std::vector< MonitorElement * > pTightTrack
std::vector< MonitorElement * > etaStaTrack
std::vector< MonitorElement * > pGlbTrack
std::vector< MonitorElement * > pStaTrack
std::vector< MonitorElement * > etaGlbTrack
const Point & position() const
position
std::vector< MonitorElement * > phiTrack
std::vector< MonitorElement * > ptStaTrack
void setCurrentFolder(const std::string &fullpath)
std::vector< MonitorElement * > ptGlbTrack
std::vector< MonitorElement * > phiGlbTrack
virtual ~MuonKinVsEtaAnalyzer()
Destructor.
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track