29 #include "TDirectory.h" 117 std::vector<double> &PixMaxP,
double &TrkMaxP,
bool &selTk);
120 double &EmipNFcand,
double &EmipTrkcand,
121 double &mindR,
double &mindP1,
122 std::vector<bool> &Flags,
double hCone);
128 std::vector<reco::TrackCollection::const_iterator>&);
130 std::vector<reco::TrackCollection::const_iterator>&);
131 void chgIsolation(
double& etaTriggered,
double& phiTriggered,
147 double pT,
int charge,
double vtxZ);
148 double getDistInCM(
double eta1,
double phi1,
double eta2,
double phi2);
186 std::vector<edm::EDGetTokenT<reco::TrackCollection> >
tok_pixtks_;
264 std::vector<math::XYZTLorentzVector>
vec_[3];
271 pixCandTag_(iConfig.getUntrackedParameter<
edm::InputTag> (
"pixCandTag")),
272 l1CandTag_(iConfig.getUntrackedParameter<
edm::InputTag> (
"l1CandTag")),
273 l2CandTag_(iConfig.getUntrackedParameter<
edm::InputTag> (
"l2CandTag")),
281 verbosity_(iConfig.getUntrackedParameter<
int>(
"verbosity",0)),
283 minPTrackValue_(iConfig.getUntrackedParameter<double>(
"minPTrackValue")),
284 vtxCutSeed_(iConfig.getUntrackedParameter<double>(
"vertexCutSeed")),
285 vtxCutIsol_(iConfig.getUntrackedParameter<double>(
"vertexCutIsol")),
286 tauUnbiasCone_(iConfig.getUntrackedParameter<double>(
"tauUnbiasCone")),
287 prelimCone_(iConfig.getUntrackedParameter<double>(
"prelimCone")),
290 dr_L1_(iConfig.getUntrackedParameter<double>(
"isolationL1",1.0)),
291 a_coneR_(iConfig.getUntrackedParameter<double>(
"coneRadius",34.98)),
293 a_mipR_(iConfig.getUntrackedParameter<double>(
"coneRadiusMIP",14.0)),
294 a_neutR1_(iConfig.getUntrackedParameter<double>(
"coneRadiusNeut1",21.0)),
295 a_neutR2_(iConfig.getUntrackedParameter<double>(
"coneRadiusNeut2",29.0)),
296 cutMip_(iConfig.getUntrackedParameter<double>(
"cutMIP",1.0)),
297 cutCharge_(iConfig.getUntrackedParameter<double>(
"chargeIsolation",2.0)),
298 cutNeutral_(iConfig.getUntrackedParameter<double>(
"neutralIsolation",2.0)),
299 minRunNo_(iConfig.getUntrackedParameter<
int>(
"minRun")),
300 maxRunNo_(iConfig.getUntrackedParameter<
int>(
"maxRun")),
336 tok_trigEvt_ = consumes<trigger::TriggerEvent>(triggerEvent_);
338 tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel);
381 <<
"\t cuts (MIP " <<
cutMip_ <<
" : Charge " 389 <<
"\t pixelIsolationConeSizeAtEC";
394 double pl[] = {20,30,40,60,80,120};
449 std::vector<std::string> triggers = {
"HLT_IsoTrackHB"};
450 std::vector<edm::InputTag> tags = {
edm::InputTag(
"hltHITPixelTracksHB"),
452 std::vector<double> cones = {35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 63.9, 70.0};
454 desc.
addUntracked<std::vector<std::string> >(
"Triggers", triggers);
486 desc.
addUntracked<std::vector<edm::InputTag> >(
"pixelTracksSources", tags);
487 desc.
addUntracked<std::vector<double> >(
"pixelIsolationConeSizeAtEC", cones);
493 descriptions.
add(
"isoTrigHB",desc);
499 edm::LogVerbatim(
"IsoTrack") <<
"Event starts====================================";
501 int RunNo = iEvent.
id().
run();
514 if (!triggerEventHandle.
isValid()) {
515 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product hltTriggerSummaryAOD";
518 triggerEvent = *(triggerEventHandle.
product());
535 if (!
recVtxs_->empty() && !((*recVtxs_)[0].isFake())) {
551 for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
560 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
562 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
563 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
565 for(
int i=0;
i<7;
i++) {
577 << iEvent.
id().
event() <<
" Lumi " 581 if (!triggerResults.isValid()) {
582 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product triggerResults";
586 std::vector<std::string>
modules;
587 h_nHLT->Fill(triggerResults->size());
590 const std::vector<std::string> & triggerNames_ = triggerNames.
triggerNames();
593 int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
594 for (
unsigned int i=0;
i<triggerResults->size();
i++) {
595 unsigned int triggerindx = hltConfig.
triggerIndex(triggerNames_[
i]);
596 const std::vector<std::string>& moduleLabels(hltConfig.
moduleLabels(triggerindx));
603 << triggerNames_[
i] <<
" accept " 604 << triggerResults->accept(i);
605 hlt = triggerResults->accept(i);
615 preL1 = prescales.first;
616 preHLT = prescales.second;
617 prescale = preL1*preHLT;
620 <<
hlt <<
" preL1 " << preL1
621 <<
" preHLT " << preHLT;
622 for (
int iv=0; iv<3; ++iv)
vec_[iv].
clear();
626 trigList_.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
627 trigPreList_.insert(std::pair<
unsigned int, std::pair<int, int>>(RunNo,prescales));
630 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
632 std::vector<int>
Keys;
635 for (
unsigned int imodule=0; imodule<moduleLabels.size();
637 if (label.find(moduleLabels[imodule]) != std::string::npos) {
640 for (
unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
641 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
644 if (label.find(
"L2Filter") != std::string::npos) {
645 vec_[1].push_back(v4);
646 }
else if (label.find(
"L3Filter") != std::string::npos) {
647 vec_[2].push_back(v4);
649 vec_[0].push_back(v4);
654 <<
" : pt " << TO.
pt()
655 <<
" eta " << TO.
eta()
656 <<
" phi " << TO.
phi()
657 <<
" mass " << TO.
mass()
658 <<
" Id " << TO.
id();
663 std::vector<reco::TrackCollection::const_iterator> goodTks;
669 reco::TrackCollection::const_iterator trkItr;
670 for (trkItr=trkCollection->begin();
671 trkItr!=trkCollection->end(); trkItr++)
672 goodTks.push_back(trkItr);
707 const unsigned int n(hltConfig.
size());
708 for (
unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
709 unsigned int triggerindx = hltConfig.
triggerIndex(triggerNames_[itrig]);
710 if (triggerindx >=
n)
712 << triggerindx <<
" does not exist in" 713 <<
" the current menu";
716 << triggerindx <<
" exists";
766 std::vector<double> &PixMaxP,
767 double &TrkMaxP,
bool &selTk) {
784 double &EmipNFcand,
double &EmipTrkcand,
785 double &mindR,
double &mindP1,
786 std::vector<bool> &Flags,
double hCone) {
811 char hname[100], htit[100];
813 "Reco",
"RecoMatch",
"RecoNoMatch",
814 "L2Match",
"L2NoMatch",
"L3Match",
"L3NoMatch",
815 "HLTTrk",
"HLTGoodTrk",
"HLTIsoTrk",
"HLTMip",
816 "HLTSelect",
"nonHLTTrk",
"nonHLTGoodTrk",
817 "nonHLTIsoTrk",
"nonHLTMip",
"nonHLTSelect"};
825 TimingTree_->Branch(
"t_timeL2Prod",
"std::vector<double>", &t_timeL2Prod);
826 TimingTree_->Branch(
"t_nPixCand",
"std::vector<int>", &t_nPixCand);
827 TimingTree_->Branch(
"t_nPixSeed",
"std::vector<int>", &t_nPixSeed);
828 TimingTree_->Branch(
"t_nGoodTk",
"std::vector<int>", &t_nGoodTk);
833 t_TrkP =
new std::vector<double>();
840 TrkResTree_->Branch(
"t_TrkhCone",
"std::vector<double>", &t_TrkhCone);
841 TrkResTree_->Branch(
"t_TrkP",
"std::vector<double>", &t_TrkP);
842 TrkResTree_->Branch(
"t_TrkselTkFlag",
"std::vector<bool>", &t_TrkselTkFlag);
843 TrkResTree_->Branch(
"t_TrkqltyFlag",
"std::vector<bool>", &t_TrkqltyFlag);
844 TrkResTree_->Branch(
"t_TrkMissFlag",
"std::vector<bool>", &t_TrkMissFlag);
845 TrkResTree_->Branch(
"t_TrkPVFlag",
"std::vector<bool>", &t_TrkPVFlag);
846 TrkResTree_->Branch(
"t_TrkNuIsolFlag",
"std::vector<bool>", &t_TrkNuIsolFlag);
862 ChgIsolnTree_->Branch(
"t_PixcandP",
"std::vector<double>", &t_PixcandP);
863 ChgIsolnTree_->Branch(
"t_PixcandPt",
"std::vector<double>", &t_PixcandPt);
864 ChgIsolnTree_->Branch(
"t_PixcandEta",
"std::vector<double>", &t_PixcandEta);
865 ChgIsolnTree_->Branch(
"t_PixcandPhi",
"std::vector<double>", &t_PixcandPhi);
866 ChgIsolnTree_->Branch(
"t_PixcandMaxP",
"std::vector<std::vector<double> >", &t_PixcandMaxP);
867 ChgIsolnTree_->Branch(
"t_PixTrkcandP",
"std::vector<double>", &t_PixTrkcandP);
868 ChgIsolnTree_->Branch(
"t_PixTrkcandPt",
"std::vector<double>", &t_PixTrkcandPt );
869 ChgIsolnTree_->Branch(
"t_PixTrkcandEta",
"std::vector<double>", &t_PixTrkcandEta );
870 ChgIsolnTree_->Branch(
"t_PixTrkcandPhi",
"std::vector<double>", &t_PixTrkcandPhi );
871 ChgIsolnTree_->Branch(
"t_PixTrkcandMaxP",
"std::vector<double>", &t_PixTrkcandMaxP);
872 ChgIsolnTree_->Branch(
"t_PixTrkcandselTk",
"std::vector<bool>", &t_PixTrkcandselTk);
896 t_ECone =
new std::vector<double>();
898 MipCutTree_->Branch(
"t_NFcandP",
"std::vector<double>", &t_NFcandP);
899 MipCutTree_->Branch(
"t_NFcandPt",
"std::vector<double>", &t_NFcandPt);
900 MipCutTree_->Branch(
"t_NFcandEta",
"std::vector<double>", &t_NFcandEta);
901 MipCutTree_->Branch(
"t_NFcandPhi",
"std::vector<double>", &t_NFcandPhi);
902 MipCutTree_->Branch(
"t_NFcandEmip",
"std::vector<double>", &t_NFcandEmip);
903 MipCutTree_->Branch(
"t_NFTrkcandP",
"std::vector<double>", &t_NFTrkcandP);
904 MipCutTree_->Branch(
"t_NFTrkcandPt",
"std::vector<double>", &t_NFTrkcandPt );
905 MipCutTree_->Branch(
"t_NFTrkcandEta",
"std::vector<double>", &t_NFTrkcandEta );
906 MipCutTree_->Branch(
"t_NFTrkcandPhi",
"std::vector<double>", &t_NFTrkcandPhi );
907 MipCutTree_->Branch(
"t_NFTrkcandEmip",
"std::vector<double>", &t_NFTrkcandEmip);
908 MipCutTree_->Branch(
"t_NFTrkMinDR",
"std::vector<double>", &t_NFTrkMinDR);
909 MipCutTree_->Branch(
"t_NFTrkMinDP1",
"std::vector<double>", &t_NFTrkMinDP1);
910 MipCutTree_->Branch(
"t_NFTrkselTkFlag",
"std::vector<bool>", &t_NFTrkselTkFlag);
911 MipCutTree_->Branch(
"t_NFTrkqltyFlag",
"std::vector<bool>", &t_NFTrkqltyFlag);
912 MipCutTree_->Branch(
"t_NFTrkMissFlag",
"std::vector<bool>", &t_NFTrkMissFlag);
913 MipCutTree_->Branch(
"t_NFTrkPVFlag",
"std::vector<bool>", &t_NFTrkPVFlag);
914 MipCutTree_->Branch(
"t_NFTrkPropFlag",
"std::vector<bool>", &t_NFTrkPropFlag);
915 MipCutTree_->Branch(
"t_NFTrkChgIsoFlag",
"std::vector<bool>", &t_NFTrkChgIsoFlag);
916 MipCutTree_->Branch(
"t_NFTrkNeuIsoFlag",
"std::vector<bool>", &t_NFTrkNeuIsoFlag);
917 MipCutTree_->Branch(
"t_NFTrkMipFlag",
"std::vector<bool>", &t_NFTrkMipFlag);
918 MipCutTree_->Branch(
"t_ECone",
"std::vector<double>", &t_ECone);
921 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
922 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
923 for(
int i=0;
i<7;
i++) {
924 h_Filters->GetXaxis()->SetBinLabel(
i+1, FilterNames[
i].c_str());
927 h_nHLT =
fs_->
make<TH1I>(
"h_nHLT" ,
"Size of trigger Names", 1000, 1, 1000);
928 h_HLT =
fs_->
make<TH1I>(
"h_HLT" ,
"HLT accept", 3, -1, 2);
931 h_Pre =
fs_->
make<TH1I>(
"h_Pre",
"Prescale", 3000, 0, 3000);
933 h_PreL1wt =
fs_->
make<TH1D>(
"h_PreL1wt",
"Weighted L1 Prescale", 500, 0, 500);
934 h_PreHLTwt =
fs_->
make<TH1D>(
"h_PreHLTwt",
"Weighted HLT Prescale", 500, 0, 100);
937 h_EnIn =
fs_->
make<TH1D>(
"h_EnInEcal",
"EnergyIn Ecal", 200, 0.0, 20.0);
938 h_EnOut =
fs_->
make<TH1D>(
"h_EnOutEcal",
"EnergyOut Ecal", 200, 0.0, 20.0);
939 h_MipEnMatch =
fs_->
make<TH2D>(
"h_MipEnMatch",
"MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
940 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);
943 h_nL3Objs =
fs_->
make<TH1I>(
"h_nL3Objs",
"Number of L3 objects", 10, 0, 10);
945 std::string pairs[9] = {
"L2L3",
"L2L3Match",
"L2L3NoMatch",
"L3Reco",
"L3RecoMatch",
"L3RecoNoMatch",
"NewFilterReco",
"NewFilterRecoMatch",
"NewFilterRecoNoMatch"};
946 for (
int ipair=0; ipair<9; ipair++) {
947 sprintf(hname,
"h_dEta%s", pairs[ipair].c_str());
948 sprintf(htit,
"#Delta#eta for %s", pairs[ipair].c_str());
949 h_dEta[ipair] =
fs_->
make<TH1D>(hname, htit, 200, -10.0, 10.0);
950 h_dEta[ipair]->GetXaxis()->SetTitle(
"d#eta");
952 sprintf(hname,
"h_dPhi%s", pairs[ipair].c_str());
953 sprintf(htit,
"#Delta#phi for %s", pairs[ipair].c_str());
954 h_dPhi[ipair] =
fs_->
make<TH1D>(hname, htit, 140, -7.0, 7.0);
955 h_dPhi[ipair]->GetXaxis()->SetTitle(
"d#phi");
957 sprintf(hname,
"h_dPt%s", pairs[ipair].c_str());
958 sprintf(htit,
"#Delta dp_{T} for %s objects", pairs[ipair].c_str());
959 h_dPt[ipair] =
fs_->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
960 h_dPt[ipair]->GetXaxis()->SetTitle(
"dp_{T} (GeV)");
962 sprintf(hname,
"h_dP%s", pairs[ipair].c_str());
963 sprintf(htit,
"#Delta p for %s objects", pairs[ipair].c_str());
964 h_dP[ipair] =
fs_->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
965 h_dP[ipair]->GetXaxis()->SetTitle(
"dP (GeV)");
967 sprintf(hname,
"h_dinvPt%s", pairs[ipair].c_str());
968 sprintf(htit,
"#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
970 h_dinvPt[ipair]->GetXaxis()->SetTitle(
"d(1/p_{T})");
971 sprintf(hname,
"h_mindR%s", pairs[ipair].c_str());
972 sprintf(htit,
"min(#Delta R) for %s objects", pairs[ipair].c_str());
974 h_mindR[ipair]->GetXaxis()->SetTitle(
"dR");
977 for (
int lvl=0; lvl<2; lvl++) {
978 sprintf(hname,
"h_dEtaL1%s", levels[lvl+1].c_str());
979 sprintf(htit,
"#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
982 sprintf(hname,
"h_dPhiL1%s", levels[lvl+1].c_str());
983 sprintf(htit,
"#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
986 sprintf(hname,
"h_dRL1%s", levels[lvl+1].c_str());
987 sprintf(htit,
"#Delta R for L1 and %s objects", levels[lvl+1].c_str());
992 int levmin = (
doL2L3_ ? 0 : 10);
993 for (
int ilevel=levmin; ilevel<20; ilevel++) {
994 sprintf(hname,
"h_p%s", levels[ilevel].c_str());
995 sprintf(htit,
"p for %s objects", levels[ilevel].c_str());
996 h_p[ilevel] =
fs_->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
997 h_p[ilevel]->GetXaxis()->SetTitle(
"p (GeV)");
999 sprintf(hname,
"h_pt%s", levels[ilevel].c_str());
1000 sprintf(htit,
"p_{T} for %s objects", levels[ilevel].c_str());
1001 h_pt[ilevel] =
fs_->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
1002 h_pt[ilevel]->GetXaxis()->SetTitle(
"p_{T} (GeV)");
1004 sprintf(hname,
"h_eta%s", levels[ilevel].c_str());
1005 sprintf(htit,
"#eta for %s objects", levels[ilevel].c_str());
1006 h_eta[ilevel] =
fs_->
make<TH1D>(hname, htit, 100, -5.0, 5.0);
1007 h_eta[ilevel]->GetXaxis()->SetTitle(
"#eta");
1009 sprintf(hname,
"h_phi%s", levels[ilevel].c_str());
1010 sprintf(htit,
"#phi for %s objects", levels[ilevel].c_str());
1011 h_phi[ilevel] =
fs_->
make<TH1D>(hname, htit, 70, -3.5, 3.50);
1012 h_phi[ilevel]->GetXaxis()->SetTitle(
"#phi");
1017 for (
int icut=0; icut<2; icut++) {
1018 sprintf(hname,
"h_eMip%s", cuts[icut].c_str());
1019 sprintf(htit,
"eMip for %s tracks", cuts[icut].c_str());
1021 h_eMip[icut]->GetXaxis()->SetTitle(
"E_{Mip} (GeV)");
1023 sprintf(hname,
"h_eMaxNearP%s", cuts[icut].c_str());
1024 sprintf(htit,
"eMaxNearP for %s tracks", cuts[icut].c_str());
1026 h_eMaxNearP[icut]->GetXaxis()->SetTitle(
"E_{MaxNearP} (GeV)");
1028 sprintf(hname,
"h_eNeutIso%s", cuts[icut].c_str());
1029 sprintf(htit,
"eNeutIso for %s ", cuts[icut].c_str());
1031 h_eNeutIso[icut]->GetXaxis()->SetTitle(
"E_{NeutIso} (GeV)");
1033 for (
int kcut=0; kcut<2; ++kcut) {
1034 for (
int lim=0; lim<5; ++lim) {
1035 sprintf(hname,
"h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1036 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());
1040 sprintf(hname,
"h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1041 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());
1048 std::string ecut1[3] = {
"all",
"HLTMatched",
"HLTNotMatched"};
1050 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,
1051 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
1052 for (
int icut=0; icut<6; icut++) {
1054 int i1 = (icut>2 ? 1 : 0);
1055 int i2 = icut - i1*3;
1056 for (
int kcut=0; kcut<48; kcut++) {
1057 for (
int lim=0; lim<5; ++lim) {
1058 sprintf(hname,
"h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1059 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());
1060 h_eHcal[lim][icut][kcut]=
fs_->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
1061 h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
1062 sprintf(hname,
"h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1063 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());
1064 h_eCalo[lim][icut][kcut]=
fs_->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
1065 h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
1073 unsigned int preL1, preHLT;
1074 std::map<unsigned int, unsigned int>::iterator itr;
1075 std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
1086 preL1 = (itrPre->second).
first;
1087 preHLT = (itrPre->second).
second;
1089 << itrPre->first <<
" " << preL1 <<
" " 1091 g_Accepts->Fill(itr->first, itr->second);
1092 g_PreL1->Fill(itr->first, preL1);
1093 g_PreHLT->Fill(itr->first, preHLT);
1094 g_Pre->Fill(itr->first, preL1*preHLT);
1113 if (!trkCollection.
isValid()) {
1116 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1119 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1121 trkCaloDirections1, ((
verbosity_/100)%10>2));
1123 int nRH_eMipDR=0, nNearTRKs=0;
1124 std::vector<bool> selFlags;
1125 for (trkDetItr = trkCaloDirections1.begin();
1126 trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
1127 double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
1128 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1132 if (pTrack->
p() > 20) {
1134 pTrack->
pz(), pTrack->
p());
1137 trkDetItr->pointECAL,
a_mipR_,
1138 trkDetItr->directionECAL, nRH_eMipDR);
1143 oneCutParameters.
maxDzPV = 100;
1150 oneCutParameters.
maxDzPV = 100;
1160 <<
"ntracks " << nTracks
1162 <<
" nNearTRKs " << nNearTRKs;
1168 <<
"ok " << trkDetItr->okECAL <<
" " 1169 << trkDetItr->okHCAL;
1173 trkDetItr->directionECAL, nRH_eMipDR);
1177 trkDetItr->directionECAL, nRH_eMipDR);
1178 double e_inCone = e2 -
e1;
1179 bool chgIsolFlag = (conehmaxNearP <
cutCharge_);
1180 bool mipFlag = (eMipDR <
cutMip_);
1182 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1184 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1185 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1188 <<
"(" << mipFlag <<
")" <<
" ; ok: " 1189 << trkDetItr->okECAL <<
"/" 1190 << trkDetItr->okHCAL <<
" ; chgiso: " 1192 <<
"(" << chgIsolFlag <<
")";
1194 if (chgIsolFlag && mipFlag && trkpropFlag) {
1195 double distFromHotCell=-99.0;
1196 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1198 std::vector<DetId> coneRecHitDetIds;
1200 trkDetItr->pointECAL,
1201 a_coneR_, trkDetItr->directionHCAL,
1202 nRecHitsCone, coneRecHitDetIds,
1203 distFromHotCell, ietaHotCell, iphiHotCell,
1212 t_TrkP ->push_back(pTrack->
p());
1218 <<
" tracks in TrkRestree out of " <<
nTracks;
1233 << layershb->
size() <<
"/" << layershe->
size();
1239 double tHB=0.0, tHE=0.0;
1241 int nSeedHB=0, nSeedHE=0;
1250 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1251 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1252 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1258 double ptTriggered = -10;
1259 double etaTriggered = -100;
1260 double phiTriggered = -100;
1261 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
1262 if (l1tauobjref[
p]->
pt()>ptTriggered) {
1263 ptTriggered = l1tauobjref[
p]->pt();
1264 phiTriggered = l1tauobjref[
p]->phi();
1265 etaTriggered = l1tauobjref[
p]->eta();
1268 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
1269 if (l1jetobjref[
p]->
pt()>ptTriggered) {
1270 ptTriggered = l1jetobjref[
p]->pt();
1271 phiTriggered = l1jetobjref[
p]->phi();
1272 etaTriggered = l1jetobjref[
p]->eta();
1275 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
1276 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
1277 ptTriggered=l1forjetobjref[
p]->pt();
1278 phiTriggered=l1forjetobjref[
p]->phi();
1279 etaTriggered=l1forjetobjref[
p]->eta();
1283 reco::VertexCollection::const_iterator vitSel;
1286 for (reco::VertexCollection::const_iterator vit=pVertHE->begin();
1287 vit!=pVertHE->end(); vit++) {
1295 (minDZ==100)) vtxMatch=
true;
1298 double R =
deltaR(etaTriggered, phiTriggered,
1304 reco::VertexCollection::const_iterator vitSel;
1306 bool vtxMatch(
false);
1307 for (reco::VertexCollection::const_iterator vit=pVertHB->begin();
1308 vit!=pVertHB->end(); vit++) {
1316 (minDZ==100)) vtxMatch=
true;
1319 double R =
deltaR(etaTriggered, phiTriggered,
1322 if (R>1.2 && vtxMatch) nSeedHB++;
1327 "hltIsolPixelTrackProdHE") ;
1329 "hltIsolPixelTrackProdHB");
1332 <<
" nCand: " << nCandHB <<
"/" << nCandHE
1333 <<
"nSeed: " << nSeedHB <<
"/" << nSeedHE;
1346 if (!trkCollection.
isValid()) {
1349 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1352 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1356 <<
" to be matched to something out of " 1357 << trkCaloDirections1.size()<<
" reco tracks";
1358 for (
unsigned int i=0;
i<L2cands->size();
i++) {
1361 double enIn = candref->energyIn();
1362 h_EnIn->Fill(candref->energyIn());
1363 h_EnOut->Fill(candref->energyOut());
1365 candref->track()->pz(),candref->track()->p());
1368 << candref->track()->eta() <<
"/" 1369 << candref->track()->phi() <<
"/" 1370 << candref->track()->pt() <<
"/" 1371 << candref->energyIn();
1373 double mindR=999.9, mindP1=999.9, eMipDR=0.0;
1374 std::vector<bool> selFlags;
1376 double conehmaxNearP = 0, hCone=0;
1377 for (trkDetItr = trkCaloDirections1.begin();
1378 trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
1379 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1381 pTrack->
pz(), pTrack->
p());
1382 double dr =
dR(v1,v2);
1383 double dp1 =
std::abs(1./v1.r() - 1./v2.r());
1386 << pTrack->
eta() <<
"/" << pTrack->
phi()
1387 <<
"/" << pTrack->
pt() <<
" has dr/dp= " 1388 << dr <<
"/" << dp1;
1393 int nRH_eMipDR=0, nNearTRKs=0;
1396 trkDetItr->pointECAL,
a_mipR_,
1397 trkDetItr->directionECAL, nRH_eMipDR);
1402 oneCutParameters.
maxDzPV = 100;
1409 oneCutParameters.
maxDzPV = 100;
1422 trkDetItr->pointHCAL,
1423 trkDetItr->pointECAL,
1428 trkDetItr->pointHCAL,
1429 trkDetItr->pointECAL,
1432 double e_inCone = e2 -
e1;
1433 bool chgIsolFlag = (conehmaxNearP <
cutCharge_);
1434 bool mipFlag = (eMipDR <
cutMip_);
1436 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1438 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1439 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1440 selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1441 selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1442 double distFromHotCell=-99.0;
1443 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1445 std::vector<DetId> coneRecHitDetIds;
1447 trkDetItr->pointECAL,
1448 a_coneR_, trkDetItr->directionHCAL,
1449 nRecHitsCone, coneRecHitDetIds,
1450 distFromHotCell, ietaHotCell, iphiHotCell,
1470 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1474 for (
int j=0; j<3; j++) {
1475 for (
unsigned int k=0;
k<
vec_[j].size();
k++) {
1478 <<
vec_[j][
k].pt() <<
" eta " 1479 <<
vec_[j][
k].eta() <<
" phi " 1480 <<
vec_[j][
k].phi();
1485 double deta, dphi,
dr;
1487 for (
int lvl=1; lvl<3; lvl++) {
1488 for (
unsigned int i=0;
i<
vec_[lvl].size();
i++) {
1494 << deta <<
" dphi " << dphi <<
" dR " <<
dr;
1503 for (
unsigned int k=0;
k<
vec_[2].size(); ++
k) {
1508 <<
vec_[2][
k].eta() <<
" phi " 1509 <<
vec_[2][
k].phi();
1510 for (
unsigned int j=0; j<
vec_[1].size(); j++) {
1514 mindRvec=
vec_[1][j];
1531 edm::LogVerbatim(
"IsoTrack") <<
"Now Matching L3 track with reco: L3 Track (eta, phi) " 1532 <<
vec_[2][
k].eta() <<
":" <<
vec_[2][
k].phi()
1533 <<
" L2 Track " << mindRvec.eta() <<
":" 1534 << mindRvec.phi() <<
" dR " << mindR;
1535 reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1536 if (trkCollection.
isValid()) {
1537 double mindP(9999.9);
1538 reco::TrackCollection::const_iterator trkItr;
1539 for (trkItr=trkCollection->begin();
1540 trkItr!=trkCollection->end(); trkItr++) {
1542 trkItr->pz(), trkItr->p());
1553 <<
" eta " << v4.eta() <<
" phi " 1554 << v4.phi() <<
" DR " <<
deltaR;
1557 edm::LogVerbatim(
"IsoTrack") <<
"Now Matching at Reco level in step 1 DR: " 1558 << mindR <<
":" << mindP <<
" eta:phi " 1559 << mindRvec.eta() <<
":" << mindRvec.phi();
1560 if (mindR < 0.03 && mindP > 0.1) {
1561 for (trkItr=trkCollection->begin();
1562 trkItr!=trkCollection->end(); trkItr++) {
1564 trkItr->pz(), trkItr->p());
1567 if (dp<mindP && deltaR<0.03) {
1575 edm::LogVerbatim(
"IsoTrack") <<
"Now Matching at Reco level in step 2 DR: " 1576 << mindR <<
":" << mindP <<
" eta:phi " 1577 << mindRvec.eta() <<
":"<<mindRvec.phi();
1588 if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1594 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1596 if (trkCollection.
isValid()) {
1600 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1604 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1611 <<
hit->time() <<
" energy " 1619 <<
hit->time() <<
" energy " 1626 <<
" time " <<
hit->time() <<
" energy " 1630 unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1632 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1633 bool l3Track = (
std::find(goodTks.begin(), goodTks.end(),
1634 trkDetItr->trkItr) != goodTks.end());
1635 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1637 pTrack->
pz(), pTrack->
p());
1640 double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1641 if (trkDetItr->okHCAL) {
1643 ieta = detId.
ieta();
1645 for (
unsigned k=0;
k<
vec_[0].size(); ++
k) {
1647 if (deltaR<mindR) mindR =
deltaR;
1651 <<
" HCAL " << trkDetItr->okHCAL
1652 <<
" Flag " << selectTk;
1653 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1655 int nRH_eMipDR=0, nNearTRKs=0;
1659 trkDetItr->directionECAL, nRH_eMipDR);
1663 trkDetItr->directionECAL, nRH_eMipDR);
1666 trkDetItr->pointECAL,
a_mipR_,
1667 trkDetItr->directionECAL, nRH_eMipDR);
1672 double distFromHotCell=-99.0;
1673 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1675 std::vector<DetId> coneRecHitDetIds;
1677 trkDetItr->pointECAL,
1678 a_coneR_, trkDetItr->directionHCAL,
1679 nRecHitsCone, coneRecHitDetIds,
1680 distFromHotCell, ietaHotCell, iphiHotCell,
1682 if (eMipDR<1.0) nselTk++;
1688 fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1_));
1707 fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1_));
1733 edm::LogVerbatim(
"IsoTrack") <<
"Inside chgIsolation() with eta/phi Triggered: " 1734 << etaTriggered <<
"/" << phiTriggered;
1735 std::vector<double>
maxP;
1737 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1740 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1742 trkCaloDirections1, ((
verbosity_/100)%10>2));
1748 std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1752 bool vtxMatch =
false;
1754 unsigned int ivSel =
recVtxs_->size();
1756 for (
unsigned int iv = 0; iv <
recVtxs_->size(); ++iv) {
1773 std::pair<double,double> seedCooAtEC;
1787 VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1791 for (
unsigned int l=0;
l<VecSeedsatEC.size();
l++) {
1792 unsigned int iSeed = VecSeedsatEC[
l].first;
1796 for (
unsigned int j=0; j<VecSeedsatEC.size(); j++) {
1797 unsigned int iSurr = VecSeedsatEC[j].first;
1798 if (iSeed != iSurr) {
1806 unsigned int ivSel =
recVtxs_->size();
1808 for (
unsigned int iv = 0; iv <
recVtxs_->size(); ++iv) {
1817 double dist =
getDistInCM(VecSeedsatEC[i].
second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[j].second.first, VecSeedsatEC[j].second.second);
1829 double conehmaxNearP = -1;
bool selectTk=
false;
1830 double mindR=999.9;
int nTracks=0;
1832 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1834 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1836 pTrack->
pz(), pTrack->
p());
1837 double dr =
dR(v1,v2);
1857 std::vector<int> nGood(4,0);
1858 if (trkCollection.
isValid()) {
1862 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1870 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1872 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1874 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1877 double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1878 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
1879 if (l1tauobjref[
p]->
pt()>ptTriggered) {
1880 ptTriggered = l1tauobjref[
p]->pt();
1881 phiTriggered = l1tauobjref[
p]->phi();
1882 etaTriggered = l1tauobjref[
p]->eta();
1885 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
1886 if (l1jetobjref[
p]->
pt()>ptTriggered) {
1887 ptTriggered = l1jetobjref[
p]->pt();
1888 phiTriggered = l1jetobjref[
p]->phi();
1889 etaTriggered = l1jetobjref[
p]->eta();
1892 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
1893 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
1894 ptTriggered=l1forjetobjref[
p]->pt();
1895 phiTriggered=l1forjetobjref[
p]->phi();
1896 etaTriggered=l1forjetobjref[
p]->eta();
1899 double pTriggered = ptTriggered*cosh(etaTriggered);
1901 ptTriggered*
sin(phiTriggered),
1902 pTriggered*tanh(etaTriggered), pTriggered);
1904 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1906 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++) {
1907 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1909 pTrack->
pz(), pTrack->
p());
1912 double mindR =
dR(v4, pTrigger);
1915 <<
" HCAL " << trkDetItr->okHCAL
1916 <<
" Flag " << selectTk;
1917 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
1918 int nRH_eMipDR(0), nNearTRKs(0);
1921 trkDetItr->pointHCAL,
1922 trkDetItr->pointECAL,
a_mipR_,
1923 trkDetItr->directionECAL, nRH_eMipDR);
1928 if (conehmaxNearP < 2.0 && eMipDR<1.0) {
1929 if (pTrack->
p() >= 20 && pTrack->
p() < 30) {
1931 }
else if (pTrack->
p() >= 30 && pTrack->
p() < 40) {
1933 }
else if (pTrack->
p() >= 40 && pTrack->
p() < 60) {
1935 }
else if (pTrack->
p() >= 60 && pTrack->
p() < 100) {
1943 for (
unsigned int ii=0;
ii<nGood.size(); ++
ii)
1948 h_p[indx]->Fill(vec.r());
1949 h_pt[indx]->Fill(vec.pt());
1950 h_eta[indx]->Fill(vec.eta());
1951 h_phi[indx]->Fill(vec.phi());
1956 double dr =
dR(vec1,vec2);
1957 double deta =
dEta(vec1, vec2);
1958 double dphi =
dPhi(vec1, vec2);
1959 double dpt =
dPt(vec1, vec2);
1960 double dp =
dP(vec1, vec2);
1961 double dinvpt =
dinvPt(vec1, vec2);
1962 h_dEta[indx] ->Fill(deta);
1963 h_dPhi[indx] ->Fill(dphi);
1964 h_dPt[indx] ->Fill(dpt);
1965 h_dP[indx] ->Fill(dp);
1970 <<
" deta " << deta <<
" dphi " << dphi
1971 <<
" dpt " << dpt <<
" dinvpt " << dinvpt;
1975 h_eMip[indx] ->Fill(eMipDR);
1979 for (
int lim=0; lim<5; ++lim) {
1994 if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1995 else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1996 if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1997 for (
int lim=0; lim<5; ++lim) {
2000 h_eCalo[lim][indx][
kk] ->Fill(hCone+eMipDR);
2007 return (vec1.eta()-vec2.eta());
2012 double phi1 = vec1.phi();
2013 if (phi1 < 0) phi1 += 2.0*
M_PI;
2014 double phi2 = vec2.phi();
2015 if (phi2 < 0) phi2 += 2.0*
M_PI;
2016 double dphi = phi1-phi2;
2018 else if (dphi < -
M_PI) dphi += 2.*
M_PI;
2023 double deta =
dEta(vec1,vec2);
2024 double dphi =
dPhi(vec1,vec2);
2025 return std::sqrt(deta*deta + dphi*dphi);
2029 return (vec1.pt()-vec2.pt());
2033 return (
std::abs(vec1.r()-vec2.r()));
2037 return ((1/vec1.pt())-(1/vec2.pt()));
2041 double eta(0),
phi(0), ptmax(0);
2042 for (
unsigned int k=0;
k<
vec_[0].size(); ++
k) {
2046 ptmax =
vec_[0][
k].pt();
2047 }
else if (
vec_[0][
k].
pt() > ptmax) {
2050 ptmax =
vec_[0][
k].pt();
2053 return std::pair<double,double>(
eta,
phi);
2064 double Rcurv = 9999999;
2067 double ecDist =
zEE_;
2068 double ecRad =
rEB_;
2069 double theta = 2*atan(
exp(-etaIP));
2072 if (fabs(etaIP)<1.479) {
2073 if ((0.5*ecRad/Rcurv)>1) {
2077 deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
2078 double alpha1 = 2*asin(0.5*ecRad/Rcurv);
2079 double z = ecRad/
tan(theta);
2080 if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ;
2081 else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ;
2082 double zAbs=fabs(zNew);
2084 etaEC = -
log(
tan(0.5*atan(ecRad/zAbs)));
2085 deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
2088 zAbs = (fabs(etaIP)/etaIP)*ecDist;
2089 double Zflight = fabs(zAbs-vtxZ);
2090 double alpha = (Zflight*ecRad)/(z*Rcurv);
2091 double Rec = 2*Rcurv*
sin(alpha/2);
2092 deltaPhi =-charge*alpha/2;
2093 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
2097 zNew = (fabs(etaIP)/etaIP)*ecDist;
2098 double Zflight = fabs(zNew-vtxZ);
2099 double Rvirt = fabs(Zflight*
tan(theta));
2100 double Rec = 2*Rcurv*
sin(Rvirt/(2*Rcurv));
2101 deltaPhi =-(
charge)*(Rvirt/(2*Rcurv));
2102 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
2105 if (zNew<0) etaEC=-etaEC;
2111 std::pair<double,double> retVal(etaEC,phiEC);
2117 double theta1=2*atan(
exp(-eta1));
2118 double theta2=2*atan(
exp(-eta2));
2119 if (fabs(eta1)<1.479) Rec=
rEB_;
2120 else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=
tan(theta1)*
zEE_;
2125 if (angle<0.5*
M_PI)
return fabs((Rec/
sin(theta1))*
tan(angle));
unsigned int size() const
number of trigger paths in trigger table
static const std::string kSharedResource
double p() const
momentum vector magnitude
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
void endRun(edm::Run const &, edm::EventSetup const &) override
std::string theTrackQuality_
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
const unsigned int nTracks(const reco::Vertex &sv)
edm::Service< TFileService > fs_
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const edm::InputTag l2CandTag_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
std::vector< double > * t_NFTrkMinDR
void beginRun(edm::Run const &, edm::EventSetup const &) override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
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)
std::vector< bool > * t_NFTrkMissFlag
const bool doChgIsolTree_
edm::EDGetTokenT< LumiDetails > tok_lumi_
edm::Handle< HBHERecHitCollection > hbhe_
std::vector< bool > * t_PixTrkcandselTk
std::vector< reco::TrackRef > pixelTrackRefsHB_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESHandle< MagneticField > bFieldH_
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
Sin< T >::type sin(const T &t)
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
const Keys & filterKeys(trigger::size_type index) const
std::map< unsigned int, const std::pair< int, int > > trigPreList_
Global3DPoint GlobalPoint
std::vector< EcalRecHit >::const_iterator const_iterator
Geom::Theta< T > theta() const
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
double phi() const
azimuthal angle of momentum vector
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
const double minPTrackValue_
edm::Handle< reco::BeamSpot > beamSpotH_
std::vector< math::XYZTLorentzVector > vec_[3]
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::pair< double, double > etaPhiTrigger()
Strings const & triggerNames() const
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
float lumiValue(AlgoType algo, unsigned int bx) const
const double tauUnbiasCone_
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
edm::ESHandle< CaloGeometry > pG_
void analyze(const edm::Event &, const edm::EventSetup &) override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const std::vector< edm::InputTag > pixelTracksSources_
void studyMipCut(edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
HLTPrescaleProvider hltPrescaleProvider_
double dinvPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
double eta() const
pseudorapidity of momentum vector
void studyTrigger(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
void fillHist(int, math::XYZTLorentzVector &)
std::vector< double > * t_NFTrkcandP
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHB_
std::vector< bool > * t_TrkNuIsolFlag
std::map< unsigned int, unsigned int > trigList_
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
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
double pt() const
track transverse momentum
void fillEnergy(int, int, double, double, math::XYZTLorentzVector &)
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)
spr::trackSelectionParameters selectionParameters_
std::vector< double > * t_NFcandEta
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHE_
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)
LuminosityBlock const & getLuminosityBlock() const
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
static std::string const triggerResults
IsoTrig(const edm::ParameterSet &)
std::vector< double > * t_PixcandPt
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< reco::TrackRef > pixelTrackRefsHE_
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)
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
const edm::InputTag pixCandTag_
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
std::vector< double > * t_PixTrkcandPt
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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.
edm::Handle< reco::VertexCollection > recVtxs_
std::vector< bool > * t_TrkqltyFlag
HLTConfigProvider const & hltConfigProvider() const
TH1D * h_etaMipTracks[5][2][2]
const std::string processName_
std::vector< std::vector< double > > * t_PixcandMaxP
std::vector< double > * t_NFTrkcandEmip
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
const edm::InputTag l1CandTag_
void clearMipCutTreeVectors()
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits_
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
const Point & position() const
position
std::vector< double > * t_PixcandPhi
std::vector< double > * t_PixTrkcandEta
std::vector< int > * t_nGoodTk
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
double queryModuleTimeByLabel(edm::StreamID, std::string const &module) const
const std::vector< double > pixelIsolationConeSizeAtEC_
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
const std::vector< std::string > trigNames_
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)
double py() const
y coordinate of momentum vector
void fillCuts(int, double, double, double, math::XYZTLorentzVector &, int, bool)
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)
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