76 edm::InputTag triggerEvent_ (
"hltTriggerSummaryAOD",
"",processName);
77 tok_trigEvt = consumes<trigger::TriggerEvent>(triggerEvent_);
78 edm::InputTag theTriggerResultsLabel (
"TriggerResults",
"",processName);
79 tok_trigRes = consumes<edm::TriggerResults>(theTriggerResultsLabel);
95 for (
unsigned int k=0;
k<pixelTracksSources_.size(); ++
k) {
98 tok_pixtks_.push_back(consumes<reco::TrackCollection>(pixelTracksSources_[
k]));
102 std::cout <<
"Parameters read from config file \n"
104 <<
"\t theTrackQuality " << theTrackQuality
122 std::cout <<
"Charge Isolation parameters:"
123 <<
"\t minPTrackValue " << minPTrackValue_
124 <<
"\t vtxCutSeed " << vtxCutSeed_
125 <<
"\t vtxCutIsol " << vtxCutIsol_
126 <<
"\t tauUnbiasCone " << tauUnbiasCone_
127 <<
"\t prelimCone " << prelimCone_
128 <<
"\t pixelIsolationConeSizeAtEC";
129 for (
unsigned int k=0;
k<pixelIsolationConeSizeAtEC_.size(); ++
k)
130 std::cout <<
" " << pixelIsolationConeSizeAtEC_[
k];
133 double pl[] = {20,30,40,60,80,120};
154 if (
verbosity%10 > 0)
std::cout <<
"Event starts====================================" << std::endl;
155 int RunNo = iEvent.
id().
run();
156 int EvtNo = iEvent.
id().
event();
169 if (!triggerEventHandle.
isValid()) {
170 if (
verbosity%10 > 0)
std::cout <<
"Error! Can't get the product hltTriggerSummaryAOD"<< std::endl;
172 triggerEvent = *(triggerEventHandle.
product());
189 if (
recVtxs->size()>0 && !((*recVtxs)[0].isFake())) {
205 for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
214 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
216 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
217 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
219 for(
int i=0;
i<7;
i++) {
230 std::cout <<
"RunNo " << RunNo <<
" EvtNo " << EvtNo <<
" Lumi " << Lumi
231 <<
" Bunch " << Bunch <<
" mybxlumi " << mybxlumi << std::endl;
233 if (!triggerResults.isValid()) {
234 std::cout <<
"Error! Can't get the product triggerResults" << std::endl;
238 std::vector<std::string>
modules;
239 h_nHLT->Fill(triggerResults->size());
242 const std::vector<std::string> & triggerNames_ = triggerNames.
triggerNames();
244 int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
245 for (
unsigned int i=0;
i<triggerResults->size();
i++) {
252 if (
verbosity%10 > 0)
std::cout <<
"trigger that i want " << triggerNames_[
i] <<
" accept " << triggerResults->accept(i) << std::endl;
253 hlt = triggerResults->accept(i);
265 prescale = preL1*preHLT;
267 std::cout << triggerNames_[
i] <<
" accept " <<
hlt <<
" preL1 "
268 << preL1 <<
" preHLT " << preHLT << std::endl;
270 for (
int iv=0; iv<3; ++iv)
vec[iv].
clear();
274 TrigList.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
278 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
280 std::vector<int>
Keys;
283 for (
unsigned int imodule=0; imodule<moduleLabels.size();
285 if (label.find(moduleLabels[imodule]) != std::string::npos) {
287 for (
unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
288 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
291 if (label.find(
"L2Filter") != std::string::npos) {
292 vec[1].push_back(v4);
293 }
else if (label.find(
"L3Filter") != std::string::npos) {
294 vec[2].push_back(v4);
296 vec[0].push_back(v4);
300 std::cout <<
"key " << ifiltrKey <<
" : pt " << TO.
pt() <<
" eta " << TO.
eta() <<
" phi " << TO.
phi() <<
" mass " << TO.
mass() <<
" Id " << TO.
id() << std::endl;
305 std::vector<reco::TrackCollection::const_iterator> goodTks;
311 reco::TrackCollection::const_iterator trkItr;
312 for (trkItr=trkCollection->begin();
313 trkItr!=trkCollection->end(); trkItr++)
314 goodTks.push_back(trkItr);
348 std::cout<<
"New trigger menu found !!!" << std::endl;
350 for (
unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
352 std::cout << triggerNames_[itrig] <<
" " << triggerindx <<
" ";
353 if (triggerindx >=
n)
354 std::cout <<
"does not exist in the current menu" << std::endl;
404 std::vector<double> &PixMaxP,
double &TrkMaxP,
422 double &EmipNFcand,
double &EmipTrkcand,
423 double &mindR,
double &mindP1,
424 std::vector<bool> &Flags,
double hCone) {
449 char hname[100], htit[100];
451 "Reco",
"RecoMatch",
"RecoNoMatch",
452 "L2Match",
"L2NoMatch",
"L3Match",
"L3NoMatch",
453 "HLTTrk",
"HLTGoodTrk",
"HLTIsoTrk",
"HLTMip",
"HLTSelect",
454 "nonHLTTrk",
"nonHLTGoodTrk",
"nonHLTIsoTrk",
"nonHLTMip",
"nonHLTSelect"};
461 TimingTree->Branch(
"t_timeL2Prod",
"std::vector<double>", &t_timeL2Prod);
462 TimingTree->Branch(
"t_nPixCand",
"std::vector<int>", &t_nPixCand);
463 TimingTree->Branch(
"t_nPixSeed",
"std::vector<int>", &t_nPixSeed);
468 t_TrkP =
new std::vector<double>();
475 TrkResTree->Branch(
"t_TrkhCone",
"std::vector<double>", &t_TrkhCone);
476 TrkResTree->Branch(
"t_TrkP",
"std::vector<double>", &t_TrkP);
477 TrkResTree->Branch(
"t_TrkselTkFlag",
"std::vector<bool>", &t_TrkselTkFlag);
478 TrkResTree->Branch(
"t_TrkqltyFlag",
"std::vector<bool>", &t_TrkqltyFlag);
479 TrkResTree->Branch(
"t_TrkMissFlag",
"std::vector<bool>", &t_TrkMissFlag);
480 TrkResTree->Branch(
"t_TrkPVFlag",
"std::vector<bool>", &t_TrkPVFlag);
481 TrkResTree->Branch(
"t_TrkNuIsolFlag",
"std::vector<bool>", &t_TrkNuIsolFlag);
497 ChgIsolnTree->Branch(
"t_PixcandP",
"std::vector<double>", &t_PixcandP);
498 ChgIsolnTree->Branch(
"t_PixcandPt",
"std::vector<double>", &t_PixcandPt);
499 ChgIsolnTree->Branch(
"t_PixcandEta",
"std::vector<double>", &t_PixcandEta);
500 ChgIsolnTree->Branch(
"t_PixcandPhi",
"std::vector<double>", &t_PixcandPhi);
501 ChgIsolnTree->Branch(
"t_PixcandMaxP",
"std::vector<std::vector<double> >", &t_PixcandMaxP);
502 ChgIsolnTree->Branch(
"t_PixTrkcandP",
"std::vector<double>", &t_PixTrkcandP);
503 ChgIsolnTree->Branch(
"t_PixTrkcandPt",
"std::vector<double>", &t_PixTrkcandPt );
504 ChgIsolnTree->Branch(
"t_PixTrkcandEta",
"std::vector<double>", &t_PixTrkcandEta );
505 ChgIsolnTree->Branch(
"t_PixTrkcandPhi",
"std::vector<double>", &t_PixTrkcandPhi );
506 ChgIsolnTree->Branch(
"t_PixTrkcandMaxP",
"std::vector<double>", &t_PixTrkcandMaxP);
507 ChgIsolnTree->Branch(
"t_PixTrkcandselTk",
"std::vector<bool>", &t_PixTrkcandselTk);
531 t_ECone =
new std::vector<double>();
533 MipCutTree->Branch(
"t_NFcandP",
"std::vector<double>", &t_NFcandP);
534 MipCutTree->Branch(
"t_NFcandPt",
"std::vector<double>", &t_NFcandPt);
535 MipCutTree->Branch(
"t_NFcandEta",
"std::vector<double>", &t_NFcandEta);
536 MipCutTree->Branch(
"t_NFcandPhi",
"std::vector<double>", &t_NFcandPhi);
537 MipCutTree->Branch(
"t_NFcandEmip",
"std::vector<double>", &t_NFcandEmip);
538 MipCutTree->Branch(
"t_NFTrkcandP",
"std::vector<double>", &t_NFTrkcandP);
539 MipCutTree->Branch(
"t_NFTrkcandPt",
"std::vector<double>", &t_NFTrkcandPt );
540 MipCutTree->Branch(
"t_NFTrkcandEta",
"std::vector<double>", &t_NFTrkcandEta );
541 MipCutTree->Branch(
"t_NFTrkcandPhi",
"std::vector<double>", &t_NFTrkcandPhi );
542 MipCutTree->Branch(
"t_NFTrkcandEmip",
"std::vector<double>", &t_NFTrkcandEmip);
543 MipCutTree->Branch(
"t_NFTrkMinDR",
"std::vector<double>", &t_NFTrkMinDR);
544 MipCutTree->Branch(
"t_NFTrkMinDP1",
"std::vector<double>", &t_NFTrkMinDP1);
545 MipCutTree->Branch(
"t_NFTrkselTkFlag",
"std::vector<bool>", &t_NFTrkselTkFlag);
546 MipCutTree->Branch(
"t_NFTrkqltyFlag",
"std::vector<bool>", &t_NFTrkqltyFlag);
547 MipCutTree->Branch(
"t_NFTrkMissFlag",
"std::vector<bool>", &t_NFTrkMissFlag);
548 MipCutTree->Branch(
"t_NFTrkPVFlag",
"std::vector<bool>", &t_NFTrkPVFlag);
549 MipCutTree->Branch(
"t_NFTrkPropFlag",
"std::vector<bool>", &t_NFTrkPropFlag);
550 MipCutTree->Branch(
"t_NFTrkChgIsoFlag",
"std::vector<bool>", &t_NFTrkChgIsoFlag);
551 MipCutTree->Branch(
"t_NFTrkNeuIsoFlag",
"std::vector<bool>", &t_NFTrkNeuIsoFlag);
552 MipCutTree->Branch(
"t_NFTrkMipFlag",
"std::vector<bool>", &t_NFTrkMipFlag);
553 MipCutTree->Branch(
"t_ECone",
"std::vector<double>", &t_ECone);
556 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
557 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
558 for(
int i=0;
i<7;
i++) {
559 h_Filters->GetXaxis()->SetBinLabel(
i+1, FilterNames[
i].c_str());
562 h_nHLT =
fs->
make<TH1I>(
"h_nHLT" ,
"Size of trigger Names", 1000, 1, 1000);
563 h_HLT =
fs->
make<TH1I>(
"h_HLT" ,
"HLT accept", 3, -1, 2);
564 h_PreL1 =
fs->
make<TH1I>(
"h_PreL1",
"L1 Prescale", 500, 0, 500);
566 h_Pre =
fs->
make<TH1I>(
"h_Pre",
"Prescale", 3000, 0, 3000);
568 h_PreL1wt =
fs->
make<TH1D>(
"h_PreL1wt",
"Weighted L1 Prescale", 500, 0, 500);
569 h_PreHLTwt =
fs->
make<TH1D>(
"h_PreHLTwt",
"Weighted HLT Prescale", 500, 0, 100);
572 h_EnIn =
fs->
make<TH1D>(
"h_EnInEcal",
"EnergyIn Ecal", 200, 0.0, 20.0);
573 h_EnOut =
fs->
make<TH1D>(
"h_EnOutEcal",
"EnergyOut Ecal", 200, 0.0, 20.0);
574 h_MipEnMatch =
fs->
make<TH2D>(
"h_MipEnMatch",
"MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
575 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);
578 h_nL3Objs =
fs->
make<TH1I>(
"h_nL3Objs",
"Number of L3 objects", 10, 0, 10);
580 std::string pairs[9] = {
"L2L3",
"L2L3Match",
"L2L3NoMatch",
"L3Reco",
"L3RecoMatch",
"L3RecoNoMatch",
"NewFilterReco",
"NewFilterRecoMatch",
"NewFilterRecoNoMatch"};
581 for (
int ipair=0; ipair<9; ipair++) {
582 sprintf(hname,
"h_dEta%s", pairs[ipair].c_str());
583 sprintf(htit,
"#Delta#eta for %s", pairs[ipair].c_str());
584 h_dEta[ipair] =
fs->
make<TH1D>(hname, htit, 200, -10.0, 10.0);
585 h_dEta[ipair]->GetXaxis()->SetTitle(
"d#eta");
587 sprintf(hname,
"h_dPhi%s", pairs[ipair].c_str());
588 sprintf(htit,
"#Delta#phi for %s", pairs[ipair].c_str());
589 h_dPhi[ipair] =
fs->
make<TH1D>(hname, htit, 140, -7.0, 7.0);
590 h_dPhi[ipair]->GetXaxis()->SetTitle(
"d#phi");
592 sprintf(hname,
"h_dPt%s", pairs[ipair].c_str());
593 sprintf(htit,
"#Delta dp_{T} for %s objects", pairs[ipair].c_str());
594 h_dPt[ipair] =
fs->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
595 h_dPt[ipair]->GetXaxis()->SetTitle(
"dp_{T} (GeV)");
597 sprintf(hname,
"h_dP%s", pairs[ipair].c_str());
598 sprintf(htit,
"#Delta p for %s objects", pairs[ipair].c_str());
599 h_dP[ipair] =
fs->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
600 h_dP[ipair]->GetXaxis()->SetTitle(
"dP (GeV)");
602 sprintf(hname,
"h_dinvPt%s", pairs[ipair].c_str());
603 sprintf(htit,
"#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
605 h_dinvPt[ipair]->GetXaxis()->SetTitle(
"d(1/p_{T})");
606 sprintf(hname,
"h_mindR%s", pairs[ipair].c_str());
607 sprintf(htit,
"min(#Delta R) for %s objects", pairs[ipair].c_str());
609 h_mindR[ipair]->GetXaxis()->SetTitle(
"dR");
612 for (
int lvl=0; lvl<2; lvl++) {
613 sprintf(hname,
"h_dEtaL1%s", levels[lvl+1].c_str());
614 sprintf(htit,
"#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
617 sprintf(hname,
"h_dPhiL1%s", levels[lvl+1].c_str());
618 sprintf(htit,
"#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
621 sprintf(hname,
"h_dRL1%s", levels[lvl+1].c_str());
622 sprintf(htit,
"#Delta R for L1 and %s objects", levels[lvl+1].c_str());
623 h_dRL1[lvl] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 10.0);
627 int levmin = (
doL2L3 ? 0 : 10);
628 for (
int ilevel=levmin; ilevel<20; ilevel++) {
629 sprintf(hname,
"h_p%s", levels[ilevel].c_str());
630 sprintf(htit,
"p for %s objects", levels[ilevel].c_str());
631 h_p[ilevel] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
632 h_p[ilevel]->GetXaxis()->SetTitle(
"p (GeV)");
634 sprintf(hname,
"h_pt%s", levels[ilevel].c_str());
635 sprintf(htit,
"p_{T} for %s objects", levels[ilevel].c_str());
636 h_pt[ilevel] =
fs->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
637 h_pt[ilevel]->GetXaxis()->SetTitle(
"p_{T} (GeV)");
639 sprintf(hname,
"h_eta%s", levels[ilevel].c_str());
640 sprintf(htit,
"#eta for %s objects", levels[ilevel].c_str());
641 h_eta[ilevel] =
fs->
make<TH1D>(hname, htit, 100, -5.0, 5.0);
642 h_eta[ilevel]->GetXaxis()->SetTitle(
"#eta");
644 sprintf(hname,
"h_phi%s", levels[ilevel].c_str());
645 sprintf(htit,
"#phi for %s objects", levels[ilevel].c_str());
646 h_phi[ilevel] =
fs->
make<TH1D>(hname, htit, 70, -3.5, 3.50);
647 h_phi[ilevel]->GetXaxis()->SetTitle(
"#phi");
652 for (
int icut=0; icut<2; icut++) {
653 sprintf(hname,
"h_eMip%s", cuts[icut].c_str());
654 sprintf(htit,
"eMip for %s tracks", cuts[icut].c_str());
655 h_eMip[icut] =
fs->
make<TH1D>(hname, htit, 200, 0.0, 10.0);
656 h_eMip[icut]->GetXaxis()->SetTitle(
"E_{Mip} (GeV)");
658 sprintf(hname,
"h_eMaxNearP%s", cuts[icut].c_str());
659 sprintf(htit,
"eMaxNearP for %s tracks", cuts[icut].c_str());
661 h_eMaxNearP[icut]->GetXaxis()->SetTitle(
"E_{MaxNearP} (GeV)");
663 sprintf(hname,
"h_eNeutIso%s", cuts[icut].c_str());
664 sprintf(htit,
"eNeutIso for %s ", cuts[icut].c_str());
666 h_eNeutIso[icut]->GetXaxis()->SetTitle(
"E_{NeutIso} (GeV)");
668 for (
int kcut=0; kcut<2; ++kcut) {
669 for (
int lim=0; lim<5; ++lim) {
670 sprintf(hname,
"h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
671 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());
675 sprintf(hname,
"h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
676 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());
683 std::string ecut1[3] = {
"all",
"HLTMatched",
"HLTNotMatched"};
685 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,
686 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
687 for (
int icut=0; icut<6; icut++) {
689 int i1 = (icut>2 ? 1 : 0);
690 int i2 = icut - i1*3;
691 for (
int kcut=0; kcut<48; kcut++) {
692 for (
int lim=0; lim<5; ++lim) {
693 sprintf(hname,
"h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
694 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());
695 h_eHcal[lim][icut][kcut]=
fs->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
696 h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
697 sprintf(hname,
"h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
698 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());
699 h_eCalo[lim][icut][kcut]=
fs->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
700 h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
708 unsigned int preL1, preHLT;
709 std::map<unsigned int, unsigned int>::iterator itr;
710 std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
722 preL1 = (itrPre->second).
first;
723 preHLT = (itrPre->second).
second;
724 std::cout << itr->first <<
" " << itr->second <<
" " << itrPre->first <<
" " << preL1 <<
" " << preHLT << std::endl;
725 g_Accepts->Fill(itr->first, itr->second);
726 g_PreL1->Fill(itr->first, preL1);
727 g_PreHLT->Fill(itr->first, preHLT);
728 g_Pre->Fill(itr->first, preL1*preHLT);
757 if (!trkCollection.
isValid()) {
758 std::cout <<
"trkCollection.isValid is false" << std::endl;
760 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
763 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
765 unsigned int nTracks=0;
766 int nRH_eMipDR=0, nNearTRKs=0;
767 std::vector<bool> selFlags;
768 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
769 double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
770 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
771 if (
verbosity%10>0)
std::cout <<
"track no. " << nTracks <<
" p(): " << pTrack->
p() << std::endl;
772 if (pTrack->
p() > 20) {
774 pTrack->
pz(), pTrack->
p());
776 trkDetItr->pointHCAL, trkDetItr->pointECAL,
777 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
782 oneCutParameters.
maxDzPV = 100;
788 oneCutParameters.
maxDzPV = 100;
806 trkDetItr->pointHCAL, trkDetItr->pointECAL,
807 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
810 trkDetItr->pointHCAL, trkDetItr->pointECAL,
811 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
812 double e_inCone = e2 - e1;
813 bool chgIsolFlag = (conehmaxNearP <
cutCharge);
814 bool mipFlag = (eMipDR <
cutMip);
816 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
818 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
819 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
821 <<
" ; ok: " << trkDetItr->okECAL <<
"/" << trkDetItr->okHCAL
822 <<
" ; chgiso: " << conehmaxNearP <<
"<" <<
cutCharge <<
"(" << chgIsolFlag <<
")" << std::endl;
825 if(chgIsolFlag && mipFlag && trkpropFlag) {
826 double distFromHotCell=-99.0;
827 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
829 std::vector<DetId> coneRecHitDetIds;
831 trkDetItr->pointECAL,
832 a_coneR, trkDetItr->directionHCAL,
833 nRecHitsCone, coneRecHitDetIds,
834 distFromHotCell, ietaHotCell, iphiHotCell,
843 t_TrkP ->push_back(pTrack->
p());
847 if (
verbosity%10>0)
std::cout <<
"Filling " <<
t_TrkP->size() <<
" tracks in TrkRestree out of " << nTracks << std::endl;
855 double tHB=0.0, tHE=0.0;
857 int nSeedHB=0, nSeedHE=0;
866 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
867 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
868 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
874 double ptTriggered = -10;
875 double etaTriggered = -100;
876 double phiTriggered = -100;
877 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
878 if (l1tauobjref[
p]->
pt()>ptTriggered) {
879 ptTriggered = l1tauobjref[
p]->pt();
880 phiTriggered = l1tauobjref[
p]->phi();
881 etaTriggered = l1tauobjref[
p]->eta();
884 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
885 if (l1jetobjref[
p]->
pt()>ptTriggered) {
886 ptTriggered = l1jetobjref[
p]->pt();
887 phiTriggered = l1jetobjref[
p]->phi();
888 etaTriggered = l1jetobjref[
p]->eta();
891 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
892 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
893 ptTriggered=l1forjetobjref[
p]->pt();
894 phiTriggered=l1forjetobjref[
p]->phi();
895 etaTriggered=l1forjetobjref[
p]->eta();
899 reco::VertexCollection::const_iterator vitSel;
902 for (reco::VertexCollection::const_iterator vit=pVertHE->begin(); vit!=pVertHE->end(); vit++) {
910 if (minDZ==100) vtxMatch=
true;
917 reco::VertexCollection::const_iterator vitSel;
920 for (reco::VertexCollection::const_iterator vit=pVertHB->begin(); vit!=pVertHB->end(); vit++) {
927 if (minDZ!=100&&fabs(
pixelTrackRefsHB[iS]->dxy(vitSel->position()))<101.0) vtxMatch=
true;
928 if (minDZ==100) vtxMatch=
true;
932 if (R>1.2 && vtxMatch) nSeedHB++;
940 " nCand: " << nCandHB <<
"/" << nCandHE <<
941 "nSeed: " << nSeedHB <<
"/" << nSeedHE << std::endl;
954 if (!trkCollection.
isValid()) {
955 std::cout <<
"trkCollection.isValid is false" << std::endl;
957 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
960 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
963 <<
" to be matched to something out of "
964 << trkCaloDirections1.size() <<
" reco tracks" << std::endl;
965 for (
unsigned int i=0;
i<L2cands->size();
i++) {
968 double enIn = candref->energyIn();
969 h_EnIn->Fill(candref->energyIn());
970 h_EnOut->Fill(candref->energyOut());
972 candref->track()->pz(),candref->track()->p());
974 << candref->track()->eta() <<
"/" << candref->track()->phi()
975 <<
"/" << candref->track()->pt() <<
"/" << candref->energyIn()
978 double mindR=999.9, mindP1=999.9, eMipDR=0.0;
979 std::vector<bool> selFlags;
980 unsigned int nTracks=0;
981 double conehmaxNearP = 0, hCone=0;
982 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
983 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
985 pTrack->
pz(), pTrack->
p());
986 double dr =
dR(v1,v2);
987 double dp1 =
std::abs(1./v1.r() - 1./v2.r());
995 int nRH_eMipDR=0, nNearTRKs=0;
1001 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1002 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1007 oneCutParameters.
maxDzPV = 100;
1013 oneCutParameters.
maxDzPV = 100;
1027 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1028 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1031 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1032 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1033 double e_inCone = e2 - e1;
1034 bool chgIsolFlag = (conehmaxNearP <
cutCharge);
1035 bool mipFlag = (eMipDR <
cutMip);
1037 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1039 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1040 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1041 selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1042 selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1044 double distFromHotCell=-99.0;
1045 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1047 std::vector<DetId> coneRecHitDetIds;
1049 trkDetItr->pointECAL,
1050 a_coneR, trkDetItr->directionHCAL,
1051 nRecHitsCone, coneRecHitDetIds,
1052 distFromHotCell, ietaHotCell, iphiHotCell,
1075 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1079 for (
int j=0;
j<3;
j++) {
1080 for (
unsigned int k=0;
k<
vec[
j].size();
k++) {
1086 double deta, dphi, dr;
1088 for (
int lvl=1; lvl<3; lvl++) {
1089 for (
unsigned int i=0;
i<
vec[lvl].size();
i++) {
1093 if (
verbosity%10 > 1)
std::cout <<
"lvl " <<lvl <<
" i " << i <<
" deta " << deta <<
" dphi " << dphi <<
" dR " << dr << std::endl;
1102 for (
unsigned int k=0;
k<
vec[2].size(); ++
k) {
1106 for (
unsigned int j=0;
j<
vec[1].size();
j++) {
1127 std::cout <<
"Now Matching L3 track with reco: L3 Track (eta, phi) "
1128 <<
vec[2][
k].eta() <<
":" <<
vec[2][
k].phi() <<
" L2 Track "
1129 << mindRvec.eta() <<
":" << mindRvec.phi() <<
" dR "
1130 << mindR << std::endl;
1131 reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1132 if (trkCollection.
isValid()) {
1133 double mindP(9999.9), mindP1(9999.9);
1134 reco::TrackCollection::const_iterator trkItr;
1135 for (trkItr=trkCollection->begin();
1136 trkItr!=trkCollection->end(); trkItr++) {
1138 trkItr->pz(), trkItr->p());
1149 if ((
verbosity/10)%10>1 && deltaR<1.0) {
1150 std::cout <<
"reco track: pt " << v4.pt() <<
" eta " << v4.eta()
1151 <<
" phi " << v4.phi() <<
" DR " << deltaR
1156 std::cout <<
"Now Matching at Reco level in step 1 DR: " << mindR
1157 <<
":" << mindP <<
":" << mindP1 <<
" eta:phi "
1158 << mindRvec.eta() <<
":" << mindRvec.phi() << std::endl;
1159 if (mindR < 0.03 && mindP > 0.1) {
1160 for (trkItr=trkCollection->begin();
1161 trkItr!=trkCollection->end(); trkItr++) {
1163 trkItr->pz(), trkItr->p());
1167 if (dp<mindP && deltaR<0.03) {
1176 std::cout <<
"Now Matching at Reco level in step 2 DR: " << mindR
1177 <<
":" << mindP <<
":" << mindP1 <<
" eta:phi "
1178 << mindRvec.eta() <<
":" << mindRvec.phi() << std::endl;
1190 if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1196 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1198 if (trkCollection.
isValid()) {
1202 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1205 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1210 std::cout <<
"hit : detid(ieta,iphi) " << (
EBDetId)(
hit->
id()) <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1214 std::cout <<
"hit : detid(ieta,iphi) " << (
EEDetId)(
hit->
id()) <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1218 std::cout <<
"hit : detid(ieta,iphi) " <<
hit->
id() <<
" time " <<
hit->time() <<
" energy " <<
hit->energy() << std::endl;
1221 unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1223 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1224 bool l3Track = (
std::find(goodTks.begin(),goodTks.end(),trkDetItr->trkItr) != goodTks.end());
1225 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1227 pTrack->
pz(), pTrack->
p());
1229 double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1230 if (trkDetItr->okHCAL) {
1232 ieta = detId.
ieta();
1234 for (
unsigned k=0;
k<
vec[0].size(); ++
k) {
1236 if (deltaR<mindR) mindR =
deltaR;
1238 if ((
verbosity/100)%10 > 1)
std::cout <<
"Track ECAL " << trkDetItr->okECAL <<
" HCAL " << trkDetItr->okHCAL <<
" Flag " << selectTk << std::endl;
1239 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1241 int nRH_eMipDR=0, nNearTRKs=0;
1243 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1244 a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1246 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1247 a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1249 trkDetItr->pointHCAL, trkDetItr->pointECAL,
1250 a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1253 double distFromHotCell=-99.0;
1254 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1256 std::vector<DetId> coneRecHitDetIds;
1258 trkDetItr->pointECAL,
1259 a_coneR, trkDetItr->directionHCAL,
1260 nRecHitsCone, coneRecHitDetIds,
1261 distFromHotCell, ietaHotCell, iphiHotCell,
1263 if (eMipDR<1.0) nselTk++;
1269 fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1));
1288 fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1));
1313 if (
verbosity%10>0)
std::cout <<
"Inside chgIsolation() with eta/phi Triggered: " << etaTriggered <<
"/" << phiTriggered << std::endl;
1314 std::vector<double> maxP;
1316 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1319 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1325 std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1329 bool vtxMatch =
false;
1331 unsigned int ivSel =
recVtxs->size();
1333 for (
unsigned int iv = 0; iv <
recVtxs->size(); ++iv) {
1340 if (ivSel ==
recVtxs->size()) {
1350 std::pair<double,double> seedCooAtEC;
1355 VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1362 for (
unsigned int l=0;
l<VecSeedsatEC.size();
l++) {
1363 unsigned int iSeed = VecSeedsatEC[
l].first;
1368 for (
unsigned int j=0;
j<VecSeedsatEC.size();
j++) {
1369 unsigned int iSurr = VecSeedsatEC[
j].first;
1370 if (iSeed != iSurr) {
1376 unsigned int ivSel =
recVtxs->size();
1378 for (
unsigned int iv = 0; iv <
recVtxs->size(); ++iv) {
1388 double dist =
getDistInCM(VecSeedsatEC[i].
second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[
j].second.first, VecSeedsatEC[j].second.second);
1401 double conehmaxNearP = -1;
bool selectTk=
false;
1402 double mindR=999.9;
int nTracks=0;
1404 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1406 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1408 pTrack->
pz(), pTrack->
p());
1409 double dr =
dR(v1,v2);
1430 h_p[indx]->Fill(vec.r());
1431 h_pt[indx]->Fill(vec.pt());
1432 h_eta[indx]->Fill(vec.eta());
1433 h_phi[indx]->Fill(vec.phi());
1438 double dr =
dR(vec1,vec2);
1439 double deta =
dEta(vec1, vec2);
1440 double dphi =
dPhi(vec1, vec2);
1441 double dpt =
dPt(vec1, vec2);
1442 double dp =
dP(vec1, vec2);
1443 double dinvpt =
dinvPt(vec1, vec2);
1444 h_dEta[indx] ->Fill(deta);
1445 h_dPhi[indx] ->Fill(dphi);
1446 h_dPt[indx] ->Fill(dpt);
1447 h_dP[indx] ->Fill(dp);
1450 if (debug)
std::cout <<
"mindR for index " << indx <<
" is " << dr <<
" deta " << deta <<
" dphi " << dphi <<
" dpt " << dpt <<
" dinvpt " << dinvpt <<std::endl;
1454 h_eMip[indx] ->Fill(eMipDR);
1458 for (
int lim=0; lim<5; ++lim) {
1473 if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1474 else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1475 if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1476 for (
int lim=0; lim<5; ++lim) {
1479 h_eCalo[lim][indx][
kk] ->Fill(hCone+eMipDR);
1486 return (vec1.eta()-vec2.eta());
1491 double phi1 = vec1.phi();
1492 if (phi1 < 0) phi1 += 2.0*
M_PI;
1493 double phi2 = vec2.phi();
1494 if (phi2 < 0) phi2 += 2.0*
M_PI;
1495 double dphi = phi1-phi2;
1497 else if (dphi < -
M_PI) dphi += 2.*
M_PI;
1502 double deta =
dEta(vec1,vec2);
1503 double dphi =
dPhi(vec1,vec2);
1504 return std::sqrt(deta*deta + dphi*dphi);
1508 return (vec1.pt()-vec2.pt());
1512 return (
std::abs(vec1.r()-vec2.r()));
1516 return ((1/vec1.pt())-(1/vec2.pt()));
1520 double eta(0),
phi(0), ptmax(0);
1521 for (
unsigned int k=0;
k<
vec[0].size(); ++
k) {
1525 ptmax =
vec[0][
k].pt();
1526 }
else if (
vec[0][
k].
pt() > ptmax) {
1529 ptmax =
vec[0][
k].pt();
1532 return std::pair<double,double>(
eta,
phi);
1536 double pT,
int charge,
1543 double Rcurv = 9999999;
1546 double ecDist =
zEE_;
1547 double ecRad =
rEB_;
1548 double theta = 2*atan(
exp(-etaIP));
1551 if (fabs(etaIP)<1.479) {
1552 if ((0.5*ecRad/Rcurv)>1) {
1556 deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
1557 double alpha1 = 2*asin(0.5*ecRad/Rcurv);
1558 double z = ecRad/
tan(theta);
1559 if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ;
1560 else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ;
1561 double zAbs=fabs(zNew);
1563 etaEC = -
log(
tan(0.5*atan(ecRad/zAbs)));
1564 deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
1567 zAbs = (fabs(etaIP)/etaIP)*ecDist;
1568 double Zflight = fabs(zAbs-vtxZ);
1569 double alpha = (Zflight*ecRad)/(z*Rcurv);
1570 double Rec = 2*Rcurv*
sin(alpha/2);
1571 deltaPhi =-charge*alpha/2;
1572 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
1576 zNew = (fabs(etaIP)/etaIP)*ecDist;
1577 double Zflight = fabs(zNew-vtxZ);
1578 double Rvirt = fabs(Zflight*
tan(theta));
1579 double Rec = 2*Rcurv*
sin(Rvirt/(2*Rcurv));
1580 deltaPhi =-(charge)*(Rvirt/(2*Rcurv));
1581 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
1584 if (zNew<0) etaEC=-etaEC;
1590 std::pair<double,double> retVal(etaEC,phiEC);
1596 double theta1=2*atan(
exp(-eta1));
1597 double theta2=2*atan(
exp(-eta2));
1598 if (fabs(eta1)<1.479) Rec=
rEB_;
1599 else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=
tan(theta1)*
zEE_;
1604 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
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_
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
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
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_
TH1D * h_etaCalibTracks[5][2][2]
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