67 theMuonToken = consumes<pat::MuonCollection>(
pset.getParameter<
InputTag>(
"MuonCollection"));
76 hPtRec = fileService->
make<TH1F>(
"pT",
"p_{T}^{rec}", 250, 0, 120);
77 hPtReso = fileService->
make<TH2F>(
"pT_Reso",
"(p_{T}^{rec}-p_{T}^{sim})/p_{T}^{sim}", 250, 0, 120, 100, -0.2, 0.2);
78 hNMuons = fileService->
make<TH1I>(
"NMuons",
"Number of muons per event", 20, 0, 20);
80 hEHcal = fileService->
make<TH1F>(
"EHCal",
"Energy deposit in HCAL", 100, 0, 10);
83 hMuonType = fileService->
make<TH1I>(
"MuonType",
"Type of Muons", 5, 1, 6);
84 hPtSTATKDiff = fileService->
make<TH1F>(
"DiffPt_STA_TK",
"p^{TK}_{T}-p^{STA}_T", 200, -50, 50);
85 hMuCaloCompatibility = fileService->
make<TH1F>(
"CaloCompatibility",
"Muon HP using Calorimeters only", 100, 0, 1);
86 hMuSegCompatibility = fileService->
make<TH1F>(
"SegmentCompatibility",
"Muon HP using segments only", 100, 0, 1);
87 hChamberMatched = fileService->
make<TH1I>(
"NumMatchedChamber",
"Number of matched chambers", 7, 0, 7);
88 hMuIdAlgo = fileService->
make<TH1I>(
"MuonIDSelectors",
"Results of muon id selectors", 13, 0, 13);
91 hMuIso03SumPt = fileService->
make<TH1F>(
"MuIso03SumPt",
"Isolation #Delta(R)=0.3: SumPt", 200, 0, 10);
93 fileService->
make<TH1F>(
"MuIso03CaloComb",
"Isolation #Delta(R)=0.3: 1.2*ECAL+0.8HCAL", 200, 0, 10);
96 h4MuInvMass = fileService->
make<TH1F>(
"InvMass4MuSystem",
"Invariant mass of the 4 muons system", 200, 0, 500);
104 event.getByToken(theMuonToken,
muons);
107 hNMuons->Fill(
muons->size());
114 hPtRec->Fill(
muon->pt());
118 if (
muon->genLepton() !=
nullptr) {
119 double reso = (
muon->pt() -
muon->genLepton()->pt()) /
muon->genLepton()->pt();
120 hPtReso->Fill(
muon->genLepton()->pt(), reso);
124 if (
muon->isEnergyValid())
125 hEHcal->Fill(
muon->calEnergy().had);
128 if (
muon->isStandAloneMuon())
129 if (
muon->isGlobalMuon())
130 if (
muon->isTrackerMuon())
134 else if (
muon->isTrackerMuon())
138 else if (
muon->isTrackerMuon())
143 if (
muon->isGlobalMuon()) {
144 double diff =
muon->innerTrack()->pt() -
muon->standAloneMuon()->pt();
145 hPtSTATKDiff->Fill(
diff);
151 if (
muon->isCaloCompatibilityValid())
152 hMuCaloCompatibility->Fill(
muon->caloCompatibility());
158 hChamberMatched->Fill(
muon->numberOfChambers());
197 if (
muon->isIsolationValid()) {
198 hMuIso03CaloComb->Fill(1.2 *
muon->isolationR03().emEt + 0.8 *
muon->isolationR03().hadEt);
199 hMuIso03SumPt->Fill(
muon->isolationR03().sumPt);
208 if (
muon->isolationR03().sumPt < 0.2) {
219 p4CM = p4CM +
muon->p4();
221 h4MuInvMass->Fill(p4CM.mass());