29 changed(
false), t_timeL2Prod(0), t_nPixCand(0), t_nPixSeed(0), t_nGoodTk(0),
30 t_TrkhCone(0), t_TrkP(0), t_TrkselTkFlag(0), t_TrkqltyFlag(0),
31 t_TrkMissFlag(0), t_TrkPVFlag(0), t_TrkNuIsolFlag(0),
32 t_PixcandP(0), t_PixcandPt(0), t_PixcandEta(0), t_PixcandPhi(0),
33 t_PixcandMaxP(0), t_PixTrkcandP(0), t_PixTrkcandPt(0), t_PixTrkcandEta(0),
34 t_PixTrkcandPhi(0), t_PixTrkcandMaxP(0), t_PixTrkcandselTk(0),
35 t_NFcandP(0), t_NFcandPt(0), t_NFcandEta(0), t_NFcandPhi(0),
36 t_NFcandEmip(0), t_NFTrkcandP(0), t_NFTrkcandPt(0), t_NFTrkcandEta(0),
37 t_NFTrkcandPhi(0), t_NFTrkcandEmip(0), t_NFTrkMinDR(0), t_NFTrkMinDP1(0),
38 t_NFTrkselTkFlag(0), t_NFTrkqltyFlag(0), t_NFTrkMissFlag(0),
39 t_NFTrkPVFlag(0), t_NFTrkPropFlag(0), t_NFTrkChgIsoFlag(0),
40 t_NFTrkNeuIsoFlag(0), t_NFTrkMipFlag(0), t_ECone(0) {
87 edm::InputTag triggerEvent_ (
"hltTriggerSummaryAOD",
"",processName);
88 tok_trigEvt = consumes<trigger::TriggerEvent>(triggerEvent_);
89 edm::InputTag theTriggerResultsLabel (
"TriggerResults",
"",processName);
90 tok_trigRes = consumes<edm::TriggerResults>(theTriggerResultsLabel);
109 for (
unsigned int k=0;
k<pixelTracksSources_.size(); ++
k) {
112 tok_pixtks_.push_back(consumes<reco::TrackCollection>(pixelTracksSources_[
k]));
117 std::cout <<
"Parameters read from config file \n"
119 <<
"\t theTrackQuality " << theTrackQuality
137 std::cout <<
"Charge Isolation parameters:"
138 <<
"\t minPTrackValue " << minPTrackValue_
139 <<
"\t vtxCutSeed " << vtxCutSeed_
140 <<
"\t vtxCutIsol " << vtxCutIsol_
141 <<
"\t tauUnbiasCone " << tauUnbiasCone_
142 <<
"\t prelimCone " << prelimCone_
143 <<
"\t pixelIsolationConeSizeAtEC";
144 for (
unsigned int k=0;
k<pixelIsolationConeSizeAtEC_.size(); ++
k)
145 std::cout <<
" " << pixelIsolationConeSizeAtEC_[
k];
149 double pl[] = {20,30,40,60,80,120};
213 if (
verbosity%10 > 0)
std::cout <<
"Event starts====================================" << std::endl;
215 int RunNo = iEvent.
id().
run();
226 if (!triggerEventHandle.
isValid()) {
227 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product hltTriggerSummaryAOD";
230 triggerEvent = *(triggerEventHandle.
product());
247 if (
recVtxs->size()>0 && !((*recVtxs)[0].isFake())) {
265 for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
274 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
276 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
277 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
279 for(
int i=0;
i<7;
i++) {
296 if (!triggerResults.isValid()) {
297 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product triggerResults";
301 std::vector<std::string>
modules;
302 h_nHLT->Fill(triggerResults->size());
305 const std::vector<std::string> & triggerNames_ = triggerNames.
triggerNames();
308 std::cout <<
"number of HLTs " << triggerNames_.size() << std::endl;
310 int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
311 for (
unsigned int i=0;
i<triggerResults->size();
i++) {
319 if (
verbosity%10 > 0)
std::cout <<
"trigger that i want " << triggerNames_[
i] <<
" accept " << triggerResults->accept(i) << std::endl;
321 hlt = triggerResults->accept(i);
333 prescale = preL1*preHLT;
336 std::cout << triggerNames_[
i] <<
" accept " <<
hlt <<
" preL1 "
337 << preL1 <<
" preHLT " << preHLT << std::endl;
339 for (
int iv=0; iv<3; ++iv)
vec[iv].
clear();
343 TrigList.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
347 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
349 std::vector<int>
Keys;
352 for (
unsigned int imodule=0; imodule<moduleLabels.size();
354 if (label.find(moduleLabels[imodule]) != std::string::npos) {
358 for (
unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
359 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
362 if (label.find(
"L2Filter") != std::string::npos) {
363 vec[1].push_back(v4);
364 }
else if (label.find(
"L3Filter") != std::string::npos) {
365 vec[2].push_back(v4);
367 vec[0].push_back(v4);
372 std::cout <<
"key " << ifiltrKey <<
" : pt " << TO.
pt() <<
" eta " << TO.
eta() <<
" phi " << TO.
phi() <<
" mass " << TO.
mass() <<
" Id " << TO.
id() << std::endl;
378 std::vector<reco::TrackCollection::const_iterator> goodTks;
384 reco::TrackCollection::const_iterator trkItr;
385 for (trkItr=trkCollection->begin();
386 trkItr!=trkCollection->end(); trkItr++)
387 goodTks.push_back(trkItr);
423 std::cout <<
"New trigger menu found !!!" << std::endl;
425 for (
unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
427 std::cout << triggerNames_[itrig] <<
" " << triggerindx <<
" ";
428 if (triggerindx >=
n)
429 std::cout <<
"does not exist in the current menu" << std::endl;
481 std::vector<double> &PixMaxP,
double &TrkMaxP,
499 double &EmipNFcand,
double &EmipTrkcand,
500 double &mindR,
double &mindP1,
501 std::vector<bool> &Flags,
double hCone) {
526 char hname[100], htit[100];
528 "Reco",
"RecoMatch",
"RecoNoMatch",
529 "L2Match",
"L2NoMatch",
"L3Match",
"L3NoMatch",
530 "HLTTrk",
"HLTGoodTrk",
"HLTIsoTrk",
"HLTMip",
"HLTSelect",
531 "nonHLTTrk",
"nonHLTGoodTrk",
"nonHLTIsoTrk",
"nonHLTMip",
"nonHLTSelect"};
539 TimingTree->Branch(
"t_timeL2Prod",
"std::vector<double>", &t_timeL2Prod);
540 TimingTree->Branch(
"t_nPixCand",
"std::vector<int>", &t_nPixCand);
541 TimingTree->Branch(
"t_nPixSeed",
"std::vector<int>", &t_nPixSeed);
542 TimingTree->Branch(
"t_nGoodTk",
"std::vector<int>", &t_nGoodTk);
547 t_TrkP =
new std::vector<double>();
554 TrkResTree->Branch(
"t_TrkhCone",
"std::vector<double>", &t_TrkhCone);
555 TrkResTree->Branch(
"t_TrkP",
"std::vector<double>", &t_TrkP);
556 TrkResTree->Branch(
"t_TrkselTkFlag",
"std::vector<bool>", &t_TrkselTkFlag);
557 TrkResTree->Branch(
"t_TrkqltyFlag",
"std::vector<bool>", &t_TrkqltyFlag);
558 TrkResTree->Branch(
"t_TrkMissFlag",
"std::vector<bool>", &t_TrkMissFlag);
559 TrkResTree->Branch(
"t_TrkPVFlag",
"std::vector<bool>", &t_TrkPVFlag);
560 TrkResTree->Branch(
"t_TrkNuIsolFlag",
"std::vector<bool>", &t_TrkNuIsolFlag);
576 ChgIsolnTree->Branch(
"t_PixcandP",
"std::vector<double>", &t_PixcandP);
577 ChgIsolnTree->Branch(
"t_PixcandPt",
"std::vector<double>", &t_PixcandPt);
578 ChgIsolnTree->Branch(
"t_PixcandEta",
"std::vector<double>", &t_PixcandEta);
579 ChgIsolnTree->Branch(
"t_PixcandPhi",
"std::vector<double>", &t_PixcandPhi);
580 ChgIsolnTree->Branch(
"t_PixcandMaxP",
"std::vector<std::vector<double> >", &t_PixcandMaxP);
581 ChgIsolnTree->Branch(
"t_PixTrkcandP",
"std::vector<double>", &t_PixTrkcandP);
582 ChgIsolnTree->Branch(
"t_PixTrkcandPt",
"std::vector<double>", &t_PixTrkcandPt );
583 ChgIsolnTree->Branch(
"t_PixTrkcandEta",
"std::vector<double>", &t_PixTrkcandEta );
584 ChgIsolnTree->Branch(
"t_PixTrkcandPhi",
"std::vector<double>", &t_PixTrkcandPhi );
585 ChgIsolnTree->Branch(
"t_PixTrkcandMaxP",
"std::vector<double>", &t_PixTrkcandMaxP);
586 ChgIsolnTree->Branch(
"t_PixTrkcandselTk",
"std::vector<bool>", &t_PixTrkcandselTk);
610 t_ECone =
new std::vector<double>();
612 MipCutTree->Branch(
"t_NFcandP",
"std::vector<double>", &t_NFcandP);
613 MipCutTree->Branch(
"t_NFcandPt",
"std::vector<double>", &t_NFcandPt);
614 MipCutTree->Branch(
"t_NFcandEta",
"std::vector<double>", &t_NFcandEta);
615 MipCutTree->Branch(
"t_NFcandPhi",
"std::vector<double>", &t_NFcandPhi);
616 MipCutTree->Branch(
"t_NFcandEmip",
"std::vector<double>", &t_NFcandEmip);
617 MipCutTree->Branch(
"t_NFTrkcandP",
"std::vector<double>", &t_NFTrkcandP);
618 MipCutTree->Branch(
"t_NFTrkcandPt",
"std::vector<double>", &t_NFTrkcandPt );
619 MipCutTree->Branch(
"t_NFTrkcandEta",
"std::vector<double>", &t_NFTrkcandEta );
620 MipCutTree->Branch(
"t_NFTrkcandPhi",
"std::vector<double>", &t_NFTrkcandPhi );
621 MipCutTree->Branch(
"t_NFTrkcandEmip",
"std::vector<double>", &t_NFTrkcandEmip);
622 MipCutTree->Branch(
"t_NFTrkMinDR",
"std::vector<double>", &t_NFTrkMinDR);
623 MipCutTree->Branch(
"t_NFTrkMinDP1",
"std::vector<double>", &t_NFTrkMinDP1);
624 MipCutTree->Branch(
"t_NFTrkselTkFlag",
"std::vector<bool>", &t_NFTrkselTkFlag);
625 MipCutTree->Branch(
"t_NFTrkqltyFlag",
"std::vector<bool>", &t_NFTrkqltyFlag);
626 MipCutTree->Branch(
"t_NFTrkMissFlag",
"std::vector<bool>", &t_NFTrkMissFlag);
627 MipCutTree->Branch(
"t_NFTrkPVFlag",
"std::vector<bool>", &t_NFTrkPVFlag);
628 MipCutTree->Branch(
"t_NFTrkPropFlag",
"std::vector<bool>", &t_NFTrkPropFlag);
629 MipCutTree->Branch(
"t_NFTrkChgIsoFlag",
"std::vector<bool>", &t_NFTrkChgIsoFlag);
630 MipCutTree->Branch(
"t_NFTrkNeuIsoFlag",
"std::vector<bool>", &t_NFTrkNeuIsoFlag);
631 MipCutTree->Branch(
"t_NFTrkMipFlag",
"std::vector<bool>", &t_NFTrkMipFlag);
632 MipCutTree->Branch(
"t_ECone",
"std::vector<double>", &t_ECone);
635 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
636 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
637 for(
int i=0;
i<7;
i++) {
638 h_Filters->GetXaxis()->SetBinLabel(
i+1, FilterNames[
i].c_str());
641 h_nHLT =
fs->
make<TH1I>(
"h_nHLT" ,
"Size of trigger Names", 1000, 1, 1000);
642 h_HLT =
fs->
make<TH1I>(
"h_HLT" ,
"HLT accept", 3, -1, 2);
643 h_PreL1 =
fs->
make<TH1I>(
"h_PreL1",
"L1 Prescale", 500, 0, 500);
645 h_Pre =
fs->
make<TH1I>(
"h_Pre",
"Prescale", 3000, 0, 3000);
647 h_PreL1wt =
fs->
make<TH1D>(
"h_PreL1wt",
"Weighted L1 Prescale", 500, 0, 500);
648 h_PreHLTwt =
fs->
make<TH1D>(
"h_PreHLTwt",
"Weighted HLT Prescale", 500, 0, 100);
651 h_EnIn =
fs->
make<TH1D>(
"h_EnInEcal",
"EnergyIn Ecal", 200, 0.0, 20.0);
652 h_EnOut =
fs->
make<TH1D>(
"h_EnOutEcal",
"EnergyOut Ecal", 200, 0.0, 20.0);
653 h_MipEnMatch =
fs->
make<TH2D>(
"h_MipEnMatch",
"MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
654 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);
657 h_nL3Objs =
fs->
make<TH1I>(
"h_nL3Objs",
"Number of L3 objects", 10, 0, 10);
659 std::string pairs[9] = {
"L2L3",
"L2L3Match",
"L2L3NoMatch",
"L3Reco",
"L3RecoMatch",
"L3RecoNoMatch",
"NewFilterReco",
"NewFilterRecoMatch",
"NewFilterRecoNoMatch"};
660 for (
int ipair=0; ipair<9; ipair++) {
661 sprintf(hname,
"h_dEta%s", pairs[ipair].c_str());
662 sprintf(htit,
"#Delta#eta for %s", pairs[ipair].c_str());
663 h_dEta[ipair] =
fs->
make<TH1D>(hname, htit, 200, -10.0, 10.0);
664 h_dEta[ipair]->GetXaxis()->SetTitle(
"d#eta");
666 sprintf(hname,
"h_dPhi%s", pairs[ipair].c_str());
667 sprintf(htit,
"#Delta#phi for %s", pairs[ipair].c_str());
668 h_dPhi[ipair] =
fs->
make<TH1D>(hname, htit, 140, -7.0, 7.0);
669 h_dPhi[ipair]->GetXaxis()->SetTitle(
"d#phi");
671 sprintf(hname,
"h_dPt%s", pairs[ipair].c_str());
672 sprintf(htit,
"#Delta dp_{T} for %s objects", pairs[ipair].c_str());
673 h_dPt[ipair] =
fs->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
674 h_dPt[ipair]->GetXaxis()->SetTitle(
"dp_{T} (GeV)");
676 sprintf(hname,
"h_dP%s", pairs[ipair].c_str());
677 sprintf(htit,
"#Delta p for %s objects", pairs[ipair].c_str());
678 h_dP[ipair] =
fs->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
679 h_dP[ipair]->GetXaxis()->SetTitle(
"dP (GeV)");
681 sprintf(hname,
"h_dinvPt%s", pairs[ipair].c_str());
682 sprintf(htit,
"#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
684 h_dinvPt[ipair]->GetXaxis()->SetTitle(
"d(1/p_{T})");
685 sprintf(hname,
"h_mindR%s", pairs[ipair].c_str());
686 sprintf(htit,
"min(#Delta R) for %s objects", pairs[ipair].c_str());
688 h_mindR[ipair]->GetXaxis()->SetTitle(
"dR");
691 for (
int lvl=0; lvl<2; lvl++) {
692 sprintf(hname,
"h_dEtaL1%s", levels[lvl+1].c_str());
693 sprintf(htit,
"#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
696 sprintf(hname,
"h_dPhiL1%s", levels[lvl+1].c_str());
697 sprintf(htit,
"#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
700 sprintf(hname,
"h_dRL1%s", levels[lvl+1].c_str());
701 sprintf(htit,
"#Delta R for L1 and %s objects", levels[lvl+1].c_str());
702 h_dRL1[lvl] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 10.0);
706 int levmin = (
doL2L3 ? 0 : 10);
707 for (
int ilevel=levmin; ilevel<20; ilevel++) {
708 sprintf(hname,
"h_p%s", levels[ilevel].c_str());
709 sprintf(htit,
"p for %s objects", levels[ilevel].c_str());
710 h_p[ilevel] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
711 h_p[ilevel]->GetXaxis()->SetTitle(
"p (GeV)");
713 sprintf(hname,
"h_pt%s", levels[ilevel].c_str());
714 sprintf(htit,
"p_{T} for %s objects", levels[ilevel].c_str());
715 h_pt[ilevel] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
716 h_pt[ilevel]->GetXaxis()->SetTitle(
"p_{T} (GeV)");
718 sprintf(hname,
"h_eta%s", levels[ilevel].c_str());
719 sprintf(htit,
"#eta for %s objects", levels[ilevel].c_str());
720 h_eta[ilevel] =
fs->
make<TH1D>(hname, htit, 100, -5.0, 5.0);
721 h_eta[ilevel]->GetXaxis()->SetTitle(
"#eta");
723 sprintf(hname,
"h_phi%s", levels[ilevel].c_str());
724 sprintf(htit,
"#phi for %s objects", levels[ilevel].c_str());
725 h_phi[ilevel] =
fs->
make<TH1D>(hname, htit, 70, -3.5, 3.50);
726 h_phi[ilevel]->GetXaxis()->SetTitle(
"#phi");
731 for (
int icut=0; icut<2; icut++) {
732 sprintf(hname,
"h_eMip%s", cuts[icut].c_str());
733 sprintf(htit,
"eMip for %s tracks", cuts[icut].c_str());
734 h_eMip[icut] =
fs->
make<TH1D>(hname, htit, 200, 0.0, 10.0);
735 h_eMip[icut]->GetXaxis()->SetTitle(
"E_{Mip} (GeV)");
737 sprintf(hname,
"h_eMaxNearP%s", cuts[icut].c_str());
738 sprintf(htit,
"eMaxNearP for %s tracks", cuts[icut].c_str());
740 h_eMaxNearP[icut]->GetXaxis()->SetTitle(
"E_{MaxNearP} (GeV)");
742 sprintf(hname,
"h_eNeutIso%s", cuts[icut].c_str());
743 sprintf(htit,
"eNeutIso for %s ", cuts[icut].c_str());
745 h_eNeutIso[icut]->GetXaxis()->SetTitle(
"E_{NeutIso} (GeV)");
747 for (
int kcut=0; kcut<2; ++kcut) {
748 for (
int lim=0; lim<5; ++lim) {
749 sprintf(hname,
"h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
750 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());
754 sprintf(hname,
"h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
755 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());
762 std::string ecut1[3] = {
"all",
"HLTMatched",
"HLTNotMatched"};
764 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,
765 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
766 for (
int icut=0; icut<6; icut++) {
768 int i1 = (icut>2 ? 1 : 0);
769 int i2 = icut - i1*3;
770 for (
int kcut=0; kcut<48; kcut++) {
771 for (
int lim=0; lim<5; ++lim) {
772 sprintf(hname,
"h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
773 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());
774 h_eHcal[lim][icut][kcut]=
fs->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
775 h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
776 sprintf(hname,
"h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
777 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());
778 h_eCalo[lim][icut][kcut]=
fs->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
779 h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
787 unsigned int preL1, preHLT;
788 std::map<unsigned int, unsigned int>::iterator itr;
789 std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
800 preL1 = (itrPre->second).
first;
801 preHLT = (itrPre->second).
second;
803 std::cout << itr->first <<
" " << itr->second <<
" " << itrPre->first <<
" " << preL1 <<
" " << preHLT << std::endl;
805 g_Accepts->Fill(itr->first, itr->second);
806 g_PreL1->Fill(itr->first, preL1);
807 g_PreHLT->Fill(itr->first, preHLT);
808 g_Pre->Fill(itr->first, preL1*preHLT);
837 if (!trkCollection.
isValid()) {
839 std::cout <<
"trkCollection.isValid is false" << std::endl;
842 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
845 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
847 unsigned int nTracks=0;
848 int nRH_eMipDR=0, nNearTRKs=0;
849 std::vector<bool> selFlags;
850 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
851 double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
852 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
854 if (
verbosity%10>0)
std::cout <<
"track no. " << nTracks <<
" p(): " << pTrack->
p() << std::endl;
856 if (pTrack->
p() > 20) {
858 pTrack->
pz(), pTrack->
p());
860 trkDetItr->pointHCAL, trkDetItr->pointECAL,
861 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
865 oneCutParameters.
maxDzPV = 100;
871 oneCutParameters.
maxDzPV = 100;
893 trkDetItr->pointHCAL, trkDetItr->pointECAL,
894 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
896 trkDetItr->pointHCAL, trkDetItr->pointECAL,
897 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
898 double e_inCone = e2 - e1;
899 bool chgIsolFlag = (conehmaxNearP <
cutCharge);
900 bool mipFlag = (eMipDR <
cutMip);
902 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
904 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
905 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
908 <<
" ; ok: " << trkDetItr->okECAL <<
"/" << trkDetItr->okHCAL
909 <<
" ; chgiso: " << conehmaxNearP <<
"<" <<
cutCharge <<
"(" << chgIsolFlag <<
")" << std::endl;
912 if(chgIsolFlag && mipFlag && trkpropFlag) {
913 double distFromHotCell=-99.0;
914 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
916 std::vector<DetId> coneRecHitDetIds;
918 trkDetItr->pointECAL,
919 a_coneR, trkDetItr->directionHCAL,
920 nRecHitsCone, coneRecHitDetIds,
921 distFromHotCell, ietaHotCell, iphiHotCell,
930 t_TrkP ->push_back(pTrack->
p());
935 if (
verbosity%10>0)
std::cout <<
"Filling " <<
t_TrkP->size() <<
" tracks in TrkRestree out of " << nTracks << std::endl;
950 std::cout <<
"size of Seeding TripletLayers hb/he " << layershb->
size() <<
"/" << layershe->
size() << std::endl;
954 std::cout <<
"size of SiPixelRechits " << rechits->
size() << std::endl;;
956 double tHB=0.0, tHE=0.0;
958 int nSeedHB=0, nSeedHE=0;
967 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
968 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
969 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
975 double ptTriggered = -10;
976 double etaTriggered = -100;
977 double phiTriggered = -100;
978 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
979 if (l1tauobjref[
p]->
pt()>ptTriggered) {
980 ptTriggered = l1tauobjref[
p]->pt();
981 phiTriggered = l1tauobjref[
p]->phi();
982 etaTriggered = l1tauobjref[
p]->eta();
985 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
986 if (l1jetobjref[
p]->
pt()>ptTriggered) {
987 ptTriggered = l1jetobjref[
p]->pt();
988 phiTriggered = l1jetobjref[
p]->phi();
989 etaTriggered = l1jetobjref[
p]->eta();
992 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
993 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
994 ptTriggered=l1forjetobjref[
p]->pt();
995 phiTriggered=l1forjetobjref[
p]->phi();
996 etaTriggered=l1forjetobjref[
p]->eta();
1000 reco::VertexCollection::const_iterator vitSel;
1003 for (reco::VertexCollection::const_iterator vit=pVertHE->begin(); vit!=pVertHE->end(); vit++) {
1011 if (minDZ==100) vtxMatch=
true;
1018 reco::VertexCollection::const_iterator vitSel;
1021 for (reco::VertexCollection::const_iterator vit=pVertHB->begin(); vit!=pVertHB->end(); vit++) {
1028 if (minDZ!=100&&fabs(
pixelTrackRefsHB[iS]->dxy(vitSel->position()))<101.0) vtxMatch=
true;
1029 if (minDZ==100) vtxMatch=
true;
1033 if (R>1.2 && vtxMatch) nSeedHB++;
1041 <<
" nCand: " << nCandHB <<
"/" << nCandHE
1042 <<
"nSeed: " << nSeedHB <<
"/" << nSeedHE
1059 if (!trkCollection.
isValid()) {
1062 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1065 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1069 <<
" to be matched to something out of "
1070 << trkCaloDirections1.size() <<
" reco tracks" << std::endl;
1072 for (
unsigned int i=0;
i<L2cands->size();
i++) {
1075 double enIn = candref->energyIn();
1076 h_EnIn->Fill(candref->energyIn());
1077 h_EnOut->Fill(candref->energyOut());
1079 candref->track()->pz(),candref->track()->p());
1082 std::cout <<
"HLT Level Candidate eta/phi/pt/enIn:"
1083 << candref->track()->eta() <<
"/" << candref->track()->phi()
1084 <<
"/" << candref->track()->pt() <<
"/" << candref->energyIn()
1088 double mindR=999.9, mindP1=999.9, eMipDR=0.0;
1089 std::vector<bool> selFlags;
1090 unsigned int nTracks=0;
1091 double conehmaxNearP = 0, hCone=0;
1092 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
1093 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1095 pTrack->
pz(), pTrack->
p());
1096 double dr =
dR(v1,v2);
1097 double dp1 =
std::abs(1./v1.r() - 1./v2.r());
1105 int nRH_eMipDR=0, nNearTRKs=0;
1107 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1108 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1112 oneCutParameters.
maxDzPV = 100;
1118 oneCutParameters.
maxDzPV = 100;
1126 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1127 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1129 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1130 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1131 double e_inCone = e2 - e1;
1132 bool chgIsolFlag = (conehmaxNearP <
cutCharge);
1133 bool mipFlag = (eMipDR <
cutMip);
1135 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1137 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1138 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1139 selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1140 selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1141 double distFromHotCell=-99.0;
1142 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1144 std::vector<DetId> coneRecHitDetIds;
1146 trkDetItr->pointECAL,
1147 a_coneR, trkDetItr->directionHCAL,
1148 nRecHitsCone, coneRecHitDetIds,
1149 distFromHotCell, ietaHotCell, iphiHotCell,
1168 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1173 for (
int j=0;
j<3;
j++) {
1175 for (
unsigned int k=0;
k<
vec[
j].size();
k++) {
1183 double deta, dphi, dr;
1185 for (
int lvl=1; lvl<3; lvl++) {
1186 for (
unsigned int i=0;
i<
vec[lvl].size();
i++) {
1191 if (
verbosity%10 > 1)
std::cout <<
"lvl " <<lvl <<
" i " << i <<
" deta " << deta <<
" dphi " << dphi <<
" dR " << dr << std::endl;
1201 for (
unsigned int k=0;
k<
vec[2].size(); ++
k) {
1207 for (
unsigned int j=0;
j<
vec[1].size();
j++) {
1229 std::cout <<
"Now Matching L3 track with reco: L3 Track (eta, phi) "
1230 <<
vec[2][
k].eta() <<
":" <<
vec[2][
k].phi() <<
" L2 Track "
1231 << mindRvec.eta() <<
":" << mindRvec.phi() <<
" dR "
1232 << mindR << std::endl;
1234 reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1235 if (trkCollection.
isValid()) {
1236 double mindP(9999.9);
1237 reco::TrackCollection::const_iterator trkItr;
1238 for (trkItr=trkCollection->begin();
1239 trkItr!=trkCollection->end(); trkItr++) {
1241 trkItr->pz(), trkItr->p());
1251 if ((
verbosity/10)%10>1 && deltaR<1.0) {
1252 std::cout <<
"reco track: pt " << v4.pt() <<
" eta " << v4.eta()
1253 <<
" phi " << v4.phi() <<
" DR " << deltaR
1260 std::cout <<
"Now Matching at Reco level in step 1 DR: " << mindR
1261 <<
":" << mindP <<
" eta:phi " << mindRvec.eta() <<
":"
1262 << mindRvec.phi() << std::endl;
1264 if (mindR < 0.03 && mindP > 0.1) {
1265 for (trkItr=trkCollection->begin();
1266 trkItr!=trkCollection->end(); trkItr++) {
1268 trkItr->pz(), trkItr->p());
1271 if (dp<mindP && deltaR<0.03) {
1280 std::cout <<
"Now Matching at Reco level in step 2 DR: " << mindR
1281 <<
":" << mindP <<
" eta:phi " << mindRvec.eta() <<
":"
1282 << mindRvec.phi() << std::endl;
1294 if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1300 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1302 if (trkCollection.
isValid()) {
1306 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1309 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1314 std::cout <<
"hit : detid(ieta,iphi) " << (
EBDetId)(
hit->
id()) <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1318 std::cout <<
"hit : detid(ieta,iphi) " << (
EEDetId)(
hit->
id()) <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1322 std::cout <<
"hit : detid(ieta,iphi) " <<
hit->
id() <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1326 unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1328 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1329 bool l3Track = (
std::find(goodTks.begin(),goodTks.end(),trkDetItr->trkItr) != goodTks.end());
1330 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1332 pTrack->
pz(), pTrack->
p());
1334 double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1335 if (trkDetItr->okHCAL) {
1337 ieta = detId.
ieta();
1339 for (
unsigned k=0;
k<
vec[0].size(); ++
k) {
1341 if (deltaR<mindR) mindR =
deltaR;
1344 if ((
verbosity/100)%10 > 1)
std::cout <<
"Track ECAL " << trkDetItr->okECAL <<
" HCAL " << trkDetItr->okHCAL <<
" Flag " << selectTk << std::endl;
1346 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1348 int nRH_eMipDR=0, nNearTRKs=0;
1350 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1351 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1353 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1354 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1356 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1357 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1360 double distFromHotCell=-99.0;
1361 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1363 std::vector<DetId> coneRecHitDetIds;
1365 trkDetItr->pointECAL,
1366 a_coneR, trkDetItr->directionHCAL,
1367 nRecHitsCone, coneRecHitDetIds,
1368 distFromHotCell, ietaHotCell, iphiHotCell,
1370 if (eMipDR<1.0) nselTk++;
1376 fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1));
1395 fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1));
1421 if (
verbosity%10>0)
std::cout <<
"Inside chgIsolation() with eta/phi Triggered: " << etaTriggered <<
"/" << phiTriggered << std::endl;
1423 std::vector<double> maxP;
1425 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1428 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1436 std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1440 bool vtxMatch =
false;
1442 unsigned int ivSel =
recVtxs->size();
1444 for (
unsigned int iv = 0; iv <
recVtxs->size(); ++iv) {
1451 if (ivSel ==
recVtxs->size()) {
1461 std::pair<double,double> seedCooAtEC;
1466 VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1470 for (
unsigned int l=0;
l<VecSeedsatEC.size();
l++) {
1471 unsigned int iSeed = VecSeedsatEC[
l].first;
1475 for (
unsigned int j=0;
j<VecSeedsatEC.size();
j++) {
1476 unsigned int iSurr = VecSeedsatEC[
j].first;
1477 if (iSeed != iSurr) {
1483 unsigned int ivSel =
recVtxs->size();
1485 for (
unsigned int iv = 0; iv <
recVtxs->size(); ++iv) {
1494 double dist =
getDistInCM(VecSeedsatEC[i].
second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[
j].second.first, VecSeedsatEC[j].second.second);
1506 double conehmaxNearP = -1;
bool selectTk=
false;
1507 double mindR=999.9;
int nTracks=0;
1509 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1511 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1513 pTrack->
pz(), pTrack->
p());
1514 double dr =
dR(v1,v2);
1531 std::vector<int> nGood(4,0);
1532 if (trkCollection.
isValid()) {
1536 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1543 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1545 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1547 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1550 double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1551 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
1552 if (l1tauobjref[
p]->
pt()>ptTriggered) {
1553 ptTriggered = l1tauobjref[
p]->pt();
1554 phiTriggered = l1tauobjref[
p]->phi();
1555 etaTriggered = l1tauobjref[
p]->eta();
1558 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
1559 if (l1jetobjref[
p]->
pt()>ptTriggered) {
1560 ptTriggered = l1jetobjref[
p]->pt();
1561 phiTriggered = l1jetobjref[
p]->phi();
1562 etaTriggered = l1jetobjref[
p]->eta();
1565 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
1566 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
1567 ptTriggered=l1forjetobjref[
p]->pt();
1568 phiTriggered=l1forjetobjref[
p]->phi();
1569 etaTriggered=l1forjetobjref[
p]->eta();
1572 double pTriggered = ptTriggered*cosh(etaTriggered);
1574 ptTriggered*
sin(phiTriggered),
1575 pTriggered*tanh(etaTriggered), pTriggered);
1577 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1578 unsigned int nTracks(0);
1579 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1580 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1582 pTrack->
pz(), pTrack->
p());
1584 double mindR =
dR(v4, pTrigger);
1586 if ((
verbosity/100)%10 > 1)
std::cout <<
"Track ECAL " << trkDetItr->okECAL <<
" HCAL " << trkDetItr->okHCAL <<
" Flag " << selectTk << std::endl;
1588 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
1589 int nRH_eMipDR(0), nNearTRKs(0);
1592 trkDetItr->pointHCAL,
1593 trkDetItr->pointECAL,
a_mipR,
1594 trkDetItr->directionECAL, nRH_eMipDR);
1599 if (conehmaxNearP < 2.0 && eMipDR<1.0) {
1600 if (pTrack->
p() >= 20 && pTrack->
p() < 30) {
1602 }
else if (pTrack->
p() >= 30 && pTrack->
p() < 40) {
1604 }
else if (pTrack->
p() >= 40 && pTrack->
p() < 60) {
1606 }
else if (pTrack->
p() >= 60 && pTrack->
p() < 100) {
1614 for (
unsigned int ii=0;
ii<nGood.size(); ++
ii)
1619 h_p[indx]->Fill(vec.r());
1620 h_pt[indx]->Fill(vec.pt());
1621 h_eta[indx]->Fill(vec.eta());
1622 h_phi[indx]->Fill(vec.phi());
1627 double dr =
dR(vec1,vec2);
1628 double deta =
dEta(vec1, vec2);
1629 double dphi =
dPhi(vec1, vec2);
1630 double dpt =
dPt(vec1, vec2);
1631 double dp =
dP(vec1, vec2);
1632 double dinvpt =
dinvPt(vec1, vec2);
1633 h_dEta[indx] ->Fill(deta);
1634 h_dPhi[indx] ->Fill(dphi);
1635 h_dPt[indx] ->Fill(dpt);
1636 h_dP[indx] ->Fill(dp);
1640 if (debug)
std::cout <<
"mindR for index " << indx <<
" is " << dr <<
" deta " << deta <<
" dphi " << dphi <<
" dpt " << dpt <<
" dinvpt " << dinvpt <<std::endl;
1645 h_eMip[indx] ->Fill(eMipDR);
1649 for (
int lim=0; lim<5; ++lim) {
1664 if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1665 else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1666 if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1667 for (
int lim=0; lim<5; ++lim) {
1670 h_eCalo[lim][indx][
kk] ->Fill(hCone+eMipDR);
1677 return (vec1.eta()-vec2.eta());
1682 double phi1 = vec1.phi();
1683 if (phi1 < 0) phi1 += 2.0*
M_PI;
1684 double phi2 = vec2.phi();
1685 if (phi2 < 0) phi2 += 2.0*
M_PI;
1686 double dphi = phi1-phi2;
1688 else if (dphi < -
M_PI) dphi += 2.*
M_PI;
1693 double deta =
dEta(vec1,vec2);
1694 double dphi =
dPhi(vec1,vec2);
1695 return std::sqrt(deta*deta + dphi*dphi);
1699 return (vec1.pt()-vec2.pt());
1703 return (
std::abs(vec1.r()-vec2.r()));
1707 return ((1/vec1.pt())-(1/vec2.pt()));
1711 double eta(0),
phi(0), ptmax(0);
1712 for (
unsigned int k=0;
k<
vec[0].size(); ++
k) {
1716 ptmax =
vec[0][
k].pt();
1717 }
else if (
vec[0][
k].
pt() > ptmax) {
1720 ptmax =
vec[0][
k].pt();
1723 return std::pair<double,double>(
eta,
phi);
1727 double pT,
int charge,
1734 double Rcurv = 9999999;
1737 double ecDist =
zEE_;
1738 double ecRad =
rEB_;
1739 double theta = 2*atan(
exp(-etaIP));
1742 if (fabs(etaIP)<1.479) {
1743 if ((0.5*ecRad/Rcurv)>1) {
1747 deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
1748 double alpha1 = 2*asin(0.5*ecRad/Rcurv);
1749 double z = ecRad/
tan(theta);
1750 if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ;
1751 else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ;
1752 double zAbs=fabs(zNew);
1754 etaEC = -
log(
tan(0.5*atan(ecRad/zAbs)));
1755 deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
1758 zAbs = (fabs(etaIP)/etaIP)*ecDist;
1759 double Zflight = fabs(zAbs-vtxZ);
1760 double alpha = (Zflight*ecRad)/(z*Rcurv);
1761 double Rec = 2*Rcurv*
sin(alpha/2);
1762 deltaPhi =-charge*alpha/2;
1763 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
1767 zNew = (fabs(etaIP)/etaIP)*ecDist;
1768 double Zflight = fabs(zNew-vtxZ);
1769 double Rvirt = fabs(Zflight*
tan(theta));
1770 double Rec = 2*Rcurv*
sin(Rvirt/(2*Rcurv));
1771 deltaPhi =-(charge)*(Rvirt/(2*Rcurv));
1772 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
1775 if (zNew<0) etaEC=-etaEC;
1781 std::pair<double,double> retVal(etaEC,phiEC);
1787 double theta1=2*atan(
exp(-eta1));
1788 double theta2=2*atan(
exp(-eta2));
1789 if (fabs(eta1)<1.479) Rec=
rEB_;
1790 else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=
tan(theta1)*
zEE_;
1795 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_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
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 > &)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
#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
HLTConfigProvider hltConfig_
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)
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 &)
double queryModuleTimeByLabel(edm::StreamID, const std::string &) const
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)
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
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 debug=false)
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 &)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
T const * product() const
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger) const
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
std::vector< double > * t_NFcandPt
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
spr::trackSelectionParameters selectionParameters
std::map< unsigned int, unsigned int > TrigList
std::vector< bool > * t_TrkqltyFlag
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
std::vector< double > * t_PixcandPhi
std::vector< double > * t_PixTrkcandEta
edm::Service< TFileService > fs
std::vector< int > * t_nGoodTk
volatile std::atomic< bool > shutdown_flag false
edm::ESHandle< MagneticField > bFieldH
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
list pairs
sort tag files by run number
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
tuple size
Write out results.
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_
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