13 #include "TDirectory.h" 15 #include "TLorentzVector.h" 16 #include "TInterpreter.h" 107 std::array<int, 3>
fillTree(std::vector<math::XYZTLorentzVector>& vecL1,
108 std::vector<math::XYZTLorentzVector>& vecL3,
110 std::vector<spr::propagatedTrackDirection>& trkCaloDirections,
111 std::vector<spr::propagatedTrackID>& trkCaloDets,
131 const std::vector<DetId>& ids,
132 std::vector<double>& edet,
134 std::vector<unsigned int>* detIds,
135 std::vector<double>* hitEnergies);
227 theTrackQuality_(iConfig.getParameter<
std::
string>(
"trackQuality")),
228 processName_(iConfig.getParameter<
std::
string>(
"processName")),
229 l1Filter_(iConfig.getParameter<
std::
string>(
"l1Filter")),
230 l2Filter_(iConfig.getParameter<
std::
string>(
"l2Filter")),
231 l3Filter_(iConfig.getParameter<
std::
string>(
"l3Filter")),
232 a_coneR_(iConfig.getParameter<double>(
"coneRadius")),
233 a_mipR_(iConfig.getParameter<double>(
"coneRadiusMIP")),
234 a_mipR2_(iConfig.getParameter<double>(
"coneRadiusMIP2")),
235 a_mipR3_(iConfig.getParameter<double>(
"coneRadiusMIP3")),
236 a_mipR4_(iConfig.getParameter<double>(
"coneRadiusMIP4")),
237 a_mipR5_(iConfig.getParameter<double>(
"coneRadiusMIP5")),
238 pTrackMin_(iConfig.getParameter<double>(
"minimumTrackP")),
239 eEcalMax_(iConfig.getParameter<double>(
"maximumEcalEnergy")),
240 maxRestrictionP_(iConfig.getParameter<double>(
"maxTrackP")),
241 slopeRestrictionP_(iConfig.getParameter<double>(
"slopeTrackP")),
242 hcalScale_(iConfig.getUntrackedParameter<double>(
"hHcalScale", 1.0)),
243 eIsolate1_(iConfig.getParameter<double>(
"isolationEnergyTight")),
244 eIsolate2_(iConfig.getParameter<double>(
"isolationEnergyLoose")),
245 pTrackLow_(iConfig.getParameter<double>(
"momentumLow")),
246 pTrackHigh_(iConfig.getParameter<double>(
"momentumHigh")),
247 prescaleLow_(iConfig.getParameter<
int>(
"prescaleLow")),
248 prescaleHigh_(iConfig.getParameter<
int>(
"prescaleHigh")),
249 useRaw_(iConfig.getUntrackedParameter<
int>(
"useRaw", 0)),
250 dataType_(iConfig.getUntrackedParameter<
int>(
"dataType", 0)),
251 mode_(iConfig.getUntrackedParameter<
int>(
"outMode", 11)),
252 ignoreTrigger_(iConfig.getUntrackedParameter<
bool>(
"ignoreTriggers",
false)),
253 useL1Trigger_(iConfig.getUntrackedParameter<
bool>(
"useL1Trigger",
false)),
254 unCorrect_(iConfig.getUntrackedParameter<
bool>(
"unCorrect",
false)),
255 collapseDepth_(iConfig.getUntrackedParameter<
bool>(
"collapseDepth",
false)),
256 hitEthrEB_(iConfig.getParameter<double>(
"EBHitEnergyThreshold")),
257 hitEthrEE0_(iConfig.getParameter<double>(
"EEHitEnergyThreshold0")),
258 hitEthrEE1_(iConfig.getParameter<double>(
"EEHitEnergyThreshold1")),
259 hitEthrEE2_(iConfig.getParameter<double>(
"EEHitEnergyThreshold2")),
260 hitEthrEE3_(iConfig.getParameter<double>(
"EEHitEnergyThreshold3")),
261 hitEthrEELo_(iConfig.getParameter<double>(
"EEHitEnergyThresholdLow")),
262 hitEthrEEHi_(iConfig.getParameter<double>(
"EEHitEnergyThresholdHigh")),
263 triggerEvent_(iConfig.getParameter<
edm::
InputTag>(
"labelTriggerEvent")),
264 theTriggerResultsLabel_(iConfig.getParameter<
edm::
InputTag>(
"labelTriggerResult")),
265 labelGenTrack_(iConfig.getParameter<
std::
string>(
"labelTrack")),
266 labelRecVtx_(iConfig.getParameter<
std::
string>(
"labelVertex")),
267 labelEB_(iConfig.getParameter<
std::
string>(
"labelEBRecHit")),
268 labelEE_(iConfig.getParameter<
std::
string>(
"labelEERecHit")),
269 labelHBHE_(iConfig.getParameter<
std::
string>(
"labelHBHERecHit")),
270 labelTower_(iConfig.getParameter<
std::
string>(
"labelCaloTower")),
271 l1TrigName_(iConfig.getUntrackedParameter<
std::
string>(
"l1TrigName",
"L1_SingleJet60")),
272 oldID_(iConfig.getUntrackedParameter<
std::
vector<
int>>(
"oldID")),
273 newDepth_(iConfig.getUntrackedParameter<
std::
vector<
int>>(
"newDepth")),
274 hep17_(iConfig.getUntrackedParameter<
bool>(
"hep17")),
275 debEvents_(iConfig.getParameter<
std::
vector<
int>>(
"debugEvents")),
276 usePFThresh_(iConfig.getParameter<
bool>(
"usePFThreshold")),
277 labelBS_(iConfig.getParameter<
std::
string>(
"labelBeamSpot")),
278 modnam_(iConfig.getUntrackedParameter<
std::
string>(
"moduleName",
"")),
279 prdnam_(iConfig.getUntrackedParameter<
std::
string>(
"producerName",
"")),
280 labelMuon_(iConfig.getParameter<
std::
string>(
"labelMuon")),
281 algTag_(iConfig.getParameter<
edm::
InputTag>(
"algInputTag")),
282 extTag_(iConfig.getParameter<
edm::
InputTag>(
"extInputTag")),
316 const double isolationRadius(28.9), innerR(10.0), outerR(30.0);
338 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k) {
364 <<
"Parameters read from config file \n" 382 <<
" events to be debugged";
389 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k)
393 for (
int i = 0;
i < 10;
i++)
395 for (
int i = 0;
i < 8; ++
i)
403 unsigned int k1(0), k2(0);
424 <<
" Luminosity " <<
iEvent.luminosityBlock() <<
" Bunch " 425 <<
iEvent.bunchCrossing();
447 if (!trkCollection.
isValid()) {
466 if (recVtxs.
isValid() && !(recVtxs->empty())) {
468 for (
unsigned int k = 0;
k < recVtxs->size(); ++
k) {
469 if (!((*recVtxs)[
k].isFake()) && ((*recVtxs)[
k].ndof() > 4)) {
489 if (!barrelRecHitsHandle.
isValid()) {
494 if (!endcapRecHitsHandle.
isValid()) {
499 if (!
hbhe.isValid()) {
506 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
508 std::vector<spr::propagatedTrackID> trkCaloDets;
510 std::vector<math::XYZTLorentzVector> vecL1, vecL3;
537 for (
const auto& decision : finalDecisions) {
538 if (decision.first.find(
l1TrigName_) != std::string::npos) {
546 <<
" from a list of " << finalDecisions.size() <<
" decisions";
555 for (
unsigned int iHLT = 0; iHLT <
triggerResults->size(); iHLT++) {
580 std::array<int, 3> ntksave{{0, 0, 0}};
608 if (!triggerEventHandle.
isValid()) {
616 std::vector<std::string>
modules;
619 for (
unsigned int iHLT = 0; iHLT <
triggerResults->size(); iHLT++) {
624 std::vector<math::XYZTLorentzVector> vecL2;
628 for (
unsigned int ifilter = 0; ifilter <
triggerEvent.sizeFilters(); ++ifilter) {
629 std::vector<int>
Keys;
632 for (
unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
633 if (
label.find(moduleLabels[imodule]) != std::string::npos) {
638 for (
unsigned int ifiltrKey = 0; ifiltrKey <
triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
652 <<
"key " << ifiltrKey <<
" : pt " << TO.
pt() <<
" eta " << TO.
eta() <<
" phi " << TO.
phi()
653 <<
" mass " << TO.
mass() <<
" Id " << TO.
id();
659 <<
"sizes " << vecL1.size() <<
":" << vecL2.size() <<
":" << vecL3.size();
667 for (
unsigned int i = 0;
i < vecL2.size();
i++) {
668 double dr =
dR(vecL1[0], vecL2[
i]);
675 mindRvec1 = vecL2[
i];
680 edm::LogVerbatim(
"HcalIsoTrack") <<
"L2 object closest to L1 " << mindRvec1 <<
" at Dr " << mindR1;
683 if (!vecL1.empty()) {
690 if (!vecL3.empty()) {
737 tree =
fs->make<TTree>(
"CalibTree",
"CalibTree");
739 tree->Branch(
"t_Run", &
t_Run,
"t_Run/I");
754 tree->Branch(
"t_p", &
t_p,
"t_p/D");
755 tree->Branch(
"t_pt", &
t_pt,
"t_pt/D");
756 tree->Branch(
"t_phi", &
t_phi,
"t_phi/D");
778 t_DetIds =
new std::vector<unsigned int>();
779 t_DetIds1 =
new std::vector<unsigned int>();
780 t_DetIds3 =
new std::vector<unsigned int>();
785 tree->Branch(
"t_DetIds",
"std::vector<unsigned int>", &
t_DetIds);
788 tree->Branch(
"t_DetIds1",
"std::vector<unsigned int>", &
t_DetIds1);
789 tree->Branch(
"t_DetIds3",
"std::vector<unsigned int>", &
t_DetIds3);
793 tree2 =
fs->make<TTree>(
"EventInfo",
"Event Information");
824 <<
" init flag " <<
flag <<
" change flag " << changed_;
831 for (
unsigned itrig = 0; itrig <
trigNames_.size(); itrig++) {
833 if (triggerindx >=
n) {
835 <<
"the current menu";
854 std::vector<std::string>
trig = {
"HLT_PFJet40",
864 desc.add<std::vector<std::string>>(
"triggers",
trig);
871 desc.add<
double>(
"minTrackPt", 1.0);
872 desc.add<
double>(
"maxDxyPV", 0.02);
873 desc.add<
double>(
"maxDzPV", 0.02);
874 desc.add<
double>(
"maxChi2", 5.0);
875 desc.add<
double>(
"maxDpOverP", 0.1);
876 desc.add<
int>(
"minOuterHit", 4);
877 desc.add<
int>(
"minLayerCrossed", 8);
878 desc.add<
int>(
"maxInMiss", 0);
879 desc.add<
int>(
"maxOutMiss", 0);
881 desc.add<
double>(
"minimumTrackP", 10.0);
882 desc.add<
double>(
"coneRadius", 34.98);
884 desc.add<
double>(
"coneRadiusMIP", 14.0);
885 desc.add<
double>(
"coneRadiusMIP2", 18.0);
886 desc.add<
double>(
"coneRadiusMIP3", 20.0);
887 desc.add<
double>(
"coneRadiusMIP4", 22.0);
888 desc.add<
double>(
"coneRadiusMIP5", 24.0);
889 desc.add<
double>(
"maximumEcalEnergy", 2.0);
891 desc.add<
double>(
"maxTrackP", 8.0);
892 desc.add<
double>(
"slopeTrackP", 0.05090504066);
893 desc.add<
double>(
"isolationEnergyTight", 2.0);
894 desc.add<
double>(
"isolationEnergyLoose", 10.0);
896 desc.add<
double>(
"EBHitEnergyThreshold", 0.08);
897 desc.add<
double>(
"EEHitEnergyThreshold0", 0.30);
898 desc.add<
double>(
"EEHitEnergyThreshold1", 0.00);
899 desc.add<
double>(
"EEHitEnergyThreshold2", 0.00);
900 desc.add<
double>(
"EEHitEnergyThreshold3", 0.00);
901 desc.add<
double>(
"EEHitEnergyThresholdLow", 0.30);
902 desc.add<
double>(
"EEHitEnergyThresholdHigh", 0.30);
904 desc.add<
double>(
"momentumLow", 40.0);
905 desc.add<
double>(
"momentumHigh", 60.0);
906 desc.add<
int>(
"prescaleLow", 1);
907 desc.add<
int>(
"prescaleHigh", 1);
925 desc.addUntracked<
int>(
"useRaw", 0);
926 desc.addUntracked<
bool>(
"ignoreTriggers",
false);
927 desc.addUntracked<
bool>(
"useL1Trigger",
false);
928 desc.addUntracked<
double>(
"hcalScale", 1.0);
929 desc.addUntracked<
int>(
"dataType", 0);
930 desc.addUntracked<
bool>(
"unCorrect",
false);
931 desc.addUntracked<
bool>(
"collapseDepth",
false);
933 desc.addUntracked<
int>(
"outMode", 11);
934 std::vector<int>
dummy;
935 desc.addUntracked<std::vector<int>>(
"oldID",
dummy);
936 desc.addUntracked<std::vector<int>>(
"newDepth",
dummy);
937 desc.addUntracked<
bool>(
"hep17",
false);
939 desc.add<std::vector<int>>(
"debugEvents",
events);
940 desc.add<
bool>(
"usePFThreshold",
true);
941 descriptions.
add(
"hcalIsoTrkAnalyzer",
desc);
945 std::vector<math::XYZTLorentzVector>& vecL3,
947 std::vector<spr::propagatedTrackDirection>& trkCaloDirections,
948 std::vector<spr::propagatedTrackID>& trkCaloDets,
961 int nSave(0),
nLoose(0), nTight(0);
963 unsigned int nTracks(0), nselTracks(0);
964 t_nTrk = trkCaloDirections.size();
966 for (
const auto& trkDetItr : trkCaloDirections) {
967 const reco::Track* pTrack = &(*(trkDetItr.trkItr));
979 for (
unsigned int k = 0;
k < vecL3.size(); ++
k) {
980 double dr =
dR(vecL3[
k], v4);
985 t_mindR1 = (!vecL1.empty()) ?
dR(vecL1[0], v4) : 999;
992 if (trkDetItr.okHCAL) {
996 if (
t_p > 40.0 &&
t_p <= 60.0)
1003 oneCutParameters.
maxDzPV = 100;
1006 bool qltyFlag =
spr::goodTrack(pTrack, leadPV, oneCutParameters,
false);
1009 oneCutParameters.
maxDzPV = 100;
1022 edm::LogVerbatim(
"HcalIsoTrack") <<
"qltyFlag|okECAL|okHCAL : " << qltyFlag <<
"|" << trkDetItr.okECAL <<
"|" 1023 << trkDetItr.okHCAL <<
" eIsolation " << eIsolation;
1025 t_qltyFlag = (qltyFlag && trkDetItr.okECAL && trkDetItr.okHCAL);
1031 std::vector<DetId> eIds;
1032 std::vector<double> eHit;
1034 barrelRecHitsHandle,
1035 endcapRecHitsHandle,
1036 trkDetItr.pointHCAL,
1037 trkDetItr.pointECAL,
1039 trkDetItr.directionECAL,
1043 for (
unsigned int k = 0;
k < eIds.size(); ++
k) {
1054 std::vector<DetId> eIds2;
1055 std::vector<double> eHit2;
1057 barrelRecHitsHandle,
1058 endcapRecHitsHandle,
1059 trkDetItr.pointHCAL,
1060 trkDetItr.pointECAL,
1062 trkDetItr.directionECAL,
1066 for (
unsigned int k = 0;
k < eIds2.size(); ++
k) {
1077 std::vector<DetId> eIds3;
1078 std::vector<double> eHit3;
1080 barrelRecHitsHandle,
1081 endcapRecHitsHandle,
1082 trkDetItr.pointHCAL,
1083 trkDetItr.pointECAL,
1085 trkDetItr.directionECAL,
1089 for (
unsigned int k = 0;
k < eIds3.size(); ++
k) {
1100 std::vector<DetId> eIds4;
1101 std::vector<double> eHit4;
1103 barrelRecHitsHandle,
1104 endcapRecHitsHandle,
1105 trkDetItr.pointHCAL,
1106 trkDetItr.pointECAL,
1108 trkDetItr.directionECAL,
1112 for (
unsigned int k = 0;
k < eIds4.size(); ++
k) {
1123 std::vector<DetId> eIds5;
1124 std::vector<double> eHit5;
1126 barrelRecHitsHandle,
1127 endcapRecHitsHandle,
1128 trkDetItr.pointHCAL,
1129 trkDetItr.pointECAL,
1131 trkDetItr.directionECAL,
1135 for (
unsigned int k = 0;
k < eIds5.size(); ++
k) {
1147 const DetId cellE(trkDetItr.detIdECAL);
1149 barrelRecHitsHandle,
1150 endcapRecHitsHandle,
1162 barrelRecHitsHandle,
1163 endcapRecHitsHandle,
1174 if (e11x11P.second && e15x15P.second) {
1175 t_eAnnular = (e15x15P.first - e11x11P.first);
1177 t_eAnnular = -(e15x15P.first - e11x11P.first);
1180 const DetId cellH(trkDetItr.detIdHCAL);
1182 theHBHETopology, cellH,
hbhe, 2, 2,
false,
true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1184 theHBHETopology, cellH,
hbhe, 3, 3,
false,
true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1189 <<
" Annular E (Ecal) " << e11x11P.first <<
":" << e15x15P.first <<
":" 1200 int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
1201 std::vector<DetId> ids, ids1, ids3;
1202 std::vector<double> edet0, edet1, edet3;
1205 trkDetItr.pointHCAL,
1206 trkDetItr.pointECAL,
1208 trkDetItr.directionHCAL,
1214 for (
unsigned k = 0;
k < ids.size(); ++
k)
1222 trkDetItr.pointHCAL,
1223 trkDetItr.pointECAL,
1225 trkDetItr.directionHCAL,
1231 for (
unsigned k = 0;
k < ids1.size(); ++
k)
1239 trkDetItr.pointHCAL,
1240 trkDetItr.pointECAL,
1242 trkDetItr.directionHCAL,
1248 for (
unsigned k = 0;
k < ids3.size(); ++
k)
1256 <<
"This track : " <<
nTracks <<
" (pt|eta|phi|p) : " <<
t_pt <<
"|" << pTrack->
eta() <<
"|" <<
t_phi 1261 for (
unsigned int ll = 0; ll <
t_DetIds->size(); ll++) {
1265 for (
unsigned int ll = 0; ll <
t_DetIds1->size(); ll++) {
1269 for (
unsigned int ll = 0; ll <
t_DetIds3->size(); ll++) {
1325 std::array<int, 3>
i3{{nSave,
nLoose, nTight}};
1337 double mindR(999.9);
1342 pmom =
p.momentum().R();
1350 std::vector<double> sumPFNallSMDQH2;
1356 for (
const auto& pf_it : (*
tower)) {
1361 hadder += pf_it.hadEt();
1363 sumPFNallSMDQH2.emplace_back(hadder);
1368 std::sort(sumPFNallSMDQH2.begin(), sumPFNallSMDQH2.end());
1369 if (sumPFNallSMDQH2.size() % 2)
1370 evt_smdq = sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 1) / 2];
1372 evt_smdq = (sumPFNallSMDQH2[sumPFNallSMDQH2.size() / 2] + sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 2) / 2]) / 2.;
1384 eThr =
static_cast<double>((*eThresholds_)[
id]);
1403 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k) {
1413 const std::vector<DetId>& ids,
1414 std::vector<double>& edet,
1416 std::vector<unsigned int>* detIds,
1417 std::vector<double>* hitEnergies) {
1420 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1427 for (
const auto& en : edet)
1431 edm::LogWarning(
"HcalIsoTrack") <<
"Check inconsistent energies: " << indx <<
" " << eHcal <<
":" << ehcal
1432 <<
" from " << ids.size() <<
" cells";
1436 std::map<HcalDetId, double> hitMap;
1437 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1439 auto itr = hitMap.find(
id);
1440 if (itr == hitMap.end()) {
1441 hitMap[
id] = edet[
k];
1443 (itr->second) += edet[
k];
1446 detIds->reserve(hitMap.size());
1447 hitEnergies->reserve(hitMap.size());
1448 for (
const auto&
hit : hitMap) {
1449 detIds->emplace_back(
hit.first.rawId());
1450 hitEnergies->emplace_back(
hit.second);
1453 detIds->reserve(ids.size());
1454 hitEnergies->reserve(ids.size());
1455 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1456 detIds->emplace_back(ids[
k].rawId());
1457 hitEnergies->emplace_back(edet[
k]);
1462 edm::LogVerbatim(
"HcalIsoTrack") <<
"Input to storeEnergy with " << ids.size() <<
" cells";
1463 for (
unsigned int k = 0;
k < ids.size(); ++
k)
1465 edm::LogVerbatim(
"HcalIsoTrack") <<
"Output of storeEnergy with " << detIds->size() <<
" cells and Etot " << eHcal;
1466 for (
unsigned int k = 0;
k < detIds->size(); ++
k)
1474 for (reco::MuonCollection::const_iterator recMuon = muonh->begin(); recMuon != muonh->end(); ++recMuon) {
1475 if (recMuon->innerTrack().isNonnull()) {
1476 const reco::Track* pTrack = (recMuon->innerTrack()).
get();
1477 bool mediumMuon = (((recMuon->isPFMuon()) && (recMuon->isGlobalMuon() || recMuon->isTrackerMuon())) &&
1478 (recMuon->innerTrack()->validFraction() > 0.49));
1480 double chiGlobal = ((recMuon->globalTrack().isNonnull()) ? recMuon->globalTrack()->normalizedChi2() : 999);
1481 bool goodGlob = (recMuon->isGlobalMuon() && chiGlobal < 3 &&
1482 recMuon->combinedQuality().chi2LocalPosition < 12 && recMuon->combinedQuality().trkKink < 20);
static const std::string kSharedResource
const std::string labelHBHE_
constexpr double deltaPhi(double phi1, double phi2)
const std::vector< std::string > trigNames_
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_
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
const edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
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
T getParameter(std::string const &) const
const std::string l1TrigName_
const double maxRestrictionP_
const std::string modnam_
std::vector< int > oldEta_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
The single EDProduct to be saved for each event (AOD case)
HcalDetId mergedDepthDetId(const HcalDetId &id) const
const std::string labelRecVtx_
constexpr int zside() const
get the z-side of the cell (1/-1)
const Point & position() const
position
const edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > tok_ecalPFRecHitThresholds_
TrackQuality
track quality
constexpr int ietaAbs() const
get the absolute value of the cell ieta
const std::string labelTower_
double px() const
x coordinate of momentum vector
double p() const
momentum vector magnitude
std::vector< int > * t_ietaAll
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
const double hitEthrEELo_
T const * product() const
std::vector< Track > TrackCollection
collection of Tracks
std::vector< int > oldDepth_
const edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
double py() const
y coordinate of momentum vector
const double hitEthrEEHi_
const std::string labelBS_
const edm::EDGetTokenT< CaloTowerCollection > tok_cala_
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
const edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
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)
const edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
std::vector< Vertex > VertexCollection
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< double > etabins_
std::vector< unsigned int > * t_DetIds
const std::string names[nVars_]
const edm::EDGetTokenT< reco::BeamSpot > tok_bs_
std::vector< double > * t_HitEnergies1
void analyze(edm::Event const &, edm::EventSetup const &) override
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< Muon > MuonCollection
collection of Muon objects
const Item * getValues(DetId fId, bool throwOnFail=true) const
const edm::InputTag extTag_
const bool ignoreTrigger_
const edm::InputTag algTag_
Single trigger physics object (e.g., an isolated muon)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double pt() const
track transverse momentum
constexpr HcalSubdetector subdet() const
get the subdetector
const EcalPFRecHitThresholds * eThresholds_
const edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
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_HitEnergies3
const std::string labelGenTrack_
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)
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
unsigned int size() const
number of trigger paths in trigger table
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
std::vector< double > vec1
const bool collapseDepth_
constexpr int ieta() const
get the cell ieta
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
l1t::L1TGlobalUtil * l1GtUtils_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< bool > * t_hltbits
const edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
Abs< T >::type abs(const T &t)
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
double phi() const
azimuthal angle of momentum vector
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)
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
static std::string const triggerResults
HLTConfigProvider hltConfig_
const std::string l3Filter_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
const edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< bool > * t_trgbits
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
const double slopeRestrictionP_
double eta() const
pseudorapidity of momentum vector
const std::vector< int > debEvents_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static TrackQuality qualityByName(const std::string &name)
const std::string l2Filter_
const edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
const std::string processName_
const edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
const edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
const std::string labelEB_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
double pz() const
z coordinate of momentum vector
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 &)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
const edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::vector< int > oldDet_
const edm::InputTag theTriggerResultsLabel_
void endRun(edm::Run const &, edm::EventSetup const &) override
HcalIsoTrkAnalyzer(edm::ParameterSet const &)
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
const HcalDDDRecConstants * hdc_
reco::TrackBase::TrackQuality minQuality
const edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
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
const std::string prdnam_
const std::vector< int > newDepth_
const edm::InputTag triggerEvent_
Log< level::Warning, false > LogWarning
std::vector< int > * t_ietaGood
std::vector< unsigned int > * t_DetIds3
double eThreshold(const DetId &id, const CaloGeometry *geo) const
const std::vector< int > oldID_
constexpr int iphi() const
get the cell iphi
const std::string labelEE_
const std::string labelMuon_
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
bool notaMuon(const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
DetId newId(const DetId &)
const std::string l1Filter_
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
constexpr int depth() const
get the tower depth