28 #include <Math/GenVector/VectorUtil.h> 37 #include "TDirectory.h" 166 std::map<std::pair<unsigned int, std::string>,
int>
l1AlgoMap_;
308 : trackerHitAssociatorConfig_(consumesCollector()),
309 doMC_(iConfig.getUntrackedParameter<
bool>(
"doMC",
false)),
310 writeAllTracks_(iConfig.getUntrackedParameter<
bool>(
"writeAllTracks",
false)),
311 myverbose_(iConfig.getUntrackedParameter<
int>(
"verbosity", 5)),
312 pvTracksPtMin_(iConfig.getUntrackedParameter<double>(
"pvTracksPtMin", 1.0)),
313 debugTrks_(iConfig.getUntrackedParameter<
int>(
"debugTracks", 0)),
314 printTrkHitPattern_(iConfig.getUntrackedParameter<
bool>(
"printTrkHitPattern",
false)),
315 minTrackP_(iConfig.getUntrackedParameter<double>(
"minTrackP", 1.0)),
316 maxTrackEta_(iConfig.getUntrackedParameter<double>(
"maxTrackEta", 5.0)),
317 debugL1Info_(iConfig.getUntrackedParameter<
bool>(
"debugL1Info",
false)),
318 L1TriggerAlgoInfo_(iConfig.getUntrackedParameter<
bool>(
"l1TriggerAlgoInfo",
false)),
319 tMinE_(iConfig.getUntrackedParameter<double>(
"timeMinCutECAL", -500.)),
320 tMaxE_(iConfig.getUntrackedParameter<double>(
"timeMaxCutECAL", 500.)),
321 tMinH_(iConfig.getUntrackedParameter<double>(
"timeMinCutHCAL", -500.)),
322 tMaxH_(iConfig.getUntrackedParameter<double>(
"timeMaxCutHCAL", 500.)) {
345 tok_L1extTauJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraTauJetSource_);
346 tok_L1extCenJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraCenJetSource_);
347 tok_L1extFwdJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraFwdJetSource_);
348 tok_L1extMu_ = consumes<l1extra::L1MuonParticleCollection>(L1extraMuonSource_);
349 tok_L1extIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraIsoEmSource_);
350 tok_L1extNoIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraNonIsoEmSource_);
351 tok_jets_ = consumes<reco::CaloJetCollection>(JetSrc_);
352 tok_hbhe_ = consumes<HBHERecHitCollection>(HBHERecHitSource_);
368 <<
" doMC " <<
doMC_ <<
"\t myverbose " <<
myverbose_ <<
"\t minTrackP " 375 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
377 tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
378 tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
380 tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
381 tok_htmap_ = esConsumes<EcalTrigTowerConstituentsMap, IdealGeometryRecord>();
388 desc.addUntracked<
bool>(
"doMC",
false);
389 desc.addUntracked<
bool>(
"writeAllTracks",
false);
390 desc.addUntracked<
int>(
"verbosity", 1);
391 desc.addUntracked<
double>(
"pvTracksPtMin", 0.200);
392 desc.addUntracked<
int>(
"debugTracks", 0);
393 desc.addUntracked<
bool>(
"printTrkHitPattern",
true);
394 desc.addUntracked<
double>(
"minTrackP", 1.0);
395 desc.addUntracked<
double>(
"maxTrackEta", 2.6);
396 desc.addUntracked<
bool>(
"debugL1Info",
false);
397 desc.addUntracked<
bool>(
"l1TriggerAlgoInfo",
false);
409 desc.addUntracked<
double>(
"maxNearTrackPT", 1.0);
410 desc.addUntracked<
double>(
"timeMinCutECAL", -500.0);
411 desc.addUntracked<
double>(
"timeMaxCutECAL", 500.0);
412 desc.addUntracked<
double>(
"timeMinCutHCAL", -500.0);
413 desc.addUntracked<
double>(
"timeMaxCutHCAL", 500.0);
414 descriptions.
add(
"isolatedTracksNxN",
desc);
418 bool haveIsoTrack =
false;
435 edm::LogVerbatim(
"IsoTrack") <<
"Number of Tracks " << trkCollection->size();
446 const bool l1Conf =
m_l1GtUtils->availableL1Configuration(iErrorCode, l1ConfCode);
449 <<
"\nL1 configuration code:" << l1ConfCode <<
"\nNo valid L1 trigger configuration available." 450 <<
"\nSee text above for error code interpretation" 451 <<
"\nNo return here, in order to test each method, protected against configuration error.";
461 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
463 int algBitNumber = (itAlgo->second).algoBitNumber();
464 l1AlgoMap_.insert(std::pair<std::pair<unsigned int, std::string>,
int>(
465 std::pair<unsigned int, std::string>(algBitNumber, algName), 0));
467 std::map<std::pair<unsigned int, std::string>,
int>::iterator itr;
469 edm::LogVerbatim(
"IsoTrack") <<
" ********** " << (itr->first).
first <<
" " << (itr->first).second <<
" " 474 std::vector<int> algbits;
475 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
477 int algBitNumber = (itAlgo->second).algoBitNumber();
483 l1AlgoMap_[std::pair<unsigned int, std::string>(algBitNumber, algName)] += 1;
488 algbits.push_back(algBitNumber);
496 for (
int i = 0;
i < 128; ++
i) {
503 l1extra::L1JetParticleCollection::const_iterator itr;
505 for (itr = l1TauHandle->begin(), iL1Obj = 0; itr != l1TauHandle->end(); ++itr, iL1Obj++) {
512 edm::LogVerbatim(
"IsoTrack") <<
"tauJ p/pt " << itr->momentum() <<
" " << itr->pt() <<
" eta/phi " 513 << itr->eta() <<
" " << itr->phi();
519 for (itr = l1CenJetHandle->begin(), iL1Obj = 0; itr != l1CenJetHandle->end(); ++itr, iL1Obj++) {
526 edm::LogVerbatim(
"IsoTrack") <<
"cenJ p/pt " << itr->momentum() <<
" " << itr->pt() <<
" eta/phi " 527 << itr->eta() <<
" " << itr->phi();
533 for (itr = l1FwdJetHandle->begin(), iL1Obj = 0; itr != l1FwdJetHandle->end(); ++itr, iL1Obj++) {
540 edm::LogVerbatim(
"IsoTrack") <<
"fwdJ p/pt " << itr->momentum() <<
" " << itr->pt() <<
" eta/phi " 541 << itr->eta() <<
" " << itr->phi();
546 l1extra::L1EmParticleCollection::const_iterator itrEm;
548 for (itrEm = l1IsoEmHandle->begin(), iL1Obj = 0; itrEm != l1IsoEmHandle->end(); ++itrEm, iL1Obj++) {
555 edm::LogVerbatim(
"IsoTrack") <<
"isoEm p/pt " << itrEm->momentum() <<
" " << itrEm->pt() <<
" eta/phi " 556 << itrEm->eta() <<
" " << itrEm->phi();
562 for (itrEm = l1NonIsoEmHandle->begin(), iL1Obj = 0; itrEm != l1NonIsoEmHandle->end(); ++itrEm, iL1Obj++) {
569 edm::LogVerbatim(
"IsoTrack") <<
"nonIsoEm p/pt " << itrEm->momentum() <<
" " << itrEm->pt() <<
" eta/phi " 570 << itrEm->eta() <<
" " << itrEm->phi();
575 l1extra::L1MuonParticleCollection::const_iterator itrMu;
577 for (itrMu = l1MuHandle->begin(), iL1Obj = 0; itrMu != l1MuHandle->end(); ++itrMu, iL1Obj++) {
584 edm::LogVerbatim(
"IsoTrack") <<
"l1muon p/pt " << itrMu->momentum() <<
" " << itrMu->pt() <<
" eta/phi " 585 << itrMu->eta() <<
" " << itrMu->phi();
594 std::vector<reco::Track> svTracks;
596 double sumPtMax = -1.0;
597 for (
unsigned int ind = 0; ind < recVtxs->size(); ind++) {
598 if (!((*recVtxs)[ind].isFake())) {
599 double vtxTrkSumPt = 0.0, vtxTrkSumPtWt = 0.0;
601 double vtxTrkSumPtHP = 0.0, vtxTrkSumPtHPWt = 0.0;
602 int vtxTrkNHP = 0, vtxTrkNHPWt = 0;
606 for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
610 bool trkQuality = (*vtxTrack)->quality(trackQuality_);
612 vtxTrkSumPt += (*vtxTrack)->pt();
614 vtxTrkSumPt += (*vtxTrack)->pt();
616 vtxTrkSumPtHP += (*vtxTrack)->pt();
620 double weight = (*recVtxs)[ind].trackWeight(*vtxTrack);
623 vtxTrkSumPtWt += (*vtxTrack)->pt();
626 vtxTrkSumPtHPWt += (*vtxTrack)->pt();
632 if (vtxTrkSumPt > sumPtMax) {
633 sumPtMax = vtxTrkSumPt;
634 leadPV =
math::XYZPoint((*recVtxs)[ind].
x(), (*recVtxs)[ind].
y(), (*recVtxs)[ind].
z());
637 t_PVx.push_back((*recVtxs)[ind].
x());
638 t_PVy.push_back((*recVtxs)[ind].
y());
639 t_PVz.push_back((*recVtxs)[ind].
z());
641 t_PVNTracks.push_back((*recVtxs)[ind].tracksSize());
653 edm::LogVerbatim(
"IsoTrack") <<
"PV " << ind <<
" isValid " << (*recVtxs)[ind].isValid() <<
" isFake " 654 << (*recVtxs)[ind].isFake() <<
" hasRefittedTracks() " << ind <<
" " 655 << (*recVtxs)[ind].hasRefittedTracks() <<
" refittedTrksSize " 656 << (*recVtxs)[ind].refittedTracks().size() <<
" tracksSize() " 657 << (*recVtxs)[ind].tracksSize() <<
" sumPt " << vtxTrkSumPt;
672 for (
unsigned int ijet = 0; ijet < (*jets).size(); ijet++) {
701 if (!
hbhe.isValid()) {
732 std::unique_ptr<TrackerHitAssociator> associate;
745 std::vector<spr::propagatedTrackID> trkCaloDets;
747 std::vector<spr::propagatedTrackID>::const_iterator trkDetItr;
750 for (trkDetItr = trkCaloDets.begin(); trkDetItr != trkCaloDets.end(); trkDetItr++) {
751 edm::LogVerbatim(
"IsoTrack") << trkDetItr->trkItr->p() <<
" " << trkDetItr->trkItr->eta() <<
" " 752 << trkDetItr->okECAL <<
" " << trkDetItr->okHCAL;
753 if (trkDetItr->okECAL) {
754 if (trkDetItr->detIdECAL.subdetId() ==
EcalBarrel)
759 if (trkDetItr->okHCAL)
765 for (trkDetItr = trkCaloDets.begin(),
nTracks = 0; trkDetItr != trkCaloDets.end(); trkDetItr++,
nTracks++) {
766 const reco::Track *pTrack = &(*(trkDetItr->trkItr));
770 for (
unsigned int ind = 0; ind < recVtxs->size(); ind++) {
771 if (!((*recVtxs)[ind].isFake())) {
773 for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
775 if (pTrack == pvtxTrack.
get()) {
779 if (pTrack->
pt() > 1.0) {
783 <<
" trkVtxIndex " << nvtxTracks <<
" vtx " << ind <<
" pt " << pTrack->
pt() <<
" eta " 784 << pTrack->
eta() <<
" " << pTrack->
pt() - pvtxTrack->
pt() <<
" " 785 << pTrack->
eta() - pvtxTrack->
eta();
798 bool ifGood = pTrack->
quality(trackQuality_);
799 double pt1 = pTrack->
pt();
800 double p1 = pTrack->
p();
802 double phi1 = pTrack->
momentum().phi();
803 double etaEcal1 = trkDetItr->etaECAL;
804 double phiEcal1 = trkDetItr->phiECAL;
805 double etaHcal1 = trkDetItr->etaHCAL;
806 double phiHcal1 = trkDetItr->phiHCAL;
807 double dxy1 = pTrack->
dxy();
808 double dz1 = pTrack->
dz();
810 double dxybs1 = beamSpotH.
isValid() ? pTrack->
dxy(bspot) : pTrack->
dxy();
811 double dzbs1 = beamSpotH.
isValid() ? pTrack->
dz(bspot) : pTrack->
dz();
812 double dxypv1 = pTrack->
dxy();
813 double dzpv1 = pTrack->
dz();
816 math::XYZPoint((*recVtxs)[pVtxTkId].
x(), (*recVtxs)[pVtxTkId].
y(), (*recVtxs)[pVtxTkId].
z());
817 dxypv1 = pTrack->
dxy(thisTkPV);
818 dzpv1 = pTrack->
dz(thisTkPV);
828 if (ifGood && nLayersCrossed > 7) {
852 edm::SimTrackContainer::const_iterator matchedSimTrkAll =
859 double maxNearP31x31 = 999.0, maxNearP25x25 = 999.0, maxNearP21x21 = 999.0, maxNearP15x15 = 999.0;
865 int iTrkEtaBin = -1, iTrkMomBin = -1;
870 for (
unsigned int ipt = 0; ipt <
NPBins; ipt++) {
874 if (iTrkMomBin >= 0 && iTrkEtaBin >= 0) {
880 if (maxNearP31x31 < 0.0 && nLayersCrossed > 7 && nOuterHits > 4) {
890 if (maxNearP31x31 < 1.0) {
894 double simTrackP = -1;
896 edm::SimTrackContainer::const_iterator matchedSimTrk =
898 if (matchedSimTrk != SimTk->end())
899 simTrackP = matchedSimTrk->momentum().P();
903 std::pair<double, bool> e7x7P, e9x9P, e11x11P, e15x15P;
904 std::pair<double, bool> e7x7_10SigP, e9x9_10SigP, e11x11_10SigP, e15x15_10SigP;
905 std::pair<double, bool> e7x7_15SigP, e9x9_15SigP, e11x11_15SigP, e15x15_15SigP;
906 std::pair<double, bool> e7x7_20SigP, e9x9_20SigP, e11x11_20SigP, e15x15_20SigP;
907 std::pair<double, bool> e7x7_25SigP, e9x9_25SigP, e11x11_25SigP, e15x15_25SigP;
908 std::pair<double, bool> e7x7_30SigP, e9x9_30SigP, e11x11_30SigP, e15x15_30SigP;
911 spr::caloSimInfo simInfo11x11, simInfo13x13, simInfo15x15, simInfo21x21, simInfo25x25, simInfo31x31;
912 double trkEcalEne = 0;
914 const DetId isoCell = trkDetItr->detIdECAL;
1008 barrelRecHitsHandle,
1009 endcapRecHitsHandle,
1022 barrelRecHitsHandle,
1023 endcapRecHitsHandle,
1036 barrelRecHitsHandle,
1037 endcapRecHitsHandle,
1050 barrelRecHitsHandle,
1051 endcapRecHitsHandle,
1064 barrelRecHitsHandle,
1065 endcapRecHitsHandle,
1080 barrelRecHitsHandle,
1081 endcapRecHitsHandle,
1093 barrelRecHitsHandle,
1094 endcapRecHitsHandle,
1106 barrelRecHitsHandle,
1107 endcapRecHitsHandle,
1119 barrelRecHitsHandle,
1120 endcapRecHitsHandle,
1133 barrelRecHitsHandle,
1134 endcapRecHitsHandle,
1146 barrelRecHitsHandle,
1147 endcapRecHitsHandle,
1159 barrelRecHitsHandle,
1160 endcapRecHitsHandle,
1172 barrelRecHitsHandle,
1173 endcapRecHitsHandle,
1186 barrelRecHitsHandle,
1187 endcapRecHitsHandle,
1199 barrelRecHitsHandle,
1200 endcapRecHitsHandle,
1212 barrelRecHitsHandle,
1213 endcapRecHitsHandle,
1225 barrelRecHitsHandle,
1226 endcapRecHitsHandle,
1239 edm::LogVerbatim(
"IsoTrack") <<
"e7x7 " << e7x7P.first <<
" e9x9 " << e9x9P.first <<
" e11x11 " 1240 << e11x11P.first <<
" e15x15 " << e15x15P.first;
1241 edm::LogVerbatim(
"IsoTrack") <<
"e7x7_10Sig " << e7x7_10SigP.first <<
" e11x11_10Sig " << e11x11_10SigP.first
1242 <<
" e15x15_10Sig " << e15x15_10SigP.first;
1248 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 1, 1, simInfo3x3);
1250 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 2, 2, simInfo5x5);
1252 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 3, 3, simInfo7x7);
1254 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 4, 4, simInfo9x9);
1341 << simInfo3x3.
eMatched <<
" eRest " << simInfo3x3.
eRest <<
" eGamma " 1345 << simInfo5x5.
eMatched <<
" eRest " << simInfo5x5.
eRest <<
" eGamma " 1349 << simInfo7x7.
eMatched <<
" eRest " << simInfo7x7.
eRest <<
" eGamma " 1353 << simInfo9x9.
eMatched <<
" eRest " << simInfo9x9.
eRest <<
" eGamma " 1357 << simInfo11x11.
eMatched <<
" eRest " << simInfo11x11.
eRest <<
" eGamma " 1361 << simInfo15x15.
eMatched <<
" eRest " << simInfo15x15.
eRest <<
" eGamma " 1365 << simInfo31x31.
eMatched <<
" eRest " << simInfo31x31.
eRest <<
" eGamma " 1373 double hcalScale = 1.0;
1380 double maxNearHcalP3x3 = -1, maxNearHcalP5x5 = -1, maxNearHcalP7x7 = -1;
1385 double h3x3 = 0, h5x5 = 0, h7x7 = 0;
1386 double h3x3Sig = 0, h5x5Sig = 0, h7x7Sig = 0;
1387 double trkHcalEne = 0;
1390 if (trkDetItr->okHCAL) {
1391 const DetId ClosestCell(trkDetItr->detIdHCAL);
1394 theHBHETopology, ClosestCell,
hbhe, 1, 1,
false,
true, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_);
1396 theHBHETopology, ClosestCell,
hbhe, 2, 2,
false,
true, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_);
1398 theHBHETopology, ClosestCell,
hbhe, 3, 3,
false,
true, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_);
1400 theHBHETopology, ClosestCell,
hbhe, 1, 1,
false,
true, 0.7, 0.8, -100.0, -100.0,
tMinH_,
tMaxH_);
1402 theHBHETopology, ClosestCell,
hbhe, 2, 2,
false,
true, 0.7, 0.8, -100.0, -100.0,
tMinH_,
tMaxH_);
1404 theHBHETopology, ClosestCell,
hbhe, 3, 3,
false,
true, 0.7, 0.8, -100.0, -100.0,
tMinH_,
tMaxH_);
1407 edm::LogVerbatim(
"IsoTrack") <<
"HCAL 3x3 " << h3x3 <<
" " << h3x3Sig <<
" 5x5 " << h5x5 <<
" " << h5x5Sig
1408 <<
" 7x7 " << h7x7 <<
" " << h7x7Sig;
1413 iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 1, 1, hsimInfo3x3);
1415 iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 2, 2, hsimInfo5x5);
1435 <<
"hsimInfo3x3: eTotal " << hsimInfo3x3.
eTotal <<
" eMatched " << hsimInfo3x3.
eMatched <<
" eRest " 1439 <<
"hsimInfo5x5: eTotal " << hsimInfo5x5.
eTotal <<
" eMatched " << hsimInfo5x5.
eMatched <<
" eRest " 1443 <<
"hsimInfo7x7: eTotal " << hsimInfo7x7.
eTotal <<
" eMatched " << hsimInfo7x7.
eMatched <<
" eRest " 1453 std::vector<std::pair<DetId, double> > v7x7 =
1457 for (
unsigned int iv = 0;
iv < v7x7.size();
iv++) {
1458 sumv += v7x7[
iv].second;
1460 edm::LogVerbatim(
"IsoTrack") <<
"h7x7 " << h7x7 <<
" v7x7 " << sumv <<
" in " << v7x7.size();
1461 for (
unsigned int iv = 0;
iv < v7x7.size();
iv++) {
1464 <<
id <<
" Energy " << v7x7[
iv].second;
1478 double trackOutPosOutHitDr =
diff.R();
1479 double trackL = point2_TK0.second;
1481 edm::LogVerbatim(
"IsoTrack") <<
" propagted " << point2_TK0.first <<
" " << point2_TK0.first.eta() <<
" " 1482 << point2_TK0.first.phi();
1486 <<
diff.R() / point2_TK0.second;
1489 for (
unsigned int ind = 0; ind < recVtxs->size(); ind++) {
1490 if (!((*recVtxs)[ind].isFake())) {
1492 if (
reco::deltaR(
eta1, phi1, (*vtxTrack)->eta(), (*vtxTrack)->phi()) < 0.01)
1550 t_e7x7.push_back(e7x7P.first);
1551 t_e9x9.push_back(e9x9P.first);
1665 double tempgen_TH[
NPBins + 1] = {
1666 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 9.0, 11.0, 15.0, 20.0, 30.0, 50.0, 75.0, 100.0};
1668 for (
unsigned int i = 0;
i <
NPBins + 1;
i++)
1671 double tempgen_Eta[
NEtaBins + 1] = {0.0, 1.131, 1.653, 2.172};
1682 std::map<std::pair<unsigned int, std::string>,
int>::iterator itr;
1684 edm::LogVerbatim(
"IsoTrack") <<
" ****endjob**** " << (itr->first).
first <<
" " << (itr->first).second <<
" " 1686 int ibin = (itr->first).
first;
1687 TString
name((itr->first).second);
1711 for (
int i = 0;
i < 128;
i++)
1900 char hname[100], htit[100];
1906 double lowEta = -5.0, highEta = 5.0;
1910 for (
unsigned int ipt = 0; ipt <
NPBins; ipt++) {
1911 double lowP = 0.0, highP = 300.0;
1914 sprintf(hname,
"h_maxNearP31x31_ptBin%i_etaBin%i", ipt,
ieta);
1915 sprintf(htit,
"maxNearP in 31x31 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1918 sprintf(hname,
"h_maxNearP25x25_ptBin%i_etaBin%i", ipt,
ieta);
1919 sprintf(htit,
"maxNearP in 25x25 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1922 sprintf(hname,
"h_maxNearP21x21_ptBin%i_etaBin%i", ipt,
ieta);
1923 sprintf(htit,
"maxNearP in 21x21 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1926 sprintf(hname,
"h_maxNearP15x15_ptBin%i_etaBin%i", ipt,
ieta);
1927 sprintf(htit,
"maxNearP in 15x15 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
1933 h_L1AlgoNames =
fs->make<TH1I>(
"h_L1AlgoNames",
"h_L1AlgoNames:Bin Labels", 128, -0.5, 127.5);
1937 h_PVTracksWt =
fs->make<TH1F>(
"h_PVTracksWt",
"h_PVTracksWt", 600, -0.1, 1.1);
1939 h_nTracks =
fs->make<TH1F>(
"h_nTracks",
"h_nTracks", 1000, -0.5, 999.5);
1941 sprintf(hname,
"h_recEtaPt_0");
1942 sprintf(htit,
"h_recEtaPt (all tracks Eta vs pT)");
1945 sprintf(hname,
"h_recEtaP_0");
1946 sprintf(htit,
"h_recEtaP (all tracks Eta vs pT)");
1951 h_recEta_0 =
fs->make<TH1F>(
"h_recEta_0",
"Eta (all tracks)", 60, -3.0, 3.0);
1952 h_recPhi_0 =
fs->make<TH1F>(
"h_recPhi_0",
"Phi (all tracks)", 100, -3.2, 3.2);
1954 sprintf(hname,
"h_recEtaPt_1");
1955 sprintf(htit,
"h_recEtaPt (all good tracks Eta vs pT)");
1958 sprintf(hname,
"h_recEtaP_1");
1959 sprintf(htit,
"h_recEtaP (all good tracks Eta vs pT)");
1964 h_recEta_1 =
fs->make<TH1F>(
"h_recEta_1",
"Eta (all good tracks)", 60, -3.0, 3.0);
1965 h_recPhi_1 =
fs->make<TH1F>(
"h_recPhi_1",
"Phi (all good tracks)", 100, -3.2, 3.2);
1967 sprintf(hname,
"h_recEtaPt_2");
1968 sprintf(htit,
"h_recEtaPt (charge isolation Eta vs pT)");
1971 sprintf(hname,
"h_recEtaP_2");
1972 sprintf(htit,
"h_recEtaP (charge isolation Eta vs pT)");
1977 h_recEta_2 =
fs->make<TH1F>(
"h_recEta_2",
"Eta (charge isolation)", 60, -3.0, 3.0);
1978 h_recPhi_2 =
fs->make<TH1F>(
"h_recPhi_2",
"Phi (charge isolation)", 100, -3.2, 3.2);
1980 tree_ =
fs->make<TTree>(
"tree",
"tree");
1981 tree_->SetAutoSave(10000);
1989 for (
int i = 0;
i < 128;
i++)
2183 << pTrack->
momentum() <<
" (pt,eta,phi)(" << pTrack->
pt() <<
"," << pTrack->
eta() <<
"," 2184 << pTrack->
phi() <<
")" 2185 <<
" p " << pTrack->
p() <<
"\n Normalized chi2 " << pTrack->
normalizedChi2()
2186 <<
" charge " << pTrack->
charge() <<
" qoverp() " << pTrack->
qoverp() <<
"+-" 2187 << pTrack->
qoverpError() <<
" d0 " << pTrack->
d0() <<
"\n NValidHits " 2189 <<
" TrackQuality " << pTrack->
qualityName(trackQuality_) <<
" " 2190 << pTrack->
quality(trackQuality_);
2195 std::ostringstream st1;
2201 std::ostringstream st2;
2202 st2 <<
"trackerMissingInnerHits() ";
2207 std::ostringstream st3;
2208 st3 <<
"trackerMissingOuterHits() ";
2214 edm::LogVerbatim(
"IsoTrack") <<
"\n \t trackerLayersWithMeasurement() " <<
p.trackerLayersWithMeasurement()
2215 <<
"\n \t pixelLayersWithMeasurement() " <<
p.pixelLayersWithMeasurement()
2216 <<
"\n \t stripLayersWithMeasurement() " <<
p.stripLayersWithMeasurement()
2217 <<
"\n \t pixelBarrelLayersWithMeasurement() " <<
p.pixelBarrelLayersWithMeasurement()
2218 <<
"\n \t pixelEndcapLayersWithMeasurement() " <<
p.pixelEndcapLayersWithMeasurement()
2219 <<
"\n \t stripTIBLayersWithMeasurement() " <<
p.stripTIBLayersWithMeasurement()
2220 <<
"\n \t stripTIDLayersWithMeasurement() " <<
p.stripTIDLayersWithMeasurement()
2221 <<
"\n \t stripTOBLayersWithMeasurement() " <<
p.stripTOBLayersWithMeasurement()
2222 <<
"\n \t stripTECLayersWithMeasurement() " <<
p.stripTECLayersWithMeasurement();
bool quality(const TrackQuality) const
Track quality.
std::vector< double > t_L1FwdJetPhi
std::vector< double > t_L1METPt
static const std::string kSharedResource
std::vector< double > t_maxNearHcalP5x5
std::vector< int > t_trackHitOutMeasTEC
Log< level::Info, true > LogVerbatim
std::vector< double > t_hsim7x7Photon
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
const bool L1TriggerAlgoInfo_
double qoverp() const
q / p
std::vector< double > t_hsim5x5Matched
const bool printTrkHitPattern_
std::vector< double > t_esim7x7Rest
static constexpr size_t NEtaBins
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
std::vector< double > t_PVTracksSumPtWt
std::vector< double > t_h5x5
T getParameter(std::string const &) const
std::vector< int > t_trackHitOutMissTEC
~IsolatedTracksNxN() override
std::vector< double > t_jetPt
static std::string qualityName(TrackQuality)
std::vector< double > t_L1IsoEMPt
std::vector< double > t_L1TauJetPhi
void eCaloSimInfo(std::vector< DetId > vdets, const CaloGeometry *geo, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, edm::SimTrackContainer::const_iterator trkInfo, caloSimInfo &info, double timeCut=150, bool debug=false)
std::vector< int > t_trackHitOutMeasTOB
std::vector< double > t_esim9x9
double qoverpError() const
error on signed transverse curvature
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
std::vector< double > t_jetEta
std::vector< double > t_L1MuonPt
unsigned short numberOfValidHits() const
number of valid hits found
const math::XYZPoint & outerPosition() const
position of the outermost hit
const Point & position() const
position
std::vector< double > t_e7x7
std::vector< int > t_trackHitOutMissTOB
std::vector< double > t_esim7x7NeutHad
std::vector< int > t_trackHitInMeasTID
std::vector< double > t_trackEtaAll
std::vector< int > t_trackHitOutMeasTID
TH1F * h_maxNearP25x25[NPBins][NEtaBins]
TrackQuality
track quality
std::vector< double > t_trackPhi
std::vector< std::pair< DetId, double > > eHCALmatrixCell(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, bool debug=false)
std::vector< double > t_trackDxyPVAll
double p() const
momentum vector magnitude
int trackerLayersWithMeasurement() const
std::vector< double > t_PVy
static constexpr size_t nL1BitsMax
std::vector< double > t_esim7x7
std::vector< double > t_hsim3x3
std::vector< double > t_esim15x15
std::vector< double > t_hsim5x5Photon
std::vector< double > t_L1CenJetPhi
std::vector< double > t_trackPdgIdAll
std::vector< int > t_L1PreScale
std::vector< double > t_h5x5Sig
std::vector< double > t_PVTracksSumPt
std::vector< double > t_esim7x7Matched
std::vector< double > t_esim15x15Rest
std::vector< double > t_L1METEta
int stripTIDLayersWithMeasurement() const
std::vector< int > t_trackHitInMissTOB
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
std::vector< int > t_trackHitInMeasTEC
std::vector< int > t_trackHitsTOB
std::vector< double > t_esim9x9CharHad
IsolatedTracksNxN(const edm::ParameterSet &)
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
const Point & referencePoint() const
Reference point on the track.
std::vector< double > t_esim9x9Photon
std::vector< double > t_h3x3Sig
int stripTIBLayersWithoutMeasurement(HitCategory category) const
std::vector< double > t_trackDxyPV
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
static constexpr size_t NPBins
std::vector< int > t_trackHitOutMeasTIB
std::vector< double > t_trackDxy
std::vector< double > t_e9x9_10Sig
std::vector< double > t_e15x15_10Sig
std::vector< double > t_esimPdgId
std::vector< double > t_maxNearHcalP7x7
std::vector< double > t_trackChiSq
std::vector< double > t_hsim5x5NeutHad
std::vector< int > t_trackHitInMissTIB
const double maxTrackEta_
std::vector< double > t_e9x9
std::vector< double > t_L1TauJetPt
int stripTECLayersWithMeasurement() const
std::vector< double > t_PVx
double genPartPBins[NPBins+1]
std::vector< double > t_trackEta
std::vector< double > t_hsim3x3NeutHad
std::vector< double > t_hsim7x7
std::vector< double > t_PVTracksSumPtHP
std::vector< double > t_L1CenJetEta
std::vector< double > t_L1FwdJetEta
std::vector< double > t_trackHcalPhi
double pt() const
track transverse momentum
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
std::vector< double > t_esim11x11Matched
int charge() const
track electric charge
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
std::vector< double > t_e11x11_30Sig
std::vector< double > t_nTrksJetVtx
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
std::vector< double > t_L1NonIsoEMEta
std::map< std::string, double > eHCALSimInfo(const edm::Event &, const HcalTopology *topology, const DetId &det, const CaloGeometry *geo, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, double timeCut=150, bool includeHO=false, bool debug=false)
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
std::vector< double > t_nTrksJetCalo
std::vector< double > t_L1NonIsoEMPhi
std::vector< double > t_L1IsoEMPhi
std::vector< double > t_hsim5x5CharHad
std::vector< double > t_h3x3
std::vector< double > t_esim7x7CharHad
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
std::vector< double > t_PVz
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< double > t_trackOutPosOutHitDr
std::vector< int > t_PVNTracksHPWt
std::vector< int > t_PVNTracksHP
std::vector< double > t_e15x15_25Sig
std::vector< double > t_hsim7x7Matched
std::vector< int > t_trackHitInMeasTIB
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
std::vector< double > t_e11x11
int stripTOBLayersWithoutMeasurement(HitCategory category) const
std::vector< double > t_e7x7_15Sig
Abs< T >::type abs(const T &t)
void analyze(const edm::Event &, const edm::EventSetup &) override
const bool writeAllTracks_
int stripTOBLayersWithMeasurement() const
std::vector< double > t_esim11x11
std::vector< double > t_hsim5x5
std::vector< int > t_PVisValid
std::vector< int > t_trackHitInMissTEC
std::vector< double > t_trackDz
double phi() const
azimuthal angle of momentum vector
std::vector< double > t_e15x15_30Sig
std::vector< double > t_esim15x15CharHad
std::vector< double > t_e7x7_20Sig
std::vector< double > t_L1IsoEMEta
#define DEFINE_FWK_MODULE(type)
std::vector< double > t_trackChiSqAll
edm::SimTrackContainer::const_iterator matchedSimTrack(const edm::Event &iEvent, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, bool debug=false)
std::vector< double > t_L1MuonEta
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
std::vector< double > t_simTrackP
int stripTECLayersWithoutMeasurement(HitCategory category) const
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< double > t_trackPhiAll
bool getData(T &iHolder) const
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
std::vector< double > t_trackDxyAll
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extIsoEm_
std::vector< double > t_hsim7x7Rest
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
std::vector< int > t_NLayersCrossed
std::vector< double > t_L1METPhi
std::vector< double > t_e11x11_10Sig
std::vector< double > t_trackL
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > tok_L1extMu_
std::vector< double > t_e7x7_25Sig
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
std::vector< double > t_e11x11_25Sig
std::vector< double > t_maxNearHcalP3x3
std::vector< double > t_hsim3x3CharHad
std::vector< unsigned int > m_triggerMaskAlgoTrig
std::vector< double > t_esim11x11Photon
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > tok_htmap_
double eta() const
pseudorapidity of momentum vector
std::vector< double > t_jetPhi
std::vector< double > t_esim11x11NeutHad
static TrackQuality qualityByName(const std::string &name)
std::vector< double > t_esim9x9NeutHad
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
std::vector< int > t_trackHitInMissTIBTID
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
std::vector< double > t_trackPAll
std::vector< double > t_esim15x15NeutHad
std::vector< double > t_trackDzBS
std::vector< double > t_e15x15
XYZPointD XYZPoint
point in space with cartesian internal representation
const double pvTracksPtMin_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extNoIsoEm_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
TH1F * h_maxNearP31x31[NPBins][NEtaBins]
std::vector< double > t_e9x9_30Sig
std::vector< double > t_e11x11_20Sig
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::vector< double > t_trackDzPVAll
TH1F * h_maxNearP15x15[NPBins][NEtaBins]
std::vector< double > t_trackEcalEta
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > t_esim7x7Photon
void eECALSimInfo(const edm::Event &, const DetId &det, const CaloGeometry *geo, const CaloTopology *caloTopology, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, caloSimInfo &info, double timeCut=150, bool debug=false)
static const bool useL1GtTriggerMenuLite(true)
std::vector< double > t_hsim5x5Rest
std::vector< double > t_L1CenJetPt
std::vector< double > t_trackP
const Vector & momentum() const
track momentum vector
std::vector< double > t_esim11x11CharHad
std::vector< double > t_e15x15_20Sig
std::vector< double > t_esim15x15Photon
std::vector< int > t_trackNOuterHits
std::vector< double > t_trkHcalEne
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< double > t_L1NonIsoEMPt
std::vector< double > t_maxNearP31x31
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::vector< int > t_infoHcal
std::vector< double > t_e7x7_30Sig
std::vector< int > t_PVndof
std::pair< math::XYZPoint, double > propagateTrackerEnd(const reco::Track *, const MagneticField *, bool debug=false)
void printTrack(const reco::Track *pTrack)
std::vector< double > t_trackDxyBS
std::unique_ptr< L1GtUtils > m_l1GtUtils
std::vector< double > t_esim11x11Rest
std::vector< int > t_trackHitInMissTID
std::vector< double > t_trackPtAll
std::vector< int > t_PVNTracksWt
std::vector< double > t_hsim7x7NeutHad
std::vector< int > t_ecalSpike11x11
TH1F * h_maxNearP21x21[NPBins][NEtaBins]
int stripTIDLayersWithoutMeasurement(HitCategory category) const
std::vector< double > t_e11x11_15Sig
std::vector< int > t_PVNTracks
std::vector< double > t_trackDzPV
std::vector< double > t_e9x9_25Sig
std::vector< double > t_trkEcalEne
std::map< std::pair< unsigned int, std::string >, int > l1AlgoMap_
std::vector< double > t_hsim3x3Matched
std::vector< double > t_L1TauJetEta
std::vector< int > t_trackHitOutMissTID
std::vector< std::string > t_L1AlgoNames
std::vector< double > t_PVTracksSumPtHPWt
edm::EDGetTokenT< reco::CaloJetCollection > tok_jets_
std::vector< int > t_trackHitOutMissTOBTEC
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< double > t_hsim3x3Photon
std::vector< int > t_trackHitInMeasTOB
std::vector< double > t_hsim3x3Rest
std::vector< double > t_trackDzAll
std::vector< double > t_e9x9_15Sig
std::vector< double > t_e7x7_10Sig
std::vector< double > t_trackHcalEta
std::vector< double > t_L1FwdJetPt
double genPartEtaBins[NEtaBins+1]
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
std::vector< int > t_trackPVIdx
std::vector< double > t_e15x15_15Sig
std::vector< double > t_esim15x15Matched
value_type const * get() const
std::vector< double > t_hsim7x7CharHad
std::vector< double > t_trackEcalPhi
std::vector< double > t_L1MuonPhi
std::vector< int > t_trackHitOutMissTIB
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
std::vector< double > t_esim9x9Matched
std::vector< double > t_h7x7Sig
static const bool useL1EventSetup(true)
std::vector< double > t_h7x7
std::vector< int > t_trackHitsTEC
std::vector< double > t_esim9x9Rest
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int useRaw=0, bool debug=false)
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extTauJet_
int stripTIBLayersWithMeasurement() const
std::vector< double > t_trackPt
std::vector< double > t_maxNearP21x21
std::vector< double > t_e9x9_20Sig
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)