17 #include "TLorentzVector.h"
66 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
88 LogTrace(
metname)<<
"[DiMuonHistograms] Analyze the mu in different eta regions";
94 iEvent.
getByLabel(
"offlineBeamSpot", beamSpotHandle);
95 beamSpot = *beamSpotHandle;
100 TLorentzVector Mu1, Mu2;
102 float InvMass = -99.;
104 for (reco::MuonCollection::const_iterator recoMu1 = muons->begin(); recoMu1!=muons->end(); ++recoMu1) {
108 for (reco::MuonCollection::const_iterator recoMu2 = recoMu1; recoMu2!=muons->end(); ++recoMu2){
110 if (recoMu1==recoMu2)
continue;
113 if (recoMu1->isGlobalMuon() && recoMu2->isGlobalMuon()) {
117 Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(), recoCombinedGlbTrack1->py(),recoCombinedGlbTrack1->pz(), recoCombinedGlbTrack1->p());
118 Mu2.SetPxPyPzE(recoCombinedGlbTrack2->px(), recoCombinedGlbTrack2->py(),recoCombinedGlbTrack2->pz(), recoCombinedGlbTrack2->p());
120 charge = recoCombinedGlbTrack1->charge()*recoCombinedGlbTrack2->charge();
122 InvMass = (Mu1+Mu2).M();
123 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
128 if(fabs(recoCombinedGlbTrack1->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack1->eta())<
EtaCutMax &&
129 fabs(recoCombinedGlbTrack2->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack2->eta())<
EtaCutMax){
136 if (recoMu1->isGlobalMuon() && recoMu1->isTrackerMuon() && recoMu1->combinedMuon()->normalizedChi2()<10.
137 && recoMu1->combinedMuon()->hitPattern().numberOfValidMuonHits()>0 && fabs(recoMu1->combinedMuon()->dxy(beamSpot.
position()))<0.2
138 && recoMu1->combinedMuon()->hitPattern().numberOfValidPixelHits()>0 && recoMu1->numberOfMatches() > 1
139 && recoMu2->isGlobalMuon() && recoMu2->isTrackerMuon() && recoMu2->combinedMuon()->normalizedChi2()<10.
140 && recoMu2->combinedMuon()->hitPattern().numberOfValidMuonHits()>0 && fabs(recoMu2->combinedMuon()->dxy(beamSpot.
position()))<0.2
141 && recoMu2->combinedMuon()->hitPattern().numberOfValidPixelHits()>0 && recoMu2->numberOfMatches() > 1) {
143 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
148 if(fabs(recoCombinedGlbTrack1->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack1->eta())<
EtaCutMax &&
149 fabs(recoCombinedGlbTrack2->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack2->eta())<
EtaCutMax){
150 if (InvMass > 55. && InvMass < 125.)
TightTightMuon[iEtaRegion]->Fill(InvMass);
157 if (recoMu2->isStandAloneMuon() && recoMu1->isTrackerMuon()) {
161 Mu2.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(),recoStaTrack->pz(), recoStaTrack->p());
162 Mu1.SetPxPyPzE(recoTrack->px(), recoTrack->py(),recoTrack->pz(), recoTrack->p());
164 charge = recoStaTrack->charge()*recoTrack->charge();
166 InvMass = (Mu1+Mu2).M();
167 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
180 if (recoMu1->isStandAloneMuon() && recoMu2->isTrackerMuon()) {
184 Mu1.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(),recoStaTrack->pz(), recoStaTrack->p());
185 Mu2.SetPxPyPzE(recoTrack->px(), recoTrack->py(),recoTrack->pz(), recoTrack->p());
187 charge = recoStaTrack->charge()*recoTrack->charge();
189 InvMass = (Mu1+Mu2).M();
190 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
205 if (recoMu1->isTrackerMuon() && recoMu2->isTrackerMuon()) {
209 Mu2.SetPxPyPzE(recoTrack2->px(), recoTrack2->py(),recoTrack2->pz(), recoTrack2->p());
210 Mu1.SetPxPyPzE(recoTrack1->px(), recoTrack1->py(),recoTrack1->pz(), recoTrack1->p());
212 charge = recoTrack1->charge()*recoTrack2->charge();
214 InvMass = (Mu1+Mu2).M();
215 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
228 if (recoMu1->isTrackerMuon() && recoMu2->isTrackerMuon() &&
229 recoMu1->innerTrack()->found() > 11 && recoMu2->innerTrack()->found() &&
230 recoMu1->innerTrack()->chi2()/recoMu1->innerTrack()->ndof() < 4.0 &&
231 recoMu2->innerTrack()->chi2()/recoMu2->innerTrack()->ndof() < 4.0 &&
232 recoMu1->numberOfMatches() > 0 && recoMu2->numberOfMatches() > 0 &&
233 recoMu1->innerTrack()->hitPattern().pixelLayersWithMeasurement() > 1 &&
234 recoMu2->innerTrack()->hitPattern().pixelLayersWithMeasurement() > 1 &&
235 fabs(recoMu1->innerTrack()->dxy()) < 3.0 && fabs(recoMu1->innerTrack()->dxy()) < 3.0 &&
236 fabs(recoMu1->innerTrack()->dz()) < 15.0 && fabs(recoMu1->innerTrack()->dz()) < 15.0){
239 InvMass = (Mu1+Mu2).M();
240 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< MonitorElement * > GlbGlbMuon_LM
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
edm::ParameterSet parameters
std::vector< MonitorElement * > SoftSoftMuon
std::vector< MonitorElement * > TrkTrkMuon_LM
void beginJob(DQMStore *dbe)
Inizialize parameters for histo binning.
std::vector< MonitorElement * > StaTrkMuon_LM
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag theMuonCollectionLabel
DiMuonHistograms(const edm::ParameterSet &pset, MuonServiceProxy *theService)
std::vector< MonitorElement * > TrkTrkMuon_HM
virtual ~DiMuonHistograms()
std::vector< MonitorElement * > StaTrkMuon_HM
std::vector< MonitorElement * > GlbGlbMuon_HM
const Point & position() const
position
std::vector< MonitorElement * > TightTightMuon
void setCurrentFolder(const std::string &fullpath)