13 #include "TDirectory.h"
15 #include "TLorentzVector.h"
16 #include "TInterpreter.h"
104 std::array<int, 3>
fillTree(std::vector<math::XYZTLorentzVector>& vecL1,
105 std::vector<math::XYZTLorentzVector>& vecL3,
107 std::vector<spr::propagatedTrackDirection>& trkCaloDirections,
108 std::vector<spr::propagatedTrackID>& trkCaloDets,
128 const std::vector<DetId>& ids,
129 std::vector<double>& edet,
131 std::vector<unsigned int>* detIds,
132 std::vector<double>* hitEnergies);
216 : trigNames_(iConfig.getParameter<std::
vector<std::
string>>(
"triggers")),
217 theTrackQuality_(iConfig.getParameter<std::
string>(
"trackQuality")),
218 processName_(iConfig.getParameter<std::
string>(
"processName")),
219 l1Filter_(iConfig.getParameter<std::
string>(
"l1Filter")),
220 l2Filter_(iConfig.getParameter<std::
string>(
"l2Filter")),
221 l3Filter_(iConfig.getParameter<std::
string>(
"l3Filter")),
222 a_coneR_(iConfig.getParameter<double>(
"coneRadius")),
223 a_mipR_(iConfig.getParameter<double>(
"coneRadiusMIP")),
224 a_mipR2_(iConfig.getParameter<double>(
"coneRadiusMIP2")),
225 a_mipR3_(iConfig.getParameter<double>(
"coneRadiusMIP3")),
226 a_mipR4_(iConfig.getParameter<double>(
"coneRadiusMIP4")),
227 a_mipR5_(iConfig.getParameter<double>(
"coneRadiusMIP5")),
228 pTrackMin_(iConfig.getParameter<double>(
"minimumTrackP")),
229 eEcalMax_(iConfig.getParameter<double>(
"maximumEcalEnergy")),
230 maxRestrictionP_(iConfig.getParameter<double>(
"maxTrackP")),
231 slopeRestrictionP_(iConfig.getParameter<double>(
"slopeTrackP")),
232 hcalScale_(iConfig.getUntrackedParameter<double>(
"hHcalScale", 1.0)),
233 eIsolate1_(iConfig.getParameter<double>(
"isolationEnergyTight")),
234 eIsolate2_(iConfig.getParameter<double>(
"isolationEnergyLoose")),
235 pTrackLow_(iConfig.getParameter<double>(
"momentumLow")),
236 pTrackHigh_(iConfig.getParameter<double>(
"momentumHigh")),
237 prescaleLow_(iConfig.getParameter<int>(
"prescaleLow")),
238 prescaleHigh_(iConfig.getParameter<int>(
"prescaleHigh")),
239 useRaw_(iConfig.getUntrackedParameter<int>(
"useRaw", 0)),
240 dataType_(iConfig.getUntrackedParameter<int>(
"dataType", 0)),
241 mode_(iConfig.getUntrackedParameter<int>(
"outMode", 11)),
242 ignoreTrigger_(iConfig.getUntrackedParameter<bool>(
"ignoreTriggers",
false)),
243 useL1Trigger_(iConfig.getUntrackedParameter<bool>(
"useL1Trigger",
false)),
244 unCorrect_(iConfig.getUntrackedParameter<bool>(
"unCorrect",
false)),
245 collapseDepth_(iConfig.getUntrackedParameter<bool>(
"collapseDepth",
false)),
246 hitEthrEB_(iConfig.getParameter<double>(
"EBHitEnergyThreshold")),
247 hitEthrEE0_(iConfig.getParameter<double>(
"EEHitEnergyThreshold0")),
248 hitEthrEE1_(iConfig.getParameter<double>(
"EEHitEnergyThreshold1")),
249 hitEthrEE2_(iConfig.getParameter<double>(
"EEHitEnergyThreshold2")),
250 hitEthrEE3_(iConfig.getParameter<double>(
"EEHitEnergyThreshold3")),
251 hitEthrEELo_(iConfig.getParameter<double>(
"EEHitEnergyThresholdLow")),
252 hitEthrEEHi_(iConfig.getParameter<double>(
"EEHitEnergyThresholdHigh")),
253 triggerEvent_(iConfig.getParameter<edm::
InputTag>(
"labelTriggerEvent")),
254 theTriggerResultsLabel_(iConfig.getParameter<edm::
InputTag>(
"labelTriggerResult")),
255 labelGenTrack_(iConfig.getParameter<std::
string>(
"labelTrack")),
256 labelRecVtx_(iConfig.getParameter<std::
string>(
"labelVertex")),
257 labelEB_(iConfig.getParameter<std::
string>(
"labelEBRecHit")),
258 labelEE_(iConfig.getParameter<std::
string>(
"labelEERecHit")),
259 labelHBHE_(iConfig.getParameter<std::
string>(
"labelHBHERecHit")),
260 labelTower_(iConfig.getParameter<std::
string>(
"labelCaloTower")),
261 l1TrigName_(iConfig.getUntrackedParameter<std::
string>(
"l1TrigName",
"L1_SingleJet60")),
262 oldID_(iConfig.getUntrackedParameter<std::
vector<int>>(
"oldID")),
263 newDepth_(iConfig.getUntrackedParameter<std::
vector<int>>(
"newDepth")),
264 hep17_(iConfig.getUntrackedParameter<bool>(
"hep17")),
265 debEvents_(iConfig.getParameter<std::
vector<int>>(
"debugEvents")),
273 const double isolationRadius(28.9), innerR(10.0), outerR(30.0);
301 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k) {
311 tok_bs_ = consumes<reco::BeamSpot>(labelBS);
316 tok_alg_ = consumes<BXVector<GlobalAlgBlk>>(algTag);
317 tok_Muon_ = consumes<reco::MuonCollection>(labelMuon);
319 if (modnam.empty()) {
342 tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
343 tok_bFieldH_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
345 tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
346 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
348 tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
349 tok_resp_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
352 <<
"Parameters read from config file \n"
359 <<
"\t a_charIsoR " << a_charIsoR_ <<
"\t a_mipR " <<
a_mipR_ <<
"\t a_mipR2 " <<
a_mipR2_ <<
"\t a_mipR3 "
376 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k)
380 for (
int i = 0;
i < 10;
i++)
382 for (
int i = 0;
i < 8; ++
i)
390 unsigned int k1(0),
k2(0);
391 for (
auto phi : phibins_) {
395 for (
auto eta : etabins_) {
433 if (!trkCollection.
isValid()) {
456 if (recVtxs.
isValid() && !(recVtxs->empty())) {
458 for (
unsigned int k = 0;
k < recVtxs->size(); ++
k) {
459 if (!((*recVtxs)[
k].isFake()) && ((*recVtxs)[
k].ndof() > 4)) {
467 leadPV = beamSpotH->position();
480 if (!barrelRecHitsHandle.
isValid()) {
486 if (!endcapRecHitsHandle.
isValid()) {
500 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
502 std::vector<spr::propagatedTrackID> trkCaloDets;
504 std::vector<math::XYZTLorentzVector> vecL1, vecL3;
528 if (!ignoreTrigger_) {
532 for (
const auto& decision : finalDecisions) {
533 if (decision.first.find(
l1TrigName_) != std::string::npos) {
541 <<
" from a list of " << finalDecisions.size() <<
" decisions";
546 if (triggerResults.
isValid()) {
550 for (
unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
551 int hlt = triggerResults->accept(iHLT);
561 <<
"This trigger " << names[iHLT] <<
" Flag " << hlt <<
":" <<
t_trgbits->at(i);
575 std::array<int, 3> ntksave{{0, 0, 0}};
604 if (!triggerEventHandle.
isValid()) {
607 triggerEvent = *(triggerEventHandle.
product());
610 if (triggerResults.
isValid()) {
611 std::vector<std::string>
modules;
614 for (
unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
619 std::vector<math::XYZTLorentzVector> vecL2;
623 for (
unsigned int ifilter = 0; ifilter < triggerEvent.
sizeFilters(); ++ifilter) {
624 std::vector<int>
Keys;
627 for (
unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
628 if (label.find(moduleLabels[imodule]) != std::string::npos) {
633 for (
unsigned int ifiltrKey = 0; ifiltrKey < triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
634 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
637 if (label.find(
l2Filter_) != std::string::npos) {
639 }
else if (label.find(
l3Filter_) != std::string::npos) {
647 <<
"key " << ifiltrKey <<
" : pt " << TO.
pt() <<
" eta " << TO.
eta() <<
" phi " << TO.
phi()
648 <<
" mass " << TO.
mass() <<
" Id " << TO.
id();
654 <<
"sizes " << vecL1.size() <<
":" << vecL2.size() <<
":" << vecL3.size();
662 for (
unsigned int i = 0;
i < vecL2.size();
i++) {
663 double dr =
dR(vecL1[0], vecL2[
i]);
670 mindRvec1 = vecL2[
i];
675 edm::LogVerbatim(
"HcalIsoTrack") <<
"L2 object closest to L1 " << mindRvec1 <<
" at Dr " << mindR1;
678 if (!vecL1.empty()) {
685 if (!vecL3.empty()) {
731 tree =
fs->
make<TTree>(
"CalibTree",
"CalibTree");
733 tree->Branch(
"t_Run", &
t_Run,
"t_Run/I");
748 tree->Branch(
"t_p", &
t_p,
"t_p/D");
749 tree->Branch(
"t_pt", &
t_pt,
"t_pt/D");
750 tree->Branch(
"t_phi", &
t_phi,
"t_phi/D");
772 t_DetIds =
new std::vector<unsigned int>();
773 t_DetIds1 =
new std::vector<unsigned int>();
774 t_DetIds3 =
new std::vector<unsigned int>();
779 tree->Branch(
"t_DetIds",
"std::vector<unsigned int>", &
t_DetIds);
780 tree->Branch(
"t_HitEnergies",
"std::vector<double>", &t_HitEnergies);
781 tree->Branch(
"t_trgbits",
"std::vector<bool>", &t_trgbits);
782 tree->Branch(
"t_DetIds1",
"std::vector<unsigned int>", &t_DetIds1);
783 tree->Branch(
"t_DetIds3",
"std::vector<unsigned int>", &t_DetIds3);
784 tree->Branch(
"t_HitEnergies1",
"std::vector<double>", &t_HitEnergies1);
785 tree->Branch(
"t_HitEnergies3",
"std::vector<double>", &t_HitEnergies3);
787 tree2 =
fs->
make<TTree>(
"EventInfo",
"Event Information");
804 tree2->Branch(
"t_ietaAll",
"std::vector<int>", &t_ietaAll);
805 tree2->Branch(
"t_ietaGood",
"std::vector<int>", &t_ietaGood);
806 tree2->Branch(
"t_trackType",
"std::vector<int>", &t_trackType);
818 <<
" init flag " << flag <<
" change flag " << changed_;
825 for (
unsigned itrig = 0; itrig <
trigNames_.size(); itrig++) {
827 if (triggerindx >=
n) {
829 <<
"the current menu";
848 std::vector<std::string> trig = {
"HLT_PFJet40",
858 desc.
add<std::vector<std::string>>(
"triggers", trig);
865 desc.
add<
double>(
"minTrackPt", 1.0);
866 desc.
add<
double>(
"maxDxyPV", 0.02);
867 desc.
add<
double>(
"maxDzPV", 0.02);
868 desc.
add<
double>(
"maxChi2", 5.0);
869 desc.
add<
double>(
"maxDpOverP", 0.1);
870 desc.
add<
int>(
"minOuterHit", 4);
871 desc.
add<
int>(
"minLayerCrossed", 8);
872 desc.
add<
int>(
"maxInMiss", 0);
873 desc.
add<
int>(
"maxOutMiss", 0);
875 desc.
add<
double>(
"minimumTrackP", 10.0);
876 desc.
add<
double>(
"coneRadius", 34.98);
878 desc.
add<
double>(
"coneRadiusMIP", 14.0);
879 desc.
add<
double>(
"coneRadiusMIP2", 18.0);
880 desc.
add<
double>(
"coneRadiusMIP3", 20.0);
881 desc.
add<
double>(
"coneRadiusMIP4", 22.0);
882 desc.
add<
double>(
"coneRadiusMIP5", 24.0);
883 desc.
add<
double>(
"maximumEcalEnergy", 2.0);
885 desc.
add<
double>(
"maxTrackP", 8.0);
886 desc.
add<
double>(
"slopeTrackP", 0.05090504066);
887 desc.
add<
double>(
"isolationEnergyTight", 2.0);
888 desc.
add<
double>(
"isolationEnergyLoose", 10.0);
890 desc.
add<
double>(
"EBHitEnergyThreshold", 0.08);
891 desc.
add<
double>(
"EEHitEnergyThreshold0", 0.30);
892 desc.
add<
double>(
"EEHitEnergyThreshold1", 0.00);
893 desc.
add<
double>(
"EEHitEnergyThreshold2", 0.00);
894 desc.
add<
double>(
"EEHitEnergyThreshold3", 0.00);
895 desc.
add<
double>(
"EEHitEnergyThresholdLow", 0.30);
896 desc.
add<
double>(
"EEHitEnergyThresholdHigh", 0.30);
898 desc.
add<
double>(
"momentumLow", 40.0);
899 desc.
add<
double>(
"momentumHigh", 60.0);
900 desc.
add<
int>(
"prescaleLow", 1);
901 desc.
add<
int>(
"prescaleHigh", 1);
928 std::vector<int> dummy;
933 desc.
add<std::vector<int>>(
"debugEvents",
events);
934 descriptions.
add(
"HcalIsoTrkAnalyzer", desc);
938 std::vector<math::XYZTLorentzVector>& vecL3,
940 std::vector<spr::propagatedTrackDirection>& trkCaloDirections,
941 std::vector<spr::propagatedTrackID>& trkCaloDets,
954 int nSave(0), nLoose(0), nTight(0);
956 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
957 unsigned int nTracks(0), nselTracks(0);
958 t_nTrk = trkCaloDirections.size();
960 for (trkDetItr = trkCaloDirections.begin(),
nTracks = 0; trkDetItr != trkCaloDirections.end();
962 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
974 for (
unsigned int k = 0;
k < vecL3.size(); ++
k) {
975 double dr =
dR(vecL3[
k], v4);
980 t_mindR1 = (!vecL1.empty()) ?
dR(vecL1[0], v4) : 999;
987 if (trkDetItr->okHCAL) {
991 if (t_p > 40.0 && t_p <= 60.0)
998 oneCutParameters.
maxDzPV = 100;
1001 bool qltyFlag =
spr::goodTrack(pTrack, leadPV, oneCutParameters,
false);
1004 oneCutParameters.
maxDzPV = 100;
1017 edm::LogVerbatim(
"HcalIsoTrack") <<
"qltyFlag|okECAL|okHCAL : " << qltyFlag <<
"|" << trkDetItr->okECAL <<
"|"
1018 << trkDetItr->okHCAL <<
" eIsolation " << eIsolation;
1020 t_qltyFlag = (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL);
1026 std::vector<DetId> eIds;
1027 std::vector<double> eHit;
1029 barrelRecHitsHandle,
1030 endcapRecHitsHandle,
1031 trkDetItr->pointHCAL,
1032 trkDetItr->pointECAL,
1034 trkDetItr->directionECAL,
1038 for (
unsigned int k = 0;
k < eIds.size(); ++
k) {
1049 std::vector<DetId> eIds2;
1050 std::vector<double> eHit2;
1052 barrelRecHitsHandle,
1053 endcapRecHitsHandle,
1054 trkDetItr->pointHCAL,
1055 trkDetItr->pointECAL,
1057 trkDetItr->directionECAL,
1061 for (
unsigned int k = 0;
k < eIds2.size(); ++
k) {
1072 std::vector<DetId> eIds3;
1073 std::vector<double> eHit3;
1075 barrelRecHitsHandle,
1076 endcapRecHitsHandle,
1077 trkDetItr->pointHCAL,
1078 trkDetItr->pointECAL,
1080 trkDetItr->directionECAL,
1084 for (
unsigned int k = 0;
k < eIds3.size(); ++
k) {
1095 std::vector<DetId> eIds4;
1096 std::vector<double> eHit4;
1098 barrelRecHitsHandle,
1099 endcapRecHitsHandle,
1100 trkDetItr->pointHCAL,
1101 trkDetItr->pointECAL,
1103 trkDetItr->directionECAL,
1107 for (
unsigned int k = 0;
k < eIds4.size(); ++
k) {
1118 std::vector<DetId> eIds5;
1119 std::vector<double> eHit5;
1121 barrelRecHitsHandle,
1122 endcapRecHitsHandle,
1123 trkDetItr->pointHCAL,
1124 trkDetItr->pointECAL,
1126 trkDetItr->directionECAL,
1130 for (
unsigned int k = 0;
k < eIds5.size(); ++
k) {
1142 const DetId cellE(trkDetItr->detIdECAL);
1144 barrelRecHitsHandle,
1145 endcapRecHitsHandle,
1157 barrelRecHitsHandle,
1158 endcapRecHitsHandle,
1169 if (e11x11P.second && e15x15P.second) {
1170 t_eAnnular = (e15x15P.first - e11x11P.first);
1172 t_eAnnular = -(e15x15P.first - e11x11P.first);
1175 const DetId cellH(trkDetItr->detIdHCAL);
1177 theHBHETopology, cellH, hbhe, 2, 2,
false,
true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1179 theHBHETopology, cellH, hbhe, 3, 3,
false,
true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1184 <<
" Annular E (Ecal) " << e11x11P.first <<
":" << e15x15P.first <<
":"
1195 int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
1196 std::vector<DetId> ids, ids1, ids3;
1197 std::vector<double> edet0, edet1, edet3;
1200 trkDetItr->pointHCAL,
1201 trkDetItr->pointECAL,
1203 trkDetItr->directionHCAL,
1209 for (
unsigned k = 0;
k < ids.size(); ++
k)
1217 trkDetItr->pointHCAL,
1218 trkDetItr->pointECAL,
1220 trkDetItr->directionHCAL,
1226 for (
unsigned k = 0;
k < ids1.size(); ++
k)
1234 trkDetItr->pointHCAL,
1235 trkDetItr->pointECAL,
1237 trkDetItr->directionHCAL,
1243 for (
unsigned k = 0;
k < ids3.size(); ++
k)
1251 <<
"This track : " <<
nTracks <<
" (pt|eta|phi|p) : " <<
t_pt <<
"|" << pTrack->
eta() <<
"|" <<
t_phi
1252 <<
"|" << t_p <<
" Generator Level p " <<
t_gentrackP;
1256 for (
unsigned int ll = 0; ll <
t_DetIds->size(); ll++) {
1260 for (
unsigned int ll = 0; ll <
t_DetIds1->size(); ll++) {
1264 for (
unsigned int ll = 0; ll <
t_DetIds3->size(); ll++) {
1303 if (t_p > 40.0 && t_p <= 60.0 &&
t_selectTk) {
1318 std::array<int, 3> i3{{nSave, nLoose, nTight}};
1323 return reco::deltaR(vec1.eta(), vec1.phi(), vec2.eta(), vec2.phi());
1330 double mindR(999.9);
1331 for (
const auto&
p : (*genParticles)) {
1335 pmom =
p.momentum().R();
1343 std::vector<double> sumPFNallSMDQH2;
1349 for (
const auto& pf_it : (*tower)) {
1354 hadder += pf_it.hadEt();
1356 sumPFNallSMDQH2.emplace_back(hadder);
1361 std::sort(sumPFNallSMDQH2.begin(), sumPFNallSMDQH2.end());
1362 if (sumPFNallSMDQH2.size() % 2)
1363 evt_smdq = sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 1) / 2];
1365 evt_smdq = (sumPFNallSMDQH2[sumPFNallSMDQH2.size() / 2] + sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 2) / 2]) / 2.;
1392 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k) {
1402 const std::vector<DetId>& ids,
1403 std::vector<double>& edet,
1405 std::vector<unsigned int>* detIds,
1406 std::vector<double>* hitEnergies) {
1409 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1416 for (
const auto& en : edet)
1420 edm::LogWarning(
"HcalIsoTrack") <<
"Check inconsistent energies: " << indx <<
" " << eHcal <<
":" << ehcal
1421 <<
" from " << ids.size() <<
" cells";
1425 std::map<HcalDetId, double> hitMap;
1426 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1428 auto itr = hitMap.find(
id);
1429 if (itr == hitMap.end()) {
1430 hitMap[
id] = edet[
k];
1432 (itr->second) += edet[k];
1435 detIds->reserve(hitMap.size());
1436 hitEnergies->reserve(hitMap.size());
1437 for (
const auto&
hit : hitMap) {
1438 detIds->emplace_back(
hit.first.rawId());
1439 hitEnergies->emplace_back(
hit.second);
1442 detIds->reserve(ids.size());
1443 hitEnergies->reserve(ids.size());
1444 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1445 detIds->emplace_back(ids[
k].rawId());
1446 hitEnergies->emplace_back(edet[
k]);
1451 edm::LogVerbatim(
"HcalIsoTrack") <<
"Input to storeEnergy with " << ids.size() <<
" cells";
1452 for (
unsigned int k = 0;
k < ids.size(); ++
k)
1454 edm::LogVerbatim(
"HcalIsoTrack") <<
"Output of storeEnergy with " << detIds->size() <<
" cells and Etot " << eHcal;
1455 for (
unsigned int k = 0; k < detIds->size(); ++
k)
1463 for (reco::MuonCollection::const_iterator recMuon = muonh->begin(); recMuon != muonh->end(); ++recMuon) {
1464 if (recMuon->innerTrack().isNonnull()) {
1465 const reco::Track* pTrack = (recMuon->innerTrack()).
get();
1466 bool mediumMuon = (((recMuon->isPFMuon()) && (recMuon->isGlobalMuon() || recMuon->isTrackerMuon())) &&
1467 (recMuon->innerTrack()->validFraction() > 0.49));
1469 double chiGlobal = ((recMuon->globalTrack().isNonnull()) ? recMuon->globalTrack()->normalizedChi2() : 999);
1470 bool goodGlob = (recMuon->isGlobalMuon() && chiGlobal < 3 &&
1471 recMuon->combinedQuality().chi2LocalPosition < 12 && recMuon->combinedQuality().trkKink < 20);
unsigned int size() const
number of trigger paths in trigger table
static const std::string kSharedResource
const std::string labelHBHE_
constexpr double deltaPhi(double phi1, double phi2)
const std::vector< std::string > trigNames_
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)
Log< level::Info, true > LogVerbatim
spr::trackSelectionParameters selectionParameter_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
~HcalIsoTrkAnalyzer() override
const std::string l1TrigName_
constexpr int ietaAbs() const
get the absolute value of the cell ieta
const double maxRestrictionP_
std::vector< int > oldEta_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
The single EDProduct to be saved for each event (AOD case)
trigger::size_type sizeFilters() const
uint16_t *__restrict__ id
const std::string labelRecVtx_
constexpr int zside() const
get the z-side of the cell (1/-1)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackQuality
track quality
HcalDetId mergedDepthDetId(const HcalDetId &id) const
const std::string labelTower_
#define DEFINE_FWK_MODULE(type)
std::vector< int > * t_ietaAll
const double hitEthrEELo_
const Keys & filterKeys(trigger::size_type index) const
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
std::vector< int > oldDepth_
const double hitEthrEEHi_
double phi() const
azimuthal angle of momentum vector
T * make(const Args &...args) const
make new ROOT object
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
const Item * getValues(DetId fId, bool throwOnFail=true) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Exp< T >::type exp(const T &t)
std::vector< double > * t_HitEnergies
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
void beginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
double px() const
x coordinate of momentum vector
void storeEnergy(int indx, const HcalRespCorrs *respCorrs, const std::vector< DetId > &ids, std::vector< double > &edet, double &eHcal, std::vector< unsigned int > *detIds, std::vector< double > *hitEnergies)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< double > etabins_
Strings const & triggerNames() const
std::vector< unsigned int > * t_DetIds
const std::string names[nVars_]
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< double > * t_HitEnergies1
void analyze(edm::Event const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
const bool ignoreTrigger_
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)
bool getData(T &iHolder) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
constexpr HcalSubdetector subdet() const
get the subdetector
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
std::vector< double > * t_HitEnergies3
const std::string labelGenTrack_
double eta() const
pseudorapidity of momentum vector
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
double trackP(const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
std::array< int, 3 > fillTree(std::vector< math::XYZTLorentzVector > &vecL1, std::vector< math::XYZTLorentzVector > &vecL3, math::XYZPoint &leadPV, std::vector< spr::propagatedTrackDirection > &trkCaloDirections, std::vector< spr::propagatedTrackID > &trkCaloDets, const CaloGeometry *geo, const CaloTopology *topo, const HcalTopology *theHBHETopology, const EcalChannelStatus *theEcalChStatus, const EcalSeverityLevelAlgo *theEcalSevlv, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, edm::Handle< CaloTowerCollection > &towerHandle, edm::Handle< reco::GenParticleCollection > &genParticles, const HcalRespCorrs *respCorrs, const edm::Handle< reco::MuonCollection > &muonh)
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
constexpr int iphi() const
get the cell iphi
edm::Service< TFileService > fs
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const TriggerObjectCollection & getObjects() const
std::vector< double > vec1
const bool collapseDepth_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
l1t::L1TGlobalUtil * l1GtUtils_
double pt() const
track transverse momentum
std::vector< bool > * t_hltbits
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Abs< T >::type abs(const T &t)
constexpr int ieta() const
get the cell ieta
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
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)
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
static std::string const triggerResults
ParameterDescriptionBase * add(U const &iLabel, T const &value)
HLTConfigProvider hltConfig_
const std::string l3Filter_
double pz() const
z coordinate of momentum vector
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
std::vector< bool > * t_trgbits
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
const double slopeRestrictionP_
const edm::InputTag filterTag(trigger::size_type index) const
const std::vector< int > debEvents_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static TrackQuality qualityByName(const std::string &name)
const std::string l2Filter_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
T const * product() const
const std::string processName_
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
const std::string labelEB_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
T getParameter(std::string const &) const
std::vector< double > phibins_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double rhoh(const edm::Handle< CaloTowerCollection > &)
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
std::vector< int > oldDet_
const edm::InputTag theTriggerResultsLabel_
double eThreshold(const DetId &id, const CaloGeometry *geo) const
void endRun(edm::Run const &, edm::EventSetup const &) override
HcalIsoTrkAnalyzer(edm::ParameterSet const &)
const HcalDDDRecConstants * hdc_
reco::TrackBase::TrackQuality minQuality
const std::vector< std::pair< std::string, bool > > & decisionsFinal()
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
std::vector< unsigned int > * t_DetIds1
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
constexpr int depth() const
get the tower depth
const std::vector< int > newDepth_
const edm::InputTag triggerEvent_
Log< level::Warning, false > LogWarning
std::vector< int > * t_ietaGood
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
edm::EDGetTokenT< CaloTowerCollection > tok_cala_
std::vector< unsigned int > * t_DetIds3
const std::vector< int > oldID_
const std::string labelEE_
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
double py() const
y coordinate of momentum vector
bool notaMuon(const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
DetId newId(const DetId &)
const std::string l1Filter_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
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)
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)
const std::string theTrackQuality_
std::vector< int > * t_trackType