13 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
15 , bsToken_ ( mayConsume<
reco::
BeamSpot> (iConfig.getParameter<
edm::InputTag>(
"beamSpot")))
32 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
33 , muoSelection_ref ( iConfig.getParameter<
std::
string>(
"muoSelection_ref") )
34 , muoSelection_tag ( iConfig.getParameter<
std::
string>(
"muoSelection_tag") )
35 , muoSelection_probe ( iConfig.getParameter<
std::
string>(
"muoSelection_probe") )
36 , nmuons_ ( iConfig.getParameter<
int>(
"nmuons" ) )
37 , tnp_ ( iConfig.getParameter<
bool>(
"tnp" ) )
38 , L3_ ( iConfig.getParameter<
int>(
"L3" ) )
39 , trOrMu_ ( iConfig.getParameter<
int>(
"trOrMu" ) )
40 , Jpsi_ ( iConfig.getParameter<
int>(
"Jpsi" ) )
41 , Upsilon_ ( iConfig.getParameter<
int>(
"Upsilon" ) )
42 , enum_ ( iConfig.getParameter<
int>(
"enum" ) )
43 , seagull_ ( iConfig.getParameter<
int>(
"seagull" ) )
44 , maxmass_ ( iConfig.getParameter<double>(
"maxmass" ) )
45 , minmass_ ( iConfig.getParameter<double>(
"minmass" ) )
46 , maxmassJpsi ( iConfig.getParameter<double>(
"maxmassJpsi" ) )
47 , minmassJpsi ( iConfig.getParameter<double>(
"minmassJpsi" ) )
48 , maxmassUpsilon ( iConfig.getParameter<double>(
"maxmassUpsilon" ) )
49 , minmassUpsilon ( iConfig.getParameter<double>(
"minmassUpsilon" ) )
50 , maxmassTkTk ( iConfig.getParameter<double>(
"maxmassTkTk" ) )
51 , minmassTkTk ( iConfig.getParameter<double>(
"minmassTkTk" ) )
52 , maxmassJpsiTk ( iConfig.getParameter<double>(
"maxmassJpsiTk" ) )
53 , minmassJpsiTk ( iConfig.getParameter<double>(
"minmassJpsiTk" ) )
54 , kaon_mass ( iConfig.getParameter<double>(
"kaon_mass" ) )
55 , mu_mass ( iConfig.getParameter<double>(
"mu_mass" ) )
56 , min_dR ( iConfig.getParameter<double>(
"min_dR" ) )
57 , minprob ( iConfig.getParameter<double>(
"minprob" ) )
58 , mincos ( iConfig.getParameter<double>(
"mincos" ) )
59 , minDS ( iConfig.getParameter<double>(
"minDS" ) )
60 , hltTrigResTag_ (mayConsume<
edm::TriggerResults>( iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet").getParameter<
edm::InputTag>(
"hltInputTag")))
61 , hltInputTag_ (mayConsume<
trigger::TriggerEvent>( iConfig.getParameter<
edm::InputTag>(
"hltTriggerSummaryAOD")))
62 , hltpaths_num ( iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet").getParameter<
std::vector<
std::
string>>(
"hltPaths"))
63 , hltpaths_den ( iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet").getParameter<
std::vector<
std::
string>>(
"hltPaths"))
64 , trSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
65 , trSelection_ref ( iConfig.getParameter<
std::
string>(
"trSelection_ref") )
66 , DMSelection_ref ( iConfig.getParameter<
std::
string>(
"DMSelection_ref") )
142 if (pset.
existsAs<std::vector<double>>(
"edges")) {
143 return MEbinning{pset.
getParameter<std::vector<double>>(
"edges")};
173 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
174 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
178 int nbins = binning.size()-1;
179 std::vector<float> fbinning(binning.begin(),binning.end());
180 float* arr = &fbinning[0];
181 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
182 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
186 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
187 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
191 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
192 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
196 int nbinsX = binningX.size()-1;
197 std::vector<float> fbinningX(binningX.begin(),binningX.end());
198 float* arrX = &fbinningX[0];
199 int nbinsY = binningY.size()-1;
200 std::vector<float> fbinningY(binningY.begin(),binningY.end());
201 float* arrY = &fbinningY[0];
203 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
204 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
211 if (binning.edges.empty()) {
212 this->
bookME(ibooker, me, histname, histtitle, binning.nbins, binning.xmin, binning.xmax);
214 this->
bookME(ibooker, me, histname, histtitle, binning.edges);
225 bool Ph_ =
false;
if (
enum_ == 7) Ph_ =
true;
226 if (
tnp_) istnp =
"Tag_and_Probe/";
else istnp =
"";
229 if (
trOrMu_) trMuPh =
"tr";
else if (Ph_) trMuPh =
"ph";
else trMuPh =
"mu";
232 histname = trMuPh+
"Pt"; histtitle = trMuPh+
"_P_{t}";
236 histname = trMuPh+
"Phi"; histtitle = trMuPh+
"Phi";
240 histname = trMuPh+
"Eta"; histtitle = trMuPh+
"_Eta";
245 histname = trMuPh+
"1Pt"; histtitle = trMuPh+
"1_P_{t}";
249 histname = trMuPh+
"1Phi"; histtitle = trMuPh+
"1Phi";
253 histname = trMuPh+
"1Eta"; histtitle = trMuPh+
"1_Eta";
257 histname = trMuPh+
"2Pt"; histtitle = trMuPh+
"2_P_{t}";
261 histname = trMuPh+
"2Phi"; histtitle = trMuPh+
"2Phi";
265 histname = trMuPh+
"2Eta"; histtitle = trMuPh+
"2_Eta";
270 histname = trMuPh+
"3Eta"; histtitle = trMuPh+
"3Eta";
274 histname = trMuPh+
"3Pt"; histtitle = trMuPh+
"3_P_{t}";
278 histname = trMuPh+
"3Phi"; histtitle = trMuPh+
"3Phi";
283 histname =
"DiMuEta"; histtitle =
"DiMuEta";
287 histname =
"DiMuPt"; histtitle =
"DiMu_P_{t}";
291 histname =
"DiMuPhi"; histtitle =
"DiMuPhi";
296 histname =
"DiMudR"; histtitle =
"DiMudR";
300 histname =
"DiMuMass"; histtitle =
"DiMuMass";
304 }
else if (
enum_ == 8) {
305 histname =
"DiMuProb"; histtitle =
"DiMuProb";
309 histname =
"DiMuPVcos"; histtitle =
"DiMuPVcos";
313 histname =
"DiMuDS"; histtitle =
"DiMuDS";
317 histname =
"DiMuDCA"; histtitle =
"DiMuDCA";
326 histname = trMuPh+
"_d0"; histtitle = trMuPh+
"_d0";
330 histname = trMuPh+
"_z0"; histtitle = trMuPh+
"_z0";
346 #include "TLorentzVector.h" 374 std::vector<reco::Muon> tagMuons;
375 for (
auto const &
m : *muoHandle ) {
379 for (
int i = 0;
i<
int(tagMuons.size());
i++) {
380 for (
auto const &
m : *muoHandle ) {
382 if ((tagMuons[
i].
pt() ==
m.pt()))
continue;
404 for (
auto const &
m : *muoHandle ) {
407 for (
auto const & m1 : *muoHandle ) {
408 if (&
m - &(*muoHandle)[0] >= &m1 - &(*muoHandle)[0])
continue;
411 if (
false && !
matchToTrigger(hltpath,m1, handleTriggerEvent))
continue;
414 if (
m.charge()*m1.charge() > 0 )
continue;
418 std::vector<reco::TransientTrack> j_tks;
421 j_tks.push_back(mu1TT);
422 j_tks.push_back(mu2TT);
428 if ( (jpsivertex.
chi2() >= 0) && (jpsivertex.
ndof() > 0) )
429 dimuonCL = TMath::Prob(jpsivertex.
chi2(), jpsivertex.
ndof() );
435 GlobalPoint displacementFromBeamspotJpsi( -1*((vertexBeamSpot.
x0() - jVertex.
x()) + (jVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
436 -1*((vertexBeamSpot.
y0() - jVertex.
y()) + (jVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
439 float jpsi_cos = vperpj.Dot(jpperp) / (vperpj.R()*jpperp.R());
446 double DiMuMass = (m1.p4()+
m.p4()).M();
456 if (dimuonCL <
minprob)
continue;
474 if (dimuonCL <
minprob)
continue;
481 if (dimuonCL <
minprob)
continue;
501 if (dimuonCL <
minprob)
continue;
521 if (dimuonCL <
minprob)
continue;
528 for (
auto const & m2 : *muoHandle) {
529 if (
false && !
matchToTrigger(hltpath,m2, handleTriggerEvent))
continue;
530 if (m2.pt() ==
m.pt())
continue;
557 if (dimuonCL <
minprob)
continue;
565 if (dimuonCL <
minprob)
continue;
566 if (fabs(jpsi_cos) <
mincos)
continue;
567 if ((displacementFromBeamspotJpsi.
perp() /
sqrt(jerr.
rerr(displacementFromBeamspotJpsi))) <
minDS)
continue;
572 for (
auto const &
t : *trHandle) {
586 double e1 =
sqrt(
m.momentum().Mag2() + MuMass2 );
587 double e2 =
sqrt(m1.momentum().Mag2() + MuMass2 );
597 std::vector<reco::TransientTrack> t_tks;
598 t_tks.push_back(mu1TT);
599 t_tks.push_back(mu2TT);
600 t_tks.push_back(trTT);
607 if ((vertex.
chi2() >= 0.0) && (vertex.
ndof() > 0) )
608 JpsiTkCL = TMath::Prob(vertex.
chi2(), vertex.
ndof() );
610 m.py() + m1.py() + itrk1.
py(),
614 GlobalPoint displacementFromBeamspot( -1*((vertexBeamSpot.
x0() - secondaryVertex.
x()) +
615 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
616 -1*((vertexBeamSpot.
y0() - secondaryVertex.
y()) +
617 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
620 float jpsiKcos = vperp.Dot(pperp) / (vperp.R()*pperp.R());
621 if (JpsiTkCL <
minprob)
continue;
622 if (fabs(jpsiKcos) <
mincos)
continue;
623 if ((displacementFromBeamspot.
perp() /
sqrt(err.
rerr(displacementFromBeamspot)))<
minDS)
continue;
634 for (
auto const &
t : *trHandle) {
644 double e2 =
sqrt(m1.momentum().Mag2() + MuMass2 );
651 std::vector<reco::TransientTrack> t_tks;
652 t_tks.push_back(mu2TT);
653 t_tks.push_back(trTT);
659 if ((vertex.
chi2() >= 0.0) && (vertex.
ndof() > 0) )
660 JpsiTkCL = TMath::Prob(vertex.
chi2(), vertex.
ndof() );
662 m1.py() + itrk1.
py(),
666 GlobalPoint displacementFromBeamspot( -1*((vertexBeamSpot.
x0() - secondaryVertex.
x()) +
667 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
668 -1*((vertexBeamSpot.
y0() - secondaryVertex.
y()) +
669 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
672 if (JpsiTkCL<
minprob)
continue;
680 case11_selection(dimuonCL, jpsi_cos, displacementFromBeamspotJpsi, jerr, trHandle, hltpath, handleTriggerEvent,
m, m1, bFieldHandle, vertexBeamSpot,
mu1Phi_.
denominator,
mu1Eta_.
denominator,
mu1Pt_.
denominator,
mu2Phi_.
denominator,
mu2Eta_.
denominator,
mu2Pt_.
denominator);
689 for (
auto const &
p : *phHandle) {
704 for (
auto const &
m : *muoHandle ) {
705 if (
false && !
matchToTrigger(hltpath1,
m, handleTriggerEvent))
continue;
707 for (
auto const & m1 : *muoHandle ) {
709 if (
m.charge()*m1.charge() > 0 )
continue;
710 if (m1.pt() ==
m.pt())
continue;
712 if (
false && !
matchToTrigger(hltpath1,m1, handleTriggerEvent))
continue;
716 std::vector<reco::TransientTrack> j_tks;
719 j_tks.push_back(mu1TT);
720 j_tks.push_back(mu2TT);
726 if ( (jpsivertex.
chi2() >= 0) && (jpsivertex.
ndof() > 0) )
727 dimuonCL = TMath::Prob(jpsivertex.
chi2(), jpsivertex.
ndof() );
733 GlobalPoint displacementFromBeamspotJpsi( -1*((vertexBeamSpot.
x0() - jVertex.
x()) + (jVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
734 -1*((vertexBeamSpot.
y0() - jVertex.
y()) + (jVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
737 float jpsi_cos = vperpj.Dot(jpperp) / (vperpj.R()*jpperp.R());
744 double DiMuMass = (m1.p4()+
m.p4()).M();
754 if (dimuonCL <
minprob)
continue;
773 if (dimuonCL <
minprob)
continue;
780 if (dimuonCL <
minprob)
continue;
800 if (dimuonCL <
minprob)
continue;
819 if (dimuonCL <
minprob)
continue;
826 for (
auto const & m2 : *muoHandle) {
827 if (
false && !
matchToTrigger(hltpath1,m2, handleTriggerEvent))
continue;
828 if (m2.pt() ==
m.pt())
continue;
851 if (dimuonCL <
minprob)
continue;
859 if (dimuonCL <
minprob)
continue;
860 if (fabs(jpsi_cos) <
mincos)
continue;
861 if ((displacementFromBeamspotJpsi.
perp() /
sqrt(jerr.
rerr(displacementFromBeamspotJpsi))) <
minDS)
continue;
863 for (
auto const &
t : *trHandle) {
865 if (
false && !
matchToTrigger(hltpath1,
t, handleTriggerEvent))
continue;
873 double e1 =
sqrt(
m.momentum().Mag2() + MuMass2 );
874 double e2 =
sqrt(m1.momentum().Mag2() + MuMass2 );
882 std::vector<reco::TransientTrack> t_tks;
883 t_tks.push_back(mu1TT);
884 t_tks.push_back(mu2TT);
885 t_tks.push_back(trTT);
891 if ((vertex.
chi2() >= 0.0) && (vertex.
ndof() > 0) )
892 JpsiTkCL = TMath::Prob(vertex.
chi2(), vertex.
ndof() );
894 m.py() + m1.py() + itrk1.
py(),
898 GlobalPoint displacementFromBeamspot( -1*((vertexBeamSpot.
x0() - secondaryVertex.
x()) +
899 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
900 -1*((vertexBeamSpot.
y0() - secondaryVertex.
y()) +
901 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
904 float jpsiKcos = vperp.Dot(pperp) / (vperp.R()*pperp.R());
905 if (JpsiTkCL<
minprob)
continue;
906 if (fabs(jpsiKcos)<
mincos)
continue;
907 if ((displacementFromBeamspot.
perp() /
sqrt(err.
rerr(displacementFromBeamspot)))<
minDS)
continue;
917 for (
auto const &
t : *trHandle) {
919 if (
false && !
matchToTrigger(hltpath1,
t, handleTriggerEvent))
continue;
927 double e2 =
sqrt(m1.momentum().Mag2() + MuMass2 );
934 std::vector<reco::TransientTrack> t_tks;
935 t_tks.push_back(mu2TT);
936 t_tks.push_back(trTT);
937 if (t_tks.size()!=2)
continue;
943 if ((vertex.
chi2() >= 0.0) && (vertex.
ndof() > 0) )
944 JpsiTkCL = TMath::Prob(vertex.
chi2(), vertex.
ndof() );
946 m1.py() + itrk1.
py(),
950 GlobalPoint displacementFromBeamspot( -1*((vertexBeamSpot.
x0() - secondaryVertex.
x()) +
951 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
952 -1*((vertexBeamSpot.
y0() - secondaryVertex.
y()) +
953 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
956 if (JpsiTkCL<
minprob)
continue;
964 case11_selection(dimuonCL, jpsi_cos, displacementFromBeamspotJpsi, jerr, trHandle, hltpath, handleTriggerEvent,
m, m1, bFieldHandle, vertexBeamSpot,
mu1Phi_.
numerator,
mu1Eta_.
numerator,
mu1Pt_.
numerator,
mu2Phi_.
numerator,
mu2Eta_.
numerator,
mu2Pt_.
numerator);
971 for (
auto const &
p : *phHandle) {
994 pset.
add<
int> (
"nbins", 2500);
1007 desc.
add<
std::string>(
"muoSelection",
"abs(eta)<1.4 & isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits> 0");
1008 desc.
add<
std::string>(
"muoSelection_ref",
"isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits> 0");
1009 desc.
add<
std::string>(
"muoSelection_tag",
"isGlobalMuon && isPFMuon && isTrackerMuon && abs(eta) < 2.4 && innerTrack.hitPattern.numberOfValidPixelHits > 0 && innerTrack.hitPattern.trackerLayersWithMeasurement > 5 && globalTrack.hitPattern.numberOfValidMuonHits > 0 && globalTrack.normalizedChi2 < 10");
1010 desc.
add<
std::string>(
"muoSelection_probe",
"isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & innerTrack.hitPattern.numberOfValidPixelHits> 0");
1014 desc.
add<
int>(
"nmuons", 1);
1016 desc.
add<
int>(
"L3", 0 );
1017 desc.
add<
int>(
"trOrMu", 0 );
1018 desc.
add<
int>(
"Jpsi", 0 );
1019 desc.
add<
int>(
"Upsilon", 0 );
1020 desc.
add<
int>(
"enum", 1 );
1021 desc.
add<
int>(
"seagull", 1 );
1022 desc.
add<
double>(
"maxmass", 3.596 );
1023 desc.
add<
double>(
"minmass", 2.596 );
1024 desc.
add<
double>(
"maxmassJpsi", 3.2 );
1025 desc.
add<
double>(
"minmassJpsi", 3. );
1026 desc.
add<
double>(
"maxmassUpsilon", 8.1 );
1027 desc.
add<
double>(
"minmassUpsilon", 8. );
1028 desc.
add<
double>(
"maxmassTkTk", 10);
1029 desc.
add<
double>(
"minmassTkTk", 0);
1030 desc.
add<
double>(
"maxmassJpsiTk", 5.46 );
1031 desc.
add<
double>(
"minmassJpsiTk", 5.1 );
1032 desc.
add<
double>(
"kaon_mass", 0.493677 );
1033 desc.
add<
double>(
"mu_mass", 0.1056583745);
1034 desc.
add<
double>(
"min_dR", 0.001);
1035 desc.
add<
double>(
"minprob", 0.005 );
1036 desc.
add<
double>(
"mincos", 0.95 );
1037 desc.
add<
double>(
"minDS", 3. );
1040 genericTriggerEventPSet.
add<
bool>(
"andOr");
1043 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
1044 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
1045 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
1046 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
1047 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
1048 genericTriggerEventPSet.add<
bool>(
"andOrL1",
true);
1049 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
1050 genericTriggerEventPSet.add<std::vector<std::string> >(
"l1Algorithms",{});
1051 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
1052 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
1053 genericTriggerEventPSet.add<
bool>(
"errorReplyL1",
true);
1054 genericTriggerEventPSet.add<
bool>(
"l1BeforeMask",
true);
1055 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",0);
1060 PrescaleTriggerEventPSet.
add<
unsigned int>(
"prescaleWeightVerbosityLevel",0);
1063 PrescaleTriggerEventPSet.add<std::vector<std::string>>(
"prescaleWeightHltPaths",{});
1102 descriptions.
add(
"bphMonitoring", desc);
1104 template <
typename T>
1108 bool matchedToTrigger =
false;
1111 for (
size_t ia = 0; ia < handleTriggerEvent->
sizeFilters(); ++ ia) {
1114 size_t p = fullname.find_first_of(
':');
1115 if ( p != std::string::npos) {name = fullname.substr(0, p);}
1116 else {name = fullname;}
1118 for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
1120 if (name.find(theTriggerName) != string::npos) {
1121 if ((
reco::deltaR(t.eta(), t.phi(),theTriggerParticle.
eta(),theTriggerParticle.
phi()) <= 0.2)) {
1122 matchedToTrigger =
true;
1128 return matchedToTrigger;
1130 else {
cout <<theTriggerName <<
"\t\tNo HLT filters" <<endl;
return false;}
1133 void BPHMonitor::case11_selection(
const float & dimuonCL,
const float & jpsi_cos,
const GlobalPoint & displacementFromBeamspotJpsi,
const GlobalError & jerr,
const edm::Handle<reco::TrackCollection> & trHandle,
const std::string & hltpath,
const edm::Handle<trigger::TriggerEvent> & handleTriggerEvent,
const reco::Muon&
m,
const reco::Muon& m1,
const edm::ESHandle<MagneticField> & bFieldHandle,
const reco::BeamSpot & vertexBeamSpot,
MonitorElement* phi1,
MonitorElement* eta1,
MonitorElement* pT1,
MonitorElement* phi2,
MonitorElement* eta2,
MonitorElement* pT2) {
1135 if (dimuonCL <
minprob)
return;
1136 if (fabs(jpsi_cos) <
mincos)
return;
1137 if ((displacementFromBeamspotJpsi.
perp() /
sqrt(jerr.
rerr(displacementFromBeamspotJpsi))) <
minDS)
return;
1140 for (
auto const &
t : *trHandle) {
1142 if (
false && !
matchToTrigger(hltpath,
t, handleTriggerEvent))
continue;
1145 for (
auto const & t1 : *trHandle) {
1146 if (&
t - &(*trHandle)[0] >= &t1 - &(*trHandle)[0])
continue;
1149 if (
false && !
matchToTrigger(hltpath,t1, handleTriggerEvent))
continue;
1170 pB = p1 + p2 + p3 +
p4;
1176 std::vector<reco::TransientTrack> t_tks;
1177 t_tks.push_back(mu1TT);
1178 t_tks.push_back(mu2TT);
1179 t_tks.push_back(trTT);
1180 t_tks.push_back(tr1TT);
1186 if ((vertex.
chi2() >= 0.0) && (vertex.
ndof() > 0) )
1187 JpsiTkCL = TMath::Prob(vertex.
chi2(), vertex.
ndof() );
1189 m.
py() + m1.
py() + itrk1.
py() + itrk2.
py(),
1193 GlobalPoint displacementFromBeamspot( -1*((vertexBeamSpot.
x0() - secondaryVertex.
x()) +
1194 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dxdz()),
1195 -1*((vertexBeamSpot.
y0() - secondaryVertex.
y()) +
1196 (secondaryVertex.
z() - vertexBeamSpot.
z0()) * vertexBeamSpot.
dydz()),
1199 float jpsiKcos = vperp.Dot(pperp) / (vperp.R()*pperp.R());
1200 if (JpsiTkCL <
minprob)
continue;
1201 if (fabs(jpsiKcos) <
mincos)
continue;
1202 if ((displacementFromBeamspot.
perp() /
sqrt(err.
rerr(displacementFromBeamspot))) <
minDS)
continue;
1204 phi1->
Fill(
t.phi());
1205 eta1->
Fill(
t.eta());
1207 phi2->
Fill(t1.phi());
1208 eta2->
Fill(t1.eta());
GlobalError positionError() const
MonitorElement * numerator
T getParameter(std::string const &) const
double z0() const
z coordinate
float distance() const override
TrackRef track() const override
reference to a Track
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
trigger::size_type sizeFilters() const
int prescaleWeight(const edm::Event &event, const edm::EventSetup &setup)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const FreeTrajectoryState & theState() const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::MuonCollection > muoToken_
void bookME(DQMStore::IBooker &, METME &me, std::string &histname, std::string &histtitle, int &nbins, double &xmin, double &xmax)
double px() const final
x coordinate of momentum vector
const Keys & filterKeys(trigger::size_type index) const
std::vector< Track > TrackCollection
collection of Tracks
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
PrescaleWeightProvider * prescaleWeightProvider_
bool matchToTrigger(const std::string &theTriggerName, T t, edm::Handle< trigger::TriggerEvent > handleTriggerEvent)
double px() const
x coordinate of momentum vector
const Vector & momentum() const
track momentum vector
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
edm::EDGetTokenT< reco::TrackCollection > trToken_
std::vector< Muon > MuonCollection
collection of Muon objects
double dydz() const
dydz slope
Vector momentum() const final
spatial momentum vector
void setMETitle(METME &me, std::string titleX, std::string titleY)
double phi() const
momentum azimuthal angle
const TriggerObjectCollection & getObjects() const
void case11_selection(const float &dimuonCL, const float &jpsi_cos, const GlobalPoint &displacementFromBeamspotJpsi, const GlobalError &jerr, const edm::Handle< reco::TrackCollection > &trHandle, const std::string &hltpath, const edm::Handle< trigger::TriggerEvent > &handleTriggerEvent, const reco::Muon &m, const reco::Muon &m1, const edm::ESHandle< MagneticField > &bFieldHandle, const reco::BeamSpot &vertexBeamSpot, MonitorElement *phi1, MonitorElement *eta1, MonitorElement *pT1, MonitorElement *phi2, MonitorElement *eta2, MonitorElement *pT2)
double pz() const final
z coordinate of momentum vector
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
GlobalPoint position() const
GenericTriggerEventFlag * den_genTriggerEventFlag_
BPHMonitor(const edm::ParameterSet &)
MonitorElement * book1D(Args &&...args)
double chi2() const
chi-squares
MonitorElement * denominator
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
void initRun(const edm::Run &run, const edm::EventSetup &setup)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
math::XYZPoint Point
point in the space
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
double dxdz() const
dxdz slope
std::vector< std::string > hltpaths_den
StringCutObjectSelector< reco::Muon, true > muoSelection_
double pz() const
z coordinate of momentum vector
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
const edm::InputTag filterTag(trigger::size_type index) const
edm::EDGetTokenT< reco::PhotonCollection > phToken_
edm::EDGetTokenT< reco::BeamSpot > bsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setCurrentFolder(const std::string &fullpath)
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
MonitorElement * book2D(Args &&...args)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
This class takes a vector of HLT paths and returns a weight based on their HLT and L1 prescales...
std::vector< size_type > Keys
T rerr(const GlobalPoint &aPoint) const
std::vector< Photon > PhotonCollection
collectin of Photon objects
static MEbinning getHistoPSet(edm::ParameterSet pset)
double py() const final
y coordinate of momentum vector
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool quality(const TrackQuality) const
Track quality.
double y0() const
y coordinate
std::vector< std::string > hltpaths_num
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
double eta() const
momentum pseudorapidity
GenericTriggerEventFlag * num_genTriggerEventFlag_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
StringCutObjectSelector< reco::Track, true > trSelection_ref
double py() const
y coordinate of momentum vector
double x0() const
x coordinate