30 hltPrescaleProvider_(iConfig, consumesCollector(), *this),
31 changed(
false), t_timeL2Prod(0), t_nPixCand(0), t_nPixSeed(0), t_nGoodTk(0),
32 t_TrkhCone(0), t_TrkP(0), t_TrkselTkFlag(0), t_TrkqltyFlag(0),
33 t_TrkMissFlag(0), t_TrkPVFlag(0), t_TrkNuIsolFlag(0),
34 t_PixcandP(0), t_PixcandPt(0), t_PixcandEta(0), t_PixcandPhi(0),
35 t_PixcandMaxP(0), t_PixTrkcandP(0), t_PixTrkcandPt(0), t_PixTrkcandEta(0),
36 t_PixTrkcandPhi(0), t_PixTrkcandMaxP(0), t_PixTrkcandselTk(0),
37 t_NFcandP(0), t_NFcandPt(0), t_NFcandEta(0), t_NFcandPhi(0),
38 t_NFcandEmip(0), t_NFTrkcandP(0), t_NFTrkcandPt(0), t_NFTrkcandEta(0),
39 t_NFTrkcandPhi(0), t_NFTrkcandEmip(0), t_NFTrkMinDR(0), t_NFTrkMinDP1(0),
40 t_NFTrkselTkFlag(0), t_NFTrkqltyFlag(0), t_NFTrkMissFlag(0),
41 t_NFTrkPVFlag(0), t_NFTrkPropFlag(0), t_NFTrkChgIsoFlag(0),
42 t_NFTrkNeuIsoFlag(0), t_NFTrkMipFlag(0), t_ECone(0) {
89 edm::InputTag triggerEvent_ (
"hltTriggerSummaryAOD",
"",processName);
90 tok_trigEvt = consumes<trigger::TriggerEvent>(triggerEvent_);
91 edm::InputTag theTriggerResultsLabel (
"TriggerResults",
"",processName);
92 tok_trigRes = consumes<edm::TriggerResults>(theTriggerResultsLabel);
111 for (
unsigned int k=0;
k<pixelTracksSources_.size(); ++
k) {
114 tok_pixtks_.push_back(consumes<reco::TrackCollection>(pixelTracksSources_[
k]));
119 std::cout <<
"Parameters read from config file \n" 121 <<
"\t theTrackQuality " << theTrackQuality
139 std::cout <<
"Charge Isolation parameters:" 140 <<
"\t minPTrackValue " << minPTrackValue_
141 <<
"\t vtxCutSeed " << vtxCutSeed_
142 <<
"\t vtxCutIsol " << vtxCutIsol_
143 <<
"\t tauUnbiasCone " << tauUnbiasCone_
144 <<
"\t prelimCone " << prelimCone_
145 <<
"\t pixelIsolationConeSizeAtEC";
146 for (
unsigned int k=0;
k<pixelIsolationConeSizeAtEC_.size(); ++
k)
147 std::cout <<
" " << pixelIsolationConeSizeAtEC_[
k];
151 double pl[] = {20,30,40,60,80,120};
215 if (
verbosity%10 > 0)
std::cout <<
"Event starts====================================" << std::endl;
217 int RunNo = iEvent.
id().
run();
230 if (!triggerEventHandle.
isValid()) {
231 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product hltTriggerSummaryAOD";
234 triggerEvent = *(triggerEventHandle.
product());
251 if (
recVtxs->size()>0 && !((*recVtxs)[0].isFake())) {
269 for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
278 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
280 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
281 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
283 for(
int i=0;
i<7;
i++) {
300 if (!triggerResults.isValid()) {
301 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product triggerResults";
305 std::vector<std::string>
modules;
306 h_nHLT->Fill(triggerResults->size());
309 const std::vector<std::string> & triggerNames_ = triggerNames.
triggerNames();
312 std::cout <<
"number of HLTs " << triggerNames_.size() << std::endl;
314 int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
315 for (
unsigned int i=0;
i<triggerResults->size();
i++) {
316 unsigned int triggerindx = hltConfig.
triggerIndex(triggerNames_[
i]);
317 const std::vector<std::string>& moduleLabels(hltConfig.
moduleLabels(triggerindx));
323 if (
verbosity%10 > 0)
std::cout <<
"trigger that i want " << triggerNames_[
i] <<
" accept " << triggerResults->accept(i) << std::endl;
325 hlt = triggerResults->accept(i);
335 preL1 = prescales.first;
336 preHLT = prescales.second;
337 prescale = preL1*preHLT;
340 std::cout << triggerNames_[
i] <<
" accept " <<
hlt <<
" preL1 " 341 << preL1 <<
" preHLT " << preHLT << std::endl;
343 for (
int iv=0; iv<3; ++iv)
vec[iv].
clear();
347 TrigList.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
348 TrigPreList.insert(std::pair<
unsigned int, std::pair<int, int>>(RunNo,prescales));
351 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
353 std::vector<int>
Keys;
356 for (
unsigned int imodule=0; imodule<moduleLabels.size();
358 if (label.find(moduleLabels[imodule]) != std::string::npos) {
362 for (
unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
363 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
366 if (label.find(
"L2Filter") != std::string::npos) {
367 vec[1].push_back(v4);
368 }
else if (label.find(
"L3Filter") != std::string::npos) {
369 vec[2].push_back(v4);
371 vec[0].push_back(v4);
376 std::cout <<
"key " << ifiltrKey <<
" : pt " << TO.
pt() <<
" eta " << TO.
eta() <<
" phi " << TO.
phi() <<
" mass " << TO.
mass() <<
" Id " << TO.
id() << std::endl;
382 std::vector<reco::TrackCollection::const_iterator> goodTks;
388 reco::TrackCollection::const_iterator trkItr;
389 for (trkItr=trkCollection->begin();
390 trkItr!=trkCollection->end(); trkItr++)
391 goodTks.push_back(trkItr);
427 std::cout <<
"New trigger menu found !!!" << std::endl;
428 const unsigned int n(hltConfig.
size());
429 for (
unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
430 unsigned int triggerindx = hltConfig.
triggerIndex(triggerNames_[itrig]);
431 std::cout << triggerNames_[itrig] <<
" " << triggerindx <<
" ";
432 if (triggerindx >=
n)
433 std::cout <<
"does not exist in the current menu" << std::endl;
485 std::vector<double> &PixMaxP,
double &TrkMaxP,
503 double &EmipNFcand,
double &EmipTrkcand,
504 double &mindR,
double &mindP1,
505 std::vector<bool> &Flags,
double hCone) {
530 char hname[100], htit[100];
532 "Reco",
"RecoMatch",
"RecoNoMatch",
533 "L2Match",
"L2NoMatch",
"L3Match",
"L3NoMatch",
534 "HLTTrk",
"HLTGoodTrk",
"HLTIsoTrk",
"HLTMip",
"HLTSelect",
535 "nonHLTTrk",
"nonHLTGoodTrk",
"nonHLTIsoTrk",
"nonHLTMip",
"nonHLTSelect"};
543 TimingTree->Branch(
"t_timeL2Prod",
"std::vector<double>", &t_timeL2Prod);
544 TimingTree->Branch(
"t_nPixCand",
"std::vector<int>", &t_nPixCand);
545 TimingTree->Branch(
"t_nPixSeed",
"std::vector<int>", &t_nPixSeed);
546 TimingTree->Branch(
"t_nGoodTk",
"std::vector<int>", &t_nGoodTk);
551 t_TrkP =
new std::vector<double>();
558 TrkResTree->Branch(
"t_TrkhCone",
"std::vector<double>", &t_TrkhCone);
559 TrkResTree->Branch(
"t_TrkP",
"std::vector<double>", &t_TrkP);
560 TrkResTree->Branch(
"t_TrkselTkFlag",
"std::vector<bool>", &t_TrkselTkFlag);
561 TrkResTree->Branch(
"t_TrkqltyFlag",
"std::vector<bool>", &t_TrkqltyFlag);
562 TrkResTree->Branch(
"t_TrkMissFlag",
"std::vector<bool>", &t_TrkMissFlag);
563 TrkResTree->Branch(
"t_TrkPVFlag",
"std::vector<bool>", &t_TrkPVFlag);
564 TrkResTree->Branch(
"t_TrkNuIsolFlag",
"std::vector<bool>", &t_TrkNuIsolFlag);
580 ChgIsolnTree->Branch(
"t_PixcandP",
"std::vector<double>", &t_PixcandP);
581 ChgIsolnTree->Branch(
"t_PixcandPt",
"std::vector<double>", &t_PixcandPt);
582 ChgIsolnTree->Branch(
"t_PixcandEta",
"std::vector<double>", &t_PixcandEta);
583 ChgIsolnTree->Branch(
"t_PixcandPhi",
"std::vector<double>", &t_PixcandPhi);
584 ChgIsolnTree->Branch(
"t_PixcandMaxP",
"std::vector<std::vector<double> >", &t_PixcandMaxP);
585 ChgIsolnTree->Branch(
"t_PixTrkcandP",
"std::vector<double>", &t_PixTrkcandP);
586 ChgIsolnTree->Branch(
"t_PixTrkcandPt",
"std::vector<double>", &t_PixTrkcandPt );
587 ChgIsolnTree->Branch(
"t_PixTrkcandEta",
"std::vector<double>", &t_PixTrkcandEta );
588 ChgIsolnTree->Branch(
"t_PixTrkcandPhi",
"std::vector<double>", &t_PixTrkcandPhi );
589 ChgIsolnTree->Branch(
"t_PixTrkcandMaxP",
"std::vector<double>", &t_PixTrkcandMaxP);
590 ChgIsolnTree->Branch(
"t_PixTrkcandselTk",
"std::vector<bool>", &t_PixTrkcandselTk);
614 t_ECone =
new std::vector<double>();
616 MipCutTree->Branch(
"t_NFcandP",
"std::vector<double>", &t_NFcandP);
617 MipCutTree->Branch(
"t_NFcandPt",
"std::vector<double>", &t_NFcandPt);
618 MipCutTree->Branch(
"t_NFcandEta",
"std::vector<double>", &t_NFcandEta);
619 MipCutTree->Branch(
"t_NFcandPhi",
"std::vector<double>", &t_NFcandPhi);
620 MipCutTree->Branch(
"t_NFcandEmip",
"std::vector<double>", &t_NFcandEmip);
621 MipCutTree->Branch(
"t_NFTrkcandP",
"std::vector<double>", &t_NFTrkcandP);
622 MipCutTree->Branch(
"t_NFTrkcandPt",
"std::vector<double>", &t_NFTrkcandPt );
623 MipCutTree->Branch(
"t_NFTrkcandEta",
"std::vector<double>", &t_NFTrkcandEta );
624 MipCutTree->Branch(
"t_NFTrkcandPhi",
"std::vector<double>", &t_NFTrkcandPhi );
625 MipCutTree->Branch(
"t_NFTrkcandEmip",
"std::vector<double>", &t_NFTrkcandEmip);
626 MipCutTree->Branch(
"t_NFTrkMinDR",
"std::vector<double>", &t_NFTrkMinDR);
627 MipCutTree->Branch(
"t_NFTrkMinDP1",
"std::vector<double>", &t_NFTrkMinDP1);
628 MipCutTree->Branch(
"t_NFTrkselTkFlag",
"std::vector<bool>", &t_NFTrkselTkFlag);
629 MipCutTree->Branch(
"t_NFTrkqltyFlag",
"std::vector<bool>", &t_NFTrkqltyFlag);
630 MipCutTree->Branch(
"t_NFTrkMissFlag",
"std::vector<bool>", &t_NFTrkMissFlag);
631 MipCutTree->Branch(
"t_NFTrkPVFlag",
"std::vector<bool>", &t_NFTrkPVFlag);
632 MipCutTree->Branch(
"t_NFTrkPropFlag",
"std::vector<bool>", &t_NFTrkPropFlag);
633 MipCutTree->Branch(
"t_NFTrkChgIsoFlag",
"std::vector<bool>", &t_NFTrkChgIsoFlag);
634 MipCutTree->Branch(
"t_NFTrkNeuIsoFlag",
"std::vector<bool>", &t_NFTrkNeuIsoFlag);
635 MipCutTree->Branch(
"t_NFTrkMipFlag",
"std::vector<bool>", &t_NFTrkMipFlag);
636 MipCutTree->Branch(
"t_ECone",
"std::vector<double>", &t_ECone);
639 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
640 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
641 for(
int i=0;
i<7;
i++) {
642 h_Filters->GetXaxis()->SetBinLabel(
i+1, FilterNames[
i].c_str());
645 h_nHLT =
fs->
make<TH1I>(
"h_nHLT" ,
"Size of trigger Names", 1000, 1, 1000);
646 h_HLT =
fs->
make<TH1I>(
"h_HLT" ,
"HLT accept", 3, -1, 2);
647 h_PreL1 =
fs->
make<TH1I>(
"h_PreL1",
"L1 Prescale", 500, 0, 500);
649 h_Pre =
fs->
make<TH1I>(
"h_Pre",
"Prescale", 3000, 0, 3000);
651 h_PreL1wt =
fs->
make<TH1D>(
"h_PreL1wt",
"Weighted L1 Prescale", 500, 0, 500);
652 h_PreHLTwt =
fs->
make<TH1D>(
"h_PreHLTwt",
"Weighted HLT Prescale", 500, 0, 100);
655 h_EnIn =
fs->
make<TH1D>(
"h_EnInEcal",
"EnergyIn Ecal", 200, 0.0, 20.0);
656 h_EnOut =
fs->
make<TH1D>(
"h_EnOutEcal",
"EnergyOut Ecal", 200, 0.0, 20.0);
657 h_MipEnMatch =
fs->
make<TH2D>(
"h_MipEnMatch",
"MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
658 h_MipEnNoMatch =
fs->
make<TH2D>(
"h_MipEnNoMatch",
"MipEn: HLT level vs Reco Level (No Match Found)", 200, 0.0, 20.0, 200, 0.0, 20.0);
661 h_nL3Objs =
fs->
make<TH1I>(
"h_nL3Objs",
"Number of L3 objects", 10, 0, 10);
663 std::string pairs[9] = {
"L2L3",
"L2L3Match",
"L2L3NoMatch",
"L3Reco",
"L3RecoMatch",
"L3RecoNoMatch",
"NewFilterReco",
"NewFilterRecoMatch",
"NewFilterRecoNoMatch"};
664 for (
int ipair=0; ipair<9; ipair++) {
665 sprintf(hname,
"h_dEta%s", pairs[ipair].c_str());
666 sprintf(htit,
"#Delta#eta for %s", pairs[ipair].c_str());
667 h_dEta[ipair] =
fs->
make<TH1D>(hname, htit, 200, -10.0, 10.0);
668 h_dEta[ipair]->GetXaxis()->SetTitle(
"d#eta");
670 sprintf(hname,
"h_dPhi%s", pairs[ipair].c_str());
671 sprintf(htit,
"#Delta#phi for %s", pairs[ipair].c_str());
672 h_dPhi[ipair] =
fs->
make<TH1D>(hname, htit, 140, -7.0, 7.0);
673 h_dPhi[ipair]->GetXaxis()->SetTitle(
"d#phi");
675 sprintf(hname,
"h_dPt%s", pairs[ipair].c_str());
676 sprintf(htit,
"#Delta dp_{T} for %s objects", pairs[ipair].c_str());
677 h_dPt[ipair] =
fs->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
678 h_dPt[ipair]->GetXaxis()->SetTitle(
"dp_{T} (GeV)");
680 sprintf(hname,
"h_dP%s", pairs[ipair].c_str());
681 sprintf(htit,
"#Delta p for %s objects", pairs[ipair].c_str());
682 h_dP[ipair] =
fs->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
683 h_dP[ipair]->GetXaxis()->SetTitle(
"dP (GeV)");
685 sprintf(hname,
"h_dinvPt%s", pairs[ipair].c_str());
686 sprintf(htit,
"#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
688 h_dinvPt[ipair]->GetXaxis()->SetTitle(
"d(1/p_{T})");
689 sprintf(hname,
"h_mindR%s", pairs[ipair].c_str());
690 sprintf(htit,
"min(#Delta R) for %s objects", pairs[ipair].c_str());
692 h_mindR[ipair]->GetXaxis()->SetTitle(
"dR");
695 for (
int lvl=0; lvl<2; lvl++) {
696 sprintf(hname,
"h_dEtaL1%s", levels[lvl+1].c_str());
697 sprintf(htit,
"#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
700 sprintf(hname,
"h_dPhiL1%s", levels[lvl+1].c_str());
701 sprintf(htit,
"#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
704 sprintf(hname,
"h_dRL1%s", levels[lvl+1].c_str());
705 sprintf(htit,
"#Delta R for L1 and %s objects", levels[lvl+1].c_str());
706 h_dRL1[lvl] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 10.0);
710 int levmin = (
doL2L3 ? 0 : 10);
711 for (
int ilevel=levmin; ilevel<20; ilevel++) {
712 sprintf(hname,
"h_p%s", levels[ilevel].c_str());
713 sprintf(htit,
"p for %s objects", levels[ilevel].c_str());
714 h_p[ilevel] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
715 h_p[ilevel]->GetXaxis()->SetTitle(
"p (GeV)");
717 sprintf(hname,
"h_pt%s", levels[ilevel].c_str());
718 sprintf(htit,
"p_{T} for %s objects", levels[ilevel].c_str());
719 h_pt[ilevel] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
720 h_pt[ilevel]->GetXaxis()->SetTitle(
"p_{T} (GeV)");
722 sprintf(hname,
"h_eta%s", levels[ilevel].c_str());
723 sprintf(htit,
"#eta for %s objects", levels[ilevel].c_str());
724 h_eta[ilevel] =
fs->
make<TH1D>(hname, htit, 100, -5.0, 5.0);
725 h_eta[ilevel]->GetXaxis()->SetTitle(
"#eta");
727 sprintf(hname,
"h_phi%s", levels[ilevel].c_str());
728 sprintf(htit,
"#phi for %s objects", levels[ilevel].c_str());
729 h_phi[ilevel] =
fs->
make<TH1D>(hname, htit, 70, -3.5, 3.50);
730 h_phi[ilevel]->GetXaxis()->SetTitle(
"#phi");
735 for (
int icut=0; icut<2; icut++) {
736 sprintf(hname,
"h_eMip%s", cuts[icut].c_str());
737 sprintf(htit,
"eMip for %s tracks", cuts[icut].c_str());
738 h_eMip[icut] =
fs->
make<TH1D>(hname, htit, 200, 0.0, 10.0);
739 h_eMip[icut]->GetXaxis()->SetTitle(
"E_{Mip} (GeV)");
741 sprintf(hname,
"h_eMaxNearP%s", cuts[icut].c_str());
742 sprintf(htit,
"eMaxNearP for %s tracks", cuts[icut].c_str());
744 h_eMaxNearP[icut]->GetXaxis()->SetTitle(
"E_{MaxNearP} (GeV)");
746 sprintf(hname,
"h_eNeutIso%s", cuts[icut].c_str());
747 sprintf(htit,
"eNeutIso for %s ", cuts[icut].c_str());
749 h_eNeutIso[icut]->GetXaxis()->SetTitle(
"E_{NeutIso} (GeV)");
751 for (
int kcut=0; kcut<2; ++kcut) {
752 for (
int lim=0; lim<5; ++lim) {
753 sprintf(hname,
"h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
754 sprintf(htit,
"#eta for %s isolated MIP tracks (%4.1f < p < %5.1f Gev/c %s)", cuts[icut].c_str(),
pLimits[lim],
pLimits[lim+1], cuts2[kcut].c_str());
758 sprintf(hname,
"h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
759 sprintf(htit,
"#eta for %s charge isolated MIP tracks (%4.1f < p < %5.1f Gev/c %s)", cuts[icut].c_str(),
pLimits[lim],
pLimits[lim+1], cuts2[kcut].c_str());
766 std::string ecut1[3] = {
"all",
"HLTMatched",
"HLTNotMatched"};
768 int etac[48] = {-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,
769 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
770 for (
int icut=0; icut<6; icut++) {
772 int i1 = (icut>2 ? 1 : 0);
773 int i2 = icut - i1*3;
774 for (
int kcut=0; kcut<48; kcut++) {
775 for (
int lim=0; lim<5; ++lim) {
776 sprintf(hname,
"h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
777 sprintf(htit,
"HCAL energy for #eta=%d for %s tracks (p=%4.1f:%5.1f Gev) %s neutral isolation", etac[kcut], ecut1[i2].c_str(),
pLimits[lim],
pLimits[lim+1], ecut2[i1].c_str());
778 h_eHcal[lim][icut][kcut]=
fs->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
779 h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
780 sprintf(hname,
"h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
781 sprintf(htit,
"Calorimter energy for #eta=%d for %s tracks (p=%4.1f:%5.1f Gev) %s neutral isolation", etac[kcut], ecut1[i2].c_str(),
pLimits[lim],
pLimits[lim+1], ecut2[i1].c_str());
782 h_eCalo[lim][icut][kcut]=
fs->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
783 h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
791 unsigned int preL1, preHLT;
792 std::map<unsigned int, unsigned int>::iterator itr;
793 std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
804 preL1 = (itrPre->second).
first;
805 preHLT = (itrPre->second).
second;
807 std::cout << itr->first <<
" " << itr->second <<
" " << itrPre->first <<
" " << preL1 <<
" " << preHLT << std::endl;
809 g_Accepts->Fill(itr->first, itr->second);
810 g_PreL1->Fill(itr->first, preL1);
811 g_PreHLT->Fill(itr->first, preHLT);
812 g_Pre->Fill(itr->first, preL1*preHLT);
841 if (!trkCollection.
isValid()) {
843 std::cout <<
"trkCollection.isValid is false" << std::endl;
846 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
849 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
852 int nRH_eMipDR=0, nNearTRKs=0;
853 std::vector<bool> selFlags;
854 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
855 double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
856 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
858 if (
verbosity%10>0)
std::cout <<
"track no. " << nTracks <<
" p(): " << pTrack->
p() << std::endl;
860 if (pTrack->
p() > 20) {
862 pTrack->
pz(), pTrack->
p());
864 trkDetItr->pointHCAL, trkDetItr->pointECAL,
865 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
869 oneCutParameters.
maxDzPV = 100;
875 oneCutParameters.
maxDzPV = 100;
897 trkDetItr->pointHCAL, trkDetItr->pointECAL,
898 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
900 trkDetItr->pointHCAL, trkDetItr->pointECAL,
901 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
902 double e_inCone = e2 -
e1;
903 bool chgIsolFlag = (conehmaxNearP <
cutCharge);
904 bool mipFlag = (eMipDR <
cutMip);
906 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
908 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
909 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
912 <<
" ; ok: " << trkDetItr->okECAL <<
"/" << trkDetItr->okHCAL
913 <<
" ; chgiso: " << conehmaxNearP <<
"<" <<
cutCharge <<
"(" << chgIsolFlag <<
")" << std::endl;
916 if(chgIsolFlag && mipFlag && trkpropFlag) {
917 double distFromHotCell=-99.0;
918 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
920 std::vector<DetId> coneRecHitDetIds;
922 trkDetItr->pointECAL,
923 a_coneR, trkDetItr->directionHCAL,
924 nRecHitsCone, coneRecHitDetIds,
925 distFromHotCell, ietaHotCell, iphiHotCell,
934 t_TrkP ->push_back(pTrack->
p());
939 if (
verbosity%10>0)
std::cout <<
"Filling " <<
t_TrkP->size() <<
" tracks in TrkRestree out of " << nTracks << std::endl;
954 std::cout <<
"size of Seeding TripletLayers hb/he " << layershb->
size() <<
"/" << layershe->
size() << std::endl;
958 std::cout <<
"size of SiPixelRechits " << rechits->
size() << std::endl;;
960 double tHB=0.0, tHE=0.0;
962 int nSeedHB=0, nSeedHE=0;
971 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
972 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
973 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
979 double ptTriggered = -10;
980 double etaTriggered = -100;
981 double phiTriggered = -100;
982 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
983 if (l1tauobjref[
p]->
pt()>ptTriggered) {
984 ptTriggered = l1tauobjref[
p]->pt();
985 phiTriggered = l1tauobjref[
p]->phi();
986 etaTriggered = l1tauobjref[
p]->eta();
989 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
990 if (l1jetobjref[
p]->
pt()>ptTriggered) {
991 ptTriggered = l1jetobjref[
p]->pt();
992 phiTriggered = l1jetobjref[
p]->phi();
993 etaTriggered = l1jetobjref[
p]->eta();
996 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
997 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
998 ptTriggered=l1forjetobjref[
p]->pt();
999 phiTriggered=l1forjetobjref[
p]->phi();
1000 etaTriggered=l1forjetobjref[
p]->eta();
1004 reco::VertexCollection::const_iterator vitSel;
1007 for (reco::VertexCollection::const_iterator vit=pVertHE->begin(); vit!=pVertHE->end(); vit++) {
1015 if (minDZ==100) vtxMatch=
true;
1022 reco::VertexCollection::const_iterator vitSel;
1025 for (reco::VertexCollection::const_iterator vit=pVertHB->begin(); vit!=pVertHB->end(); vit++) {
1033 if (minDZ==100) vtxMatch=
true;
1037 if (R>1.2 && vtxMatch) nSeedHB++;
1045 <<
" nCand: " << nCandHB <<
"/" << nCandHE
1046 <<
"nSeed: " << nSeedHB <<
"/" << nSeedHE
1063 if (!trkCollection.
isValid()) {
1066 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1069 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1073 <<
" to be matched to something out of " 1074 << trkCaloDirections1.size() <<
" reco tracks" << std::endl;
1076 for (
unsigned int i=0;
i<L2cands->size();
i++) {
1079 double enIn = candref->energyIn();
1080 h_EnIn->Fill(candref->energyIn());
1081 h_EnOut->Fill(candref->energyOut());
1083 candref->track()->pz(),candref->track()->p());
1086 std::cout <<
"HLT Level Candidate eta/phi/pt/enIn:" 1087 << candref->track()->eta() <<
"/" << candref->track()->phi()
1088 <<
"/" << candref->track()->pt() <<
"/" << candref->energyIn()
1092 double mindR=999.9, mindP1=999.9, eMipDR=0.0;
1093 std::vector<bool> selFlags;
1095 double conehmaxNearP = 0, hCone=0;
1096 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
1097 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1099 pTrack->
pz(), pTrack->
p());
1100 double dr =
dR(v1,v2);
1101 double dp1 =
std::abs(1./v1.r() - 1./v2.r());
1109 int nRH_eMipDR=0, nNearTRKs=0;
1111 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1112 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1116 oneCutParameters.
maxDzPV = 100;
1122 oneCutParameters.
maxDzPV = 100;
1130 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1131 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1133 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1134 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1135 double e_inCone = e2 -
e1;
1136 bool chgIsolFlag = (conehmaxNearP <
cutCharge);
1137 bool mipFlag = (eMipDR <
cutMip);
1139 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1141 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1142 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1143 selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1144 selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1145 double distFromHotCell=-99.0;
1146 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1148 std::vector<DetId> coneRecHitDetIds;
1150 trkDetItr->pointECAL,
1151 a_coneR, trkDetItr->directionHCAL,
1152 nRecHitsCone, coneRecHitDetIds,
1153 distFromHotCell, ietaHotCell, iphiHotCell,
1172 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1177 for (
int j=0; j<3; j++) {
1179 for (
unsigned int k=0;
k<
vec[j].size();
k++) {
1181 if (
verbosity%10 > 0)
std::cout <<
"vec[" << j <<
"][" <<
k <<
"] pt " <<
vec[j][
k].pt() <<
" eta " <<
vec[j][
k].eta() <<
" phi " <<
vec[j][
k].phi() << std::endl;
1187 double deta, dphi,
dr;
1189 for (
int lvl=1; lvl<3; lvl++) {
1190 for (
unsigned int i=0;
i<
vec[lvl].size();
i++) {
1195 if (
verbosity%10 > 1)
std::cout <<
"lvl " <<lvl <<
" i " << i <<
" deta " << deta <<
" dphi " << dphi <<
" dR " << dr << std::endl;
1205 for (
unsigned int k=0;
k<
vec[2].size(); ++
k) {
1211 for (
unsigned int j=0; j<
vec[1].size(); j++) {
1233 std::cout <<
"Now Matching L3 track with reco: L3 Track (eta, phi) " 1234 <<
vec[2][
k].eta() <<
":" <<
vec[2][
k].phi() <<
" L2 Track " 1235 << mindRvec.eta() <<
":" << mindRvec.phi() <<
" dR " 1236 << mindR << std::endl;
1238 reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1239 if (trkCollection.
isValid()) {
1240 double mindP(9999.9);
1241 reco::TrackCollection::const_iterator trkItr;
1242 for (trkItr=trkCollection->begin();
1243 trkItr!=trkCollection->end(); trkItr++) {
1245 trkItr->pz(), trkItr->p());
1255 if ((
verbosity/10)%10>1 && deltaR<1.0) {
1256 std::cout <<
"reco track: pt " << v4.pt() <<
" eta " << v4.eta()
1257 <<
" phi " << v4.phi() <<
" DR " << deltaR
1264 std::cout <<
"Now Matching at Reco level in step 1 DR: " << mindR
1265 <<
":" << mindP <<
" eta:phi " << mindRvec.eta() <<
":" 1266 << mindRvec.phi() << std::endl;
1268 if (mindR < 0.03 && mindP > 0.1) {
1269 for (trkItr=trkCollection->begin();
1270 trkItr!=trkCollection->end(); trkItr++) {
1272 trkItr->pz(), trkItr->p());
1275 if (dp<mindP && deltaR<0.03) {
1284 std::cout <<
"Now Matching at Reco level in step 2 DR: " << mindR
1285 <<
":" << mindP <<
" eta:phi " << mindRvec.eta() <<
":" 1286 << mindRvec.phi() << std::endl;
1298 if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1304 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1306 if (trkCollection.
isValid()) {
1310 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1313 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1318 std::cout <<
"hit : detid(ieta,iphi) " << (
EBDetId)(
hit->
id()) <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1322 std::cout <<
"hit : detid(ieta,iphi) " << (
EEDetId)(
hit->
id()) <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1326 std::cout <<
"hit : detid(ieta,iphi) " <<
hit->
id() <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1330 unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1332 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1333 bool l3Track = (
std::find(goodTks.begin(),goodTks.end(),trkDetItr->trkItr) != goodTks.end());
1334 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1336 pTrack->
pz(), pTrack->
p());
1338 double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1339 if (trkDetItr->okHCAL) {
1341 ieta = detId.
ieta();
1343 for (
unsigned k=0;
k<
vec[0].size(); ++
k) {
1345 if (deltaR<mindR) mindR =
deltaR;
1348 if ((
verbosity/100)%10 > 1)
std::cout <<
"Track ECAL " << trkDetItr->okECAL <<
" HCAL " << trkDetItr->okHCAL <<
" Flag " << selectTk << std::endl;
1350 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1352 int nRH_eMipDR=0, nNearTRKs=0;
1354 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1355 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1357 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1358 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1360 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1361 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1364 double distFromHotCell=-99.0;
1365 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1367 std::vector<DetId> coneRecHitDetIds;
1369 trkDetItr->pointECAL,
1370 a_coneR, trkDetItr->directionHCAL,
1371 nRecHitsCone, coneRecHitDetIds,
1372 distFromHotCell, ietaHotCell, iphiHotCell,
1374 if (eMipDR<1.0) nselTk++;
1380 fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1));
1399 fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1));
1425 if (
verbosity%10>0)
std::cout <<
"Inside chgIsolation() with eta/phi Triggered: " << etaTriggered <<
"/" << phiTriggered << std::endl;
1427 std::vector<double>
maxP;
1429 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1432 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1440 std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1444 bool vtxMatch =
false;
1446 unsigned int ivSel =
recVtxs->size();
1448 for (
unsigned int iv = 0; iv <
recVtxs->size(); ++iv) {
1455 if (ivSel ==
recVtxs->size()) {
1465 std::pair<double,double> seedCooAtEC;
1470 VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1474 for (
unsigned int l=0;
l<VecSeedsatEC.size();
l++) {
1475 unsigned int iSeed = VecSeedsatEC[
l].first;
1479 for (
unsigned int j=0; j<VecSeedsatEC.size(); j++) {
1480 unsigned int iSurr = VecSeedsatEC[j].first;
1481 if (iSeed != iSurr) {
1487 unsigned int ivSel =
recVtxs->size();
1489 for (
unsigned int iv = 0; iv <
recVtxs->size(); ++iv) {
1498 double dist =
getDistInCM(VecSeedsatEC[i].
second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[j].second.first, VecSeedsatEC[j].second.second);
1510 double conehmaxNearP = -1;
bool selectTk=
false;
1511 double mindR=999.9;
int nTracks=0;
1513 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1515 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1517 pTrack->
pz(), pTrack->
p());
1518 double dr =
dR(v1,v2);
1535 std::vector<int> nGood(4,0);
1536 if (trkCollection.
isValid()) {
1540 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1547 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1549 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1551 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1554 double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1555 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
1556 if (l1tauobjref[
p]->
pt()>ptTriggered) {
1557 ptTriggered = l1tauobjref[
p]->pt();
1558 phiTriggered = l1tauobjref[
p]->phi();
1559 etaTriggered = l1tauobjref[
p]->eta();
1562 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
1563 if (l1jetobjref[
p]->
pt()>ptTriggered) {
1564 ptTriggered = l1jetobjref[
p]->pt();
1565 phiTriggered = l1jetobjref[
p]->phi();
1566 etaTriggered = l1jetobjref[
p]->eta();
1569 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
1570 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
1571 ptTriggered=l1forjetobjref[
p]->pt();
1572 phiTriggered=l1forjetobjref[
p]->phi();
1573 etaTriggered=l1forjetobjref[
p]->eta();
1576 double pTriggered = ptTriggered*cosh(etaTriggered);
1578 ptTriggered*
sin(phiTriggered),
1579 pTriggered*tanh(etaTriggered), pTriggered);
1581 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1583 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1584 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1586 pTrack->
pz(), pTrack->
p());
1588 double mindR =
dR(v4, pTrigger);
1590 if ((
verbosity/100)%10 > 1)
std::cout <<
"Track ECAL " << trkDetItr->okECAL <<
" HCAL " << trkDetItr->okHCAL <<
" Flag " << selectTk << std::endl;
1592 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
1593 int nRH_eMipDR(0), nNearTRKs(0);
1596 trkDetItr->pointHCAL,
1597 trkDetItr->pointECAL,
a_mipR,
1598 trkDetItr->directionECAL, nRH_eMipDR);
1603 if (conehmaxNearP < 2.0 && eMipDR<1.0) {
1604 if (pTrack->
p() >= 20 && pTrack->
p() < 30) {
1606 }
else if (pTrack->
p() >= 30 && pTrack->
p() < 40) {
1608 }
else if (pTrack->
p() >= 40 && pTrack->
p() < 60) {
1610 }
else if (pTrack->
p() >= 60 && pTrack->
p() < 100) {
1618 for (
unsigned int ii=0;
ii<nGood.size(); ++
ii)
1623 h_p[indx]->Fill(vec.r());
1624 h_pt[indx]->Fill(vec.pt());
1625 h_eta[indx]->Fill(vec.eta());
1626 h_phi[indx]->Fill(vec.phi());
1631 double dr =
dR(vec1,vec2);
1632 double deta =
dEta(vec1, vec2);
1633 double dphi =
dPhi(vec1, vec2);
1634 double dpt =
dPt(vec1, vec2);
1635 double dp =
dP(vec1, vec2);
1636 double dinvpt =
dinvPt(vec1, vec2);
1637 h_dEta[indx] ->Fill(deta);
1638 h_dPhi[indx] ->Fill(dphi);
1639 h_dPt[indx] ->Fill(dpt);
1640 h_dP[indx] ->Fill(dp);
1644 if (debug)
std::cout <<
"mindR for index " << indx <<
" is " << dr <<
" deta " << deta <<
" dphi " << dphi <<
" dpt " << dpt <<
" dinvpt " << dinvpt <<std::endl;
1649 h_eMip[indx] ->Fill(eMipDR);
1653 for (
int lim=0; lim<5; ++lim) {
1668 if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1669 else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1670 if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1671 for (
int lim=0; lim<5; ++lim) {
1674 h_eCalo[lim][indx][
kk] ->Fill(hCone+eMipDR);
1681 return (vec1.eta()-vec2.eta());
1686 double phi1 = vec1.phi();
1687 if (phi1 < 0) phi1 += 2.0*
M_PI;
1688 double phi2 = vec2.phi();
1689 if (phi2 < 0) phi2 += 2.0*
M_PI;
1690 double dphi = phi1-phi2;
1692 else if (dphi < -
M_PI) dphi += 2.*
M_PI;
1697 double deta =
dEta(vec1,vec2);
1698 double dphi =
dPhi(vec1,vec2);
1699 return std::sqrt(deta*deta + dphi*dphi);
1703 return (vec1.pt()-vec2.pt());
1707 return (
std::abs(vec1.r()-vec2.r()));
1711 return ((1/vec1.pt())-(1/vec2.pt()));
1715 double eta(0),
phi(0), ptmax(0);
1716 for (
unsigned int k=0;
k<
vec[0].size(); ++
k) {
1720 ptmax =
vec[0][
k].pt();
1721 }
else if (
vec[0][
k].
pt() > ptmax) {
1724 ptmax =
vec[0][
k].pt();
1727 return std::pair<double,double>(
eta,
phi);
1738 double Rcurv = 9999999;
1741 double ecDist =
zEE_;
1742 double ecRad =
rEB_;
1743 double theta = 2*atan(
exp(-etaIP));
1746 if (fabs(etaIP)<1.479) {
1747 if ((0.5*ecRad/Rcurv)>1) {
1751 deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
1752 double alpha1 = 2*asin(0.5*ecRad/Rcurv);
1753 double z = ecRad/
tan(theta);
1754 if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ;
1755 else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ;
1756 double zAbs=fabs(zNew);
1758 etaEC = -
log(
tan(0.5*atan(ecRad/zAbs)));
1759 deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
1762 zAbs = (fabs(etaIP)/etaIP)*ecDist;
1763 double Zflight = fabs(zAbs-vtxZ);
1764 double alpha = (Zflight*ecRad)/(z*Rcurv);
1765 double Rec = 2*Rcurv*
sin(alpha/2);
1766 deltaPhi =-charge*alpha/2;
1767 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
1771 zNew = (fabs(etaIP)/etaIP)*ecDist;
1772 double Zflight = fabs(zNew-vtxZ);
1773 double Rvirt = fabs(Zflight*
tan(theta));
1774 double Rec = 2*Rcurv*
sin(Rvirt/(2*Rcurv));
1775 deltaPhi =-(
charge)*(Rvirt/(2*Rcurv));
1776 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
1779 if (zNew<0) etaEC=-etaEC;
1785 std::pair<double,double> retVal(etaEC,phiEC);
1791 double theta1=2*atan(
exp(-eta1));
1792 double theta2=2*atan(
exp(-eta2));
1793 if (fabs(eta1)<1.479) Rec=
rEB_;
1794 else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=
tan(theta1)*
zEE_;
1799 if (angle<0.5*
M_PI)
return fabs((Rec/
sin(theta1))*
tan(angle));
unsigned int size() const
number of trigger paths in trigger table
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
EventNumber_t event() const
std::vector< bool > * t_NFTrkPVFlag
std::vector< double > * t_PixTrkcandPhi
std::vector< double > * t_PixTrkcandP
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
const unsigned int nTracks(const reco::Vertex &sv)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
std::vector< double > * t_NFTrkMinDR
The single EDProduct to be saved for each event (AOD case)
trigger::size_type sizeFilters() const
void chgIsolation(double &etaTriggered, double &phiTriggered, edm::Handle< reco::TrackCollection > &trkCollection, const edm::Event &theEvent)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::vector< bool > * t_NFTrkMissFlag
std::vector< reco::TrackRef > pixelTrackRefsHE
edm::EDGetTokenT< LumiDetails > tok_lumi
std::vector< bool > * t_PixTrkcandselTk
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackQuality
track quality
void studyIsolation(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
#define DEFINE_FWK_MODULE(type)
std::vector< double > * t_NFTrkcandEta
std::vector< double > * t_NFcandP
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle
std::string theTrackQuality
Sin< T >::type sin(const T &t)
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
const Keys & filterKeys(trigger::size_type index) const
Global3DPoint GlobalPoint
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
std::vector< reco::TrackRef > pixelTrackRefsHB
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
std::vector< math::XYZTLorentzVector > vec[3]
std::vector< int > * t_nPixSeed
std::vector< double > * t_TrkhCone
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_pixtk_
std::vector< bool > * t_NFTrkqltyFlag
T * make(const Args &...args) const
make new ROOT object
std::pair< double, double > GetEtaPhiAtEcal(double etaIP, double phiIP, double pT, int charge, double vtxZ)
std::vector< double > * t_PixTrkcandMaxP
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
double px() const
x coordinate of momentum vector
std::vector< bool > * t_NFTrkselTkFlag
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double dP(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
std::vector< double > * t_PixcandP
std::vector< std::string > trigNames
std::pair< double, double > etaPhiTrigger()
Strings const & triggerNames() const
float lumiValue(AlgoType algo, unsigned int bx) const
std::vector< bool > * t_NFTrkMipFlag
void pushMipCutTreeVecs(math::XYZTLorentzVector &NFcand, math::XYZTLorentzVector &Trkcand, double &EmipNFcand, double &EmipTrkcand, double &mindR, double &mindP1, std::vector< bool > &Flags, double hCone)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
Single trigger physics object (e.g., an isolated muon)
U second(std::pair< T, U > const &p)
std::vector< double > * t_NFTrkMinDP1
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::InputTag PixcandTag_
void studyMipCut(edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
HLTPrescaleProvider hltPrescaleProvider_
double dinvPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
edm::ESHandle< CaloGeometry > pG
void studyTrigger(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
void fillHist(int, math::XYZTLorentzVector &)
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< double > * t_NFTrkcandP
edm::Handle< HBHERecHitCollection > hbhe
std::vector< bool > * t_TrkNuIsolFlag
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
std::vector< bool > * t_TrkPVFlag
const TriggerObjectCollection & getObjects() const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< double > * t_ECone
std::vector< double > vec1
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
void fillEnergy(int, int, double, double, math::XYZTLorentzVector &)
edm::Handle< reco::VertexCollection > recVtxs
Cos< T >::type cos(const T &t)
std::vector< bool > * t_NFTrkChgIsoFlag
int ieta() const
get the cell ieta
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
std::vector< double > * t_TrkP
Tan< T >::type tan(const T &t)
std::pair< T, T > etaphi(T x, T y, T z)
Abs< T >::type abs(const T &t)
std::vector< double > * t_NFcandEta
std::vector< double > * t_timeL2Prod
double eCone_ecal(const CaloGeometry *geo, edm::Handle< T > &barrelhits, edm::Handle< T > &endcaphits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
LuminosityBlock const & getLuminosityBlock() const
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
static std::string const triggerResults
IsoTrig(const edm::ParameterSet &)
std::vector< double > * t_PixcandPt
std::map< unsigned int, const std::pair< int, int > > TrigPreList
std::vector< double > * t_NFcandEmip
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
void studyTiming(const edm::Event &theEvent)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
void clearChgIsolnTreeVectors()
std::vector< bool > * t_NFTrkPropFlag
double pz() const
z coordinate of momentum vector
std::vector< double > * t_NFTrkcandPhi
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
const edm::InputTag filterTag(trigger::size_type index) const
std::vector< bool > * t_TrkMissFlag
double getDistInCM(double eta1, double phi1, double eta2, double phi2)
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
std::vector< int > * t_nPixCand
static TrackQuality qualityByName(const std::string &name)
void StudyTrkEbyP(edm::Handle< reco::TrackCollection > &trkCollection)
std::vector< double > * t_NFTrkcandPt
T const * product() const
virtual void endRun(edm::Run const &, edm::EventSetup const &)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
edm::Handle< reco::BeamSpot > beamSpotH
std::vector< double > * t_PixTrkcandPt
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
std::vector< double > * t_NFcandPt
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
spr::trackSelectionParameters selectionParameters
std::map< unsigned int, unsigned int > TrigList
std::vector< bool > * t_TrkqltyFlag
HLTConfigProvider const & hltConfigProvider() const
TH1D * h_etaMipTracks[5][2][2]
std::vector< std::vector< double > > * t_PixcandMaxP
std::vector< double > * t_NFTrkcandEmip
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
std::vector< edm::InputTag > pixelTracksSources_
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerhb
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
void clearMipCutTreeVectors()
std::vector< double > * t_PixcandEta
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
static int position[264][3]
reco::TrackBase::TrackQuality minQuality
StreamID streamID() const
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerhe
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
double dPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
std::vector< bool > * t_NFTrkNeuIsoFlag
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle
const Point & position() const
position
std::vector< double > * t_PixcandPhi
std::vector< double > * t_PixTrkcandEta
edm::Service< TFileService > fs
std::vector< int > * t_nGoodTk
edm::ESHandle< MagneticField > bFieldH
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
double queryModuleTimeByLabel(edm::StreamID, std::string const &module) const
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
void getGoodTracks(const edm::Event &, edm::Handle< reco::TrackCollection > &)
TH1D * h_etaCalibTracks[5][2][2]
unsigned short size() const
Get the number of SeedingLayerSets.
std::vector< bool > * t_TrkselTkFlag
T const * product() const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
void fillCuts(int, double, double, double, math::XYZTLorentzVector &, int, bool)
double py() const
y coordinate of momentum vector
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
std::vector< double > pixelIsolationConeSizeAtEC_
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, bool useRaw=false, bool debug=false)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
void pushChgIsolnTreeVecs(math::XYZTLorentzVector &Pixcand, math::XYZTLorentzVector &Trkcand, std::vector< double > &PixMaxP, double &TrkMaxP, bool &selTk)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
std::vector< double > * t_NFcandPhi