29 #include "TDirectory.h" 116 std::vector<double> &PixMaxP,
double &TrkMaxP,
bool &selTk);
119 double &EmipNFcand,
double &EmipTrkcand,
120 double &mindR,
double &mindP1,
121 std::vector<bool> &Flags,
double hCone);
127 std::vector<reco::TrackCollection::const_iterator>&);
129 std::vector<reco::TrackCollection::const_iterator>&);
130 void chgIsolation(
double& etaTriggered,
double& phiTriggered,
146 double pT,
int charge,
double vtxZ);
147 double getDistInCM(
double eta1,
double phi1,
double eta2,
double phi2);
185 std::vector<edm::EDGetTokenT<reco::TrackCollection> >
tok_pixtks_;
263 std::vector<math::XYZTLorentzVector>
vec_[3];
270 pixCandTag_(iConfig.getUntrackedParameter<
edm::InputTag> (
"pixCandTag")),
271 l1CandTag_(iConfig.getUntrackedParameter<
edm::InputTag> (
"l1CandTag")),
272 l2CandTag_(iConfig.getUntrackedParameter<
edm::InputTag> (
"l2CandTag")),
280 verbosity_(iConfig.getUntrackedParameter<
int>(
"verbosity",0)),
282 minPTrackValue_(iConfig.getUntrackedParameter<double>(
"minPTrackValue")),
283 vtxCutSeed_(iConfig.getUntrackedParameter<double>(
"vertexCutSeed")),
284 vtxCutIsol_(iConfig.getUntrackedParameter<double>(
"vertexCutIsol")),
285 tauUnbiasCone_(iConfig.getUntrackedParameter<double>(
"tauUnbiasCone")),
286 prelimCone_(iConfig.getUntrackedParameter<double>(
"prelimCone")),
289 dr_L1_(iConfig.getUntrackedParameter<double>(
"isolationL1",1.0)),
290 a_coneR_(iConfig.getUntrackedParameter<double>(
"coneRadius",34.98)),
292 a_mipR_(iConfig.getUntrackedParameter<double>(
"coneRadiusMIP",14.0)),
293 a_neutR1_(iConfig.getUntrackedParameter<double>(
"coneRadiusNeut1",21.0)),
294 a_neutR2_(iConfig.getUntrackedParameter<double>(
"coneRadiusNeut2",29.0)),
295 cutMip_(iConfig.getUntrackedParameter<double>(
"cutMIP",1.0)),
296 cutCharge_(iConfig.getUntrackedParameter<double>(
"chargeIsolation",2.0)),
297 cutNeutral_(iConfig.getUntrackedParameter<double>(
"neutralIsolation",2.0)),
298 minRunNo_(iConfig.getUntrackedParameter<
int>(
"minRun")),
299 maxRunNo_(iConfig.getUntrackedParameter<
int>(
"maxRun")),
335 tok_trigEvt_ = consumes<trigger::TriggerEvent>(triggerEvent_);
337 tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel);
380 <<
"\t cuts (MIP " <<
cutMip_ <<
" : Charge " 388 <<
"\t pixelIsolationConeSizeAtEC";
393 double pl[] = {20,30,40,60,80,120};
448 std::vector<std::string> triggers = {
"HLT_IsoTrackHB"};
449 std::vector<edm::InputTag> tags = {
edm::InputTag(
"hltHITPixelTracksHB"),
451 std::vector<double> cones = {35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 63.9, 70.0};
453 desc.
addUntracked<std::vector<std::string> >(
"Triggers", triggers);
485 desc.
addUntracked<std::vector<edm::InputTag> >(
"pixelTracksSources", tags);
486 desc.
addUntracked<std::vector<double> >(
"pixelIsolationConeSizeAtEC", cones);
492 descriptions.
add(
"isoTrigHB",desc);
498 edm::LogVerbatim(
"IsoTrack") <<
"Event starts====================================";
500 int RunNo = iEvent.
id().
run();
513 if (!triggerEventHandle.
isValid()) {
514 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product hltTriggerSummaryAOD";
517 triggerEvent = *(triggerEventHandle.
product());
534 if (!
recVtxs_->empty() && !((*recVtxs_)[0].isFake())) {
550 for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
559 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
561 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
562 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
564 for(
int i=0;
i<7;
i++) {
576 << iEvent.
id().
event() <<
" Lumi " 580 if (!triggerResults.isValid()) {
581 edm::LogWarning(
"IsoTrack") <<
"Error! Can't get the product triggerResults";
585 std::vector<std::string>
modules;
586 h_nHLT->Fill(triggerResults->size());
589 const std::vector<std::string> & triggerNames_ = triggerNames.
triggerNames();
593 for (
unsigned int i=0;
i<triggerResults->size();
i++) {
594 unsigned int triggerindx = hltConfig.
triggerIndex(triggerNames_[
i]);
595 const std::vector<std::string>& moduleLabels(hltConfig.
moduleLabels(triggerindx));
602 << triggerNames_[
i] <<
" accept " 603 << triggerResults->accept(i);
604 hlt = triggerResults->accept(i);
614 preL1 = prescales.first;
615 preHLT = prescales.second;
616 prescale = preL1*preHLT;
619 <<
hlt <<
" preL1 " << preL1
620 <<
" preHLT " << preHLT;
621 for (
int iv=0; iv<3; ++iv)
vec_[iv].
clear();
625 trigList_.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
626 trigPreList_.insert(std::pair<
unsigned int, std::pair<int, int>>(RunNo,prescales));
629 for (
unsigned int ifilter=0; ifilter<triggerEvent.
sizeFilters();
631 std::vector<int>
Keys;
634 for (
unsigned int imodule=0; imodule<moduleLabels.size();
636 if (label.find(moduleLabels[imodule]) != std::string::npos) {
639 for (
unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
640 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
643 if (label.find(
"L2Filter") != std::string::npos) {
644 vec_[1].push_back(v4);
645 }
else if (label.find(
"L3Filter") != std::string::npos) {
646 vec_[2].push_back(v4);
648 vec_[0].push_back(v4);
653 <<
" : pt " << TO.
pt()
654 <<
" eta " << TO.
eta()
655 <<
" phi " << TO.
phi()
656 <<
" mass " << TO.
mass()
657 <<
" Id " << TO.
id();
662 std::vector<reco::TrackCollection::const_iterator> goodTks;
668 reco::TrackCollection::const_iterator trkItr;
669 for (trkItr=trkCollection->begin();
670 trkItr!=trkCollection->end(); trkItr++)
671 goodTks.push_back(trkItr);
706 const unsigned int n(hltConfig.
size());
707 for (
unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
708 unsigned int triggerindx = hltConfig.
triggerIndex(triggerNames_[itrig]);
709 if (triggerindx >=
n)
711 << triggerindx <<
" does not exist in" 712 <<
" the current menu";
715 << triggerindx <<
" exists";
765 std::vector<double> &PixMaxP,
766 double &TrkMaxP,
bool &selTk) {
783 double &EmipNFcand,
double &EmipTrkcand,
784 double &mindR,
double &mindP1,
785 std::vector<bool> &Flags,
double hCone) {
810 char hname[100], htit[100];
812 "Reco",
"RecoMatch",
"RecoNoMatch",
813 "L2Match",
"L2NoMatch",
"L3Match",
"L3NoMatch",
814 "HLTTrk",
"HLTGoodTrk",
"HLTIsoTrk",
"HLTMip",
815 "HLTSelect",
"nonHLTTrk",
"nonHLTGoodTrk",
816 "nonHLTIsoTrk",
"nonHLTMip",
"nonHLTSelect"};
824 TimingTree_->Branch(
"t_timeL2Prod",
"std::vector<double>", &t_timeL2Prod);
825 TimingTree_->Branch(
"t_nPixCand",
"std::vector<int>", &t_nPixCand);
826 TimingTree_->Branch(
"t_nPixSeed",
"std::vector<int>", &t_nPixSeed);
827 TimingTree_->Branch(
"t_nGoodTk",
"std::vector<int>", &t_nGoodTk);
832 t_TrkP =
new std::vector<double>();
839 TrkResTree_->Branch(
"t_TrkhCone",
"std::vector<double>", &t_TrkhCone);
840 TrkResTree_->Branch(
"t_TrkP",
"std::vector<double>", &t_TrkP);
841 TrkResTree_->Branch(
"t_TrkselTkFlag",
"std::vector<bool>", &t_TrkselTkFlag);
842 TrkResTree_->Branch(
"t_TrkqltyFlag",
"std::vector<bool>", &t_TrkqltyFlag);
843 TrkResTree_->Branch(
"t_TrkMissFlag",
"std::vector<bool>", &t_TrkMissFlag);
844 TrkResTree_->Branch(
"t_TrkPVFlag",
"std::vector<bool>", &t_TrkPVFlag);
845 TrkResTree_->Branch(
"t_TrkNuIsolFlag",
"std::vector<bool>", &t_TrkNuIsolFlag);
861 ChgIsolnTree_->Branch(
"t_PixcandP",
"std::vector<double>", &t_PixcandP);
862 ChgIsolnTree_->Branch(
"t_PixcandPt",
"std::vector<double>", &t_PixcandPt);
863 ChgIsolnTree_->Branch(
"t_PixcandEta",
"std::vector<double>", &t_PixcandEta);
864 ChgIsolnTree_->Branch(
"t_PixcandPhi",
"std::vector<double>", &t_PixcandPhi);
865 ChgIsolnTree_->Branch(
"t_PixcandMaxP",
"std::vector<std::vector<double> >", &t_PixcandMaxP);
866 ChgIsolnTree_->Branch(
"t_PixTrkcandP",
"std::vector<double>", &t_PixTrkcandP);
867 ChgIsolnTree_->Branch(
"t_PixTrkcandPt",
"std::vector<double>", &t_PixTrkcandPt );
868 ChgIsolnTree_->Branch(
"t_PixTrkcandEta",
"std::vector<double>", &t_PixTrkcandEta );
869 ChgIsolnTree_->Branch(
"t_PixTrkcandPhi",
"std::vector<double>", &t_PixTrkcandPhi );
870 ChgIsolnTree_->Branch(
"t_PixTrkcandMaxP",
"std::vector<double>", &t_PixTrkcandMaxP);
871 ChgIsolnTree_->Branch(
"t_PixTrkcandselTk",
"std::vector<bool>", &t_PixTrkcandselTk);
895 t_ECone =
new std::vector<double>();
897 MipCutTree_->Branch(
"t_NFcandP",
"std::vector<double>", &t_NFcandP);
898 MipCutTree_->Branch(
"t_NFcandPt",
"std::vector<double>", &t_NFcandPt);
899 MipCutTree_->Branch(
"t_NFcandEta",
"std::vector<double>", &t_NFcandEta);
900 MipCutTree_->Branch(
"t_NFcandPhi",
"std::vector<double>", &t_NFcandPhi);
901 MipCutTree_->Branch(
"t_NFcandEmip",
"std::vector<double>", &t_NFcandEmip);
902 MipCutTree_->Branch(
"t_NFTrkcandP",
"std::vector<double>", &t_NFTrkcandP);
903 MipCutTree_->Branch(
"t_NFTrkcandPt",
"std::vector<double>", &t_NFTrkcandPt );
904 MipCutTree_->Branch(
"t_NFTrkcandEta",
"std::vector<double>", &t_NFTrkcandEta );
905 MipCutTree_->Branch(
"t_NFTrkcandPhi",
"std::vector<double>", &t_NFTrkcandPhi );
906 MipCutTree_->Branch(
"t_NFTrkcandEmip",
"std::vector<double>", &t_NFTrkcandEmip);
907 MipCutTree_->Branch(
"t_NFTrkMinDR",
"std::vector<double>", &t_NFTrkMinDR);
908 MipCutTree_->Branch(
"t_NFTrkMinDP1",
"std::vector<double>", &t_NFTrkMinDP1);
909 MipCutTree_->Branch(
"t_NFTrkselTkFlag",
"std::vector<bool>", &t_NFTrkselTkFlag);
910 MipCutTree_->Branch(
"t_NFTrkqltyFlag",
"std::vector<bool>", &t_NFTrkqltyFlag);
911 MipCutTree_->Branch(
"t_NFTrkMissFlag",
"std::vector<bool>", &t_NFTrkMissFlag);
912 MipCutTree_->Branch(
"t_NFTrkPVFlag",
"std::vector<bool>", &t_NFTrkPVFlag);
913 MipCutTree_->Branch(
"t_NFTrkPropFlag",
"std::vector<bool>", &t_NFTrkPropFlag);
914 MipCutTree_->Branch(
"t_NFTrkChgIsoFlag",
"std::vector<bool>", &t_NFTrkChgIsoFlag);
915 MipCutTree_->Branch(
"t_NFTrkNeuIsoFlag",
"std::vector<bool>", &t_NFTrkNeuIsoFlag);
916 MipCutTree_->Branch(
"t_NFTrkMipFlag",
"std::vector<bool>", &t_NFTrkMipFlag);
917 MipCutTree_->Branch(
"t_ECone",
"std::vector<double>", &t_ECone);
920 std::string FilterNames[7] = {
"hltL1sL1SingleJet68",
"hltIsolPixelTrackL2FilterHE",
"ecalIsolPixelTrackFilterHE",
"hltIsolPixelTrackL3FilterHE",
921 "hltIsolPixelTrackL2FilterHB",
"ecalIsolPixelTrackFilterHB",
"hltIsolPixelTrackL3FilterHB"};
922 for(
int i=0;
i<7;
i++) {
923 h_Filters->GetXaxis()->SetBinLabel(
i+1, FilterNames[
i].c_str());
926 h_nHLT =
fs_->
make<TH1I>(
"h_nHLT" ,
"Size of trigger Names", 1000, 1, 1000);
927 h_HLT =
fs_->
make<TH1I>(
"h_HLT" ,
"HLT accept", 3, -1, 2);
930 h_Pre =
fs_->
make<TH1I>(
"h_Pre",
"Prescale", 3000, 0, 3000);
932 h_PreL1wt =
fs_->
make<TH1D>(
"h_PreL1wt",
"Weighted L1 Prescale", 500, 0, 500);
933 h_PreHLTwt =
fs_->
make<TH1D>(
"h_PreHLTwt",
"Weighted HLT Prescale", 500, 0, 100);
936 h_EnIn =
fs_->
make<TH1D>(
"h_EnInEcal",
"EnergyIn Ecal", 200, 0.0, 20.0);
937 h_EnOut =
fs_->
make<TH1D>(
"h_EnOutEcal",
"EnergyOut Ecal", 200, 0.0, 20.0);
938 h_MipEnMatch =
fs_->
make<TH2D>(
"h_MipEnMatch",
"MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
939 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);
942 h_nL3Objs =
fs_->
make<TH1I>(
"h_nL3Objs",
"Number of L3 objects", 10, 0, 10);
944 std::string pairs[9] = {
"L2L3",
"L2L3Match",
"L2L3NoMatch",
"L3Reco",
"L3RecoMatch",
"L3RecoNoMatch",
"NewFilterReco",
"NewFilterRecoMatch",
"NewFilterRecoNoMatch"};
945 for (
int ipair=0; ipair<9; ipair++) {
946 sprintf(hname,
"h_dEta%s", pairs[ipair].c_str());
947 sprintf(htit,
"#Delta#eta for %s", pairs[ipair].c_str());
948 h_dEta[ipair] =
fs_->
make<TH1D>(hname, htit, 200, -10.0, 10.0);
949 h_dEta[ipair]->GetXaxis()->SetTitle(
"d#eta");
951 sprintf(hname,
"h_dPhi%s", pairs[ipair].c_str());
952 sprintf(htit,
"#Delta#phi for %s", pairs[ipair].c_str());
953 h_dPhi[ipair] =
fs_->
make<TH1D>(hname, htit, 140, -7.0, 7.0);
954 h_dPhi[ipair]->GetXaxis()->SetTitle(
"d#phi");
956 sprintf(hname,
"h_dPt%s", pairs[ipair].c_str());
957 sprintf(htit,
"#Delta dp_{T} for %s objects", pairs[ipair].c_str());
958 h_dPt[ipair] =
fs_->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
959 h_dPt[ipair]->GetXaxis()->SetTitle(
"dp_{T} (GeV)");
961 sprintf(hname,
"h_dP%s", pairs[ipair].c_str());
962 sprintf(htit,
"#Delta p for %s objects", pairs[ipair].c_str());
963 h_dP[ipair] =
fs_->
make<TH1D>(hname, htit, 400, -200.0, 200.0);
964 h_dP[ipair]->GetXaxis()->SetTitle(
"dP (GeV)");
966 sprintf(hname,
"h_dinvPt%s", pairs[ipair].c_str());
967 sprintf(htit,
"#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
969 h_dinvPt[ipair]->GetXaxis()->SetTitle(
"d(1/p_{T})");
970 sprintf(hname,
"h_mindR%s", pairs[ipair].c_str());
971 sprintf(htit,
"min(#Delta R) for %s objects", pairs[ipair].c_str());
973 h_mindR[ipair]->GetXaxis()->SetTitle(
"dR");
976 for (
int lvl=0; lvl<2; lvl++) {
977 sprintf(hname,
"h_dEtaL1%s", levels[lvl+1].c_str());
978 sprintf(htit,
"#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
981 sprintf(hname,
"h_dPhiL1%s", levels[lvl+1].c_str());
982 sprintf(htit,
"#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
985 sprintf(hname,
"h_dRL1%s", levels[lvl+1].c_str());
986 sprintf(htit,
"#Delta R for L1 and %s objects", levels[lvl+1].c_str());
991 int levmin = (
doL2L3_ ? 0 : 10);
992 for (
int ilevel=levmin; ilevel<20; ilevel++) {
993 sprintf(hname,
"h_p%s", levels[ilevel].c_str());
994 sprintf(htit,
"p for %s objects", levels[ilevel].c_str());
995 h_p[ilevel] =
fs_->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
996 h_p[ilevel]->GetXaxis()->SetTitle(
"p (GeV)");
998 sprintf(hname,
"h_pt%s", levels[ilevel].c_str());
999 sprintf(htit,
"p_{T} for %s objects", levels[ilevel].c_str());
1000 h_pt[ilevel] =
fs_->
make<TH1D>(hname, htit, 100, 0.0, 500.0);
1001 h_pt[ilevel]->GetXaxis()->SetTitle(
"p_{T} (GeV)");
1003 sprintf(hname,
"h_eta%s", levels[ilevel].c_str());
1004 sprintf(htit,
"#eta for %s objects", levels[ilevel].c_str());
1005 h_eta[ilevel] =
fs_->
make<TH1D>(hname, htit, 100, -5.0, 5.0);
1006 h_eta[ilevel]->GetXaxis()->SetTitle(
"#eta");
1008 sprintf(hname,
"h_phi%s", levels[ilevel].c_str());
1009 sprintf(htit,
"#phi for %s objects", levels[ilevel].c_str());
1010 h_phi[ilevel] =
fs_->
make<TH1D>(hname, htit, 70, -3.5, 3.50);
1011 h_phi[ilevel]->GetXaxis()->SetTitle(
"#phi");
1016 for (
int icut=0; icut<2; icut++) {
1017 sprintf(hname,
"h_eMip%s", cuts[icut].c_str());
1018 sprintf(htit,
"eMip for %s tracks", cuts[icut].c_str());
1020 h_eMip[icut]->GetXaxis()->SetTitle(
"E_{Mip} (GeV)");
1022 sprintf(hname,
"h_eMaxNearP%s", cuts[icut].c_str());
1023 sprintf(htit,
"eMaxNearP for %s tracks", cuts[icut].c_str());
1025 h_eMaxNearP[icut]->GetXaxis()->SetTitle(
"E_{MaxNearP} (GeV)");
1027 sprintf(hname,
"h_eNeutIso%s", cuts[icut].c_str());
1028 sprintf(htit,
"eNeutIso for %s ", cuts[icut].c_str());
1030 h_eNeutIso[icut]->GetXaxis()->SetTitle(
"E_{NeutIso} (GeV)");
1032 for (
int kcut=0; kcut<2; ++kcut) {
1033 for (
int lim=0; lim<5; ++lim) {
1034 sprintf(hname,
"h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1035 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());
1039 sprintf(hname,
"h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1040 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());
1047 std::string ecut1[3] = {
"all",
"HLTMatched",
"HLTNotMatched"};
1049 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,
1050 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 for (
int icut=0; icut<6; icut++) {
1053 int i1 = (icut>2 ? 1 : 0);
1054 int i2 = icut - i1*3;
1055 for (
int kcut=0; kcut<48; kcut++) {
1056 for (
int lim=0; lim<5; ++lim) {
1057 sprintf(hname,
"h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1058 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());
1059 h_eHcal[lim][icut][kcut]=
fs_->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
1060 h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
1061 sprintf(hname,
"h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1062 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());
1063 h_eCalo[lim][icut][kcut]=
fs_->
make<TH1D>(hname, htit, 750, 0.0, 150.0);
1064 h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle(
"Energy (GeV)");
1072 unsigned int preL1, preHLT;
1073 std::map<unsigned int, unsigned int>::iterator itr;
1074 std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
1085 preL1 = (itrPre->second).
first;
1086 preHLT = (itrPre->second).
second;
1088 << itrPre->first <<
" " << preL1 <<
" " 1090 g_Accepts->Fill(itr->first, itr->second);
1091 g_PreL1->Fill(itr->first, preL1);
1092 g_PreHLT->Fill(itr->first, preHLT);
1093 g_Pre->Fill(itr->first, preL1*preHLT);
1112 if (!trkCollection.
isValid()) {
1115 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1118 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1120 trkCaloDirections1, ((
verbosity_/100)%10>2));
1122 int nRH_eMipDR=0, nNearTRKs=0;
1123 std::vector<bool> selFlags;
1124 for (trkDetItr = trkCaloDirections1.begin();
1125 trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
1126 double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
1127 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1131 if (pTrack->
p() > 20) {
1133 pTrack->
pz(), pTrack->
p());
1136 trkDetItr->pointECAL,
a_mipR_,
1137 trkDetItr->directionECAL, nRH_eMipDR);
1142 oneCutParameters.
maxDzPV = 100;
1149 oneCutParameters.
maxDzPV = 100;
1159 <<
"ntracks " << nTracks
1161 <<
" nNearTRKs " << nNearTRKs;
1167 <<
"ok " << trkDetItr->okECAL <<
" " 1168 << trkDetItr->okHCAL;
1172 trkDetItr->directionECAL, nRH_eMipDR);
1176 trkDetItr->directionECAL, nRH_eMipDR);
1177 double e_inCone = e2 - e1;
1178 bool chgIsolFlag = (conehmaxNearP <
cutCharge_);
1179 bool mipFlag = (eMipDR <
cutMip_);
1181 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1183 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1184 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1187 <<
"(" << mipFlag <<
")" <<
" ; ok: " 1188 << trkDetItr->okECAL <<
"/" 1189 << trkDetItr->okHCAL <<
" ; chgiso: " 1191 <<
"(" << chgIsolFlag <<
")";
1193 if (chgIsolFlag && mipFlag && trkpropFlag) {
1194 double distFromHotCell=-99.0;
1195 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1197 std::vector<DetId> coneRecHitDetIds;
1199 trkDetItr->pointECAL,
1200 a_coneR_, trkDetItr->directionHCAL,
1201 nRecHitsCone, coneRecHitDetIds,
1202 distFromHotCell, ietaHotCell, iphiHotCell,
1211 t_TrkP ->push_back(pTrack->
p());
1217 <<
" tracks in TrkRestree out of " <<
nTracks;
1232 << layershb->
size() <<
"/" << layershe->
size();
1239 int nSeedHB=0, nSeedHE=0;
1248 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1249 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1250 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1256 double ptTriggered = -10;
1257 double etaTriggered = -100;
1258 double phiTriggered = -100;
1259 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
1260 if (l1tauobjref[
p]->
pt()>ptTriggered) {
1261 ptTriggered = l1tauobjref[
p]->pt();
1262 phiTriggered = l1tauobjref[
p]->phi();
1263 etaTriggered = l1tauobjref[
p]->eta();
1266 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
1267 if (l1jetobjref[
p]->
pt()>ptTriggered) {
1268 ptTriggered = l1jetobjref[
p]->pt();
1269 phiTriggered = l1jetobjref[
p]->phi();
1270 etaTriggered = l1jetobjref[
p]->eta();
1273 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
1274 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
1275 ptTriggered=l1forjetobjref[
p]->pt();
1276 phiTriggered=l1forjetobjref[
p]->phi();
1277 etaTriggered=l1forjetobjref[
p]->eta();
1281 reco::VertexCollection::const_iterator vitSel;
1284 for (reco::VertexCollection::const_iterator vit=pVertHE->begin();
1285 vit!=pVertHE->end(); vit++) {
1293 (minDZ==100)) vtxMatch=
true;
1296 double R =
deltaR(etaTriggered, phiTriggered,
1302 reco::VertexCollection::const_iterator vitSel;
1304 bool vtxMatch(
false);
1305 for (reco::VertexCollection::const_iterator vit=pVertHB->begin();
1306 vit!=pVertHB->end(); vit++) {
1314 (minDZ==100)) vtxMatch=
true;
1317 double R =
deltaR(etaTriggered, phiTriggered,
1320 if (R>1.2 && vtxMatch) nSeedHB++;
1324 edm::LogVerbatim(
"IsoTrack") <<
"(HB/HE) nCand: " << nCandHB <<
"/" << nCandHE
1325 <<
"nSeed: " << nSeedHB <<
"/" << nSeedHE;
1338 if (!trkCollection.
isValid()) {
1341 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1344 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1348 <<
" to be matched to something out of " 1349 << trkCaloDirections1.size()<<
" reco tracks";
1350 for (
unsigned int i=0;
i<L2cands->size();
i++) {
1353 double enIn = candref->energyIn();
1354 h_EnIn->Fill(candref->energyIn());
1355 h_EnOut->Fill(candref->energyOut());
1357 candref->track()->pz(),candref->track()->p());
1360 << candref->track()->eta() <<
"/" 1361 << candref->track()->phi() <<
"/" 1362 << candref->track()->pt() <<
"/" 1363 << candref->energyIn();
1365 double mindR=999.9, mindP1=999.9, eMipDR=0.0;
1366 std::vector<bool> selFlags;
1368 double conehmaxNearP = 0, hCone=0;
1369 for (trkDetItr = trkCaloDirections1.begin();
1370 trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
1371 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1373 pTrack->
pz(), pTrack->
p());
1374 double dr =
dR(v1,v2);
1375 double dp1 =
std::abs(1./v1.r() - 1./v2.r());
1378 << pTrack->
eta() <<
"/" << pTrack->
phi()
1379 <<
"/" << pTrack->
pt() <<
" has dr/dp= " 1380 << dr <<
"/" << dp1;
1385 int nRH_eMipDR=0, nNearTRKs=0;
1388 trkDetItr->pointECAL,
a_mipR_,
1389 trkDetItr->directionECAL, nRH_eMipDR);
1394 oneCutParameters.
maxDzPV = 100;
1401 oneCutParameters.
maxDzPV = 100;
1414 trkDetItr->pointHCAL,
1415 trkDetItr->pointECAL,
1420 trkDetItr->pointHCAL,
1421 trkDetItr->pointECAL,
1424 double e_inCone = e2 - e1;
1425 bool chgIsolFlag = (conehmaxNearP <
cutCharge_);
1426 bool mipFlag = (eMipDR <
cutMip_);
1428 bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1430 selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1431 selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1432 selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1433 selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1434 double distFromHotCell=-99.0;
1435 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1437 std::vector<DetId> coneRecHitDetIds;
1439 trkDetItr->pointECAL,
1440 a_coneR_, trkDetItr->directionHCAL,
1441 nRecHitsCone, coneRecHitDetIds,
1442 distFromHotCell, ietaHotCell, iphiHotCell,
1462 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1466 for (
int j=0; j<3; j++) {
1467 for (
unsigned int k=0;
k<
vec_[j].size();
k++) {
1470 <<
vec_[j][
k].pt() <<
" eta " 1471 <<
vec_[j][
k].eta() <<
" phi " 1472 <<
vec_[j][
k].phi();
1477 double deta, dphi,
dr;
1479 for (
int lvl=1; lvl<3; lvl++) {
1480 for (
unsigned int i=0;
i<
vec_[lvl].size();
i++) {
1486 << deta <<
" dphi " << dphi <<
" dR " <<
dr;
1495 for (
unsigned int k=0;
k<
vec_[2].size(); ++
k) {
1500 <<
vec_[2][
k].eta() <<
" phi " 1501 <<
vec_[2][
k].phi();
1502 for (
unsigned int j=0; j<
vec_[1].size(); j++) {
1506 mindRvec=
vec_[1][j];
1523 edm::LogVerbatim(
"IsoTrack") <<
"Now Matching L3 track with reco: L3 Track (eta, phi) " 1524 <<
vec_[2][
k].eta() <<
":" <<
vec_[2][
k].phi()
1525 <<
" L2 Track " << mindRvec.eta() <<
":" 1526 << mindRvec.phi() <<
" dR " << mindR;
1527 reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1528 if (trkCollection.
isValid()) {
1529 double mindP(9999.9);
1530 reco::TrackCollection::const_iterator trkItr;
1531 for (trkItr=trkCollection->begin();
1532 trkItr!=trkCollection->end(); trkItr++) {
1534 trkItr->pz(), trkItr->p());
1545 <<
" eta " << v4.eta() <<
" phi " 1546 << v4.phi() <<
" DR " <<
deltaR;
1549 edm::LogVerbatim(
"IsoTrack") <<
"Now Matching at Reco level in step 1 DR: " 1550 << mindR <<
":" << mindP <<
" eta:phi " 1551 << mindRvec.eta() <<
":" << mindRvec.phi();
1552 if (mindR < 0.03 && mindP > 0.1) {
1553 for (trkItr=trkCollection->begin();
1554 trkItr!=trkCollection->end(); trkItr++) {
1556 trkItr->pz(), trkItr->p());
1559 if (dp<mindP && deltaR<0.03) {
1567 edm::LogVerbatim(
"IsoTrack") <<
"Now Matching at Reco level in step 2 DR: " 1568 << mindR <<
":" << mindP <<
" eta:phi " 1569 << mindRvec.eta() <<
":"<<mindRvec.phi();
1580 if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1586 std::vector<reco::TrackCollection::const_iterator>& goodTks) {
1588 if (trkCollection.
isValid()) {
1592 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1596 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1603 <<
hit->time() <<
" energy " 1611 <<
hit->time() <<
" energy " 1618 <<
" time " <<
hit->time() <<
" energy " 1622 unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1624 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1625 bool l3Track = (
std::find(goodTks.begin(), goodTks.end(),
1626 trkDetItr->trkItr) != goodTks.end());
1627 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1629 pTrack->
pz(), pTrack->
p());
1632 double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1633 if (trkDetItr->okHCAL) {
1635 ieta = detId.
ieta();
1637 for (
unsigned k=0;
k<
vec_[0].size(); ++
k) {
1639 if (deltaR<mindR) mindR =
deltaR;
1643 <<
" HCAL " << trkDetItr->okHCAL
1644 <<
" Flag " << selectTk;
1645 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1647 int nRH_eMipDR=0, nNearTRKs=0;
1651 trkDetItr->directionECAL, nRH_eMipDR);
1655 trkDetItr->directionECAL, nRH_eMipDR);
1658 trkDetItr->pointECAL,
a_mipR_,
1659 trkDetItr->directionECAL, nRH_eMipDR);
1664 double distFromHotCell=-99.0;
1665 int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1667 std::vector<DetId> coneRecHitDetIds;
1669 trkDetItr->pointECAL,
1670 a_coneR_, trkDetItr->directionHCAL,
1671 nRecHitsCone, coneRecHitDetIds,
1672 distFromHotCell, ietaHotCell, iphiHotCell,
1674 if (eMipDR<1.0) nselTk++;
1680 fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1_));
1699 fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>
dr_L1_));
1725 edm::LogVerbatim(
"IsoTrack") <<
"Inside chgIsolation() with eta/phi Triggered: " 1726 << etaTriggered <<
"/" << phiTriggered;
1727 std::vector<double>
maxP;
1729 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1732 std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1734 trkCaloDirections1, ((
verbosity_/100)%10>2));
1740 std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1744 bool vtxMatch =
false;
1746 unsigned int ivSel =
recVtxs_->size();
1748 for (
unsigned int iv = 0; iv <
recVtxs_->size(); ++iv) {
1765 std::pair<double,double> seedCooAtEC;
1779 VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1783 for (
unsigned int l=0;
l<VecSeedsatEC.size();
l++) {
1784 unsigned int iSeed = VecSeedsatEC[
l].first;
1788 for (
unsigned int j=0; j<VecSeedsatEC.size(); j++) {
1789 unsigned int iSurr = VecSeedsatEC[j].first;
1790 if (iSeed != iSurr) {
1798 unsigned int ivSel =
recVtxs_->size();
1800 for (
unsigned int iv = 0; iv <
recVtxs_->size(); ++iv) {
1809 double dist =
getDistInCM(VecSeedsatEC[i].
second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[j].second.first, VecSeedsatEC[j].second.second);
1821 double conehmaxNearP = -1;
bool selectTk=
false;
1822 double mindR=999.9;
int nTracks=0;
1824 for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1826 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1828 pTrack->
pz(), pTrack->
p());
1829 double dr =
dR(v1,v2);
1849 std::vector<int> nGood(4,0);
1850 if (trkCollection.
isValid()) {
1854 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1862 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1864 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1866 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1869 double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1870 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
1871 if (l1tauobjref[
p]->
pt()>ptTriggered) {
1872 ptTriggered = l1tauobjref[
p]->pt();
1873 phiTriggered = l1tauobjref[
p]->phi();
1874 etaTriggered = l1tauobjref[
p]->eta();
1877 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
1878 if (l1jetobjref[
p]->
pt()>ptTriggered) {
1879 ptTriggered = l1jetobjref[
p]->pt();
1880 phiTriggered = l1jetobjref[
p]->phi();
1881 etaTriggered = l1jetobjref[
p]->eta();
1884 for (
unsigned int p=0;
p<l1forjetobjref.size();
p++) {
1885 if (l1forjetobjref[
p]->
pt()>ptTriggered) {
1886 ptTriggered=l1forjetobjref[
p]->pt();
1887 phiTriggered=l1forjetobjref[
p]->phi();
1888 etaTriggered=l1forjetobjref[
p]->eta();
1891 double pTriggered = ptTriggered*cosh(etaTriggered);
1893 ptTriggered*
sin(phiTriggered),
1894 pTriggered*tanh(etaTriggered), pTriggered);
1896 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1898 for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++) {
1899 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1901 pTrack->
pz(), pTrack->
p());
1904 double mindR =
dR(v4, pTrigger);
1907 <<
" HCAL " << trkDetItr->okHCAL
1908 <<
" Flag " << selectTk;
1909 if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
1910 int nRH_eMipDR(0), nNearTRKs(0);
1913 trkDetItr->pointHCAL,
1914 trkDetItr->pointECAL,
a_mipR_,
1915 trkDetItr->directionECAL, nRH_eMipDR);
1920 if (conehmaxNearP < 2.0 && eMipDR<1.0) {
1921 if (pTrack->
p() >= 20 && pTrack->
p() < 30) {
1923 }
else if (pTrack->
p() >= 30 && pTrack->
p() < 40) {
1925 }
else if (pTrack->
p() >= 40 && pTrack->
p() < 60) {
1927 }
else if (pTrack->
p() >= 60 && pTrack->
p() < 100) {
1935 for (
unsigned int ii=0;
ii<nGood.size(); ++
ii)
1940 h_p[indx]->Fill(vec.r());
1941 h_pt[indx]->Fill(vec.pt());
1942 h_eta[indx]->Fill(vec.eta());
1943 h_phi[indx]->Fill(vec.phi());
1948 double dr =
dR(vec1,vec2);
1949 double deta =
dEta(vec1, vec2);
1950 double dphi =
dPhi(vec1, vec2);
1951 double dpt =
dPt(vec1, vec2);
1952 double dp =
dP(vec1, vec2);
1953 double dinvpt =
dinvPt(vec1, vec2);
1954 h_dEta[indx] ->Fill(deta);
1955 h_dPhi[indx] ->Fill(dphi);
1956 h_dPt[indx] ->Fill(dpt);
1957 h_dP[indx] ->Fill(dp);
1962 <<
" deta " << deta <<
" dphi " << dphi
1963 <<
" dpt " << dpt <<
" dinvpt " << dinvpt;
1967 h_eMip[indx] ->Fill(eMipDR);
1971 for (
int lim=0; lim<5; ++lim) {
1986 if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1987 else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1988 if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1989 for (
int lim=0; lim<5; ++lim) {
1992 h_eCalo[lim][indx][
kk] ->Fill(hCone+eMipDR);
1999 return (vec1.eta()-vec2.eta());
2004 double phi1 = vec1.phi();
2005 if (phi1 < 0) phi1 += 2.0*
M_PI;
2006 double phi2 = vec2.phi();
2007 if (phi2 < 0) phi2 += 2.0*
M_PI;
2008 double dphi = phi1-phi2;
2010 else if (dphi < -
M_PI) dphi += 2.*
M_PI;
2015 double deta =
dEta(vec1,vec2);
2016 double dphi =
dPhi(vec1,vec2);
2017 return std::sqrt(deta*deta + dphi*dphi);
2021 return (vec1.pt()-vec2.pt());
2025 return (
std::abs(vec1.r()-vec2.r()));
2029 return ((1/vec1.pt())-(1/vec2.pt()));
2033 double eta(0),
phi(0), ptmax(0);
2034 for (
unsigned int k=0;
k<
vec_[0].size(); ++
k) {
2038 ptmax =
vec_[0][
k].pt();
2039 }
else if (
vec_[0][
k].
pt() > ptmax) {
2042 ptmax =
vec_[0][
k].pt();
2045 return std::pair<double,double>(
eta,
phi);
2056 double Rcurv = 9999999;
2059 double ecDist =
zEE_;
2060 double ecRad =
rEB_;
2061 double theta = 2*atan(
exp(-etaIP));
2064 if (fabs(etaIP)<1.479) {
2065 if ((0.5*ecRad/Rcurv)>1) {
2069 deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
2070 double alpha1 = 2*asin(0.5*ecRad/Rcurv);
2071 double z = ecRad/
tan(theta);
2072 if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ;
2073 else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ;
2074 double zAbs=fabs(zNew);
2076 etaEC = -
log(
tan(0.5*atan(ecRad/zAbs)));
2077 deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
2080 zAbs = (fabs(etaIP)/etaIP)*ecDist;
2081 double Zflight = fabs(zAbs-vtxZ);
2082 double alpha = (Zflight*ecRad)/(z*Rcurv);
2083 double Rec = 2*Rcurv*
sin(alpha/2);
2084 deltaPhi =-charge*alpha/2;
2085 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
2089 zNew = (fabs(etaIP)/etaIP)*ecDist;
2090 double Zflight = fabs(zNew-vtxZ);
2091 double Rvirt = fabs(Zflight*
tan(theta));
2092 double Rec = 2*Rcurv*
sin(Rvirt/(2*Rcurv));
2093 deltaPhi =-(
charge)*(Rvirt/(2*Rcurv));
2094 etaEC =-
log(
tan(0.5*atan(Rec/ecDist)));
2097 if (zNew<0) etaEC=-etaEC;
2103 std::pair<double,double> retVal(etaEC,phiEC);
2109 double theta1=2*atan(
exp(-eta1));
2110 double theta2=2*atan(
exp(-eta2));
2111 if (fabs(eta1)<1.479) Rec=
rEB_;
2112 else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=
tan(theta1)*
zEE_;
2117 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
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, int useRaw=0, bool debug=false)
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_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
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_
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
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_
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)
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