27 #include <Math/GenVector/VectorUtil.h>
36 #include "TDirectory.h"
165 std::map<std::pair<unsigned int, std::string>,
int>
l1AlgoMap_;
307 : trackerHitAssociatorConfig_(consumesCollector()),
308 doMC_(iConfig.getUntrackedParameter<bool>(
"doMC",
false)),
309 writeAllTracks_(iConfig.getUntrackedParameter<bool>(
"writeAllTracks",
false)),
310 myverbose_(iConfig.getUntrackedParameter<int>(
"verbosity", 5)),
311 pvTracksPtMin_(iConfig.getUntrackedParameter<double>(
"pvTracksPtMin", 1.0)),
312 debugTrks_(iConfig.getUntrackedParameter<int>(
"debugTracks", 0)),
313 printTrkHitPattern_(iConfig.getUntrackedParameter<bool>(
"printTrkHitPattern",
false)),
314 minTrackP_(iConfig.getUntrackedParameter<double>(
"minTrackP", 1.0)),
315 maxTrackEta_(iConfig.getUntrackedParameter<double>(
"maxTrackEta", 5.0)),
316 debugL1Info_(iConfig.getUntrackedParameter<bool>(
"debugL1Info",
false)),
317 L1TriggerAlgoInfo_(iConfig.getUntrackedParameter<bool>(
"l1TriggerAlgoInfo",
false)),
318 tMinE_(iConfig.getUntrackedParameter<double>(
"timeMinCutECAL", -500.)),
319 tMaxE_(iConfig.getUntrackedParameter<double>(
"timeMaxCutECAL", 500.)),
320 tMinH_(iConfig.getUntrackedParameter<double>(
"timeMinCutHCAL", -500.)),
321 tMaxH_(iConfig.getUntrackedParameter<double>(
"timeMaxCutHCAL", 500.)),
322 t_L1AlgoNames(nullptr),
323 t_L1PreScale(nullptr),
324 t_L1CenJetPt(nullptr),
325 t_L1CenJetEta(nullptr),
326 t_L1CenJetPhi(nullptr),
327 t_L1FwdJetPt(nullptr),
328 t_L1FwdJetEta(nullptr),
329 t_L1FwdJetPhi(nullptr),
330 t_L1TauJetPt(nullptr),
331 t_L1TauJetEta(nullptr),
332 t_L1TauJetPhi(nullptr),
334 t_L1MuonEta(nullptr),
335 t_L1MuonPhi(nullptr),
336 t_L1IsoEMPt(nullptr),
337 t_L1IsoEMEta(nullptr),
338 t_L1IsoEMPhi(nullptr),
339 t_L1NonIsoEMPt(nullptr),
340 t_L1NonIsoEMEta(nullptr),
341 t_L1NonIsoEMPhi(nullptr),
348 t_PVTracksSumPt(nullptr),
349 t_PVTracksSumPtWt(nullptr),
350 t_PVTracksSumPtHP(nullptr),
351 t_PVTracksSumPtHPWt(nullptr),
352 t_PVisValid(nullptr),
353 t_PVNTracks(nullptr),
354 t_PVNTracksWt(nullptr),
356 t_PVNTracksHP(nullptr),
357 t_PVNTracksHPWt(nullptr),
361 t_nTrksJetCalo(nullptr),
362 t_nTrksJetVtx(nullptr),
363 t_trackPAll(nullptr),
364 t_trackEtaAll(nullptr),
365 t_trackPhiAll(nullptr),
366 t_trackPdgIdAll(nullptr),
367 t_trackPtAll(nullptr),
368 t_trackDxyAll(nullptr),
369 t_trackDzAll(nullptr),
370 t_trackDxyPVAll(nullptr),
371 t_trackDzPVAll(nullptr),
372 t_trackChiSqAll(nullptr),
377 t_trackEcalEta(nullptr),
378 t_trackEcalPhi(nullptr),
379 t_trackHcalEta(nullptr),
380 t_trackHcalPhi(nullptr),
382 t_trackDxyBS(nullptr),
384 t_trackDzBS(nullptr),
385 t_trackDxyPV(nullptr),
386 t_trackDzPV(nullptr),
387 t_trackChiSq(nullptr),
388 t_trackPVIdx(nullptr),
389 t_NLayersCrossed(nullptr),
390 t_trackNOuterHits(nullptr),
391 t_trackHitsTOB(nullptr),
392 t_trackHitsTEC(nullptr),
393 t_trackHitInMissTOB(nullptr),
394 t_trackHitInMissTEC(nullptr),
395 t_trackHitInMissTIB(nullptr),
396 t_trackHitInMissTID(nullptr),
397 t_trackHitInMissTIBTID(nullptr),
398 t_trackHitOutMissTOB(nullptr),
399 t_trackHitOutMissTEC(nullptr),
400 t_trackHitOutMissTIB(nullptr),
401 t_trackHitOutMissTID(nullptr),
402 t_trackHitOutMissTOBTEC(nullptr),
403 t_trackHitInMeasTOB(nullptr),
404 t_trackHitInMeasTEC(nullptr),
405 t_trackHitInMeasTIB(nullptr),
406 t_trackHitInMeasTID(nullptr),
407 t_trackHitOutMeasTOB(nullptr),
408 t_trackHitOutMeasTEC(nullptr),
409 t_trackHitOutMeasTIB(nullptr),
410 t_trackHitOutMeasTID(nullptr),
411 t_trackOutPosOutHitDr(nullptr),
413 t_maxNearP31x31(nullptr),
414 t_maxNearP21x21(nullptr),
415 t_ecalSpike11x11(nullptr),
420 t_e7x7_10Sig(nullptr),
421 t_e9x9_10Sig(nullptr),
422 t_e11x11_10Sig(nullptr),
423 t_e15x15_10Sig(nullptr),
424 t_e7x7_15Sig(nullptr),
425 t_e9x9_15Sig(nullptr),
426 t_e11x11_15Sig(nullptr),
427 t_e15x15_15Sig(nullptr),
428 t_e7x7_20Sig(nullptr),
429 t_e9x9_20Sig(nullptr),
430 t_e11x11_20Sig(nullptr),
431 t_e15x15_20Sig(nullptr),
432 t_e7x7_25Sig(nullptr),
433 t_e9x9_25Sig(nullptr),
434 t_e11x11_25Sig(nullptr),
435 t_e15x15_25Sig(nullptr),
436 t_e7x7_30Sig(nullptr),
437 t_e9x9_30Sig(nullptr),
438 t_e11x11_30Sig(nullptr),
439 t_e15x15_30Sig(nullptr),
440 t_esimPdgId(nullptr),
441 t_simTrackP(nullptr),
442 t_trkEcalEne(nullptr),
445 t_esim11x11(nullptr),
446 t_esim15x15(nullptr),
447 t_esim7x7Matched(nullptr),
448 t_esim9x9Matched(nullptr),
449 t_esim11x11Matched(nullptr),
450 t_esim15x15Matched(nullptr),
451 t_esim7x7Rest(nullptr),
452 t_esim9x9Rest(nullptr),
453 t_esim11x11Rest(nullptr),
454 t_esim15x15Rest(nullptr),
455 t_esim7x7Photon(nullptr),
456 t_esim9x9Photon(nullptr),
457 t_esim11x11Photon(nullptr),
458 t_esim15x15Photon(nullptr),
459 t_esim7x7NeutHad(nullptr),
460 t_esim9x9NeutHad(nullptr),
461 t_esim11x11NeutHad(nullptr),
462 t_esim15x15NeutHad(nullptr),
463 t_esim7x7CharHad(nullptr),
464 t_esim9x9CharHad(nullptr),
465 t_esim11x11CharHad(nullptr),
466 t_esim15x15CharHad(nullptr),
467 t_maxNearHcalP3x3(nullptr),
468 t_maxNearHcalP5x5(nullptr),
469 t_maxNearHcalP7x7(nullptr),
477 t_trkHcalEne(nullptr),
481 t_hsim3x3Matched(nullptr),
482 t_hsim5x5Matched(nullptr),
483 t_hsim7x7Matched(nullptr),
484 t_hsim3x3Rest(nullptr),
485 t_hsim5x5Rest(nullptr),
486 t_hsim7x7Rest(nullptr),
487 t_hsim3x3Photon(nullptr),
488 t_hsim5x5Photon(nullptr),
489 t_hsim7x7Photon(nullptr),
490 t_hsim3x3NeutHad(nullptr),
491 t_hsim5x5NeutHad(nullptr),
492 t_hsim7x7NeutHad(nullptr),
493 t_hsim3x3CharHad(nullptr),
494 t_hsim5x5CharHad(nullptr),
495 t_hsim7x7CharHad(nullptr) {
518 tok_L1extTauJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraTauJetSource_);
519 tok_L1extCenJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraCenJetSource_);
520 tok_L1extFwdJet_ = consumes<l1extra::L1JetParticleCollection>(L1extraFwdJetSource_);
521 tok_L1extMu_ = consumes<l1extra::L1MuonParticleCollection>(L1extraMuonSource_);
522 tok_L1extIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraIsoEmSource_);
523 tok_L1extNoIsoEm_ = consumes<l1extra::L1EmParticleCollection>(L1extraNonIsoEmSource_);
524 tok_jets_ = consumes<reco::CaloJetCollection>(JetSrc_);
525 tok_hbhe_ = consumes<HBHERecHitCollection>(HBHERecHitSource_);
541 <<
" doMC " <<
doMC_ <<
"\t myverbose " <<
myverbose_ <<
"\t minTrackP "
548 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
550 tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
551 tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
553 tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
554 tok_htmap_ = esConsumes<EcalTrigTowerConstituentsMap, IdealGeometryRecord>();
762 descriptions.
add(
"isolatedTracksNxN", desc);
766 bool haveIsoTrack =
false;
783 edm::LogVerbatim(
"IsoTrack") <<
"Number of Tracks " << trkCollection->size();
794 const bool l1Conf =
m_l1GtUtils->availableL1Configuration(iErrorCode, l1ConfCode);
797 <<
"\nL1 configuration code:" << l1ConfCode <<
"\nNo valid L1 trigger configuration available."
798 <<
"\nSee text above for error code interpretation"
799 <<
"\nNo return here, in order to test each method, protected against configuration error.";
809 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
811 int algBitNumber = (itAlgo->second).algoBitNumber();
812 l1AlgoMap_.insert(std::pair<std::pair<unsigned int, std::string>,
int>(
813 std::pair<unsigned int, std::string>(algBitNumber, algName), 0));
815 std::map<std::pair<unsigned int, std::string>,
int>::iterator itr;
817 edm::LogVerbatim(
"IsoTrack") <<
" ********** " << (itr->first).
first <<
" " << (itr->first).second <<
" "
822 std::vector<int> algbits;
823 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
825 int algBitNumber = (itAlgo->second).algoBitNumber();
826 bool decision =
m_l1GtUtils->decision(iEvent, itAlgo->first, iErrorCode);
827 int preScale =
m_l1GtUtils->prescaleFactor(iEvent, itAlgo->first, iErrorCode);
831 l1AlgoMap_[std::pair<unsigned int, std::string>(algBitNumber, algName)] += 1;
836 algbits.push_back(algBitNumber);
845 for (
int i = 0;
i < 128; ++
i) {
853 l1extra::L1JetParticleCollection::const_iterator itr;
855 for (itr = l1TauHandle->begin(), iL1Obj = 0; itr != l1TauHandle->end(); ++itr, iL1Obj++) {
862 edm::LogVerbatim(
"IsoTrack") <<
"tauJ p/pt " << itr->momentum() <<
" " << itr->pt() <<
" eta/phi "
863 << itr->eta() <<
" " << itr->phi();
870 for (itr = l1CenJetHandle->begin(), iL1Obj = 0; itr != l1CenJetHandle->end(); ++itr, iL1Obj++) {
877 edm::LogVerbatim(
"IsoTrack") <<
"cenJ p/pt " << itr->momentum() <<
" " << itr->pt() <<
" eta/phi "
878 << itr->eta() <<
" " << itr->phi();
885 for (itr = l1FwdJetHandle->begin(), iL1Obj = 0; itr != l1FwdJetHandle->end(); ++itr, iL1Obj++) {
892 edm::LogVerbatim(
"IsoTrack") <<
"fwdJ p/pt " << itr->momentum() <<
" " << itr->pt() <<
" eta/phi "
893 << itr->eta() <<
" " << itr->phi();
898 l1extra::L1EmParticleCollection::const_iterator itrEm;
901 for (itrEm = l1IsoEmHandle->begin(), iL1Obj = 0; itrEm != l1IsoEmHandle->end(); ++itrEm, iL1Obj++) {
908 edm::LogVerbatim(
"IsoTrack") <<
"isoEm p/pt " << itrEm->momentum() <<
" " << itrEm->pt() <<
" eta/phi "
909 << itrEm->eta() <<
" " << itrEm->phi();
916 for (itrEm = l1NonIsoEmHandle->begin(), iL1Obj = 0; itrEm != l1NonIsoEmHandle->end(); ++itrEm, iL1Obj++) {
923 edm::LogVerbatim(
"IsoTrack") <<
"nonIsoEm p/pt " << itrEm->momentum() <<
" " << itrEm->pt() <<
" eta/phi "
924 << itrEm->eta() <<
" " << itrEm->phi();
929 l1extra::L1MuonParticleCollection::const_iterator itrMu;
932 for (itrMu = l1MuHandle->begin(), iL1Obj = 0; itrMu != l1MuHandle->end(); ++itrMu, iL1Obj++) {
939 edm::LogVerbatim(
"IsoTrack") <<
"l1muon p/pt " << itrMu->momentum() <<
" " << itrMu->pt() <<
" eta/phi "
940 << itrMu->eta() <<
" " << itrMu->phi();
950 std::vector<reco::Track> svTracks;
952 double sumPtMax = -1.0;
953 for (
unsigned int ind = 0; ind < recVtxs->size(); ind++) {
954 if (!((*recVtxs)[ind].isFake())) {
955 double vtxTrkSumPt = 0.0, vtxTrkSumPtWt = 0.0;
957 double vtxTrkSumPtHP = 0.0, vtxTrkSumPtHPWt = 0.0;
958 int vtxTrkNHP = 0, vtxTrkNHPWt = 0;
962 for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
966 bool trkQuality = (*vtxTrack)->quality(trackQuality_);
968 vtxTrkSumPt += (*vtxTrack)->pt();
970 vtxTrkSumPt += (*vtxTrack)->pt();
972 vtxTrkSumPtHP += (*vtxTrack)->pt();
976 double weight = (*recVtxs)[ind].trackWeight(*vtxTrack);
979 vtxTrkSumPtWt += (*vtxTrack)->pt();
982 vtxTrkSumPtHPWt += (*vtxTrack)->pt();
988 if (vtxTrkSumPt > sumPtMax) {
989 sumPtMax = vtxTrkSumPt;
990 leadPV =
math::XYZPoint((*recVtxs)[ind].
x(), (*recVtxs)[ind].
y(), (*recVtxs)[ind].
z());
993 t_PVx->push_back((*recVtxs)[ind].
x());
994 t_PVy->push_back((*recVtxs)[ind].
y());
995 t_PVz->push_back((*recVtxs)[ind].
z());
997 t_PVNTracks->push_back((*recVtxs)[ind].tracksSize());
1009 edm::LogVerbatim(
"IsoTrack") <<
"PV " << ind <<
" isValid " << (*recVtxs)[ind].isValid() <<
" isFake "
1010 << (*recVtxs)[ind].isFake() <<
" hasRefittedTracks() " << ind <<
" "
1011 << (*recVtxs)[ind].hasRefittedTracks() <<
" refittedTrksSize "
1012 << (*recVtxs)[ind].refittedTracks().size() <<
" tracksSize() "
1013 << (*recVtxs)[ind].tracksSize() <<
" sumPt " << vtxTrkSumPt;
1032 for (
unsigned int ijet = 0; ijet < (*jets).size(); ijet++) {
1092 std::unique_ptr<TrackerHitAssociator> associate;
1105 std::vector<spr::propagatedTrackID> trkCaloDets;
1107 std::vector<spr::propagatedTrackID>::const_iterator trkDetItr;
1110 for (trkDetItr = trkCaloDets.begin(); trkDetItr != trkCaloDets.end(); trkDetItr++) {
1111 edm::LogVerbatim(
"IsoTrack") << trkDetItr->trkItr->p() <<
" " << trkDetItr->trkItr->eta() <<
" "
1112 << trkDetItr->okECAL <<
" " << trkDetItr->okHCAL;
1113 if (trkDetItr->okECAL) {
1114 if (trkDetItr->detIdECAL.subdetId() ==
EcalBarrel)
1119 if (trkDetItr->okHCAL)
1125 for (trkDetItr = trkCaloDets.begin(), nTracks = 0; trkDetItr != trkCaloDets.end(); trkDetItr++, nTracks++) {
1126 const reco::Track *pTrack = &(*(trkDetItr->trkItr));
1130 for (
unsigned int ind = 0; ind < recVtxs->size(); ind++) {
1131 if (!((*recVtxs)[ind].isFake())) {
1133 for (vtxTrack = (*recVtxs)[ind].tracks_begin(); vtxTrack != (*recVtxs)[ind].tracks_end(); vtxTrack++) {
1135 if (pTrack == pvtxTrack.
get()) {
1139 if (pTrack->
pt() > 1.0) {
1140 edm::LogVerbatim(
"IsoTrack") <<
"Debug the track association with vertex ";
1143 <<
" trkVtxIndex " << nvtxTracks <<
" vtx " << ind <<
" pt " << pTrack->
pt() <<
" eta "
1144 << pTrack->
eta() <<
" " << pTrack->
pt() - pvtxTrack->
pt() <<
" "
1145 << pTrack->
eta() - pvtxTrack->
eta();
1158 bool ifGood = pTrack->
quality(trackQuality_);
1159 double pt1 = pTrack->
pt();
1160 double p1 = pTrack->
p();
1162 double phi1 = pTrack->
momentum().phi();
1163 double etaEcal1 = trkDetItr->etaECAL;
1164 double phiEcal1 = trkDetItr->phiECAL;
1165 double etaHcal1 = trkDetItr->etaHCAL;
1166 double phiHcal1 = trkDetItr->phiHCAL;
1167 double dxy1 = pTrack->
dxy();
1168 double dz1 = pTrack->
dz();
1170 double dxybs1 = beamSpotH.
isValid() ? pTrack->
dxy(bspot) : pTrack->
dxy();
1171 double dzbs1 = beamSpotH.
isValid() ? pTrack->
dz(bspot) : pTrack->
dz();
1172 double dxypv1 = pTrack->
dxy();
1173 double dzpv1 = pTrack->
dz();
1174 if (pVtxTkId >= 0) {
1176 math::XYZPoint((*recVtxs)[pVtxTkId].
x(), (*recVtxs)[pVtxTkId].
y(), (*recVtxs)[pVtxTkId].
z());
1177 dxypv1 = pTrack->
dxy(thisTkPV);
1178 dzpv1 = pTrack->
dz(thisTkPV);
1188 if (ifGood && nLayersCrossed > 7) {
1212 edm::SimTrackContainer::const_iterator matchedSimTrkAll =
1219 double maxNearP31x31 = 999.0, maxNearP25x25 = 999.0, maxNearP21x21 = 999.0, maxNearP15x15 = 999.0;
1225 int iTrkEtaBin = -1, iTrkMomBin = -1;
1226 for (
unsigned int ieta = 0; ieta <
NEtaBins; ieta++) {
1230 for (
unsigned int ipt = 0; ipt <
NPBins; ipt++) {
1234 if (iTrkMomBin >= 0 && iTrkEtaBin >= 0) {
1240 if (maxNearP31x31 < 0.0 && nLayersCrossed > 7 && nOuterHits > 4) {
1250 if (maxNearP31x31 < 1.0) {
1251 haveIsoTrack =
true;
1254 double simTrackP = -1;
1256 edm::SimTrackContainer::const_iterator matchedSimTrk =
1258 if (matchedSimTrk != SimTk->end())
1259 simTrackP = matchedSimTrk->momentum().P();
1263 std::pair<double, bool> e7x7P, e9x9P, e11x11P, e15x15P;
1264 std::pair<double, bool> e7x7_10SigP, e9x9_10SigP, e11x11_10SigP, e15x15_10SigP;
1265 std::pair<double, bool> e7x7_15SigP, e9x9_15SigP, e11x11_15SigP, e15x15_15SigP;
1266 std::pair<double, bool> e7x7_20SigP, e9x9_20SigP, e11x11_20SigP, e15x15_20SigP;
1267 std::pair<double, bool> e7x7_25SigP, e9x9_25SigP, e11x11_25SigP, e15x15_25SigP;
1268 std::pair<double, bool> e7x7_30SigP, e9x9_30SigP, e11x11_30SigP, e15x15_30SigP;
1271 spr::caloSimInfo simInfo11x11, simInfo13x13, simInfo15x15, simInfo21x21, simInfo25x25, simInfo31x31;
1272 double trkEcalEne = 0;
1274 const DetId isoCell = trkDetItr->detIdECAL;
1276 barrelRecHitsHandle,
1277 endcapRecHitsHandle,
1289 barrelRecHitsHandle,
1290 endcapRecHitsHandle,
1302 barrelRecHitsHandle,
1303 endcapRecHitsHandle,
1315 barrelRecHitsHandle,
1316 endcapRecHitsHandle,
1329 barrelRecHitsHandle,
1330 endcapRecHitsHandle,
1342 barrelRecHitsHandle,
1343 endcapRecHitsHandle,
1355 barrelRecHitsHandle,
1356 endcapRecHitsHandle,
1368 barrelRecHitsHandle,
1369 endcapRecHitsHandle,
1382 barrelRecHitsHandle,
1383 endcapRecHitsHandle,
1396 barrelRecHitsHandle,
1397 endcapRecHitsHandle,
1410 barrelRecHitsHandle,
1411 endcapRecHitsHandle,
1424 barrelRecHitsHandle,
1425 endcapRecHitsHandle,
1440 barrelRecHitsHandle,
1441 endcapRecHitsHandle,
1453 barrelRecHitsHandle,
1454 endcapRecHitsHandle,
1466 barrelRecHitsHandle,
1467 endcapRecHitsHandle,
1479 barrelRecHitsHandle,
1480 endcapRecHitsHandle,
1493 barrelRecHitsHandle,
1494 endcapRecHitsHandle,
1506 barrelRecHitsHandle,
1507 endcapRecHitsHandle,
1519 barrelRecHitsHandle,
1520 endcapRecHitsHandle,
1532 barrelRecHitsHandle,
1533 endcapRecHitsHandle,
1546 barrelRecHitsHandle,
1547 endcapRecHitsHandle,
1559 barrelRecHitsHandle,
1560 endcapRecHitsHandle,
1572 barrelRecHitsHandle,
1573 endcapRecHitsHandle,
1585 barrelRecHitsHandle,
1586 endcapRecHitsHandle,
1599 edm::LogVerbatim(
"IsoTrack") <<
"e7x7 " << e7x7P.first <<
" e9x9 " << e9x9P.first <<
" e11x11 "
1600 << e11x11P.first <<
" e15x15 " << e15x15P.first;
1601 edm::LogVerbatim(
"IsoTrack") <<
"e7x7_10Sig " << e7x7_10SigP.first <<
" e11x11_10Sig " << e11x11_10SigP.first
1602 <<
" e15x15_10Sig " << e15x15_10SigP.first;
1608 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 1, 1, simInfo3x3);
1610 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 2, 2, simInfo5x5);
1612 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 3, 3, simInfo7x7);
1614 iEvent, isoCell, geo, caloTopology, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate, 4, 4, simInfo9x9);
1696 trkEcalEne =
spr::eCaloSimInfo(iEvent, geo, pcaloeb, pcaloee, SimTk, SimVtx, pTrack, *associate);
1701 << simInfo3x3.
eMatched <<
" eRest " << simInfo3x3.
eRest <<
" eGamma "
1705 << simInfo5x5.
eMatched <<
" eRest " << simInfo5x5.
eRest <<
" eGamma "
1709 << simInfo7x7.
eMatched <<
" eRest " << simInfo7x7.
eRest <<
" eGamma "
1713 << simInfo9x9.
eMatched <<
" eRest " << simInfo9x9.
eRest <<
" eGamma "
1717 << simInfo11x11.
eMatched <<
" eRest " << simInfo11x11.
eRest <<
" eGamma "
1721 << simInfo15x15.
eMatched <<
" eRest " << simInfo15x15.
eRest <<
" eGamma "
1725 << simInfo31x31.
eMatched <<
" eRest " << simInfo31x31.
eRest <<
" eGamma "
1733 double hcalScale = 1.0;
1740 double maxNearHcalP3x3 = -1, maxNearHcalP5x5 = -1, maxNearHcalP7x7 = -1;
1745 double h3x3 = 0, h5x5 = 0, h7x7 = 0;
1746 double h3x3Sig = 0, h5x5Sig = 0, h7x7Sig = 0;
1747 double trkHcalEne = 0;
1750 if (trkDetItr->okHCAL) {
1751 const DetId ClosestCell(trkDetItr->detIdHCAL);
1754 theHBHETopology, ClosestCell, hbhe, 1, 1,
false,
true, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_);
1756 theHBHETopology, ClosestCell, hbhe, 2, 2,
false,
true, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_);
1758 theHBHETopology, ClosestCell, hbhe, 3, 3,
false,
true, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_);
1760 theHBHETopology, ClosestCell, hbhe, 1, 1,
false,
true, 0.7, 0.8, -100.0, -100.0,
tMinH_,
tMaxH_);
1762 theHBHETopology, ClosestCell, hbhe, 2, 2,
false,
true, 0.7, 0.8, -100.0, -100.0,
tMinH_,
tMaxH_);
1764 theHBHETopology, ClosestCell, hbhe, 3, 3,
false,
true, 0.7, 0.8, -100.0, -100.0,
tMinH_,
tMaxH_);
1767 edm::LogVerbatim(
"IsoTrack") <<
"HCAL 3x3 " << h3x3 <<
" " << h3x3Sig <<
" 5x5 " << h5x5 <<
" " << h5x5Sig
1768 <<
" 7x7 " << h7x7 <<
" " << h7x7Sig;
1773 iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 1, 1, hsimInfo3x3);
1775 iEvent, theHBHETopology, ClosestCell, geo, pcalohh, SimTk, SimVtx, pTrack, *associate, 2, 2, hsimInfo5x5);
1791 trkHcalEne =
spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
1795 <<
"hsimInfo3x3: eTotal " << hsimInfo3x3.
eTotal <<
" eMatched " << hsimInfo3x3.
eMatched <<
" eRest "
1799 <<
"hsimInfo5x5: eTotal " << hsimInfo5x5.
eTotal <<
" eMatched " << hsimInfo5x5.
eMatched <<
" eRest "
1803 <<
"hsimInfo7x7: eTotal " << hsimInfo7x7.
eTotal <<
" eMatched " << hsimInfo7x7.
eMatched <<
" eRest "
1812 edm::LogVerbatim(
"IsoTrack") <<
"Run " << iEvent.id().run() <<
" Event " << iEvent.id().event();
1813 std::vector<std::pair<DetId, double> > v7x7 =
1817 for (
unsigned int iv = 0;
iv < v7x7.size();
iv++) {
1818 sumv += v7x7[
iv].second;
1820 edm::LogVerbatim(
"IsoTrack") <<
"h7x7 " << h7x7 <<
" v7x7 " << sumv <<
" in " << v7x7.size();
1821 for (
unsigned int iv = 0;
iv < v7x7.size();
iv++) {
1824 <<
id <<
" Energy " << v7x7[
iv].second;
1829 trkHcalEne =
spr::eCaloSimInfo(iEvent, geo, pcalohh, SimTk, SimVtx, pTrack, *associate);
1838 double trackOutPosOutHitDr =
diff.R();
1839 double trackL = point2_TK0.second;
1841 edm::LogVerbatim(
"IsoTrack") <<
" propagted " << point2_TK0.first <<
" " << point2_TK0.first.eta() <<
" "
1842 << point2_TK0.first.phi();
1846 <<
diff.R() / point2_TK0.second;
1849 for (
unsigned int ind = 0; ind < recVtxs->size(); ind++) {
1850 if (!((*recVtxs)[ind].isFake())) {
1852 if (
reco::deltaR(eta1, phi1, (*vtxTrack)->eta(), (*vtxTrack)->phi()) < 0.01)
1910 t_e7x7->push_back(e7x7P.first);
1911 t_e9x9->push_back(e9x9P.first);
1912 t_e11x11->push_back(e11x11P.first);
1913 t_e15x15->push_back(e15x15P.first);
2025 double tempgen_TH[
NPBins + 1] = {
2026 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};
2028 for (
unsigned int i = 0;
i <
NPBins + 1;
i++)
2031 double tempgen_Eta[
NEtaBins + 1] = {0.0, 1.131, 1.653, 2.172};
2042 std::map<std::pair<unsigned int, std::string>,
int>::iterator itr;
2044 edm::LogVerbatim(
"IsoTrack") <<
" ****endjob**** " << (itr->first).
first <<
" " << (itr->first).second <<
" "
2046 int ibin = (itr->first).
first;
2047 TString
name((itr->first).second);
2071 for (
int i = 0;
i < 128;
i++)
2260 char hname[100], htit[100];
2265 for (
unsigned int ieta = 0; ieta <
NEtaBins; ieta++) {
2266 double lowEta = -5.0, highEta = 5.0;
2270 for (
unsigned int ipt = 0; ipt <
NPBins; ipt++) {
2271 double lowP = 0.0, highP = 300.0;
2274 sprintf(hname,
"h_maxNearP31x31_ptBin%i_etaBin%i", ipt, ieta);
2275 sprintf(htit,
"maxNearP in 31x31 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2278 sprintf(hname,
"h_maxNearP25x25_ptBin%i_etaBin%i", ipt, ieta);
2279 sprintf(htit,
"maxNearP in 25x25 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2282 sprintf(hname,
"h_maxNearP21x21_ptBin%i_etaBin%i", ipt, ieta);
2283 sprintf(htit,
"maxNearP in 21x21 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2286 sprintf(hname,
"h_maxNearP15x15_ptBin%i_etaBin%i", ipt, ieta);
2287 sprintf(htit,
"maxNearP in 15x15 (%3.2f<|#eta|<%3.2f), (%2.0f<trkP<%3.0f)", lowEta, highEta, lowP, highP);
2293 h_L1AlgoNames = fs->
make<TH1I>(
"h_L1AlgoNames",
"h_L1AlgoNames:Bin Labels", 128, -0.5, 127.5);
2297 h_PVTracksWt = fs->
make<TH1F>(
"h_PVTracksWt",
"h_PVTracksWt", 600, -0.1, 1.1);
2299 h_nTracks = fs->
make<TH1F>(
"h_nTracks",
"h_nTracks", 1000, -0.5, 999.5);
2301 sprintf(hname,
"h_recEtaPt_0");
2302 sprintf(htit,
"h_recEtaPt (all tracks Eta vs pT)");
2305 sprintf(hname,
"h_recEtaP_0");
2306 sprintf(htit,
"h_recEtaP (all tracks Eta vs pT)");
2311 h_recEta_0 = fs->
make<TH1F>(
"h_recEta_0",
"Eta (all tracks)", 60, -3.0, 3.0);
2312 h_recPhi_0 = fs->
make<TH1F>(
"h_recPhi_0",
"Phi (all tracks)", 100, -3.2, 3.2);
2314 sprintf(hname,
"h_recEtaPt_1");
2315 sprintf(htit,
"h_recEtaPt (all good tracks Eta vs pT)");
2318 sprintf(hname,
"h_recEtaP_1");
2319 sprintf(htit,
"h_recEtaP (all good tracks Eta vs pT)");
2324 h_recEta_1 = fs->
make<TH1F>(
"h_recEta_1",
"Eta (all good tracks)", 60, -3.0, 3.0);
2325 h_recPhi_1 = fs->
make<TH1F>(
"h_recPhi_1",
"Phi (all good tracks)", 100, -3.2, 3.2);
2327 sprintf(hname,
"h_recEtaPt_2");
2328 sprintf(htit,
"h_recEtaPt (charge isolation Eta vs pT)");
2331 sprintf(hname,
"h_recEtaP_2");
2332 sprintf(htit,
"h_recEtaP (charge isolation Eta vs pT)");
2337 h_recEta_2 = fs->
make<TH1F>(
"h_recEta_2",
"Eta (charge isolation)", 60, -3.0, 3.0);
2338 h_recPhi_2 = fs->
make<TH1F>(
"h_recPhi_2",
"Phi (charge isolation)", 100, -3.2, 3.2);
2340 tree_ = fs->
make<TTree>(
"tree",
"tree");
2341 tree_->SetAutoSave(10000);
2348 t_PVx =
new std::vector<double>();
2349 t_PVy =
new std::vector<double>();
2350 t_PVz =
new std::vector<double>();
2362 tree_->Branch(
"PVx",
"std::vector<double>", &
t_PVx);
2363 tree_->Branch(
"PVy",
"std::vector<double>", &t_PVy);
2364 tree_->Branch(
"PVz",
"std::vector<double>", &t_PVz);
2365 tree_->Branch(
"PVisValid",
"std::vector<int>", &t_PVisValid);
2366 tree_->Branch(
"PVndof",
"std::vector<int>", &t_PVndof);
2367 tree_->Branch(
"PVNTracks",
"std::vector<int>", &t_PVNTracks);
2368 tree_->Branch(
"PVNTracksWt",
"std::vector<int>", &t_PVNTracksWt);
2369 tree_->Branch(
"t_PVTracksSumPt",
"std::vector<double>", &t_PVTracksSumPt);
2370 tree_->Branch(
"t_PVTracksSumPtWt",
"std::vector<double>", &t_PVTracksSumPtWt);
2371 tree_->Branch(
"PVNTracksHP",
"std::vector<int>", &t_PVNTracksHP);
2372 tree_->Branch(
"PVNTracksHPWt",
"std::vector<int>", &t_PVNTracksHPWt);
2373 tree_->Branch(
"t_PVTracksSumPtHP",
"std::vector<double>", &t_PVTracksSumPtHP);
2374 tree_->Branch(
"t_PVTracksSumPtHPWt",
"std::vector<double>", &t_PVTracksSumPtHPWt);
2377 for (
int i = 0;
i < 128;
i++)
2405 tree_->Branch(
"t_L1PreScale",
"std::vector<int>", &t_L1PreScale);
2406 tree_->Branch(
"t_L1CenJetPt",
"std::vector<double>", &t_L1CenJetPt);
2407 tree_->Branch(
"t_L1CenJetEta",
"std::vector<double>", &t_L1CenJetEta);
2408 tree_->Branch(
"t_L1CenJetPhi",
"std::vector<double>", &t_L1CenJetPhi);
2409 tree_->Branch(
"t_L1FwdJetPt",
"std::vector<double>", &t_L1FwdJetPt);
2410 tree_->Branch(
"t_L1FwdJetEta",
"std::vector<double>", &t_L1FwdJetEta);
2411 tree_->Branch(
"t_L1FwdJetPhi",
"std::vector<double>", &t_L1FwdJetPhi);
2412 tree_->Branch(
"t_L1TauJetPt",
"std::vector<double>", &t_L1TauJetPt);
2413 tree_->Branch(
"t_L1TauJetEta",
"std::vector<double>", &t_L1TauJetEta);
2414 tree_->Branch(
"t_L1TauJetPhi",
"std::vector<double>", &t_L1TauJetPhi);
2415 tree_->Branch(
"t_L1MuonPt",
"std::vector<double>", &t_L1MuonPt);
2416 tree_->Branch(
"t_L1MuonEta",
"std::vector<double>", &t_L1MuonEta);
2417 tree_->Branch(
"t_L1MuonPhi",
"std::vector<double>", &t_L1MuonPhi);
2418 tree_->Branch(
"t_L1IsoEMPt",
"std::vector<double>", &t_L1IsoEMPt);
2419 tree_->Branch(
"t_L1IsoEMEta",
"std::vector<double>", &t_L1IsoEMEta);
2420 tree_->Branch(
"t_L1IsoEMPhi",
"std::vector<double>", &t_L1IsoEMPhi);
2421 tree_->Branch(
"t_L1NonIsoEMPt",
"std::vector<double>", &t_L1NonIsoEMPt);
2422 tree_->Branch(
"t_L1NonIsoEMEta",
"std::vector<double>", &t_L1NonIsoEMEta);
2423 tree_->Branch(
"t_L1NonIsoEMPhi",
"std::vector<double>", &t_L1NonIsoEMPhi);
2424 tree_->Branch(
"t_L1METPt",
"std::vector<double>", &t_L1METPt);
2425 tree_->Branch(
"t_L1METEta",
"std::vector<double>", &t_L1METEta);
2426 tree_->Branch(
"t_L1METPhi",
"std::vector<double>", &t_L1METPhi);
2428 t_jetPt =
new std::vector<double>();
2429 t_jetEta =
new std::vector<double>();
2430 t_jetPhi =
new std::vector<double>();
2433 tree_->Branch(
"t_jetPt",
"std::vector<double>", &
t_jetPt);
2434 tree_->Branch(
"t_jetEta",
"std::vector<double>", &t_jetEta);
2435 tree_->Branch(
"t_jetPhi",
"std::vector<double>", &t_jetPhi);
2436 tree_->Branch(
"t_nTrksJetCalo",
"std::vector<double>", &t_nTrksJetCalo);
2437 tree_->Branch(
"t_nTrksJetVtx",
"std::vector<double>", &t_nTrksJetVtx);
2450 tree_->Branch(
"t_trackPhiAll",
"std::vector<double>", &t_trackPhiAll);
2451 tree_->Branch(
"t_trackEtaAll",
"std::vector<double>", &t_trackEtaAll);
2452 tree_->Branch(
"t_trackPtAll",
"std::vector<double>", &t_trackPtAll);
2453 tree_->Branch(
"t_trackDxyAll",
"std::vector<double>", &t_trackDxyAll);
2454 tree_->Branch(
"t_trackDzAll",
"std::vector<double>", &t_trackDzAll);
2455 tree_->Branch(
"t_trackDxyPVAll",
"std::vector<double>", &t_trackDxyPVAll);
2456 tree_->Branch(
"t_trackDzPVAll",
"std::vector<double>", &t_trackDzPVAll);
2457 tree_->Branch(
"t_trackChiSqAll",
"std::vector<double>", &t_trackChiSqAll);
2460 t_trackP =
new std::vector<double>();
2489 t_trackHitOutMissTOB =
new std::vector<int>();
2490 t_trackHitOutMissTEC =
new std::vector<int>();
2491 t_trackHitOutMissTIB =
new std::vector<int>();
2492 t_trackHitOutMissTID =
new std::vector<int>();
2503 t_trackL =
new std::vector<double>();
2505 tree_->Branch(
"t_trackP",
"std::vector<double>", &
t_trackP);
2506 tree_->Branch(
"t_trackPt",
"std::vector<double>", &t_trackPt);
2507 tree_->Branch(
"t_trackEta",
"std::vector<double>", &t_trackEta);
2508 tree_->Branch(
"t_trackPhi",
"std::vector<double>", &t_trackPhi);
2509 tree_->Branch(
"t_trackEcalEta",
"std::vector<double>", &t_trackEcalEta);
2510 tree_->Branch(
"t_trackEcalPhi",
"std::vector<double>", &t_trackEcalPhi);
2511 tree_->Branch(
"t_trackHcalEta",
"std::vector<double>", &t_trackHcalEta);
2512 tree_->Branch(
"t_trackHcalPhi",
"std::vector<double>", &t_trackHcalPhi);
2514 tree_->Branch(
"t_trackNOuterHits",
"std::vector<int>", &t_trackNOuterHits);
2515 tree_->Branch(
"t_NLayersCrossed",
"std::vector<int>", &t_NLayersCrossed);
2516 tree_->Branch(
"t_trackHitsTOB",
"std::vector<int>", &t_trackHitsTOB);
2517 tree_->Branch(
"t_trackHitsTEC",
"std::vector<int>", &t_trackHitsTEC);
2518 tree_->Branch(
"t_trackHitInMissTOB",
"std::vector<int>", &t_trackHitInMissTOB);
2519 tree_->Branch(
"t_trackHitInMissTEC",
"std::vector<int>", &t_trackHitInMissTEC);
2520 tree_->Branch(
"t_trackHitInMissTIB",
"std::vector<int>", &t_trackHitInMissTIB);
2521 tree_->Branch(
"t_trackHitInMissTID",
"std::vector<int>", &t_trackHitInMissTID);
2522 tree_->Branch(
"t_trackHitInMissTIBTID",
"std::vector<int>", &t_trackHitInMissTIBTID);
2523 tree_->Branch(
"t_trackHitOutMissTOB",
"std::vector<int>", &t_trackHitOutMissTOB);
2524 tree_->Branch(
"t_trackHitOutMissTEC",
"std::vector<int>", &t_trackHitOutMissTEC);
2525 tree_->Branch(
"t_trackHitOutMissTIB",
"std::vector<int>", &t_trackHitOutMissTIB);
2526 tree_->Branch(
"t_trackHitOutMissTID",
"std::vector<int>", &t_trackHitOutMissTID);
2527 tree_->Branch(
"t_trackHitOutMissTOBTEC",
"std::vector<int>", &t_trackHitOutMissTOBTEC);
2528 tree_->Branch(
"t_trackHitInMeasTOB",
"std::vector<int>", &t_trackHitInMeasTOB);
2529 tree_->Branch(
"t_trackHitInMeasTEC",
"std::vector<int>", &t_trackHitInMeasTEC);
2530 tree_->Branch(
"t_trackHitInMeasTIB",
"std::vector<int>", &t_trackHitInMeasTIB);
2531 tree_->Branch(
"t_trackHitInMeasTID",
"std::vector<int>", &t_trackHitInMeasTID);
2532 tree_->Branch(
"t_trackHitOutMeasTOB",
"std::vector<int>", &t_trackHitOutMeasTOB);
2533 tree_->Branch(
"t_trackHitOutMeasTEC",
"std::vector<int>", &t_trackHitOutMeasTEC);
2534 tree_->Branch(
"t_trackHitOutMeasTIB",
"std::vector<int>", &t_trackHitOutMeasTIB);
2535 tree_->Branch(
"t_trackHitOutMeasTID",
"std::vector<int>", &t_trackHitOutMeasTID);
2536 tree_->Branch(
"t_trackOutPosOutHitDr",
"std::vector<double>", &t_trackOutPosOutHitDr);
2537 tree_->Branch(
"t_trackL",
"std::vector<double>", &t_trackL);
2539 tree_->Branch(
"t_trackDxy",
"std::vector<double>", &t_trackDxy);
2540 tree_->Branch(
"t_trackDxyBS",
"std::vector<double>", &t_trackDxyBS);
2541 tree_->Branch(
"t_trackDz",
"std::vector<double>", &t_trackDz);
2542 tree_->Branch(
"t_trackDzBS",
"std::vector<double>", &t_trackDzBS);
2543 tree_->Branch(
"t_trackDxyPV",
"std::vector<double>", &t_trackDxyPV);
2544 tree_->Branch(
"t_trackDzPV",
"std::vector<double>", &t_trackDzPV);
2545 tree_->Branch(
"t_trackChiSq",
"std::vector<double>", &t_trackChiSq);
2546 tree_->Branch(
"t_trackPVIdx",
"std::vector<int>", &t_trackPVIdx);
2552 tree_->Branch(
"t_maxNearP21x21",
"std::vector<double>", &t_maxNearP21x21);
2555 t_e7x7 =
new std::vector<double>();
2556 t_e9x9 =
new std::vector<double>();
2557 t_e11x11 =
new std::vector<double>();
2558 t_e15x15 =
new std::vector<double>();
2561 tree_->Branch(
"t_e7x7",
"std::vector<double>", &t_e7x7);
2562 tree_->Branch(
"t_e9x9",
"std::vector<double>", &t_e9x9);
2563 tree_->Branch(
"t_e11x11",
"std::vector<double>", &t_e11x11);
2564 tree_->Branch(
"t_e15x15",
"std::vector<double>", &t_e15x15);
2588 tree_->Branch(
"t_e9x9_10Sig",
"std::vector<double>", &t_e9x9_10Sig);
2589 tree_->Branch(
"t_e11x11_10Sig",
"std::vector<double>", &t_e11x11_10Sig);
2590 tree_->Branch(
"t_e15x15_10Sig",
"std::vector<double>", &t_e15x15_10Sig);
2591 tree_->Branch(
"t_e7x7_15Sig",
"std::vector<double>", &t_e7x7_15Sig);
2592 tree_->Branch(
"t_e9x9_15Sig",
"std::vector<double>", &t_e9x9_15Sig);
2593 tree_->Branch(
"t_e11x11_15Sig",
"std::vector<double>", &t_e11x11_15Sig);
2594 tree_->Branch(
"t_e15x15_15Sig",
"std::vector<double>", &t_e15x15_15Sig);
2595 tree_->Branch(
"t_e7x7_20Sig",
"std::vector<double>", &t_e7x7_20Sig);
2596 tree_->Branch(
"t_e9x9_20Sig",
"std::vector<double>", &t_e9x9_20Sig);
2597 tree_->Branch(
"t_e11x11_20Sig",
"std::vector<double>", &t_e11x11_20Sig);
2598 tree_->Branch(
"t_e15x15_20Sig",
"std::vector<double>", &t_e15x15_20Sig);
2599 tree_->Branch(
"t_e7x7_25Sig",
"std::vector<double>", &t_e7x7_25Sig);
2600 tree_->Branch(
"t_e9x9_25Sig",
"std::vector<double>", &t_e9x9_25Sig);
2601 tree_->Branch(
"t_e11x11_25Sig",
"std::vector<double>", &t_e11x11_25Sig);
2602 tree_->Branch(
"t_e15x15_25Sig",
"std::vector<double>", &t_e15x15_25Sig);
2603 tree_->Branch(
"t_e7x7_30Sig",
"std::vector<double>", &t_e7x7_30Sig);
2604 tree_->Branch(
"t_e9x9_30Sig",
"std::vector<double>", &t_e9x9_30Sig);
2605 tree_->Branch(
"t_e11x11_30Sig",
"std::vector<double>", &t_e11x11_30Sig);
2606 tree_->Branch(
"t_e15x15_30Sig",
"std::vector<double>", &t_e15x15_30Sig);
2644 tree_->Branch(
"t_esim9x9",
"std::vector<double>", &t_esim9x9);
2645 tree_->Branch(
"t_esim11x11",
"std::vector<double>", &t_esim11x11);
2646 tree_->Branch(
"t_esim15x15",
"std::vector<double>", &t_esim15x15);
2648 tree_->Branch(
"t_esim7x7Matched",
"std::vector<double>", &t_esim7x7Matched);
2649 tree_->Branch(
"t_esim9x9Matched",
"std::vector<double>", &t_esim9x9Matched);
2650 tree_->Branch(
"t_esim11x11Matched",
"std::vector<double>", &t_esim11x11Matched);
2651 tree_->Branch(
"t_esim15x15Matched",
"std::vector<double>", &t_esim15x15Matched);
2653 tree_->Branch(
"t_esim7x7Rest",
"std::vector<double>", &t_esim7x7Rest);
2654 tree_->Branch(
"t_esim9x9Rest",
"std::vector<double>", &t_esim9x9Rest);
2655 tree_->Branch(
"t_esim11x11Rest",
"std::vector<double>", &t_esim11x11Rest);
2656 tree_->Branch(
"t_esim15x15Rest",
"std::vector<double>", &t_esim15x15Rest);
2658 tree_->Branch(
"t_esim7x7Photon",
"std::vector<double>", &t_esim7x7Photon);
2659 tree_->Branch(
"t_esim9x9Photon",
"std::vector<double>", &t_esim9x9Photon);
2660 tree_->Branch(
"t_esim11x11Photon",
"std::vector<double>", &t_esim11x11Photon);
2661 tree_->Branch(
"t_esim15x15Photon",
"std::vector<double>", &t_esim15x15Photon);
2663 tree_->Branch(
"t_esim7x7NeutHad",
"std::vector<double>", &t_esim7x7NeutHad);
2664 tree_->Branch(
"t_esim9x9NeutHad",
"std::vector<double>", &t_esim9x9NeutHad);
2665 tree_->Branch(
"t_esim11x11NeutHad",
"std::vector<double>", &t_esim11x11NeutHad);
2666 tree_->Branch(
"t_esim15x15NeutHad",
"std::vector<double>", &t_esim15x15NeutHad);
2668 tree_->Branch(
"t_esim7x7CharHad",
"std::vector<double>", &t_esim7x7CharHad);
2669 tree_->Branch(
"t_esim9x9CharHad",
"std::vector<double>", &t_esim9x9CharHad);
2670 tree_->Branch(
"t_esim11x11CharHad",
"std::vector<double>", &t_esim11x11CharHad);
2671 tree_->Branch(
"t_esim15x15CharHad",
"std::vector<double>", &t_esim15x15CharHad);
2673 tree_->Branch(
"t_trkEcalEne",
"std::vector<double>", &t_trkEcalEne);
2674 tree_->Branch(
"t_simTrackP",
"std::vector<double>", &t_simTrackP);
2675 tree_->Branch(
"t_esimPdgId",
"std::vector<double>", &t_esimPdgId);
2681 t_h3x3 =
new std::vector<double>();
2682 t_h5x5 =
new std::vector<double>();
2683 t_h7x7 =
new std::vector<double>();
2712 tree_->Branch(
"t_maxNearHcalP5x5",
"std::vector<double>", &t_maxNearHcalP5x5);
2713 tree_->Branch(
"t_maxNearHcalP7x7",
"std::vector<double>", &t_maxNearHcalP7x7);
2714 tree_->Branch(
"t_h3x3",
"std::vector<double>", &t_h3x3);
2715 tree_->Branch(
"t_h5x5",
"std::vector<double>", &t_h5x5);
2716 tree_->Branch(
"t_h7x7",
"std::vector<double>", &t_h7x7);
2717 tree_->Branch(
"t_h3x3Sig",
"std::vector<double>", &t_h3x3Sig);
2718 tree_->Branch(
"t_h5x5Sig",
"std::vector<double>", &t_h5x5Sig);
2719 tree_->Branch(
"t_h7x7Sig",
"std::vector<double>", &t_h7x7Sig);
2720 tree_->Branch(
"t_infoHcal",
"std::vector<int>", &t_infoHcal);
2751 << pTrack->
momentum() <<
" (pt,eta,phi)(" << pTrack->
pt() <<
"," << pTrack->
eta() <<
","
2752 << pTrack->
phi() <<
")"
2753 <<
" p " << pTrack->
p() <<
"\n Normalized chi2 " << pTrack->
normalizedChi2()
2754 <<
" charge " << pTrack->
charge() <<
" qoverp() " << pTrack->
qoverp() <<
"+-"
2755 << pTrack->
qoverpError() <<
" d0 " << pTrack->
d0() <<
"\n NValidHits "
2757 <<
" TrackQuality " << pTrack->
qualityName(trackQuality_) <<
" "
2758 << pTrack->
quality(trackQuality_);
std::vector< double > * t_hsim7x7CharHad
double qoverp() const
q / p
static const std::string kSharedResource
double p() const
momentum vector magnitude
std::vector< double > * t_hsim3x3Matched
Log< level::Info, true > LogVerbatim
int stripTOBLayersWithMeasurement() const
std::vector< double > * t_esim7x7CharHad
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
std::vector< double > * t_e15x15
value_type const * get() const
std::vector< double > * t_nTrksJetCalo
const bool L1TriggerAlgoInfo_
EventNumber_t event() const
std::vector< double > * t_maxNearHcalP7x7
const Point & referencePoint() const
Reference point on the track.
std::vector< double > * t_trackPt
std::vector< double > * t_trackPAll
const bool printTrkHitPattern_
std::vector< double > * t_e7x7
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_trackHcalPhi
std::vector< double > * t_trackDxyPVAll
~IsolatedTracksNxN() override
static std::string qualityName(TrackQuality)
std::vector< int > * t_trackHitOutMeasTEC
std::vector< double > * t_trackPdgIdAll
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< double > * t_trackOutPosOutHitDr
std::vector< double > * t_maxNearHcalP5x5
std::vector< double > * t_L1NonIsoEMPt
std::vector< int > * t_trackHitOutMeasTIB
std::vector< double > * t_esim7x7
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< int > * t_trackHitInMissTOB
std::vector< double > * t_trackDz
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
std::vector< double > * t_trackEcalEta
int stripTIBLayersWithMeasurement() const
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
std::vector< double > * t_trackEtaAll
std::vector< double > * t_esim11x11Matched
std::vector< double > * t_L1IsoEMEta
std::vector< double > * t_PVTracksSumPt
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< double > * t_e9x9_10Sig
TH1F * h_maxNearP25x25[NPBins][NEtaBins]
TrackQuality
track quality
std::vector< double > * t_hsim3x3CharHad
#define DEFINE_FWK_MODULE(type)
int stripTOBLayersWithoutMeasurement(HitCategory category) const
std::vector< int > * t_PVndof
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_hsim7x7Rest
std::vector< double > * t_L1TauJetPhi
std::vector< double > * t_PVTracksSumPtWt
std::vector< int > * t_infoHcal
static constexpr size_t nL1BitsMax
std::vector< double > * t_e11x11_15Sig
std::vector< double > * t_L1TauJetPt
std::vector< int > * t_PVNTracksWt
std::vector< double > * t_trackEcalPhi
std::vector< double > * t_esim11x11NeutHad
std::vector< double > * t_L1TauJetEta
std::vector< double > * t_e15x15_15Sig
std::vector< double > * t_L1MuonEta
std::vector< double > * t_L1MuonPt
int bunchCrossing() const
std::vector< double > * t_h3x3
edm::LuminosityBlockNumber_t luminosityBlock() const
std::vector< double > * t_L1MuonPhi
double phi() const
azimuthal angle of momentum vector
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
std::vector< double > * t_trackDxyAll
T * make(const Args &...args) const
make new ROOT object
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
std::vector< double > * t_maxNearHcalP3x3
IsolatedTracksNxN(const edm::ParameterSet &)
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
std::vector< double > * t_hsim3x3Photon
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
int pixelLayersWithMeasurement() const
const Vector & momentum() const
track momentum vector
static constexpr size_t NPBins
std::vector< double > * t_PVTracksSumPtHP
const math::XYZPoint & outerPosition() const
position of the outermost hit
std::vector< double > * t_esim11x11Rest
int trackerLayersWithMeasurement() const
int pixelEndcapLayersWithMeasurement() const
const double maxTrackEta_
std::vector< int > * t_trackNOuterHits
std::vector< double > * t_h7x7Sig
std::vector< double > * t_e15x15_30Sig
std::vector< double > * t_trackPhiAll
std::vector< double > * t_e7x7_25Sig
double genPartPBins[NPBins+1]
std::vector< double > * t_trkHcalEne
std::vector< double > * t_e7x7_20Sig
std::vector< double > * t_e11x11_10Sig
std::vector< double > * t_trackPtAll
std::vector< double > * t_h3x3Sig
bool getData(T &iHolder) const
std::vector< double > * t_esimPdgId
void printHitPattern(HitCategory category, int position, std::ostream &stream) const
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
std::vector< double > * t_e11x11_20Sig
std::vector< double > * t_jetEta
std::vector< double > * t_maxNearP31x31
std::vector< int > * t_trackHitInMissTEC
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_trkEcalEne
std::vector< double > * t_trackEta
std::vector< double > * t_esim9x9Photon
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
std::vector< int > * t_trackHitInMeasTID
double eta() const
pseudorapidity of momentum vector
std::vector< double > * t_hsim5x5Rest
std::vector< double > * t_e11x11
std::vector< double > * t_esim15x15
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_L1CenJetPt
std::vector< double > * t_trackChiSqAll
std::vector< double > * t_e15x15_25Sig
std::vector< int > * t_trackHitOutMissTIB
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
std::vector< double > * t_esim15x15Rest
std::vector< double > * t_esim11x11
std::vector< double > * t_hsim7x7
std::vector< int > * t_PVNTracksHPWt
int stripTIDLayersWithMeasurement() const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< int > * t_trackHitOutMissTID
std::vector< int > * t_trackHitOutMissTOBTEC
double pt() const
track transverse momentum
std::vector< int > * t_trackHitsTEC
std::vector< double > * t_e9x9_30Sig
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
std::vector< double > * t_L1CenJetPhi
int numberOfAllHits(HitCategory category) const
std::vector< double > * t_L1FwdJetEta
std::vector< double > * t_h7x7
Abs< T >::type abs(const T &t)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< int > * t_ecalSpike11x11
const bool writeAllTracks_
std::vector< double > * t_esim15x15NeutHad
std::vector< double > * t_e9x9_20Sig
std::vector< int > * t_trackHitOutMeasTOB
std::vector< int > * t_trackHitInMeasTIB
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)
unsigned short numberOfValidHits() const
number of valid hits found
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
T * make(const Args &...args) const
make new ROOT object
std::vector< double > * t_trackDzPV
std::vector< int > * t_PVNTracksHP
std::vector< double > * t_L1FwdJetPhi
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extIsoEm_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > * t_nTrksJetVtx
std::vector< double > * t_esim7x7NeutHad
std::vector< double > * t_hsim3x3NeutHad
std::vector< double > * t_L1NonIsoEMPhi
std::vector< double > * t_trackDzBS
std::vector< int > * t_trackHitOutMissTOB
std::vector< double > * t_L1CenJetEta
std::vector< double > * t_trackDzPVAll
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > tok_L1extMu_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_topo_
std::vector< double > * t_esim7x7Matched
std::vector< double > * t_esim9x9
std::vector< double > * t_hsim5x5
std::vector< double > * t_h5x5
double qoverpError() const
error on signed transverse curvature
std::vector< double > * t_trackDxyPV
std::vector< double > * t_hsim5x5NeutHad
std::vector< double > * t_trackChiSq
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...
std::vector< double > * t_hsim5x5Photon
std::vector< double > * t_PVy
std::vector< unsigned int > m_triggerMaskAlgoTrig
std::vector< int > * t_L1PreScale
std::vector< double > * t_hsim3x3Rest
int stripTIDLayersWithoutMeasurement(HitCategory category) const
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > tok_htmap_
std::vector< int > * t_PVisValid
static TrackQuality qualityByName(const std::string &name)
std::vector< double > * t_esim9x9Rest
std::vector< double > * t_L1METPhi
std::vector< int > * t_trackHitInMissTIB
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
std::vector< double > * t_e9x9_15Sig
std::vector< double > * t_e7x7_15Sig
std::vector< double > * t_trackPhi
T const * product() const
std::vector< double > * t_e7x7_10Sig
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
XYZPointD XYZPoint
point in space with cartesian internal representation
const double pvTracksPtMin_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > tok_L1extNoIsoEm_
std::vector< double > * t_trackDzAll
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
TH1F * h_maxNearP31x31[NPBins][NEtaBins]
std::vector< double > * t_esim11x11CharHad
int stripLayersWithMeasurement() const
int pixelBarrelLayersWithMeasurement() const
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
TH1F * h_maxNearP15x15[NPBins][NEtaBins]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > * t_e9x9_25Sig
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)
std::vector< double > * t_esim7x7Photon
static const bool useL1GtTriggerMenuLite(true)
std::vector< double > * t_esim9x9NeutHad
std::vector< double > * t_L1FwdJetPt
std::vector< double > * t_simTrackP
std::vector< double > * t_hsim7x7Matched
std::vector< int > * t_trackPVIdx
bool quality(const TrackQuality) const
Track quality.
std::vector< int > * t_trackHitsTOB
std::vector< double > * t_esim9x9Matched
std::vector< double > * t_hsim7x7NeutHad
std::vector< double > * t_L1IsoEMPhi
std::vector< int > * t_PVNTracks
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< double > * t_maxNearP21x21
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::vector< double > * t_L1NonIsoEMEta
std::vector< double > * t_PVz
std::pair< math::XYZPoint, double > propagateTrackerEnd(const reco::Track *, const MagneticField *, bool debug=false)
void printTrack(const reco::Track *pTrack)
std::unique_ptr< L1GtUtils > m_l1GtUtils
std::vector< double > * t_e15x15_20Sig
std::vector< double > * t_PVTracksSumPtHPWt
std::vector< double > * t_trackDxy
std::vector< std::string > * t_L1AlgoNames
std::vector< double > * t_hsim5x5CharHad
std::vector< double > * t_e15x15_10Sig
int stripTECLayersWithMeasurement() const
TH1F * h_maxNearP21x21[NPBins][NEtaBins]
int stripTECLayersWithoutMeasurement(HitCategory category) const
std::vector< double > * t_jetPhi
std::vector< double > * t_trackL
std::vector< double > * t_esim7x7Rest
std::vector< double > * t_trackDxyBS
int charge() const
track electric charge
std::vector< double > * t_trackHcalEta
std::vector< double > * t_L1METPt
std::map< std::pair< unsigned int, std::string >, int > l1AlgoMap_
std::vector< int > * t_NLayersCrossed
edm::EDGetTokenT< reco::CaloJetCollection > tok_jets_
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< int > * t_trackHitInMeasTOB
std::vector< double > * t_PVx
std::vector< int > * t_trackHitInMeasTEC
std::vector< double > * t_esim15x15Photon
std::vector< double > * t_e9x9
std::vector< double > * t_hsim5x5Matched
double genPartEtaBins[NEtaBins+1]
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
std::vector< double > * t_esim15x15Matched
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
std::vector< int > * t_trackHitOutMeasTID
std::vector< double > * t_L1METEta
std::vector< double > * t_e7x7_30Sig
std::vector< int > * t_trackHitOutMissTEC
std::vector< double > * t_e11x11_25Sig
std::vector< double > * t_hsim3x3
std::vector< double > * t_trackP
std::vector< double > * t_hsim7x7Photon
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
std::vector< double > * t_jetPt
static const bool useL1EventSetup(true)
std::vector< double > * t_L1IsoEMPt
std::vector< double > * t_esim11x11Photon
int stripTIBLayersWithoutMeasurement(HitCategory category) const
std::vector< double > * t_h5x5Sig
std::vector< int > * t_trackHitInMissTID
std::vector< double > * t_e11x11_30Sig
std::vector< int > * t_trackHitInMissTIBTID
std::vector< double > * t_esim9x9CharHad
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_
std::vector< double > * t_esim15x15CharHad
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)