138 LogTrace(
"TriggerMatching") <<
"[TriggerMatchMonitor] Analyze the mu in different eta regions";
156 unsigned int theIndexOfThePrimaryVertex = 999.;
157 for (
unsigned int ind = 0; ind < recVtxs->size(); ++ind) {
158 if ((*recVtxs)[ind].isValid() && !((*recVtxs)[ind].isFake())) {
159 theIndexOfThePrimaryVertex = ind;
163 if (theIndexOfThePrimaryVertex < 100) {
164 posVtx = ((*recVtxs)[theIndexOfThePrimaryVertex]).
position();
165 errVtx = ((*recVtxs)[theIndexOfThePrimaryVertex]).
error();
167 LogInfo(
"RecoMuonValidator") <<
"reco::PrimaryVertex not found, use BeamSpot position instead\n";
171 posVtx =
bs.position();
172 errVtx(0, 0) =
bs.BeamWidthX();
173 errVtx(1, 1) =
bs.BeamWidthY();
174 errVtx(2, 2) =
bs.sigmaZ();
179 for (
const auto& patMuon : *
PATmuons) {
181 patMuon.pfIsolationR04().sumChargedHadronPt +
183 patMuon.pfIsolationR04().sumNeutralHadronEt + patMuon.pfIsolationR04().sumPhotonEt -
184 0.5 * patMuon.pfIsolationR04().sumPUPt) /
188 if (patMuon.isGlobalMuon() && Isolated && patMuon.isTightMuon(thePrimaryVertex)) {
190 TLorentzVector offlineMuon;
191 offlineMuon.SetPtEtaPhiM(patMuon.pt(), patMuon.eta(), patMuon.phi(), 0.0);
205 if (patMuon.triggered(ptrmuPath1) && patMuon.hltObject() !=
nullptr) {
206 TLorentzVector hltMuon;
207 hltMuon.SetPtEtaPhiM(patMuon.hltObject()->pt(), patMuon.hltObject()->eta(), patMuon.hltObject()->phi(), 0.0);
208 double DelRrecoHLT = offlineMuon.DeltaR(hltMuon);
212 matchHists[2]->Fill(patMuon.hltObject()->pt() / patMuon.pt());
218 if (patMuon.l1Object() !=
nullptr) {
220 L1Muon.SetPtEtaPhiM(patMuon.l1Object()->pt(), patMuon.l1Object()->eta(), patMuon.l1Object()->phi(), 0.0);
221 double DelRrecoL1 = offlineMuon.DeltaR(
L1Muon);
224 matchHists[5]->Fill(patMuon.l1Object()->pt() / patMuon.pt());
229 if (patMuon.triggered(ptrmuPath2)) {
230 TLorentzVector hltMuon50;
231 hltMuon50.SetPtEtaPhiM(
232 patMuon.hltObject()->pt(), patMuon.hltObject()->eta(), patMuon.hltObject()->phi(), 0.0);
233 double DelRrecoHLT50 = offlineMuon.DeltaR(hltMuon50);
237 matchHists[8]->Fill(patMuon.hltObject()->pt() / patMuon.pt());
244 if (patMuon.l1Object() !=
nullptr) {
245 TLorentzVector L1Muon50;
246 L1Muon50.SetPtEtaPhiM(patMuon.l1Object()->pt(), patMuon.l1Object()->eta(), patMuon.l1Object()->phi(), 0.0);
247 double DelRrecoL150 = offlineMuon.DeltaR(L1Muon50);
250 matchHists[11]->Fill(patMuon.l1Object()->pt() / patMuon.pt());
MonitorElement * h_passHLTPath2_eta_Tight
MonitorElement * h_passHLTPath2_phi_Tight
MonitorElement * h_totalHLTPath1_phi_Tight
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::string triggerPathName1_
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
MonitorElement * h_totalHLTPath2_pt_Tight
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
MonitorElement * h_totalHLTPath1_eta_Tight
math::XYZPoint Point
point in the space
static std::string const triggerResults
std::string triggerPathName2_
Log< level::Info, false > LogInfo
MonitorElement * h_passHLTPath1_phi_Tight
MonitorElement * h_passHLTPath1_eta_Tight
MonitorElement * h_totalHLTPath1_pt_Tight
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::EDGetTokenT< std::vector< pat::TriggerObjectStandAlone > > triggerObjects_
double triggerPtThresholdPath1_
MonitorElement * h_totalHLTPath2_eta_Tight
static int position[264][3]
MonitorElement * h_passHLTPath2_pt_Tight
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
double triggerPtThresholdPath2_
MonitorElement * h_totalHLTPath2_phi_Tight
MonitorElement * h_passHLTPath1_pt_Tight
edm::EDGetTokenT< edm::View< pat::Muon > > thePATMuonCollectionLabel_
std::vector< MonitorElement * > matchHists
edm::EDGetTokenT< std::vector< reco::Vertex > > primaryVerticesToken_