13 #include "TDirectory.h"
15 #include "TLorentzVector.h"
16 #include "TInterpreter.h"
95 std::array<int, 3>
fillTree(std::vector<math::XYZTLorentzVector>& vecL1,
96 std::vector<math::XYZTLorentzVector>& vecL3,
98 std::vector<spr::propagatedGenParticleID>& trackIDs,
116 const std::vector<DetId>& ids,
117 std::vector<double>& edet,
119 std::vector<unsigned int>* detIds,
120 std::vector<double>* hitEnergies);
199 : trigNames_(iConfig.getParameter<std::
vector<std::
string> >(
"triggers")),
200 processName_(iConfig.getParameter<std::
string>(
"processName")),
201 l1Filter_(iConfig.getParameter<std::
string>(
"l1Filter")),
202 l2Filter_(iConfig.getParameter<std::
string>(
"l2Filter")),
203 l3Filter_(iConfig.getParameter<std::
string>(
"l3Filter")),
204 ptMin_(iConfig.getParameter<double>(
"pTMin")),
205 etaMax_(iConfig.getParameter<double>(
"maxChargedHadronEta")),
206 a_coneR_(iConfig.getParameter<double>(
"coneRadius")),
207 a_mipR_(iConfig.getParameter<double>(
"coneRadiusMIP")),
208 a_mipR2_(iConfig.getParameter<double>(
"coneRadiusMIP2")),
209 a_mipR3_(iConfig.getParameter<double>(
"coneRadiusMIP3")),
210 a_mipR4_(iConfig.getParameter<double>(
"coneRadiusMIP4")),
211 a_mipR5_(iConfig.getParameter<double>(
"coneRadiusMIP5")),
212 pTrackMin_(iConfig.getParameter<double>(
"minimumTrackP")),
213 eEcalMax_(iConfig.getParameter<double>(
"maximumEcalEnergy")),
214 maxRestrictionP_(iConfig.getParameter<double>(
"maxTrackP")),
215 slopeRestrictionP_(iConfig.getParameter<double>(
"slopeTrackP")),
216 hcalScale_(iConfig.getUntrackedParameter<double>(
"hHcalScale", 1.0)),
217 eIsolate1_(iConfig.getParameter<double>(
"isolationEnergyTight")),
218 eIsolate2_(iConfig.getParameter<double>(
"isolationEnergyLoose")),
219 pTrackLow_(iConfig.getParameter<double>(
"momentumLow")),
220 pTrackHigh_(iConfig.getParameter<double>(
"momentumHigh")),
221 prescaleLow_(iConfig.getParameter<int>(
"prescaleLow")),
222 prescaleHigh_(iConfig.getParameter<int>(
"prescaleHigh")),
223 useRaw_(iConfig.getUntrackedParameter<int>(
"useRaw", 0)),
224 dataType_(iConfig.getUntrackedParameter<int>(
"dataType", 0)),
225 mode_(iConfig.getUntrackedParameter<int>(
"outMode", 11)),
226 ignoreTrigger_(iConfig.getUntrackedParameter<bool>(
"ignoreTriggers",
false)),
227 useL1Trigger_(iConfig.getUntrackedParameter<bool>(
"useL1Trigger",
false)),
228 unCorrect_(iConfig.getUntrackedParameter<bool>(
"unCorrect",
false)),
229 collapseDepth_(iConfig.getUntrackedParameter<bool>(
"collapseDepth",
false)),
230 hitEthrEB_(iConfig.getParameter<double>(
"EBHitEnergyThreshold")),
231 hitEthrEE0_(iConfig.getParameter<double>(
"EEHitEnergyThreshold0")),
232 hitEthrEE1_(iConfig.getParameter<double>(
"EEHitEnergyThreshold1")),
233 hitEthrEE2_(iConfig.getParameter<double>(
"EEHitEnergyThreshold2")),
234 hitEthrEE3_(iConfig.getParameter<double>(
"EEHitEnergyThreshold3")),
235 hitEthrEELo_(iConfig.getParameter<double>(
"EEHitEnergyThresholdLow")),
236 hitEthrEEHi_(iConfig.getParameter<double>(
"EEHitEnergyThresholdHigh")),
237 triggerEvent_(iConfig.getParameter<edm::
InputTag>(
"labelTriggerEvent")),
238 theTriggerResultsLabel_(iConfig.getParameter<edm::
InputTag>(
"labelTriggerResult")),
239 labelGenTrack_(iConfig.getParameter<std::
string>(
"labelTrack")),
240 labelRecVtx_(iConfig.getParameter<std::
string>(
"labelVertex")),
241 labelEB_(iConfig.getParameter<std::
string>(
"labelEBRecHit")),
242 labelEE_(iConfig.getParameter<std::
string>(
"labelEERecHit")),
243 labelHBHE_(iConfig.getParameter<std::
string>(
"labelHBHERecHit")),
244 labelTower_(iConfig.getParameter<std::
string>(
"labelCaloTower")),
245 l1TrigName_(iConfig.getUntrackedParameter<std::
string>(
"l1TrigName",
"L1_SingleJet60")),
246 oldID_(iConfig.getUntrackedParameter<std::
vector<int> >(
"oldID")),
247 newDepth_(iConfig.getUntrackedParameter<std::
vector<int> >(
"newDepth")),
248 hep17_(iConfig.getUntrackedParameter<bool>(
"hep17")),
256 const double isolationRadius(28.9), innerR(10.0), outerR(30.0);
271 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k) {
281 tok_bs_ = consumes<reco::BeamSpot>(labelBS);
285 tok_alg_ = consumes<BXVector<GlobalAlgBlk> >(algTag);
287 if (modnam.empty()) {
309 tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
310 tok_bFieldH_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
312 tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
313 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
315 tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
316 tok_resp_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
317 tok_pdt_ = esConsumes<HepPDT::ParticleDataTable, PDTRecord>();
323 <<
"\t a_mipR4 " <<
a_mipR4_ <<
"\t a_mipR5 " <<
a_mipR5_ <<
"\n pTrackMin_ "
342 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k)
346 for (
int i = 0;
i < 10;
i++)
348 for (
int i = 0;
i < 8; ++
i)
356 unsigned int k1(0),
k2(0);
357 for (
auto phi : phibins_) {
361 for (
auto eta : etabins_) {
386 respCorrs->
setTopo(theHBHETopology);
395 edm::LogWarning(
"HcalIsoTrack") <<
"Cannot access the genParticles collection";
410 if (recVtxs.
isValid() && !(recVtxs->empty())) {
412 for (
unsigned int k = 0;
k < recVtxs->size(); ++
k) {
413 if (!((*recVtxs)[
k].isFake()) && ((*recVtxs)[
k].ndof() > 4)) {
421 leadPV = beamSpotH->position();
432 if (!barrelRecHitsHandle.
isValid()) {
437 if (!endcapRecHitsHandle.
isValid()) {
449 std::vector<spr::propagatedGenParticleID> trackIDs =
451 std::vector<math::XYZTLorentzVector> vecL1, vecL3;
474 if (!ignoreTrigger_) {
478 for (
const auto& decision : finalDecisions) {
479 if (decision.first.find(
l1TrigName_) != std::string::npos) {
486 <<
" from a list of " << finalDecisions.size() <<
" decisions";
491 if (triggerResults.
isValid()) {
495 for (
unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
496 int hlt = triggerResults->accept(iHLT);
505 <<
"This trigger " << names[iHLT] <<
" Flag " << hlt <<
":" <<
t_trgbits->at(i);
518 std::array<int, 3> ntksave{{0, 0, 0}};
544 if (!triggerEventHandle.
isValid()) {
547 triggerEvent = *(triggerEventHandle.
product());
550 if (triggerResults.
isValid()) {
551 std::vector<std::string>
modules;
554 for (
unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
559 std::vector<math::XYZTLorentzVector> vecL2;
563 for (
unsigned int ifilter = 0; ifilter < triggerEvent.
sizeFilters(); ++ifilter) {
564 std::vector<int>
Keys;
567 for (
unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
568 if (label.find(moduleLabels[imodule]) != std::string::npos) {
572 for (
unsigned int ifiltrKey = 0; ifiltrKey < triggerEvent.
filterKeys(ifilter).size(); ++ifiltrKey) {
573 Keys.push_back(triggerEvent.
filterKeys(ifilter)[ifiltrKey]);
576 if (label.find(
l2Filter_) != std::string::npos) {
578 }
else if (label.find(
l3Filter_) != std::string::npos) {
585 <<
"key " << ifiltrKey <<
" : pt " << TO.
pt() <<
" eta " << TO.
eta() <<
" phi " << TO.
phi()
586 <<
" mass " << TO.
mass() <<
" Id " << TO.
id();
591 <<
"sizes " << vecL1.size() <<
":" << vecL2.size() <<
":" << vecL3.size();
599 for (
unsigned int i = 0;
i < vecL2.size();
i++) {
600 double dr =
dR(vecL1[0], vecL2[
i]);
606 mindRvec1 = vecL2[
i];
610 edm::LogVerbatim(
"HcalIsoTrack") <<
"L2 object closest to L1 " << mindRvec1 <<
" at Dr " << mindR1;
613 if (!vecL1.empty()) {
620 if (!vecL3.empty()) {
665 tree->Branch(
"t_Run", &
t_Run,
"t_Run/I");
680 tree->Branch(
"t_p", &
t_p,
"t_p/D");
681 tree->Branch(
"t_pt", &
t_pt,
"t_pt/D");
682 tree->Branch(
"t_phi", &
t_phi,
"t_phi/D");
704 t_DetIds =
new std::vector<unsigned int>();
705 t_DetIds1 =
new std::vector<unsigned int>();
706 t_DetIds3 =
new std::vector<unsigned int>();
711 tree->Branch(
"t_DetIds",
"std::vector<unsigned int>", &
t_DetIds);
712 tree->Branch(
"t_HitEnergies",
"std::vector<double>", &t_HitEnergies);
713 tree->Branch(
"t_trgbits",
"std::vector<bool>", &t_trgbits);
714 tree->Branch(
"t_DetIds1",
"std::vector<unsigned int>", &t_DetIds1);
715 tree->Branch(
"t_DetIds3",
"std::vector<unsigned int>", &t_DetIds3);
716 tree->Branch(
"t_HitEnergies1",
"std::vector<double>", &t_HitEnergies1);
717 tree->Branch(
"t_HitEnergies3",
"std::vector<double>", &t_HitEnergies3);
719 tree2 =
fs_->
make<TTree>(
"EventInfo",
"Event Information");
736 tree2->Branch(
"t_ietaAll",
"std::vector<int>", &t_ietaAll);
737 tree2->Branch(
"t_ietaGood",
"std::vector<int>", &t_ietaGood);
738 tree2->Branch(
"t_trackType",
"std::vector<int>", &t_trackType);
749 <<
" init flag " << flag <<
" change flag " << changed_;
756 for (
unsigned itrig = 0; itrig <
trigNames_.size(); itrig++) {
758 if (triggerindx >=
n) {
760 <<
"the current menu";
778 std::vector<std::string> trig = {
"HLT_PFJet40",
788 desc.
add<std::vector<std::string> >(
"triggers", trig);
793 desc.
add<
double>(
"pTMin", 1.0), desc.
add<
double>(
"maxChargedHadronEta", 3.0);
795 desc.
add<
double>(
"minimumTrackP", 10.0);
796 desc.
add<
double>(
"coneRadius", 34.98);
798 desc.
add<
double>(
"coneRadiusMIP", 14.0);
799 desc.
add<
double>(
"coneRadiusMIP2", 18.0);
800 desc.
add<
double>(
"coneRadiusMIP3", 20.0);
801 desc.
add<
double>(
"coneRadiusMIP4", 22.0);
802 desc.
add<
double>(
"coneRadiusMIP5", 24.0);
803 desc.
add<
double>(
"maximumEcalEnergy", 2.0);
805 desc.
add<
double>(
"maxTrackP", 8.0);
806 desc.
add<
double>(
"slopeTrackP", 0.05090504066);
807 desc.
add<
double>(
"isolationEnergyTight", 2.0);
808 desc.
add<
double>(
"isolationEnergyLoose", 10.0);
810 desc.
add<
double>(
"EBHitEnergyThreshold", 0.08);
811 desc.
add<
double>(
"EEHitEnergyThreshold0", 0.30);
812 desc.
add<
double>(
"EEHitEnergyThreshold1", 0.00);
813 desc.
add<
double>(
"EEHitEnergyThreshold2", 0.00);
814 desc.
add<
double>(
"EEHitEnergyThreshold3", 0.00);
815 desc.
add<
double>(
"EEHitEnergyThresholdLow", 0.30);
816 desc.
add<
double>(
"EEHitEnergyThresholdHigh", 0.30);
818 desc.
add<
double>(
"momentumLow", 40.0);
819 desc.
add<
double>(
"momentumHigh", 60.0);
820 desc.
add<
int>(
"prescaleLow", 1);
821 desc.
add<
int>(
"prescaleHigh", 1);
847 std::vector<int> dummy;
849 desc.
addUntracked<std::vector<int> >(
"newDepth", dummy);
851 descriptions.
add(
"hcalIsoTrkSimAnalyzer", desc);
855 std::vector<math::XYZTLorentzVector>& vecL3,
857 std::vector<spr::propagatedGenParticleID>& trackIDs,
869 int nSave(0), nLoose(0), nTight(0);
871 std::vector<spr::propagatedGenParticleID>::const_iterator trkDetItr;
872 unsigned int nTracks(0), nselTracks(0);
875 for (trkDetItr = trackIDs.begin(),
nTracks = 0; trkDetItr != trackIDs.end(); trkDetItr++,
nTracks++) {
880 << pTrack->
eta() <<
"|" << pTrack->
phi() <<
"|" << pTrack->
p();
883 for (
unsigned int k = 0;
k < vecL3.size(); ++
k) {
884 double dr =
dR(vecL3[
k], v4);
889 t_mindR1 = (!vecL1.empty()) ?
dR(vecL1[0], v4) : 999;
894 if (trkDetItr->okHCAL) {
898 if (
t_p > 40.0 &&
t_p <= 60.0)
910 << trkDetItr->okHCAL <<
" eIsolation " << eIsolation;
918 std::vector<DetId> eIds;
919 std::vector<double> eHit;
923 trkDetItr->pointHCAL,
924 trkDetItr->pointECAL,
926 trkDetItr->directionECAL,
930 for (
unsigned int k = 0;
k < eIds.size(); ++
k) {
940 std::vector<DetId> eIds2;
941 std::vector<double> eHit2;
945 trkDetItr->pointHCAL,
946 trkDetItr->pointECAL,
948 trkDetItr->directionECAL,
952 for (
unsigned int k = 0;
k < eIds2.size(); ++
k) {
962 std::vector<DetId> eIds3;
963 std::vector<double> eHit3;
967 trkDetItr->pointHCAL,
968 trkDetItr->pointECAL,
970 trkDetItr->directionECAL,
974 for (
unsigned int k = 0;
k < eIds3.size(); ++
k) {
984 std::vector<DetId> eIds4;
985 std::vector<double> eHit4;
989 trkDetItr->pointHCAL,
990 trkDetItr->pointECAL,
992 trkDetItr->directionECAL,
996 for (
unsigned int k = 0;
k < eIds4.size(); ++
k) {
1006 std::vector<DetId> eIds5;
1007 std::vector<double> eHit5;
1009 barrelRecHitsHandle,
1010 endcapRecHitsHandle,
1011 trkDetItr->pointHCAL,
1012 trkDetItr->pointECAL,
1014 trkDetItr->directionECAL,
1018 for (
unsigned int k = 0;
k < eIds5.size(); ++
k) {
1029 const DetId cellE(trkDetItr->detIdECAL);
1031 barrelRecHitsHandle,
1032 endcapRecHitsHandle,
1044 barrelRecHitsHandle,
1045 endcapRecHitsHandle,
1056 if (e11x11P.second && e15x15P.second) {
1057 t_eAnnular = (e15x15P.first - e11x11P.first);
1059 t_eAnnular = -(e15x15P.first - e11x11P.first);
1062 const DetId cellH(trkDetItr->detIdHCAL);
1064 theHBHETopology, cellH, hbhe, 2, 2,
false,
true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1066 theHBHETopology, cellH, hbhe, 3, 3,
false,
true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1070 <<
" Annular E (Ecal) " << e11x11P.first <<
":" << e15x15P.first <<
":"
1081 int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
1082 std::vector<DetId> ids, ids1, ids3;
1083 std::vector<double> edet0, edet1, edet3;
1086 trkDetItr->pointHCAL,
1087 trkDetItr->pointECAL,
1089 trkDetItr->directionHCAL,
1095 for (
unsigned k = 0;
k < ids.size(); ++
k)
1103 trkDetItr->pointHCAL,
1104 trkDetItr->pointECAL,
1106 trkDetItr->directionHCAL,
1112 for (
unsigned k = 0;
k < ids1.size(); ++
k)
1120 trkDetItr->pointHCAL,
1121 trkDetItr->pointECAL,
1123 trkDetItr->directionHCAL,
1129 for (
unsigned k = 0;
k < ids3.size(); ++
k)
1140 << pTrack->
eta() <<
"|" <<
t_phi <<
"|" <<
t_p <<
" Generator Level p "
1145 for (
unsigned int ll = 0; ll <
t_DetIds->size(); ll++) {
1149 for (
unsigned int ll = 0; ll <
t_DetIds1->size(); ll++) {
1153 for (
unsigned int ll = 0; ll <
t_DetIds3->size(); ll++) {
1190 if (
t_p > 40.0 &&
t_p <= 60.0 && t_selectTk) {
1203 std::array<int, 3> i3{{nSave, nLoose, nTight}};
1208 return reco::deltaR(vec1.eta(), vec1.phi(), vec2.eta(), vec2.phi());
1212 std::vector<double> sumPFNallSMDQH2;
1218 for (
const auto& pf_it : (*tower)) {
1223 hadder += pf_it.hadEt();
1225 sumPFNallSMDQH2.emplace_back(hadder);
1230 std::sort(sumPFNallSMDQH2.begin(), sumPFNallSMDQH2.end());
1231 if (sumPFNallSMDQH2.size() % 2)
1232 evt_smdq = sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 1) / 2];
1234 evt_smdq = (sumPFNallSMDQH2[sumPFNallSMDQH2.size() / 2] + sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 2) / 2]) / 2.;
1260 for (
unsigned int k = 0;
k <
oldID_.size(); ++
k) {
1270 const std::vector<DetId>& ids,
1271 std::vector<double>& edet,
1273 std::vector<unsigned int>* detIds,
1274 std::vector<double>* hitEnergies) {
1277 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1284 for (
const auto& en : edet)
1288 edm::LogWarning(
"HcalIsoTrack") <<
"Check inconsistent energies: " << indx <<
" " << eHcal <<
":" << ehcal
1289 <<
" from " << ids.size() <<
" cells";
1293 std::map<HcalDetId, double> hitMap;
1294 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1296 auto itr = hitMap.find(
id);
1297 if (itr == hitMap.end()) {
1298 hitMap[
id] = edet[
k];
1300 (itr->second) += edet[k];
1303 detIds->reserve(hitMap.size());
1304 hitEnergies->reserve(hitMap.size());
1305 for (
const auto&
hit : hitMap) {
1306 detIds->emplace_back(
hit.first.rawId());
1307 hitEnergies->emplace_back(
hit.second);
1310 detIds->reserve(ids.size());
1311 hitEnergies->reserve(ids.size());
1312 for (
unsigned int k = 0;
k < ids.size(); ++
k) {
1313 detIds->emplace_back(ids[
k].rawId());
1314 hitEnergies->emplace_back(edet[
k]);
1318 edm::LogVerbatim(
"HcalIsoTrack") <<
"Input to storeEnergy with " << ids.size() <<
" cells";
1319 for (
unsigned int k = 0;
k < ids.size(); ++
k)
1321 edm::LogVerbatim(
"HcalIsoTrack") <<
"Output of storeEnergy with " << detIds->size() <<
" cells and Etot " << eHcal;
1322 for (
unsigned int k = 0; k < detIds->size(); ++
k)
1328 int id = pTrack->
pdgId();
1329 bool flag = ((
id != 13) && (
id != -13) && (pTrack->
charge() != 0));
1331 edm::LogVerbatim(
"HcalIsoTrack") <<
"notaMuon: ID " <<
id <<
" charge " << pTrack->
charge() <<
" Flag " << flag;
unsigned int size() const
number of trigger paths in trigger table
static const std::string kSharedResource
constexpr double deltaPhi(double phi1, double phi2)
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
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< int > newDepth_
const std::string labelEB_
void beginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
HcalIsoTrkSimAnalyzer(edm::ParameterSet const &)
constexpr int ietaAbs() const
get the absolute value of the cell ieta
std::vector< double > * t_HitEnergies3
double pz() const final
z coordinate of momentum vector
const std::string labelHBHE_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
double pt() const final
transverse momentum
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
constexpr int zside() const
get the z-side of the cell (1/-1)
HepPDT::ParticleDataTable ParticleDataTable
std::vector< double > * t_HitEnergies
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string l3Filter_
HcalDetId mergedDepthDetId(const HcalDetId &id) const
#define DEFINE_FWK_MODULE(type)
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
edm::Service< TFileService > fs_
const std::string l2Filter_
const std::string labelEE_
const Keys & filterKeys(trigger::size_type index) const
std::vector< int > oldEta_
const std::string labelRecVtx_
const std::vector< std::string > trigNames_
int bunchCrossing() const
l1t::L1TGlobalUtil * l1GtUtils_
edm::LuminosityBlockNumber_t luminosityBlock() const
double chargeIsolationGenCone(unsigned int trkIndex, std::vector< spr::propagatedGenParticleID > &trackIDs, double dR, int &nNearTRKs, bool debug=false)
T * make(const Args &...args) const
make new ROOT object
std::vector< int > * t_ietaGood
std::vector< double > etabins_
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< double > phibins_
Exp< T >::type exp(const T &t)
const edm::InputTag triggerEvent_
std::vector< bool > * t_hltbits
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
etaMax_(conf.getParameter< double >("etaMax"))
double chargeIsolationGenEcal(unsigned int trkIndex, std::vector< spr::propagatedGenParticleID > &trackIDs, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
double eThreshold(const DetId &id, const CaloGeometry *geo) const
std::vector< unsigned int > * t_DetIds1
Strings const & triggerNames() const
const std::string names[nVars_]
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
DetId newId(const DetId &)
int pdgId() const final
PDG identifier.
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.
double rhoh(const edm::Handle< CaloTowerCollection > &)
constexpr HcalSubdetector subdet() const
get the subdetector
const std::vector< int > oldID_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
ptMin_(conf.getParameter< double >("ptMin"))
HLTConfigProvider hltConfig_
bool notaMuon(const reco::GenParticle *pTrack)
double px() const final
x coordinate of momentum vector
std::vector< int > oldDepth_
double p() const final
magnitude of momentum vector
constexpr int iphi() const
get the cell iphi
const TriggerObjectCollection & getObjects() const
std::vector< double > vec1
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const double maxRestrictionP_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
const HcalDDDRecConstants * hdc_
std::vector< int > * t_ietaAll
const std::string l1Filter_
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
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)
std::vector< int > * t_trackType
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< HcalTopology, HcalRecNumberingRecord > tok_htopo_
const bool collapseDepth_
static std::string const triggerResults
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double py() const final
y coordinate of momentum vector
const std::string l1TrigName_
std::vector< unsigned int > * t_DetIds3
~HcalIsoTrkSimAnalyzer() override=default
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
std::vector< int > oldDet_
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
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::EDGetTokenT< CaloTowerCollection > tok_cala_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
void endRun(edm::Run const &, edm::EventSetup const &) override
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
const edm::InputTag filterTag(trigger::size_type index) const
std::vector< unsigned int > * t_DetIds
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
T const * product() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
T getParameter(std::string const &) const
void analyze(edm::Event const &, edm::EventSetup const &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > * t_HitEnergies1
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
const std::string labelTower_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
const std::string processName_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
std::vector< bool > * t_trgbits
const double hitEthrEELo_
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
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
const double hitEthrEEHi_
edm::ESGetToken< HepPDT::ParticleDataTable, PDTRecord > tok_pdt_
const std::string labelGenTrack_
constexpr int depth() const
get the tower depth
Log< level::Warning, false > LogWarning
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
double phi() const final
momentum azimuthal angle
const edm::InputTag theTriggerResultsLabel_
std::array< int, 3 > fillTree(std::vector< math::XYZTLorentzVector > &vecL1, std::vector< math::XYZTLorentzVector > &vecL3, math::XYZPoint &leadPV, std::vector< spr::propagatedGenParticleID > &trackIDs, 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)
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
tuple size
Write out results.
const bool ignoreTrigger_
void setTopo(const HcalTopology *topo)
const double slopeRestrictionP_
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
int charge() const final
electric charge
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)
double eta() const final
momentum pseudorapidity