CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
AlCaHcalIsotrkProducer Class Reference
Inheritance diagram for AlCaHcalIsotrkProducer:
edm::stream::EDProducer< edm::GlobalCache< alCaHcalIsotrkProducer::Counters > >

Public Member Functions

 AlCaHcalIsotrkProducer (edm::ParameterSet const &, const alCaHcalIsotrkProducer::Counters *)
 
void endStream () override
 
void produce (edm::Event &, edm::EventSetup const &) override
 
 ~AlCaHcalIsotrkProducer () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< alCaHcalIsotrkProducer::Counters > >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void globalEndJob (const alCaHcalIsotrkProducer::Counters *counters)
 
static std::unique_ptr< alCaHcalIsotrkProducer::CountersinitializeGlobalCache (edm::ParameterSet const &)
 

Private Member Functions

void beginRun (edm::Run const &, edm::EventSetup const &) override
 
double dR (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
double eThreshold (const DetId &id, const CaloGeometry *geo) const
 
std::array< int, 3 > getProducts (int goodPV, double eventWeight, 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, const edm::Handle< reco::GenParticleCollection > &genParticles, const HcalRespCorrs *respCorrs, const edm::Handle< reco::MuonCollection > &muonh, std::vector< HcalIsoTrkCalibVariables > &hocalib, HcalIsoTrkEventVariables &hocalibEvent, const edm::EventID &eventId)
 
DetId newId (const DetId &)
 
bool notaMuon (const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
 
double rhoh (const edm::Handle< CaloTowerCollection > &)
 
void storeEnergy (const HcalRespCorrs *respCorrs, const std::vector< DetId > &ids, std::vector< double > &edet, double &eHcal, std::vector< unsigned int > &detIds, std::vector< double > &hitEnergies)
 
std::pair< double, double > storeEnergy (const HcalRespCorrs *respCorrs, edm::Handle< HBHERecHitCollection > &hbhe, const std::vector< DetId > &ids, std::vector< double > &hitEnergy1, std::vector< double > &hitEnergy2)
 
double trackP (const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
 

Private Attributes

double a_charIsoR_
 
double a_coneR1_
 
double a_coneR2_
 
const double a_coneR_
 
const double a_mipR2_
 
const double a_mipR3_
 
const double a_mipR4_
 
const double a_mipR5_
 
const double a_mipR_
 
const bool collapseDepth_
 
const std::vector< int > debEvents_
 
bool debug_
 
const double eEcalMax_
 
const double eIsolate1_
 
const double eIsolate2_
 
std::vector< double > etabins_
 
double etadist_
 
double etahalfdist_
 
const EcalPFRecHitThresholdseThresholds_
 
const double hcalScale_
 
const HcalDDDRecConstantshdc_
 
const bool hep17_
 
const double hitEthrEB_
 
const double hitEthrEE0_
 
const double hitEthrEE1_
 
const double hitEthrEE2_
 
const double hitEthrEE3_
 
const double hitEthrEEHi_
 
const double hitEthrEELo_
 
HLTConfigProvider hltConfig_
 
const bool ignoreTrigger_
 
const std::string l1Filter_
 
l1t::L1TGlobalUtill1GtUtils_
 
const std::string l1TrigName_
 
const std::string l2Filter_
 
const std::string l3Filter_
 
const std::string labelEB_
 
const std::string labelEE_
 
const std::string labelGenTrack_
 
const std::string labelHBHE_
 
const std::string labelIsoTkEvtVar_
 
const std::string labelIsoTkVar_
 
const std::string labelRecVtx_
 
const std::string labelTower_
 
const double maxRestrictionP_
 
unsigned int nAll_
 
const std::vector< int > newDepth_
 
unsigned int nGood_
 
unsigned int nRange_
 
unsigned int nRun_
 
std::vector< int > oldDepth_
 
std::vector< int > oldDet_
 
std::vector< int > oldEta_
 
const std::vector< int > oldID_
 
std::vector< double > phibins_
 
double phidist_
 
double phihalfdist_
 
const std::string processName_
 
const double pTrackHigh_
 
const double pTrackLow_
 
const double pTrackMin_
 
spr::trackSelectionParameters selectionParameter_
 
const double slopeRestrictionP_
 
const std::string theTrackQuality_
 
const edm::InputTag theTriggerResultsLabel_
 
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordtok_bFieldH_
 
edm::EDGetTokenT< reco::BeamSpottok_bs_
 
edm::EDGetTokenT< CaloTowerCollectiontok_cala_
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtok_caloTopology_
 
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecordtok_ddrec_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EB_
 
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcdtok_ecalChStatus_
 
edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcdtok_ecalPFRecHitThresholds_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EE_
 
edm::EDGetTokenT< GenEventInfoProducttok_ew_
 
edm::EDGetTokenT< reco::TrackCollectiontok_genTrack_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordtok_geom_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbhe_
 
edm::ESGetToken< HcalTopology, HcalRecNumberingRecordtok_htopo_
 
edm::EDGetTokenT< reco::MuonCollectiontok_Muon_
 
edm::EDGetTokenT< reco::GenParticleCollectiontok_parts_
 
edm::EDGetTokenT< reco::VertexCollectiontok_recVtx_
 
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcdtok_resp_
 
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcdtok_sevlv_
 
edm::EDGetTokenT< trigger::TriggerEventtok_trigEvt_
 
edm::EDGetTokenT< edm::TriggerResultstok_trigRes_
 
const edm::InputTag triggerEvent_
 
const std::vector< std::string > trigNames_
 
const bool unCorrect_
 
const bool useL1Trigger_
 
const bool usePFThresh_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< alCaHcalIsotrkProducer::Counters > >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 93 of file AlCaHcalIsotrkProducer.cc.

Constructor & Destructor Documentation

◆ AlCaHcalIsotrkProducer()

AlCaHcalIsotrkProducer::AlCaHcalIsotrkProducer ( edm::ParameterSet const &  iConfig,
const alCaHcalIsotrkProducer::Counters counters 
)
explicit

Definition at line 213 of file AlCaHcalIsotrkProducer.cc.

References a_charIsoR_, a_coneR1_, a_coneR2_, a_coneR_, a_mipR2_, a_mipR3_, a_mipR4_, a_mipR5_, a_mipR_, collapseDepth_, debEvents_, eEcalMax_, eIsolate1_, eIsolate2_, etabins_, etadist_, etahalfdist_, l1t::Event, edm::ParameterSet::getParameter(), hcalScale_, hep17_, hitEthrEB_, hitEthrEE0_, hitEthrEE1_, hitEthrEE2_, hitEthrEE3_, hitEthrEEHi_, hitEthrEELo_, mps_fire::i, ignoreTrigger_, ProducerED_cfi::InputTag, dqmdumpme::k, l1Filter_, l1GtUtils_, l1TrigName_, l2Filter_, l3Filter_, labelEB_, labelEE_, labelGenTrack_, labelHBHE_, labelIsoTkEvtVar_, labelIsoTkVar_, labelRecVtx_, labelTower_, M_PI, spr::trackSelectionParameters::maxChi2, spr::trackSelectionParameters::maxDpOverP, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, maxRestrictionP_, spr::trackSelectionParameters::minLayerCrossed, spr::trackSelectionParameters::minOuterHit, spr::trackSelectionParameters::minPt, spr::trackSelectionParameters::minQuality, newDepth_, oldDepth_, oldDet_, oldEta_, oldID_, phibins_, phidist_, phihalfdist_, processName_, pTrackHigh_, pTrackLow_, pTrackMin_, reco::TrackBase::qualityByName(), selectionParameter_, slopeRestrictionP_, AlCaHLTBitMon_QueryRunRegistry::string, theTrackQuality_, theTriggerResultsLabel_, tok_alg_, tok_bFieldH_, tok_bs_, tok_cala_, tok_caloTopology_, tok_ddrec_, tok_EB_, tok_ecalChStatus_, tok_ecalPFRecHitThresholds_, tok_EE_, tok_ew_, tok_genTrack_, tok_geom_, tok_hbhe_, tok_htopo_, tok_Muon_, tok_parts_, tok_recVtx_, tok_resp_, tok_sevlv_, tok_trigEvt_, tok_trigRes_, triggerEvent_, trigNames_, unCorrect_, useL1Trigger_, and usePFThresh_.

215  : nRun_(0),
216  nAll_(0),
217  nGood_(0),
218  nRange_(0),
219  trigNames_(iConfig.getParameter<std::vector<std::string>>("triggers")),
220  theTrackQuality_(iConfig.getParameter<std::string>("trackQuality")),
221  processName_(iConfig.getParameter<std::string>("processName")),
222  l1Filter_(iConfig.getParameter<std::string>("l1Filter")),
223  l2Filter_(iConfig.getParameter<std::string>("l2Filter")),
224  l3Filter_(iConfig.getParameter<std::string>("l3Filter")),
225  a_coneR_(iConfig.getParameter<double>("coneRadius")),
226  a_mipR_(iConfig.getParameter<double>("coneRadiusMIP")),
227  a_mipR2_(iConfig.getParameter<double>("coneRadiusMIP2")),
228  a_mipR3_(iConfig.getParameter<double>("coneRadiusMIP3")),
229  a_mipR4_(iConfig.getParameter<double>("coneRadiusMIP4")),
230  a_mipR5_(iConfig.getParameter<double>("coneRadiusMIP5")),
231  pTrackMin_(iConfig.getParameter<double>("minimumTrackP")),
232  eEcalMax_(iConfig.getParameter<double>("maximumEcalEnergy")),
233  maxRestrictionP_(iConfig.getParameter<double>("maxTrackP")),
234  slopeRestrictionP_(iConfig.getParameter<double>("slopeTrackP")),
235  hcalScale_(iConfig.getUntrackedParameter<double>("hHcalScale", 1.0)),
236  eIsolate1_(iConfig.getParameter<double>("isolationEnergyTight")),
237  eIsolate2_(iConfig.getParameter<double>("isolationEnergyLoose")),
238  pTrackLow_(iConfig.getParameter<double>("momentumLow")),
239  pTrackHigh_(iConfig.getParameter<double>("momentumHigh")),
240  ignoreTrigger_(iConfig.getUntrackedParameter<bool>("ignoreTriggers", false)),
241  useL1Trigger_(iConfig.getUntrackedParameter<bool>("useL1Trigger", false)),
242  unCorrect_(iConfig.getUntrackedParameter<bool>("unCorrect", false)),
243  collapseDepth_(iConfig.getUntrackedParameter<bool>("collapseDepth", false)),
244  hitEthrEB_(iConfig.getParameter<double>("EBHitEnergyThreshold")),
245  hitEthrEE0_(iConfig.getParameter<double>("EEHitEnergyThreshold0")),
246  hitEthrEE1_(iConfig.getParameter<double>("EEHitEnergyThreshold1")),
247  hitEthrEE2_(iConfig.getParameter<double>("EEHitEnergyThreshold2")),
248  hitEthrEE3_(iConfig.getParameter<double>("EEHitEnergyThreshold3")),
249  hitEthrEELo_(iConfig.getParameter<double>("EEHitEnergyThresholdLow")),
250  hitEthrEEHi_(iConfig.getParameter<double>("EEHitEnergyThresholdHigh")),
251  triggerEvent_(iConfig.getParameter<edm::InputTag>("labelTriggerEvent")),
252  theTriggerResultsLabel_(iConfig.getParameter<edm::InputTag>("labelTriggerResult")),
253  labelGenTrack_(iConfig.getParameter<std::string>("labelTrack")),
254  labelRecVtx_(iConfig.getParameter<std::string>("labelVertex")),
255  labelEB_(iConfig.getParameter<std::string>("labelEBRecHit")),
256  labelEE_(iConfig.getParameter<std::string>("labelEERecHit")),
257  labelHBHE_(iConfig.getParameter<std::string>("labelHBHERecHit")),
258  labelTower_(iConfig.getParameter<std::string>("labelCaloTower")),
259  l1TrigName_(iConfig.getUntrackedParameter<std::string>("l1TrigName", "L1_SingleJet60")),
260  oldID_(iConfig.getUntrackedParameter<std::vector<int>>("oldID")),
261  newDepth_(iConfig.getUntrackedParameter<std::vector<int>>("newDepth")),
262  hep17_(iConfig.getUntrackedParameter<bool>("hep17")),
263  labelIsoTkVar_(iConfig.getParameter<std::string>("isoTrackLabel")),
264  labelIsoTkEvtVar_(iConfig.getParameter<std::string>("isoTrackEventLabel")),
265  debEvents_(iConfig.getParameter<std::vector<int>>("debugEvents")),
266  usePFThresh_(iConfig.getParameter<bool>("usePFThreshold")) {
267  // Get the run parameters
268  const double isolationRadius(28.9), innerR(10.0), outerR(30.0);
270  selectionParameter_.minPt = iConfig.getParameter<double>("minTrackPt");
271  selectionParameter_.maxChi2 = iConfig.getParameter<double>("maxChi2");
272  selectionParameter_.maxDpOverP = iConfig.getParameter<double>("maxDpOverP");
273  selectionParameter_.minOuterHit = iConfig.getParameter<int>("minOuterHit");
274  selectionParameter_.minLayerCrossed = iConfig.getParameter<int>("minLayerCrossed");
275  selectionParameter_.maxInMiss = iConfig.getParameter<int>("maxInMiss");
276  selectionParameter_.minQuality = trackQuality_;
277  selectionParameter_.maxDxyPV = iConfig.getParameter<double>("maxDxyPV");
278  selectionParameter_.maxDzPV = iConfig.getParameter<double>("maxDzPV");
279  selectionParameter_.maxChi2 = iConfig.getParameter<double>("maxChi2");
280  selectionParameter_.maxDpOverP = iConfig.getParameter<double>("maxDpOverP");
281  selectionParameter_.minOuterHit = iConfig.getParameter<int>("minOuterHit");
282  selectionParameter_.minLayerCrossed = iConfig.getParameter<int>("minLayerCrossed");
283  selectionParameter_.maxInMiss = iConfig.getParameter<int>("maxInMiss");
284  selectionParameter_.maxOutMiss = iConfig.getParameter<int>("maxOutMiss");
285  a_charIsoR_ = a_coneR_ + isolationRadius;
286  a_coneR1_ = a_coneR_ + innerR;
287  a_coneR2_ = a_coneR_ + outerR;
288  // Different isolation cuts are described in DN-2016/029
289  // Tight cut uses 2 GeV; Loose cut uses 10 GeV
290  // Eta dependent cut uses (maxRestrictionP_ * exp(|ieta|*log(2.5)/18))
291  // with the factor for exponential slopeRestrictionP_ = log(2.5)/18
292  // maxRestrictionP_ = 8 GeV as came from a study
293  std::string labelBS = iConfig.getParameter<std::string>("labelBeamSpot");
294  edm::InputTag algTag = iConfig.getParameter<edm::InputTag>("algInputTag");
295  edm::InputTag extTag = iConfig.getParameter<edm::InputTag>("extInputTag");
296  std::string labelMuon = iConfig.getParameter<std::string>("labelMuon");
297 
298  for (unsigned int k = 0; k < oldID_.size(); ++k) {
299  oldDet_.emplace_back((oldID_[k] / 10000) % 10);
300  oldEta_.emplace_back((oldID_[k] / 100) % 100);
301  oldDepth_.emplace_back(oldID_[k] % 100);
302  }
303  l1GtUtils_ = new l1t::L1TGlobalUtil(iConfig, consumesCollector(), *this, algTag, extTag, l1t::UseEventSetupIn::Event);
304  // define tokens for access
305  tok_trigEvt_ = consumes<trigger::TriggerEvent>(triggerEvent_);
306  tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel_);
307  tok_bs_ = consumes<reco::BeamSpot>(labelBS);
308  tok_genTrack_ = consumes<reco::TrackCollection>(labelGenTrack_);
309  tok_ew_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
310  tok_parts_ = consumes<reco::GenParticleCollection>(edm::InputTag("genParticles"));
311  tok_cala_ = consumes<CaloTowerCollection>(labelTower_);
312  tok_alg_ = consumes<BXVector<GlobalAlgBlk>>(algTag);
313  tok_Muon_ = consumes<reco::MuonCollection>(labelMuon);
314  tok_recVtx_ = consumes<reco::VertexCollection>(labelRecVtx_);
315  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", labelEB_));
316  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", labelEE_));
317  tok_hbhe_ = consumes<HBHERecHitCollection>(labelHBHE_);
318  edm::LogVerbatim("HcalIsoTrack") << "Labels used " << triggerEvent_ << " " << theTriggerResultsLabel_ << " "
319  << labelBS << " " << labelRecVtx_ << " " << labelGenTrack_ << " "
320  << edm::InputTag("ecalRecHit", labelEB_) << " "
321  << edm::InputTag("ecalRecHit", labelEE_) << " " << labelHBHE_ << " " << labelTower_
322  << " " << labelMuon;
323 
324  tok_ddrec_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
325  tok_bFieldH_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
326  tok_ecalChStatus_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
327  tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
328  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
329  tok_caloTopology_ = esConsumes<CaloTopology, CaloTopologyRecord>();
330  tok_htopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
331  tok_resp_ = esConsumes<HcalRespCorrs, HcalRespCorrsRcd>();
332  tok_ecalPFRecHitThresholds_ = esConsumes<EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd>();
333 
334  edm::LogVerbatim("HcalIsoTrack")
335  << "Parameters read from config file \n"
336  << "\t minPt " << selectionParameter_.minPt << "\t theTrackQuality " << theTrackQuality_ << "\t minQuality "
337  << selectionParameter_.minQuality << "\t maxDxyPV " << selectionParameter_.maxDxyPV << "\t maxDzPV "
338  << selectionParameter_.maxDzPV << "\t maxChi2 " << selectionParameter_.maxChi2 << "\t maxDpOverP "
339  << selectionParameter_.maxDpOverP << "\t minOuterHit " << selectionParameter_.minOuterHit << "\t minLayerCrossed "
340  << selectionParameter_.minLayerCrossed << "\t maxInMiss " << selectionParameter_.maxInMiss << "\t maxOutMiss "
341  << selectionParameter_.maxOutMiss << "\t a_coneR " << a_coneR_ << ":" << a_coneR1_ << ":" << a_coneR2_
342  << "\t a_charIsoR " << a_charIsoR_ << "\t a_mipR " << a_mipR_ << "\t a_mipR2 " << a_mipR2_ << "\t a_mipR3 "
343  << a_mipR3_ << "\t a_mipR4 " << a_mipR4_ << "\t a_mipR5 " << a_mipR5_ << "\n pTrackMin_ " << pTrackMin_
344  << "\t eEcalMax_ " << eEcalMax_ << "\t maxRestrictionP_ " << maxRestrictionP_ << "\t slopeRestrictionP_ "
345  << slopeRestrictionP_ << "\t eIsolateStrong_ " << eIsolate1_ << "\t eIsolateSoft_ " << eIsolate2_
346  << "\t hcalScale_ " << hcalScale_ << "\n\t momentumLow_ " << pTrackLow_ << "\t momentumHigh_ " << pTrackHigh_
347  << "\n\t ignoreTrigger_ " << ignoreTrigger_ << "\n\t useL1Trigger_ " << useL1Trigger_ << "\t unCorrect_ "
348  << unCorrect_ << "\t collapseDepth_ " << collapseDepth_ << "\t L1TrigName_ " << l1TrigName_
349  << "\nThreshold flag used " << usePFThresh_ << " value for EB " << hitEthrEB_ << " EE " << hitEthrEE0_ << ":"
350  << hitEthrEE1_ << ":" << hitEthrEE2_ << ":" << hitEthrEE3_ << ":" << hitEthrEELo_ << ":" << hitEthrEEHi_;
351  edm::LogVerbatim("HcalIsoTrack") << "Process " << processName_ << " L1Filter:" << l1Filter_
352  << " L2Filter:" << l2Filter_ << " L3Filter:" << l3Filter_ << " and "
353  << debEvents_.size() << " events to be debugged";
354  for (unsigned int k = 0; k < trigNames_.size(); ++k) {
355  edm::LogVerbatim("HcalIsoTrack") << "Trigger[" << k << "] " << trigNames_[k];
356  }
357  edm::LogVerbatim("HcalIsoTrack") << oldID_.size() << " DetIDs to be corrected with HEP17 flag:" << hep17_;
358  for (unsigned int k = 0; k < oldID_.size(); ++k)
359  edm::LogVerbatim("HcalIsoTrack") << "[" << k << "] Det " << oldDet_[k] << " EtaAbs " << oldEta_[k] << " Depth "
360  << oldDepth_[k] << ":" << newDepth_[k];
361 
362  for (int i = 0; i < 10; i++)
363  phibins_.push_back(-M_PI + 0.1 * (2 * i + 1) * M_PI);
364  for (int i = 0; i < 8; ++i)
365  etabins_.push_back(-2.1 + 0.6 * i);
366  etadist_ = etabins_[1] - etabins_[0];
367  phidist_ = phibins_[1] - phibins_[0];
368  etahalfdist_ = 0.5 * etadist_;
369  phihalfdist_ = 0.5 * phidist_;
370  edm::LogVerbatim("HcalIsoTrack") << "EtaDist " << etadist_ << " " << etahalfdist_ << " PhiDist " << phidist_ << " "
371  << phihalfdist_;
372  //create also IsolatedPixelTrackCandidateCollection which contains isolation info and reference to primary track
373  produces<HcalIsoTrkCalibVariablesCollection>(labelIsoTkVar_);
374  produces<HcalIsoTrkEventVariablesCollection>(labelIsoTkEvtVar_);
375  edm::LogVerbatim("HcalIsoTrack") << " Expected to produce the collections:\n"
376  << "HcalIsoTrkCalibVariablesCollection with label " << labelIsoTkVar_
377  << "\nand HcalIsoTrkEventVariablesCollection with label " << labelIsoTkEvtVar_;
378 }
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
TrackQuality
track quality
Definition: TrackBase.h:150
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const std::string labelIsoTkEvtVar_
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
spr::trackSelectionParameters selectionParameter_
edm::EDGetTokenT< CaloTowerCollection > tok_cala_
std::vector< double > phibins_
const std::vector< int > debEvents_
const edm::InputTag triggerEvent_
l1t::L1TGlobalUtil * l1GtUtils_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
const std::vector< int > newDepth_
#define M_PI
const edm::InputTag theTriggerResultsLabel_
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
reco::TrackBase::TrackQuality minQuality
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
const std::vector< int > oldID_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
const std::string theTrackQuality_
const std::vector< std::string > trigNames_
std::vector< double > etabins_
edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > tok_ecalPFRecHitThresholds_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_

◆ ~AlCaHcalIsotrkProducer()

AlCaHcalIsotrkProducer::~AlCaHcalIsotrkProducer ( )
overridedefault

Member Function Documentation

◆ beginRun()

void AlCaHcalIsotrkProducer::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 752 of file AlCaHcalIsotrkProducer.cc.

References edm::EventSetup::getData(), hdc_, hltConfig_, ignoreTrigger_, HLTConfigProvider::init(), nRun_, processName_, edm::RunBase::run(), and tok_ddrec_.

752  {
753  hdc_ = &iSetup.getData(tok_ddrec_);
754  if (!ignoreTrigger_) {
755  bool changed(false);
756  edm::LogVerbatim("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run() << " hltconfig.init "
757  << hltConfig_.init(iRun, iSetup, processName_, changed);
758  }
759 }
Log< level::Info, true > LogVerbatim
const HcalDDDRecConstants * hdc_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_

◆ dR()

double AlCaHcalIsotrkProducer::dR ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 1213 of file AlCaHcalIsotrkProducer.cc.

References reco::deltaR().

Referenced by getProducts(), notaMuon(), and trackP().

1213  {
1214  return reco::deltaR(vec1.eta(), vec1.phi(), vec2.eta(), vec2.phi());
1215 }
std::vector< double > vec1
Definition: HCALResponse.h:15
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
std::vector< vec1 > vec2
Definition: HCALResponse.h:16

◆ endRun()

void AlCaHcalIsotrkProducer::endRun ( edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivate

Definition at line 761 of file AlCaHcalIsotrkProducer.cc.

References nRun_, and edm::RunBase::run().

761  {
762  edm::LogVerbatim("HcalIsoTrack") << "endRun [" << nRun_ << "] " << iRun.run();
763  ++nRun_;
764 }
Log< level::Info, true > LogVerbatim

◆ endStream()

void AlCaHcalIsotrkProducer::endStream ( )
override

Definition at line 741 of file AlCaHcalIsotrkProducer.cc.

References nAll_, nGood_, and nRange_.

741  {
742  globalCache()->nAll_ += nAll_;
743  globalCache()->nGood_ += nGood_;
744  globalCache()->nRange_ += nRange_;
745 }

◆ eThreshold()

double AlCaHcalIsotrkProducer::eThreshold ( const DetId id,
const CaloGeometry geo 
) const
private

Definition at line 1264 of file AlCaHcalIsotrkProducer.cc.

References funct::abs(), EcalBarrel, PVValHelper::eta, CaloGeometry::getPosition(), hitEthrEB_, hitEthrEE0_, hitEthrEE1_, hitEthrEE2_, hitEthrEE3_, hitEthrEEHi_, hitEthrEELo_, l1ctLayer2EG_cff::id, and usePFThresh_.

Referenced by getProducts().

1264  {
1265  const GlobalPoint& pos = geo->getPosition(id);
1266  double eta = std::abs(pos.eta());
1267  double eThr(hitEthrEB_);
1268  if (usePFThresh_) {
1269  eThr = static_cast<double>((*eThresholds_)[id]);
1270  } else {
1271  if (id.subdetId() != EcalBarrel) {
1272  eThr = (((eta * hitEthrEE3_ + hitEthrEE2_) * eta + hitEthrEE1_) * eta + hitEthrEE0_);
1273  if (eThr < hitEthrEELo_)
1274  eThr = hitEthrEELo_;
1275  else if (eThr > hitEthrEEHi_)
1276  eThr = hitEthrEEHi_;
1277  }
1278  }
1279  return eThr;
1280 }
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ fillDescriptions()

void AlCaHcalIsotrkProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 380 of file AlCaHcalIsotrkProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, events, ProducerED_cfi::InputTag, AlCaHLTBitMon_QueryRunRegistry::string, and ClusterTask_cfi::trig.

380  {
382  desc.add<std::string>("processName", "HLT");
383  std::vector<std::string> trig;
384  desc.add<std::vector<std::string>>("triggers", trig);
385  desc.add<std::string>("l1Filter", "");
386  desc.add<std::string>("l2Filter", "L2Filter");
387  desc.add<std::string>("l3Filter", "Filter");
388  // following 10 parameters are parameters to select good tracks
389  desc.add<std::string>("trackQuality", "highPurity");
390  desc.add<double>("minTrackPt", 1.0);
391  desc.add<double>("maxDxyPV", 0.02);
392  desc.add<double>("maxDzPV", 0.02);
393  desc.add<double>("maxChi2", 5.0);
394  desc.add<double>("maxDpOverP", 0.1);
395  desc.add<int>("minOuterHit", 4);
396  desc.add<int>("minLayerCrossed", 8);
397  desc.add<int>("maxInMiss", 0);
398  desc.add<int>("maxOutMiss", 0);
399  // Minimum momentum of selected isolated track and signal zone
400  desc.add<double>("minimumTrackP", 10.0);
401  desc.add<double>("coneRadius", 34.98);
402  // signal zone in ECAL and MIP energy cutoff
403  desc.add<double>("coneRadiusMIP", 14.0);
404  desc.add<double>("coneRadiusMIP2", 18.0);
405  desc.add<double>("coneRadiusMIP3", 20.0);
406  desc.add<double>("coneRadiusMIP4", 22.0);
407  desc.add<double>("coneRadiusMIP5", 24.0);
408  desc.add<double>("maximumEcalEnergy", 2.0);
409  // following 4 parameters are for isolation cuts and described in the code
410  desc.add<double>("maxTrackP", 8.0);
411  desc.add<double>("slopeTrackP", 0.05090504066);
412  desc.add<double>("isolationEnergyTight", 2.0);
413  desc.add<double>("isolationEnergyLoose", 10.0);
414  // energy thershold for ECAL (from Egamma group)
415  desc.add<double>("EBHitEnergyThreshold", 0.08);
416  desc.add<double>("EEHitEnergyThreshold0", 0.30);
417  desc.add<double>("EEHitEnergyThreshold1", 0.00);
418  desc.add<double>("EEHitEnergyThreshold2", 0.00);
419  desc.add<double>("EEHitEnergyThreshold3", 0.00);
420  desc.add<double>("EEHitEnergyThresholdLow", 0.30);
421  desc.add<double>("EEHitEnergyThresholdHigh", 0.30);
422  // prescale factors
423  desc.add<double>("momentumLow", 40.0);
424  desc.add<double>("momentumHigh", 60.0);
425  desc.add<int>("prescaleLow", 1);
426  desc.add<int>("prescaleHigh", 1);
427  // various labels for collections used in the code
428  desc.add<edm::InputTag>("labelTriggerEvent", edm::InputTag("hltTriggerSummaryAOD", "", "HLT"));
429  desc.add<edm::InputTag>("labelTriggerResult", edm::InputTag("TriggerResults", "", "HLT"));
430  desc.add<std::string>("labelTrack", "generalTracks");
431  desc.add<std::string>("labelVertex", "offlinePrimaryVertices");
432  desc.add<std::string>("labelEBRecHit", "EcalRecHitsEB");
433  desc.add<std::string>("labelEERecHit", "EcalRecHitsEE");
434  desc.add<std::string>("labelHBHERecHit", "hbhereco");
435  desc.add<std::string>("labelBeamSpot", "offlineBeamSpot");
436  desc.add<std::string>("labelCaloTower", "towerMaker");
437  desc.add<std::string>("labelMuon", "muons");
438  desc.add<edm::InputTag>("algInputTag", edm::InputTag("gtStage2Digis"));
439  desc.add<edm::InputTag>("extInputTag", edm::InputTag("gtStage2Digis"));
440  desc.add<std::string>("isoTrackLabel", "HcalIsoTrack");
441  desc.add<std::string>("isoTrackEventLabel", "HcalIsoTrackEvent");
442  // Various flags used for selecting tracks, choice of energy Method2/0
443  // Data type 0/1 for single jet trigger or others
444  desc.addUntracked<bool>("ignoreTriggers", false);
445  desc.addUntracked<bool>("useL1Trigger", false);
446  desc.addUntracked<double>("hcalScale", 1.0);
447  desc.addUntracked<bool>("unCorrect", false);
448  desc.addUntracked<bool>("collapseDepth", false);
449  desc.addUntracked<std::string>("l1TrigName", "L1_SingleJet60");
450  std::vector<int> dummy;
451  desc.addUntracked<std::vector<int>>("oldID", dummy);
452  desc.addUntracked<std::vector<int>>("newDepth", dummy);
453  desc.addUntracked<bool>("hep17", false);
454  std::vector<int> events;
455  desc.add<std::vector<int>>("debugEvents", events);
456  desc.add<bool>("usePFThreshold", true);
457  descriptions.add("alcaHcalIsotrkProducer", desc);
458 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int events

◆ getProducts()

std::array< int, 3 > AlCaHcalIsotrkProducer::getProducts ( int  goodPV,
double  eventWeight,
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,
const edm::Handle< reco::GenParticleCollection > &  genParticles,
const HcalRespCorrs respCorrs,
const edm::Handle< reco::MuonCollection > &  muonh,
std::vector< HcalIsoTrkCalibVariables > &  hocalib,
HcalIsoTrkEventVariables hocalibEvent,
const edm::EventID eventId 
)
private

Definition at line 766 of file AlCaHcalIsotrkProducer.cc.

References a_charIsoR_, a_coneR1_, a_coneR2_, a_coneR_, a_mipR2_, a_mipR3_, a_mipR4_, a_mipR5_, a_mipR_, funct::abs(), accept(), HcalIsoTrkEventVariables::allvertex_, spr::chargeIsolationCone(), spr::chargeIsolationEcal(), debug_, TauDecayModes::dec, hcalRecHitTable_cff::detId, HcalIsoTrkCalibVariables::detIds1_, HcalIsoTrkCalibVariables::detIds3_, HcalIsoTrkCalibVariables::detIds_, l1ctLayer1_cff::dr, dR(), HcalIsoTrkCalibVariables::eAnnular_, spr::eCone_ecal(), spr::eCone_hcal(), spr::eECALmatrix(), eEcalMax_, HcalIsoTrkCalibVariables::eHcal10_, HcalIsoTrkCalibVariables::eHcal10Aux_, HcalIsoTrkCalibVariables::eHcal10Raw_, HcalIsoTrkCalibVariables::eHcal30_, HcalIsoTrkCalibVariables::eHcal30Aux_, HcalIsoTrkCalibVariables::eHcal30Raw_, HcalIsoTrkCalibVariables::eHcal_, HcalIsoTrkCalibVariables::eHcalAux_, spr::eHCALmatrix(), HcalIsoTrkCalibVariables::eHcalRaw_, eIsolate1_, eIsolate2_, HcalIsoTrkCalibVariables::emaxNearP_, HcalIsoTrkCalibVariables::eMipDR_, reco::TrackBase::eta(), eThreshold(), edm::EventID::event(), HcalIsoTrkCalibVariables::eventWeight_, JetChargeProducer_cfi::exp, RemoveAddSevLevel::flag, AJJGenJetFilter_cfi::genParticles, HcalIsoTrkCalibVariables::gentrackP_, HcalIsoTrkCalibVariables::goodPV_, spr::goodTrack(), HcalIsoTrkCalibVariables::hAnnular_, photonIsolationHIProducer_cfi::hbhe, HcalIsoTrkCalibVariables::hitEnergies1_, HcalIsoTrkCalibVariables::hitEnergies1Aux_, HcalIsoTrkCalibVariables::hitEnergies1Raw_, HcalIsoTrkCalibVariables::hitEnergies3_, HcalIsoTrkCalibVariables::hitEnergies3Aux_, HcalIsoTrkCalibVariables::hitEnergies3Raw_, HcalIsoTrkCalibVariables::hitEnergies_, HcalIsoTrkCalibVariables::hitEnergiesAux_, HcalIsoTrkCalibVariables::hitEnergiesRaw_, HcalIsoTrkEventVariables::hltbits_, HcalIsoTrkCalibVariables::hmaxNearP_, testProducerWithPsetDescEmpty_cfi::i3, HcalIsoTrkCalibVariables::ieta_, HcalIsoTrkEventVariables::ietaAll_, HcalIsoTrkEventVariables::ietaGood_, HcalIsoTrkCalibVariables::iphi_, edm::HandleBase::isValid(), dqmdumpme::k, HcalIsoTrkCalibVariables::l1eta_, HcalIsoTrkCalibVariables::l1phi_, HcalIsoTrkCalibVariables::l1pt_, HcalIsoTrkCalibVariables::l3eta_, HcalIsoTrkCalibVariables::l3phi_, HcalIsoTrkCalibVariables::l3pt_, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, maxRestrictionP_, HcalIsoTrkCalibVariables::mindR1_, HcalIsoTrkCalibVariables::mindR2_, newId(), jetSelector_cfi::nLoose, notaMuon(), beamSpotPI::nTracks, HcalIsoTrkCalibVariables::nTrk_, HcalIsoTrkCalibVariables::nVtx_, oldID_, reco::TrackBase::p(), HcalIsoTrkCalibVariables::p_, reco::TrackBase::phi(), HcalIsoTrkCalibVariables::phi_, reco::TrackBase::pt(), HcalIsoTrkCalibVariables::pt_, pTrackMin_, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), HcalIsoTrkCalibVariables::qltyFlag_, HcalIsoTrkCalibVariables::qltyMissFlag_, HcalIsoTrkCalibVariables::qltyPVFlag_, rhoh(), HcalIsoTrkCalibVariables::rhoh_, edm::EventID::run(), selectionParameter_, HcalIsoTrkCalibVariables::selectTk_, slopeRestrictionP_, storeEnergy(), AlCaHLTBitMon_QueryRunRegistry::string, l1tHGCalTowerProducer_cfi::tower, trackP(), HcalIsoTrkEventVariables::trackType_, HcalIsoTrkCalibVariables::trgbits_, and ClusterTask_cfi::trig.

Referenced by produce().

787  {
788  int nSave(0), nLoose(0), nTight(0);
789  unsigned int nTracks(0);
790  double rhohEV = (tower.isValid()) ? rhoh(tower) : 0;
791 
792  //Loop over tracks
793  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
794  for (trkDetItr = trkCaloDirections.begin(), nTracks = 0; trkDetItr != trkCaloDirections.end();
795  trkDetItr++, nTracks++) {
796  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
797  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
798  bool accept(false);
800  isoTk.eventWeight_ = eventWeight;
801  isoTk.goodPV_ = goodPV;
802  isoTk.nVtx_ = hocalibEvent.allvertex_;
803  isoTk.nTrk_ = trkCaloDirections.size();
804  isoTk.rhoh_ = rhohEV;
805  for (const auto& trig : hocalibEvent.hltbits_)
806  isoTk.trgbits_.emplace_back(trig);
807  if (!vecL1.empty()) {
808  isoTk.l1pt_ = vecL1[0].pt();
809  isoTk.l1eta_ = vecL1[0].eta();
810  isoTk.l1phi_ = vecL1[0].phi();
811  }
812  if (!vecL3.empty()) {
813  isoTk.l3pt_ = vecL3[0].pt();
814  isoTk.l3eta_ = vecL3[0].eta();
815  isoTk.l3phi_ = vecL3[0].phi();
816  }
817 
818  isoTk.p_ = pTrack->p();
819  isoTk.pt_ = pTrack->pt();
820  isoTk.phi_ = pTrack->phi();
821 #ifdef EDM_ML_DEBUG
822  if (debug_)
823  edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) : " << isoTk.pt_ << "|"
824  << pTrack->eta() << "|" << isoTk.phi_ << "|" << isoTk.p_;
825  int flag(0);
826 #endif
827  isoTk.mindR2_ = 999;
828  for (unsigned int k = 0; k < vecL3.size(); ++k) {
829  double dr = dR(vecL3[k], v4);
830  if (dr < isoTk.mindR2_) {
831  isoTk.mindR2_ = dr;
832  }
833  }
834  isoTk.mindR1_ = (!vecL1.empty()) ? dR(vecL1[0], v4) : 999;
835 #ifdef EDM_ML_DEBUG
836  if (debug_)
837  edm::LogVerbatim("HcalIsoTrack") << "Closest L3 object at dr : " << isoTk.mindR2_ << " and from L1 "
838  << isoTk.mindR1_;
839 #endif
840  isoTk.ieta_ = isoTk.iphi_ = 0;
841  if (trkDetItr->okHCAL) {
842  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
843  isoTk.ieta_ = detId.ieta();
844  isoTk.iphi_ = detId.iphi();
845  if (isoTk.p_ > 40.0 && isoTk.p_ <= 60.0)
846  hocalibEvent.ietaAll_.emplace_back(isoTk.ieta_);
847  }
848  //Selection of good track
849  isoTk.selectTk_ = spr::goodTrack(pTrack, leadPV, selectionParameter_, false);
851  oneCutParameters.maxDxyPV = 10;
852  oneCutParameters.maxDzPV = 100;
853  oneCutParameters.maxInMiss = 2;
854  oneCutParameters.maxOutMiss = 2;
855  bool qltyFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
856  oneCutParameters = selectionParameter_;
857  oneCutParameters.maxDxyPV = 10;
858  oneCutParameters.maxDzPV = 100;
859  isoTk.qltyMissFlag_ = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
860  oneCutParameters = selectionParameter_;
861  oneCutParameters.maxInMiss = 2;
862  oneCutParameters.maxOutMiss = 2;
863  isoTk.qltyPVFlag_ = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
864  double eIsolation = maxRestrictionP_ * exp(slopeRestrictionP_ * std::abs((double)isoTk.ieta_));
865  if (eIsolation < eIsolate1_)
866  eIsolation = eIsolate1_;
867  if (eIsolation < eIsolate2_)
868  eIsolation = eIsolate2_;
869 #ifdef EDM_ML_DEBUG
870  if (debug_)
871  edm::LogVerbatim("HcalIsoTrack") << "qltyFlag|okECAL|okHCAL : " << qltyFlag << "|" << trkDetItr->okECAL << "|"
872  << trkDetItr->okHCAL << " eIsolation " << eIsolation;
873  if (qltyFlag)
874  flag += 1;
875  if (trkDetItr->okECAL)
876  flag += 2;
877  if (trkDetItr->okHCAL)
878  flag += 4;
879 #endif
880  isoTk.qltyFlag_ = (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL);
881  bool notMuon = (muonh.isValid()) ? notaMuon(pTrack, muonh) : true;
882 #ifdef EDM_ML_DEBUG
883  if (notMuon)
884  flag += 8;
885 #endif
886  if (isoTk.qltyFlag_ && notMuon) {
887  int nNearTRKs(0);
889  std::vector<DetId> eIds;
890  std::vector<double> eHit;
891 #ifdef EDM_ML_DEBUG
892  double eMipDR =
893 #endif
894  spr::eCone_ecal(geo,
895  barrelRecHitsHandle,
896  endcapRecHitsHandle,
897  trkDetItr->pointHCAL,
898  trkDetItr->pointECAL,
899  a_mipR_,
900  trkDetItr->directionECAL,
901  eIds,
902  eHit);
903  double eEcal(0);
904  for (unsigned int k = 0; k < eIds.size(); ++k) {
905  if (eHit[k] > eThreshold(eIds[k], geo))
906  eEcal += eHit[k];
907  }
908 #ifdef EDM_ML_DEBUG
909  if (debug_)
910  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << eMipDR << ":" << eEcal;
911 #endif
912  isoTk.eMipDR_.emplace_back(eEcal);
915  std::vector<DetId> eIds2;
916  std::vector<double> eHit2;
917 #ifdef EDM_ML_DEBUG
918  double eMipDR2 =
919 #endif
920  spr::eCone_ecal(geo,
921  barrelRecHitsHandle,
922  endcapRecHitsHandle,
923  trkDetItr->pointHCAL,
924  trkDetItr->pointECAL,
925  a_mipR2_,
926  trkDetItr->directionECAL,
927  eIds2,
928  eHit2);
929  double eEcal2(0);
930  for (unsigned int k = 0; k < eIds2.size(); ++k) {
931  if (eHit2[k] > eThreshold(eIds2[k], geo))
932  eEcal2 += eHit2[k];
933  }
934 #ifdef EDM_ML_DEBUG
935  if (debug_)
936  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << eMipDR2 << ":" << eEcal2;
937 #endif
938  isoTk.eMipDR_.emplace_back(eEcal2);
941  std::vector<DetId> eIds3;
942  std::vector<double> eHit3;
943 #ifdef EDM_ML_DEBUG
944  double eMipDR3 =
945 #endif
946  spr::eCone_ecal(geo,
947  barrelRecHitsHandle,
948  endcapRecHitsHandle,
949  trkDetItr->pointHCAL,
950  trkDetItr->pointECAL,
951  a_mipR3_,
952  trkDetItr->directionECAL,
953  eIds3,
954  eHit3);
955  double eEcal3(0);
956  for (unsigned int k = 0; k < eIds3.size(); ++k) {
957  if (eHit3[k] > eThreshold(eIds3[k], geo))
958  eEcal3 += eHit3[k];
959  }
960 #ifdef EDM_ML_DEBUG
961  if (debug_)
962  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << eMipDR3 << ":" << eEcal3;
963 #endif
964  isoTk.eMipDR_.emplace_back(eEcal3);
967  std::vector<DetId> eIds4;
968  std::vector<double> eHit4;
969 #ifdef EDM_ML_DEBUG
970  double eMipDR4 =
971 #endif
972  spr::eCone_ecal(geo,
973  barrelRecHitsHandle,
974  endcapRecHitsHandle,
975  trkDetItr->pointHCAL,
976  trkDetItr->pointECAL,
977  a_mipR4_,
978  trkDetItr->directionECAL,
979  eIds4,
980  eHit4);
981  double eEcal4(0);
982  for (unsigned int k = 0; k < eIds4.size(); ++k) {
983  if (eHit4[k] > eThreshold(eIds4[k], geo))
984  eEcal4 += eHit4[k];
985  }
986 #ifdef EDM_ML_DEBUG
987  if (debug_)
988  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << eMipDR4 << ":" << eEcal4;
989 #endif
990  isoTk.eMipDR_.emplace_back(eEcal4);
993  std::vector<DetId> eIds5;
994  std::vector<double> eHit5;
995 #ifdef EDM_ML_DEBUG
996  double eMipDR5 =
997 #endif
998  spr::eCone_ecal(geo,
999  barrelRecHitsHandle,
1000  endcapRecHitsHandle,
1001  trkDetItr->pointHCAL,
1002  trkDetItr->pointECAL,
1003  a_mipR5_,
1004  trkDetItr->directionECAL,
1005  eIds5,
1006  eHit5);
1007  double eEcal5(0);
1008  for (unsigned int k = 0; k < eIds5.size(); ++k) {
1009  if (eHit5[k] > eThreshold(eIds5[k], geo))
1010  eEcal5 += eHit5[k];
1011  }
1012 #ifdef EDM_ML_DEBUG
1013  if (debug_)
1014  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << eMipDR5 << ":" << eEcal5;
1015 #endif
1016  isoTk.eMipDR_.emplace_back(eEcal5);
1018 
1019  isoTk.emaxNearP_ = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 15, 15);
1020  const DetId cellE(trkDetItr->detIdECAL);
1021  std::pair<double, bool> e11x11P = spr::eECALmatrix(cellE,
1022  barrelRecHitsHandle,
1023  endcapRecHitsHandle,
1024  *theEcalChStatus,
1025  geo,
1026  caloTopology,
1027  theEcalSevlv,
1028  5,
1029  5,
1030  -100.0,
1031  -100.0,
1032  -100.0,
1033  100.0);
1034  std::pair<double, bool> e15x15P = spr::eECALmatrix(cellE,
1035  barrelRecHitsHandle,
1036  endcapRecHitsHandle,
1037  *theEcalChStatus,
1038  geo,
1039  caloTopology,
1040  theEcalSevlv,
1041  7,
1042  7,
1043  -100.0,
1044  -100.0,
1045  -100.0,
1046  100.0);
1047  if (e11x11P.second && e15x15P.second) {
1048  isoTk.eAnnular_ = (e15x15P.first - e11x11P.first);
1049  } else {
1050  isoTk.eAnnular_ = -(e15x15P.first - e11x11P.first);
1051  }
1052  isoTk.hmaxNearP_ = spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, false);
1053  const DetId cellH(trkDetItr->detIdHCAL);
1054  double h5x5 = spr::eHCALmatrix(
1055  theHBHETopology, cellH, hbhe, 2, 2, false, true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1056  double h7x7 = spr::eHCALmatrix(
1057  theHBHETopology, cellH, hbhe, 3, 3, false, true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1058  isoTk.hAnnular_ = h7x7 - h5x5;
1059 #ifdef EDM_ML_DEBUG
1060  if (debug_)
1061  edm::LogVerbatim("HcalIsoTrack") << "max p Near (Ecal) " << isoTk.emaxNearP_ << " (Hcal) " << isoTk.hmaxNearP_
1062  << " Annular E (Ecal) " << e11x11P.first << ":" << e15x15P.first << ":"
1063  << isoTk.eAnnular_ << " (Hcal) " << h5x5 << ":" << h7x7 << ":"
1064  << isoTk.hAnnular_;
1065  if (isoTk.eMipDR_[0] < eEcalMax_)
1066  flag += 16;
1067  if (isoTk.hmaxNearP_ < eIsolation)
1068  flag += 32;
1069 #endif
1070  isoTk.gentrackP_ = trackP(pTrack, genParticles);
1071  if (isoTk.eMipDR_[0] < eEcalMax_ && isoTk.hmaxNearP_ < eIsolation) {
1072  int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
1073  std::vector<DetId> ids, ids1, ids3;
1074  std::vector<double> edet0, edet1, edet3;
1075  isoTk.eHcal_ = spr::eCone_hcal(geo,
1076  hbhe,
1077  trkDetItr->pointHCAL,
1078  trkDetItr->pointECAL,
1079  a_coneR_,
1080  trkDetItr->directionHCAL,
1081  nRecHits,
1082  ids,
1083  edet0,
1084  0);
1085  if (!oldID_.empty()) {
1086  for (unsigned k = 0; k < ids.size(); ++k)
1087  ids[k] = newId(ids[k]);
1088  }
1089  storeEnergy(respCorrs, ids, edet0, isoTk.eHcal_, isoTk.detIds_, isoTk.hitEnergies_);
1090  std::pair<double, double> ehcal0 =
1091  storeEnergy(respCorrs, hbhe, ids, isoTk.hitEnergiesRaw_, isoTk.hitEnergiesAux_);
1092  isoTk.eHcalRaw_ = ehcal0.first;
1093  isoTk.eHcalAux_ = ehcal0.second;
1094 
1095  //----- hcal energy in the extended cone 1 (a_coneR+10) --------------
1096  isoTk.eHcal10_ = spr::eCone_hcal(geo,
1097  hbhe,
1098  trkDetItr->pointHCAL,
1099  trkDetItr->pointECAL,
1100  a_coneR1_,
1101  trkDetItr->directionHCAL,
1102  nRecHits1,
1103  ids1,
1104  edet1,
1105  0);
1106  if (!oldID_.empty()) {
1107  for (unsigned k = 0; k < ids1.size(); ++k)
1108  ids1[k] = newId(ids1[k]);
1109  }
1110  storeEnergy(respCorrs, ids1, edet1, isoTk.eHcal10_, isoTk.detIds1_, isoTk.hitEnergies1_);
1111  std::pair<double, double> ehcal1 =
1112  storeEnergy(respCorrs, hbhe, ids1, isoTk.hitEnergies1Raw_, isoTk.hitEnergies1Aux_);
1113  isoTk.eHcal10Raw_ = ehcal1.first;
1114  isoTk.eHcal10Aux_ = ehcal1.second;
1115 
1116  //----- hcal energy in the extended cone 3 (a_coneR+30) --------------
1117  isoTk.eHcal30_ = spr::eCone_hcal(geo,
1118  hbhe,
1119  trkDetItr->pointHCAL,
1120  trkDetItr->pointECAL,
1121  a_coneR2_,
1122  trkDetItr->directionHCAL,
1123  nRecHits3,
1124  ids3,
1125  edet3,
1126  0);
1127  if (!oldID_.empty()) {
1128  for (unsigned k = 0; k < ids3.size(); ++k)
1129  ids3[k] = newId(ids3[k]);
1130  }
1131  storeEnergy(respCorrs, ids3, edet3, isoTk.eHcal30_, isoTk.detIds3_, isoTk.hitEnergies3_);
1132  std::pair<double, double> ehcal3 =
1133  storeEnergy(respCorrs, hbhe, ids3, isoTk.hitEnergies3Raw_, isoTk.hitEnergies3Aux_);
1134  isoTk.eHcal30Raw_ = ehcal3.first;
1135  isoTk.eHcal30Aux_ = ehcal3.second;
1136 
1137  if (isoTk.p_ > pTrackMin_)
1138  accept = true;
1139 #ifdef EDM_ML_DEBUG
1140  if (accept)
1141  flag += 64;
1142  if (debug_) {
1143  std::string ctype = accept ? " ***** ACCEPT *****" : "";
1144  edm::LogVerbatim("HcalIsoTrack")
1145  << "This track : " << nTracks << " (pt|eta|phi|p) : " << isoTk.pt_ << "|" << pTrack->eta() << "|"
1146  << isoTk.phi_ << "|" << isoTk.p_ << " Generator Level p " << isoTk.gentrackP_;
1147  edm::LogVerbatim("HcalIsoTrack")
1148  << "e_MIP " << isoTk.eMipDR_[0] << " Chg Isolation " << isoTk.hmaxNearP_ << " eHcal" << isoTk.eHcal_
1149  << ":" << isoTk.eHcalRaw_ << ":" << isoTk.eHcalAux_ << " ieta " << isoTk.ieta_ << " Quality "
1150  << isoTk.qltyMissFlag_ << ":" << isoTk.qltyPVFlag_ << ":" << isoTk.selectTk_ << ctype;
1151  for (unsigned int ll = 0; ll < isoTk.detIds_.size(); ll++) {
1152  edm::LogVerbatim("HcalIsoTrack")
1153  << "det id is = " << HcalDetId(isoTk.detIds_[ll]) << " hit enery is = " << isoTk.hitEnergies_[ll]
1154  << " : " << isoTk.hitEnergiesRaw_[ll] << " : " << isoTk.hitEnergiesAux_[ll];
1155  }
1156  for (unsigned int ll = 0; ll < isoTk.detIds1_.size(); ll++) {
1157  edm::LogVerbatim("HcalIsoTrack")
1158  << "det id is = " << HcalDetId(isoTk.detIds1_[ll]) << " hit enery is = " << isoTk.hitEnergies1_[ll]
1159  << " : " << isoTk.hitEnergies1Raw_[ll] << " : " << isoTk.hitEnergies1Aux_[ll];
1160  }
1161  for (unsigned int ll = 0; ll < isoTk.detIds3_.size(); ll++) {
1162  edm::LogVerbatim("HcalIsoTrack")
1163  << "det id is = " << HcalDetId(isoTk.detIds3_[ll]) << " hit enery is = " << isoTk.hitEnergies3_[ll]
1164  << " : " << isoTk.hitEnergies3Raw_[ll] << " : " << isoTk.hitEnergies3Aux_[ll];
1165  }
1166  }
1167 #endif
1168  if (accept) {
1169  edm::LogVerbatim("HcalIsoTrackX")
1170  << "Run " << eventId.run() << " Event " << eventId.event() << " Track " << nTracks << " p " << isoTk.p_;
1171  hocalib.emplace_back(isoTk);
1172  nSave++;
1173  int type(0);
1174  if (isoTk.eMipDR_[0] < 1.0) {
1175  if (isoTk.hmaxNearP_ < eIsolate2_) {
1176  ++nLoose;
1177  type = 1;
1178  }
1179  if (isoTk.hmaxNearP_ < eIsolate1_) {
1180  ++nTight;
1181  type = 2;
1182  }
1183  }
1184  if (isoTk.p_ > 40.0 && isoTk.p_ <= 60.0 && isoTk.selectTk_) {
1185  hocalibEvent.ietaGood_.emplace_back(isoTk.ieta_);
1186  hocalibEvent.trackType_.emplace_back(type);
1187  }
1188 #ifdef EDM_ML_DEBUG
1189  for (unsigned int k = 0; k < isoTk.trgbits_.size(); k++) {
1190  edm::LogVerbatim("HcalIsoTrack") << "trigger bit is = " << isoTk.trgbits_[k];
1191  }
1192 #endif
1193  }
1194  }
1195  }
1196 #ifdef EDM_ML_DEBUG
1197  if (debug_) {
1198  if (isoTk.eMipDR_.empty())
1199  edm::LogVerbatim("HcalIsoTrack") << "Track " << nTracks << " Selection Flag " << std::hex << flag << std::dec
1200  << " Accept " << accept << " Momentum " << isoTk.p_ << ":" << pTrackMin_;
1201  else
1202  edm::LogVerbatim("HcalIsoTrack") << "Track " << nTracks << " Selection Flag " << std::hex << flag << std::dec
1203  << " Accept " << accept << " Momentum " << isoTk.p_ << ":" << pTrackMin_
1204  << " Ecal Energy " << isoTk.eMipDR_[0] << ":" << eEcalMax_
1205  << " Charge Isolation " << isoTk.hmaxNearP_ << ":" << eIsolation;
1206  }
1207 #endif
1208  }
1209  std::array<int, 3> i3{{nSave, nLoose, nTight}};
1210  return i3;
1211 }
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
std::vector< double > hitEnergies1Raw_
std::vector< double > hitEnergies3_
std::vector< unsigned int > detIds3_
std::vector< double > hitEnergies_
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
std::vector< unsigned int > detIds1_
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
std::vector< unsigned int > detIds_
void storeEnergy(const HcalRespCorrs *respCorrs, const std::vector< DetId > &ids, std::vector< double > &edet, double &eHcal, std::vector< unsigned int > &detIds, std::vector< double > &hitEnergies)
bool notaMuon(const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
std::vector< double > hitEnergiesRaw_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double pt() const
track transverse momentum
Definition: TrackBase.h:637
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
spr::trackSelectionParameters selectionParameter_
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 > hitEnergies1Aux_
double rhoh(const edm::Handle< CaloTowerCollection > &)
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
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)
std::vector< double > hitEnergies1_
double trackP(const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
std::vector< double > hitEnergies3Raw_
RunNumber_t run() const
Definition: EventID.h:38
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
Definition: DetId.h:17
std::vector< double > hitEnergies3Aux_
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
bool isValid() const
Definition: HandleBase.h:70
const std::vector< int > oldID_
std::vector< double > hitEnergiesAux_
double eThreshold(const DetId &id, const CaloGeometry *geo) const
EventNumber_t event() const
Definition: EventID.h:40
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)

◆ globalEndJob()

void AlCaHcalIsotrkProducer::globalEndJob ( const alCaHcalIsotrkProducer::Counters counters)
static

Definition at line 747 of file AlCaHcalIsotrkProducer.cc.

References submitPVResolutionJobs::count.

747  {
748  edm::LogVerbatim("HcalIsoTrack") << "Finds " << count->nGood_ << " good tracks in " << count->nAll_ << " events and "
749  << count->nRange_ << " events in the momentum range";
750 }
Log< level::Info, true > LogVerbatim

◆ initializeGlobalCache()

static std::unique_ptr<alCaHcalIsotrkProducer::Counters> AlCaHcalIsotrkProducer::initializeGlobalCache ( edm::ParameterSet const &  )
inlinestatic

Definition at line 98 of file AlCaHcalIsotrkProducer.cc.

98  {
99  return std::make_unique<alCaHcalIsotrkProducer::Counters>();
100  }

◆ newId()

DetId AlCaHcalIsotrkProducer::newId ( const DetId id)
private

Definition at line 1282 of file AlCaHcalIsotrkProducer.cc.

References HcalDetId::depth(), hep17_, l1ctLayer2EG_cff::id, HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), dqmdumpme::k, newDepth_, oldDepth_, oldDet_, oldEta_, oldID_, HcalDetId::subdet(), DetId::subdetId(), and HcalDetId::zside().

Referenced by getProducts().

1282  {
1283  HcalDetId hid(id);
1284  if (hep17_ && ((hid.iphi() < 63) || (hid.iphi() > 66) || (hid.zside() < 0)))
1285  return id;
1286  for (unsigned int k = 0; k < oldID_.size(); ++k) {
1287  if ((hid.subdetId() == oldDet_[k]) && (hid.ietaAbs() == oldEta_[k]) && (hid.depth() == oldDepth_[k])) {
1288  return static_cast<DetId>(HcalDetId(hid.subdet(), hid.ieta(), hid.iphi(), newDepth_[k]));
1289  }
1290  }
1291  return id;
1292 }
const std::vector< int > newDepth_
Definition: DetId.h:17
const std::vector< int > oldID_

◆ notaMuon()

bool AlCaHcalIsotrkProducer::notaMuon ( const reco::Track pTrack0,
const edm::Handle< reco::MuonCollection > &  muonh 
)
private

Definition at line 1432 of file AlCaHcalIsotrkProducer.cc.

References reco::deltaR(), dR(), reco::TrackBase::eta(), RemoveAddSevLevel::flag, reco::TrackBase::phi(), and muon::segmentCompatibility().

Referenced by getProducts().

1432  {
1433  bool flag(true);
1434  for (reco::MuonCollection::const_iterator recMuon = muonh->begin(); recMuon != muonh->end(); ++recMuon) {
1435  if (recMuon->innerTrack().isNonnull()) {
1436  const reco::Track* pTrack = (recMuon->innerTrack()).get();
1437  bool mediumMuon = (((recMuon->isPFMuon()) && (recMuon->isGlobalMuon() || recMuon->isTrackerMuon())) &&
1438  (recMuon->innerTrack()->validFraction() > 0.49));
1439  if (mediumMuon) {
1440  double chiGlobal = ((recMuon->globalTrack().isNonnull()) ? recMuon->globalTrack()->normalizedChi2() : 999);
1441  bool goodGlob = (recMuon->isGlobalMuon() && chiGlobal < 3 &&
1442  recMuon->combinedQuality().chi2LocalPosition < 12 && recMuon->combinedQuality().trkKink < 20);
1443  mediumMuon = muon::segmentCompatibility(*recMuon) > (goodGlob ? 0.303 : 0.451);
1444  }
1445  if (mediumMuon) {
1446  double dR = reco::deltaR(pTrack->eta(), pTrack->phi(), pTrack0->eta(), pTrack0->phi());
1447  if (dR < 0.1) {
1448  flag = false;
1449  break;
1450  }
1451  }
1452  }
1453  }
1454  return flag;
1455 }
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652

◆ produce()

void AlCaHcalIsotrkProducer::produce ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
override

Definition at line 460 of file AlCaHcalIsotrkProducer.cc.

References HcalIsoTrkEventVariables::allvertex_, Calorimetry_cff::bField, debEvents_, debug_, l1t::L1TGlobalUtil::decisionsFinal(), fileCollector::done, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), eThresholds_, spr::find(), genParticles2HepMC_cfi::genEventInfo, AJJGenJetFilter_cfi::genParticles, edm::EventSetup::getData(), getProducts(), photonIsolationHIProducer_cfi::hbhe, ValidationMatrix::hlt, HcalIsoTrkEventVariables::hltbits_, hltConfig_, mps_fire::i, trigger::TriggerObject::id(), iEvent, ignoreTrigger_, dqmdumpme::k, HcalIsoTrkEventVariables::l1Bit_, l1Filter_, l1GtUtils_, l1TrigName_, l2Filter_, l3Filter_, label, edm::InputTag::label(), labelEB_, labelEE_, labelGenTrack_, labelHBHE_, labelIsoTkEvtVar_, labelIsoTkVar_, trigger::TriggerObject::mass(), HLTConfigProvider::moduleLabels(), LogMessageMonitor_cff::modules, eostools::move(), nAll_, names, nGood_, nRange_, convertSQLiteXML::ok, trigger::TriggerObject::phi(), spr::propagateCALO(), trigger::TriggerObject::pt(), pTrackHigh_, pTrackLow_, trigger::TriggerObject::px(), trigger::TriggerObject::py(), trigger::TriggerObject::pz(), l1t::L1TGlobalUtil::retrieveL1(), theTrackQuality_, tok_alg_, tok_bFieldH_, tok_bs_, tok_cala_, tok_caloTopology_, tok_EB_, tok_ecalChStatus_, tok_ecalPFRecHitThresholds_, tok_EE_, tok_ew_, tok_genTrack_, tok_geom_, tok_hbhe_, tok_htopo_, tok_Muon_, tok_parts_, tok_recVtx_, tok_resp_, tok_sevlv_, tok_trigEvt_, tok_trigRes_, HcalIsoTrkEventVariables::tracks_, HcalIsoTrkEventVariables::tracksLoose_, HcalIsoTrkEventVariables::tracksProp_, HcalIsoTrkEventVariables::tracksSaved_, HcalIsoTrkEventVariables::tracksTight_, PDWG_DiPhoton_SD_cff::triggerEvent, triggerEvent_, HLTConfigProvider::triggerIndex(), L1TEGammaOffline_cfi::triggerNames, triggerResults, trigNames_, HcalIsoTrkEventVariables::trigPass_, HcalIsoTrkEventVariables::trigPassSel_, useL1Trigger_, x, y, and z.

460  {
461  nAll_++;
462  debug_ = (debEvents_.empty())
463  ? true
464  : (std::find(debEvents_.begin(), debEvents_.end(), iEvent.id().event()) != debEvents_.end());
465 #ifdef EDM_ML_DEBUG
466  if (debug_)
467  edm::LogVerbatim("HcalIsoTrack") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event()
468  << " Luminosity " << iEvent.luminosityBlock() << " Bunch "
469  << iEvent.bunchCrossing();
470 #endif
471 
472  HcalIsoTrkEventVariables isoTrkEvent;
473  //Step1: Get all the relevant containers
474  const MagneticField* bField = &iSetup.getData(tok_bFieldH_);
475  const EcalChannelStatus* theEcalChStatus = &iSetup.getData(tok_ecalChStatus_);
476  const EcalSeverityLevelAlgo* theEcalSevlv = &iSetup.getData(tok_sevlv_);
477  eThresholds_ = &iSetup.getData(tok_ecalPFRecHitThresholds_);
478 
479  // get calogeometry and calotopology
480  const CaloGeometry* geo = &iSetup.getData(tok_geom_);
481  const CaloTopology* caloTopology = &iSetup.getData(tok_caloTopology_);
482  const HcalTopology* theHBHETopology = &iSetup.getData(tok_htopo_);
483 
484  // get Hcal response corrections
485  const HcalRespCorrs* respCorrs = &iSetup.getData(tok_resp_);
486 
487  bool okC(true);
488  //Get track collection
489  auto trkCollection = iEvent.getHandle(tok_genTrack_);
490  if (!trkCollection.isValid()) {
491  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelGenTrack_;
492  okC = false;
493  }
494 
495  //Get muon collection
496  auto const& muonh = iEvent.getHandle(tok_Muon_);
497 
498  //Define the best vertex and the beamspot
499  auto const& recVtxs = iEvent.getHandle(tok_recVtx_);
500  auto const& beamSpotH = iEvent.getHandle(tok_bs_);
501  math::XYZPoint leadPV(0, 0, 0);
502  int goodPV(0);
503  if (recVtxs.isValid() && !(recVtxs->empty())) {
504  isoTrkEvent.allvertex_ = recVtxs->size();
505  for (unsigned int k = 0; k < recVtxs->size(); ++k) {
506  if (!((*recVtxs)[k].isFake()) && ((*recVtxs)[k].ndof() > 4)) {
507  if (goodPV == 0)
508  leadPV = math::XYZPoint((*recVtxs)[k].x(), (*recVtxs)[k].y(), (*recVtxs)[k].z());
509  goodPV++;
510  }
511  }
512  }
513  if (goodPV == 0 && beamSpotH.isValid()) {
514  leadPV = beamSpotH->position();
515  }
516 #ifdef EDM_ML_DEBUG
517  if (debug_) {
518  edm::LogVerbatim("HcalIsoTrack") << "Primary Vertex " << leadPV << " out of " << goodPV << " vertex";
519  if (beamSpotH.isValid())
520  edm::LogVerbatim("HcalIsoTrack") << " Beam Spot " << beamSpotH->position();
521  }
522 #endif
523 
524  // RecHits
525  auto barrelRecHitsHandle = iEvent.getHandle(tok_EB_);
526  if (!barrelRecHitsHandle.isValid()) {
527  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEB_;
528  okC = false;
529  }
530  auto endcapRecHitsHandle = iEvent.getHandle(tok_EE_);
531  if (!endcapRecHitsHandle.isValid()) {
532  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEE_;
533  okC = false;
534  }
535  auto hbhe = iEvent.getHandle(tok_hbhe_);
536  if (!hbhe.isValid()) {
537  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelHBHE_;
538  okC = false;
539  }
540  auto caloTower = iEvent.getHandle(tok_cala_);
541 
542  //=== genParticle information
543  auto const& genParticles = iEvent.getHandle(tok_parts_);
544  auto const& genEventInfo = iEvent.getHandle(tok_ew_);
545  double eventWeight = (genEventInfo.isValid()) ? genEventInfo->weight() : 1.0;
546 
547  //Propagate tracks to calorimeter surface)
548  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
549  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, false);
550  std::vector<spr::propagatedTrackID> trkCaloDets;
551  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDets, false);
552  std::vector<math::XYZTLorentzVector> vecL1, vecL3;
553  isoTrkEvent.tracks_ = trkCollection->size();
554  isoTrkEvent.tracksProp_ = trkCaloDirections.size();
555  isoTrkEvent.hltbits_.assign(trigNames_.size(), false);
556 
557  if (!ignoreTrigger_) {
558  //L1
560  const std::vector<std::pair<std::string, bool>>& finalDecisions = l1GtUtils_->decisionsFinal();
561  for (const auto& decision : finalDecisions) {
562  if (decision.first.find(l1TrigName_) != std::string::npos) {
563  isoTrkEvent.l1Bit_ = decision.second;
564  break;
565  }
566  }
567 #ifdef EDM_ML_DEBUG
568  if (debug_)
569  edm::LogVerbatim("HcalIsoTrack") << "Trigger Information for " << l1TrigName_ << " is " << isoTrkEvent.l1Bit_
570  << " from a list of " << finalDecisions.size() << " decisions";
571 #endif
572 
573  //HLT
574  auto const& triggerResults = iEvent.getHandle(tok_trigRes_);
575  if (triggerResults.isValid()) {
576  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
577  const std::vector<std::string>& names = triggerNames.triggerNames();
578  if (!trigNames_.empty()) {
579  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
580  int hlt = triggerResults->accept(iHLT);
581  for (unsigned int i = 0; i < trigNames_.size(); ++i) {
582  if (names[iHLT].find(trigNames_[i]) != std::string::npos) {
583  isoTrkEvent.hltbits_[i] = (hlt > 0);
584  if (hlt > 0)
585  isoTrkEvent.trigPass_ = true;
586 #ifdef EDM_ML_DEBUG
587  if (debug_)
588  edm::LogVerbatim("HcalIsoTrack")
589  << "This trigger " << names[iHLT] << " Flag " << hlt << ":" << isoTrkEvent.hltbits_[i];
590 #endif
591  }
592  }
593  }
594  }
595  }
596 #ifdef EDM_ML_DEBUG
597  if (debug_)
598  edm::LogVerbatim("HcalIsoTrack") << "HLT Information shows " << isoTrkEvent.trigPass_ << ":" << trigNames_.empty()
599  << ":" << okC;
600 #endif
601  }
602 
603  auto outputHcalIsoTrackColl = std::make_unique<HcalIsoTrkCalibVariablesCollection>();
604  std::array<int, 3> ntksave{{0, 0, 0}};
605  if (ignoreTrigger_ || useL1Trigger_) {
606  if (ignoreTrigger_ || isoTrkEvent.l1Bit_)
607  ntksave = getProducts(goodPV,
608  eventWeight,
609  vecL1,
610  vecL3,
611  leadPV,
612  trkCaloDirections,
613  trkCaloDets,
614  geo,
615  caloTopology,
616  theHBHETopology,
617  theEcalChStatus,
618  theEcalSevlv,
619  barrelRecHitsHandle,
620  endcapRecHitsHandle,
621  hbhe,
622  caloTower,
623  genParticles,
624  respCorrs,
625  muonh,
626  *outputHcalIsoTrackColl,
627  isoTrkEvent,
628  iEvent.id());
629  isoTrkEvent.tracksSaved_ = ntksave[0];
630  isoTrkEvent.tracksLoose_ = ntksave[1];
631  isoTrkEvent.tracksTight_ = ntksave[2];
632  } else {
634  auto const& triggerEventHandle = iEvent.getHandle(tok_trigEvt_);
635  if (!triggerEventHandle.isValid()) {
636  edm::LogWarning("HcalIsoTrack") << "Error! Can't get the product " << triggerEvent_.label();
637  } else if (okC) {
638  triggerEvent = *(triggerEventHandle.product());
639  const trigger::TriggerObjectCollection& TOC(triggerEvent.getObjects());
640  bool done(false);
641  auto const& triggerResults = iEvent.getHandle(tok_trigRes_);
642  if (triggerResults.isValid()) {
643  std::vector<std::string> modules;
644  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
645  const std::vector<std::string>& names = triggerNames.triggerNames();
646  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
647  bool ok = (isoTrkEvent.trigPass_) || (trigNames_.empty());
648  if (ok) {
649  unsigned int triggerindx = hltConfig_.triggerIndex(names[iHLT]);
650  const std::vector<std::string>& moduleLabels(hltConfig_.moduleLabels(triggerindx));
651  std::vector<math::XYZTLorentzVector> vecL2;
652  vecL1.clear();
653  vecL3.clear();
654  //loop over all trigger filters in event (i.e. filters passed)
655  for (unsigned int ifilter = 0; ifilter < triggerEvent.sizeFilters(); ++ifilter) {
656  std::vector<int> Keys;
657  auto const label = triggerEvent.filterLabel(ifilter);
658  //loop over keys to objects passing this filter
659  for (unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
660  if (label.find(moduleLabels[imodule]) != label.npos) {
661 #ifdef EDM_ML_DEBUG
662  if (debug_)
663  edm::LogVerbatim("HcalIsoTrack") << "FilterName " << label;
664 #endif
665  for (unsigned int ifiltrKey = 0; ifiltrKey < triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
666  Keys.push_back(triggerEvent.filterKeys(ifilter)[ifiltrKey]);
667  const trigger::TriggerObject& TO(TOC[Keys[ifiltrKey]]);
668  math::XYZTLorentzVector v4(TO.px(), TO.py(), TO.pz(), TO.energy());
669  if (label.find(l2Filter_) != std::string::npos) {
670  vecL2.push_back(v4);
671  } else if (label.find(l3Filter_) != std::string::npos) {
672  vecL3.push_back(v4);
673  } else if ((label.find(l1Filter_) != std::string::npos) || (l1Filter_.empty())) {
674  vecL1.push_back(v4);
675  }
676 #ifdef EDM_ML_DEBUG
677  if (debug_)
678  edm::LogVerbatim("HcalIsoTrack")
679  << "key " << ifiltrKey << " : pt " << TO.pt() << " eta " << TO.eta() << " phi " << TO.phi()
680  << " mass " << TO.mass() << " Id " << TO.id();
681 #endif
682  }
683 #ifdef EDM_ML_DEBUG
684  if (debug_)
685  edm::LogVerbatim("HcalIsoTrack")
686  << "sizes " << vecL1.size() << ":" << vecL2.size() << ":" << vecL3.size();
687 #endif
688  }
689  }
690  }
691 
692  // Now Make the products for all selected tracks
693  if (!done) {
694  ntksave = getProducts(goodPV,
695  eventWeight,
696  vecL1,
697  vecL3,
698  leadPV,
699  trkCaloDirections,
700  trkCaloDets,
701  geo,
702  caloTopology,
703  theHBHETopology,
704  theEcalChStatus,
705  theEcalSevlv,
706  barrelRecHitsHandle,
707  endcapRecHitsHandle,
708  hbhe,
709  caloTower,
710  genParticles,
711  respCorrs,
712  muonh,
713  *outputHcalIsoTrackColl,
714  isoTrkEvent,
715  iEvent.id());
716  isoTrkEvent.tracksSaved_ += ntksave[0];
717  isoTrkEvent.tracksLoose_ += ntksave[1];
718  isoTrkEvent.tracksTight_ += ntksave[2];
719  done = true;
720  }
721  }
722  }
723  }
724  }
725  }
726  isoTrkEvent.trigPassSel_ = (isoTrkEvent.tracksSaved_ > 0);
727  if (isoTrkEvent.trigPassSel_) {
728  ++nGood_;
729  for (auto itr = outputHcalIsoTrackColl->begin(); itr != outputHcalIsoTrackColl->end(); ++itr) {
730  if (itr->p_ > pTrackLow_ && itr->p_ < pTrackHigh_)
731  ++nRange_;
732  }
733  }
734 
735  auto outputEventcol = std::make_unique<HcalIsoTrkEventVariablesCollection>();
736  outputEventcol->emplace_back(isoTrkEvent);
737  iEvent.put(std::move(outputEventcol), labelIsoTkEvtVar_);
738  iEvent.put(std::move(outputHcalIsoTrackColl), labelIsoTkVar_);
739 }
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:26
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
const std::string labelIsoTkEvtVar_
std::string const & label() const
Definition: InputTag.h:36
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
const std::string names[nVars_]
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
char const * label
edm::EDGetTokenT< CaloTowerCollection > tok_cala_
int iEvent
Definition: GenABIO.cc:224
const std::vector< int > debEvents_
const edm::InputTag triggerEvent_
l1t::L1TGlobalUtil * l1GtUtils_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
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
Definition: EdmProvDump.cc:47
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< size_type > Keys
const EcalPFRecHitThresholds * eThresholds_
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
const std::vector< std::pair< std::string, bool > > & decisionsFinal()
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
Log< level::Warning, false > LogWarning
const std::string theTrackQuality_
std::array< int, 3 > getProducts(int goodPV, double eventWeight, 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, const edm::Handle< reco::GenParticleCollection > &genParticles, const HcalRespCorrs *respCorrs, const edm::Handle< reco::MuonCollection > &muonh, std::vector< HcalIsoTrkCalibVariables > &hocalib, HcalIsoTrkEventVariables &hocalibEvent, const edm::EventID &eventId)
const std::vector< std::string > trigNames_
def move(src, dest)
Definition: eostools.py:511
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > tok_ecalPFRecHitThresholds_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_

◆ rhoh()

double AlCaHcalIsotrkProducer::rhoh ( const edm::Handle< CaloTowerCollection > &  tower)
private

Definition at line 1233 of file AlCaHcalIsotrkProducer.cc.

References debug_, reco::deltaPhi(), PVValHelper::eta, etabins_, etadist_, etahalfdist_, phi, phibins_, phidist_, phihalfdist_, jetUpdater_cfi::sort, and l1tHGCalTowerProducer_cfi::tower.

Referenced by getProducts().

1233  {
1234  std::vector<double> sumPFNallSMDQH2;
1235  sumPFNallSMDQH2.reserve(phibins_.size() * etabins_.size());
1236  for (auto eta : etabins_) {
1237  for (auto phi : phibins_) {
1238  double hadder = 0;
1239  for (const auto& pf_it : (*tower)) {
1240  if (fabs(eta - pf_it.eta()) > etahalfdist_)
1241  continue;
1242  if (fabs(reco::deltaPhi(phi, pf_it.phi())) > phihalfdist_)
1243  continue;
1244  hadder += pf_it.hadEt();
1245  }
1246  sumPFNallSMDQH2.emplace_back(hadder);
1247  }
1248  }
1249 
1250  double evt_smdq(0);
1251  std::sort(sumPFNallSMDQH2.begin(), sumPFNallSMDQH2.end());
1252  if (sumPFNallSMDQH2.size() % 2)
1253  evt_smdq = sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 1) / 2];
1254  else
1255  evt_smdq = (sumPFNallSMDQH2[sumPFNallSMDQH2.size() / 2] + sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 2) / 2]) / 2.;
1256  double rhoh = evt_smdq / (etadist_ * phidist_);
1257 #ifdef EDM_ML_DEBUG
1258  if (debug_)
1259  edm::LogVerbatim("HcalIsoTrack") << "Rho " << evt_smdq << ":" << rhoh;
1260 #endif
1261  return rhoh;
1262 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
Log< level::Info, true > LogVerbatim
std::vector< double > phibins_
double rhoh(const edm::Handle< CaloTowerCollection > &)
std::vector< double > etabins_

◆ storeEnergy() [1/2]

void AlCaHcalIsotrkProducer::storeEnergy ( const HcalRespCorrs respCorrs,
const std::vector< DetId > &  ids,
std::vector< double > &  edet,
double &  eHcal,
std::vector< unsigned int > &  detIds,
std::vector< double > &  hitEnergies 
)
private

Definition at line 1294 of file AlCaHcalIsotrkProducer.cc.

References funct::abs(), collapseDepth_, alignCSCRings::corr, debug_, reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), hcalScale_, hdc_, l1ctLayer2EG_cff::id, dqmdumpme::k, HcalDDDRecConstants::mergedDepthDetId(), nano_mu_digi_cff::rawId, and unCorrect_.

Referenced by getProducts().

1299  {
1300  double ehcal(0);
1301  if (unCorrect_) {
1302  for (unsigned int k = 0; k < ids.size(); ++k) {
1303  double corr = (respCorrs->getValues(ids[k]))->getValue();
1304  if (corr != 0)
1305  edet[k] /= corr;
1306  ehcal += edet[k];
1307  }
1308  } else {
1309  for (const auto& en : edet)
1310  ehcal += en;
1311  }
1312  if ((std::abs(ehcal - eHcal) > 0.001) && (!unCorrect_))
1313  edm::LogWarning("HcalIsoTrack") << "Check inconsistent energies: " << eHcal << ":" << ehcal << " from "
1314  << ids.size() << " cells";
1315  eHcal = hcalScale_ * ehcal;
1316 
1317  if (collapseDepth_) {
1318  std::map<HcalDetId, double> hitMap;
1319  for (unsigned int k = 0; k < ids.size(); ++k) {
1320  HcalDetId id = hdc_->mergedDepthDetId(HcalDetId(ids[k]));
1321  auto itr = hitMap.find(id);
1322  if (itr == hitMap.end()) {
1323  hitMap[id] = edet[k];
1324  } else {
1325  (itr->second) += edet[k];
1326  }
1327  }
1328  detIds.reserve(hitMap.size());
1329  hitEnergies.reserve(hitMap.size());
1330  for (const auto& hit : hitMap) {
1331  detIds.emplace_back(hit.first.rawId());
1332  hitEnergies.emplace_back(hit.second);
1333  }
1334  } else {
1335  detIds.reserve(ids.size());
1336  hitEnergies.reserve(ids.size());
1337  for (unsigned int k = 0; k < ids.size(); ++k) {
1338  detIds.emplace_back(ids[k].rawId());
1339  hitEnergies.emplace_back(edet[k]);
1340  }
1341  }
1342 #ifdef EDM_ML_DEBUG
1343  if (debug_) {
1344  edm::LogVerbatim("HcalIsoTrack") << "StoreEnergy1::Input to storeEnergy with " << ids.size() << " cells";
1345  for (unsigned int k = 0; k < ids.size(); ++k)
1346  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << HcalDetId(ids[k]) << " E " << edet[k];
1347  edm::LogVerbatim("HcalIsoTrack") << "StoreEnergy1::Output of storeEnergy with " << detIds.size()
1348  << " cells and Etot " << eHcal;
1349  for (unsigned int k = 0; k < detIds.size(); ++k)
1350  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << HcalDetId(detIds[k]) << " E " << hitEnergies[k];
1351  }
1352 #endif
1353 }
Log< level::Info, true > LogVerbatim
HcalDetId mergedDepthDetId(const HcalDetId &id) const
const Item * getValues(DetId fId, bool throwOnFail=true) const
const HcalDDDRecConstants * hdc_
dictionary corr
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Log< level::Warning, false > LogWarning

◆ storeEnergy() [2/2]

std::pair< double, double > AlCaHcalIsotrkProducer::storeEnergy ( const HcalRespCorrs respCorrs,
edm::Handle< HBHERecHitCollection > &  hbhe,
const std::vector< DetId > &  ids,
std::vector< double > &  hitEnergy1,
std::vector< double > &  hitEnergy2 
)
private

Definition at line 1355 of file AlCaHcalIsotrkProducer.cc.

References collapseDepth_, alignCSCRings::corr, debug_, MillePedeFileConverter_cfg::e, StorageManager_cfg::e1, dqmdumpme::first, reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), photonIsolationHIProducer_cfi::hbhe, hcalScale_, hdc_, l1ctLayer2EG_cff::id, dqmdumpme::k, HcalDDDRecConstants::mergedDepthDetId(), edm::second(), and unCorrect_.

1359  {
1360  double ehcal1(0), ehcal2(0);
1361  std::vector<double> edet1, edet2;
1362  for (unsigned int k = 0; k < ids.size(); ++k) {
1363  double e1(0), e2(0);
1364  for (auto itr = hbhe->begin(); itr != hbhe->end(); ++itr) {
1365  if (itr->id() == ids[k]) {
1366  e1 = itr->eraw();
1367  e2 = itr->eaux();
1368  break;
1369  }
1370  }
1371  if (e1 < 1.e-10)
1372  e1 = 0;
1373  if (e2 < 1.e-10)
1374  e2 = 0;
1375  edet1.emplace_back(e1);
1376  edet2.emplace_back(e2);
1377  }
1378  if (unCorrect_) {
1379  for (unsigned int k = 0; k < ids.size(); ++k) {
1380  double corr = (respCorrs->getValues(ids[k]))->getValue();
1381  if (corr != 0) {
1382  edet1[k] /= corr;
1383  edet2[k] /= corr;
1384  }
1385  }
1386  }
1387  for (unsigned int k = 0; k < ids.size(); ++k) {
1388  ehcal1 += edet1[k];
1389  ehcal2 += edet2[k];
1390  }
1391  ehcal1 *= hcalScale_;
1392  ehcal2 *= hcalScale_;
1393 
1394  if (collapseDepth_) {
1395  std::map<HcalDetId, std::pair<double, double>> hitMap;
1396  for (unsigned int k = 0; k < ids.size(); ++k) {
1397  HcalDetId id = hdc_->mergedDepthDetId(HcalDetId(ids[k]));
1398  auto itr = hitMap.find(id);
1399  if (itr == hitMap.end()) {
1400  hitMap[id] = std::make_pair(edet1[k], edet2[k]);
1401  } else {
1402  (itr->second).first += edet1[k];
1403  (itr->second).second += edet2[k];
1404  }
1405  }
1406  hitEnergy1.reserve(hitMap.size());
1407  hitEnergy2.reserve(hitMap.size());
1408  for (const auto& hit : hitMap) {
1409  hitEnergy1.emplace_back(hit.second.first);
1410  hitEnergy2.emplace_back(hit.second.second);
1411  }
1412  } else {
1413  hitEnergy1.reserve(ids.size());
1414  hitEnergy2.reserve(ids.size());
1415  for (unsigned int k = 0; k < ids.size(); ++k) {
1416  hitEnergy1.emplace_back(edet1[k]);
1417  hitEnergy2.emplace_back(edet2[k]);
1418  }
1419  }
1420 #ifdef EDM_ML_DEBUG
1421  if (debug_) {
1422  edm::LogVerbatim("HcalIsoTrack") << "StoreEnergy2::Input to storeEnergy with " << ids.size() << " cells";
1423  edm::LogVerbatim("HcalIsoTrack") << "StoreEnergy2::Output of storeEnergy with " << hitEnergy1.size()
1424  << " cells and Etot " << ehcal1 << ":" << ehcal2;
1425  for (unsigned int k = 0; k < hitEnergy1.size(); ++k)
1426  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << hitEnergy1[k] << " : " << hitEnergy2[k];
1427  }
1428 #endif
1429  return std::make_pair(ehcal1, ehcal2);
1430 }
Log< level::Info, true > LogVerbatim
HcalDetId mergedDepthDetId(const HcalDetId &id) const
const Item * getValues(DetId fId, bool throwOnFail=true) const
U second(std::pair< T, U > const &p)
const HcalDDDRecConstants * hdc_
dictionary corr
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found

◆ trackP()

double AlCaHcalIsotrkProducer::trackP ( const reco::Track pTrack,
const edm::Handle< reco::GenParticleCollection > &  genParticles 
)
private

Definition at line 1217 of file AlCaHcalIsotrkProducer.cc.

References reco::deltaR(), dR(), reco::TrackBase::eta(), AJJGenJetFilter_cfi::genParticles, AlCaHLTBitMon_ParallelJobs::p, and reco::TrackBase::phi().

Referenced by getProducts().

1218  {
1219  double pmom = -1.0;
1220  if (genParticles.isValid()) {
1221  double mindR(999.9);
1222  for (const auto& p : (*genParticles)) {
1223  double dR = reco::deltaR(pTrack->eta(), pTrack->phi(), p.momentum().Eta(), p.momentum().Phi());
1224  if (dR < mindR) {
1225  mindR = dR;
1226  pmom = p.momentum().R();
1227  }
1228  }
1229  }
1230  return pmom;
1231 }
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652

Member Data Documentation

◆ a_charIsoR_

double AlCaHcalIsotrkProducer::a_charIsoR_
private

Definition at line 178 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_coneR1_

double AlCaHcalIsotrkProducer::a_coneR1_
private

Definition at line 178 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_coneR2_

double AlCaHcalIsotrkProducer::a_coneR2_
private

Definition at line 178 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_coneR_

const double AlCaHcalIsotrkProducer::a_coneR_
private

Definition at line 159 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_mipR2_

const double AlCaHcalIsotrkProducer::a_mipR2_
private

Definition at line 159 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_mipR3_

const double AlCaHcalIsotrkProducer::a_mipR3_
private

Definition at line 159 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_mipR4_

const double AlCaHcalIsotrkProducer::a_mipR4_
private

Definition at line 160 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_mipR5_

const double AlCaHcalIsotrkProducer::a_mipR5_
private

Definition at line 160 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ a_mipR_

const double AlCaHcalIsotrkProducer::a_mipR_
private

Definition at line 159 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ collapseDepth_

const bool AlCaHcalIsotrkProducer::collapseDepth_
private

Definition at line 165 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and storeEnergy().

◆ debEvents_

const std::vector<int> AlCaHcalIsotrkProducer::debEvents_
private

Definition at line 175 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ debug_

bool AlCaHcalIsotrkProducer::debug_
private

Definition at line 210 of file AlCaHcalIsotrkProducer.cc.

Referenced by getProducts(), produce(), rhoh(), and storeEnergy().

◆ eEcalMax_

const double AlCaHcalIsotrkProducer::eEcalMax_
private

Definition at line 160 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ eIsolate1_

const double AlCaHcalIsotrkProducer::eIsolate1_
private

Definition at line 162 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ eIsolate2_

const double AlCaHcalIsotrkProducer::eIsolate2_
private

Definition at line 162 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ etabins_

std::vector<double> AlCaHcalIsotrkProducer::etabins_
private

Definition at line 182 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and rhoh().

◆ etadist_

double AlCaHcalIsotrkProducer::etadist_
private

Definition at line 184 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and rhoh().

◆ etahalfdist_

double AlCaHcalIsotrkProducer::etahalfdist_
private

Definition at line 184 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and rhoh().

◆ eThresholds_

const EcalPFRecHitThresholds* AlCaHcalIsotrkProducer::eThresholds_
private

Definition at line 180 of file AlCaHcalIsotrkProducer.cc.

Referenced by produce().

◆ hcalScale_

const double AlCaHcalIsotrkProducer::hcalScale_
private

Definition at line 162 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and storeEnergy().

◆ hdc_

const HcalDDDRecConstants* AlCaHcalIsotrkProducer::hdc_
private

Definition at line 179 of file AlCaHcalIsotrkProducer.cc.

Referenced by beginRun(), and storeEnergy().

◆ hep17_

const bool AlCaHcalIsotrkProducer::hep17_
private

Definition at line 173 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and newId().

◆ hitEthrEB_

const double AlCaHcalIsotrkProducer::hitEthrEB_
private

Definition at line 166 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hitEthrEE0_

const double AlCaHcalIsotrkProducer::hitEthrEE0_
private

Definition at line 166 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hitEthrEE1_

const double AlCaHcalIsotrkProducer::hitEthrEE1_
private

Definition at line 166 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hitEthrEE2_

const double AlCaHcalIsotrkProducer::hitEthrEE2_
private

Definition at line 167 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hitEthrEE3_

const double AlCaHcalIsotrkProducer::hitEthrEE3_
private

Definition at line 167 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hitEthrEEHi_

const double AlCaHcalIsotrkProducer::hitEthrEEHi_
private

Definition at line 168 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hitEthrEELo_

const double AlCaHcalIsotrkProducer::hitEthrEELo_
private

Definition at line 168 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().

◆ hltConfig_

HLTConfigProvider AlCaHcalIsotrkProducer::hltConfig_
private

Definition at line 152 of file AlCaHcalIsotrkProducer.cc.

Referenced by beginRun(), and produce().

◆ ignoreTrigger_

const bool AlCaHcalIsotrkProducer::ignoreTrigger_
private

Definition at line 164 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), beginRun(), and produce().

◆ l1Filter_

const std::string AlCaHcalIsotrkProducer::l1Filter_
private

Definition at line 157 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ l1GtUtils_

l1t::L1TGlobalUtil* AlCaHcalIsotrkProducer::l1GtUtils_
private

Definition at line 151 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ l1TrigName_

const std::string AlCaHcalIsotrkProducer::l1TrigName_
private

Definition at line 171 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ l2Filter_

const std::string AlCaHcalIsotrkProducer::l2Filter_
private

Definition at line 158 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ l3Filter_

const std::string AlCaHcalIsotrkProducer::l3Filter_
private

Definition at line 158 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelEB_

const std::string AlCaHcalIsotrkProducer::labelEB_
private

Definition at line 170 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelEE_

const std::string AlCaHcalIsotrkProducer::labelEE_
private

Definition at line 171 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelGenTrack_

const std::string AlCaHcalIsotrkProducer::labelGenTrack_
private

Definition at line 170 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelHBHE_

const std::string AlCaHcalIsotrkProducer::labelHBHE_
private

Definition at line 171 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelIsoTkEvtVar_

const std::string AlCaHcalIsotrkProducer::labelIsoTkEvtVar_
private

Definition at line 174 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelIsoTkVar_

const std::string AlCaHcalIsotrkProducer::labelIsoTkVar_
private

Definition at line 174 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ labelRecVtx_

const std::string AlCaHcalIsotrkProducer::labelRecVtx_
private

Definition at line 170 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer().

◆ labelTower_

const std::string AlCaHcalIsotrkProducer::labelTower_
private

Definition at line 171 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer().

◆ maxRestrictionP_

const double AlCaHcalIsotrkProducer::maxRestrictionP_
private

Definition at line 161 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ nAll_

unsigned int AlCaHcalIsotrkProducer::nAll_
private

Definition at line 153 of file AlCaHcalIsotrkProducer.cc.

Referenced by endStream(), and produce().

◆ newDepth_

const std::vector<int> AlCaHcalIsotrkProducer::newDepth_
private

Definition at line 172 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and newId().

◆ nGood_

unsigned int AlCaHcalIsotrkProducer::nGood_
private

Definition at line 153 of file AlCaHcalIsotrkProducer.cc.

Referenced by endStream(), and produce().

◆ nRange_

unsigned int AlCaHcalIsotrkProducer::nRange_
private

Definition at line 153 of file AlCaHcalIsotrkProducer.cc.

Referenced by endStream(), and produce().

◆ nRun_

unsigned int AlCaHcalIsotrkProducer::nRun_
private

Definition at line 153 of file AlCaHcalIsotrkProducer.cc.

Referenced by beginRun(), and endRun().

◆ oldDepth_

std::vector<int> AlCaHcalIsotrkProducer::oldDepth_
private

Definition at line 183 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and newId().

◆ oldDet_

std::vector<int> AlCaHcalIsotrkProducer::oldDet_
private

Definition at line 183 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and newId().

◆ oldEta_

std::vector<int> AlCaHcalIsotrkProducer::oldEta_
private

Definition at line 183 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and newId().

◆ oldID_

const std::vector<int> AlCaHcalIsotrkProducer::oldID_
private

Definition at line 172 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), getProducts(), and newId().

◆ phibins_

std::vector<double> AlCaHcalIsotrkProducer::phibins_
private

Definition at line 182 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and rhoh().

◆ phidist_

double AlCaHcalIsotrkProducer::phidist_
private

Definition at line 184 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and rhoh().

◆ phihalfdist_

double AlCaHcalIsotrkProducer::phihalfdist_
private

Definition at line 184 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and rhoh().

◆ processName_

const std::string AlCaHcalIsotrkProducer::processName_
private

Definition at line 157 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and beginRun().

◆ pTrackHigh_

const double AlCaHcalIsotrkProducer::pTrackHigh_
private

Definition at line 163 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ pTrackLow_

const double AlCaHcalIsotrkProducer::pTrackLow_
private

Definition at line 163 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ pTrackMin_

const double AlCaHcalIsotrkProducer::pTrackMin_
private

Definition at line 160 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ selectionParameter_

spr::trackSelectionParameters AlCaHcalIsotrkProducer::selectionParameter_
private

Definition at line 155 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ slopeRestrictionP_

const double AlCaHcalIsotrkProducer::slopeRestrictionP_
private

Definition at line 161 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and getProducts().

◆ theTrackQuality_

const std::string AlCaHcalIsotrkProducer::theTrackQuality_
private

Definition at line 156 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ theTriggerResultsLabel_

const edm::InputTag AlCaHcalIsotrkProducer::theTriggerResultsLabel_
private

Definition at line 169 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer().

◆ tok_alg_

edm::EDGetTokenT<BXVector<GlobalAlgBlk> > AlCaHcalIsotrkProducer::tok_alg_
private

Definition at line 197 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_bFieldH_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> AlCaHcalIsotrkProducer::tok_bFieldH_
private

Definition at line 201 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_bs_

edm::EDGetTokenT<reco::BeamSpot> AlCaHcalIsotrkProducer::tok_bs_
private

Definition at line 191 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_cala_

edm::EDGetTokenT<CaloTowerCollection> AlCaHcalIsotrkProducer::tok_cala_
private

Definition at line 195 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_caloTopology_

edm::ESGetToken<CaloTopology, CaloTopologyRecord> AlCaHcalIsotrkProducer::tok_caloTopology_
private

Definition at line 205 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_ddrec_

edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> AlCaHcalIsotrkProducer::tok_ddrec_
private

Definition at line 200 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and beginRun().

◆ tok_EB_

edm::EDGetTokenT<EcalRecHitCollection> AlCaHcalIsotrkProducer::tok_EB_
private

Definition at line 192 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_ecalChStatus_

edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> AlCaHcalIsotrkProducer::tok_ecalChStatus_
private

Definition at line 202 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_ecalPFRecHitThresholds_

edm::ESGetToken<EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd> AlCaHcalIsotrkProducer::tok_ecalPFRecHitThresholds_
private

Definition at line 208 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_EE_

edm::EDGetTokenT<EcalRecHitCollection> AlCaHcalIsotrkProducer::tok_EE_
private

Definition at line 193 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_ew_

edm::EDGetTokenT<GenEventInfoProduct> AlCaHcalIsotrkProducer::tok_ew_
private

Definition at line 196 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_genTrack_

edm::EDGetTokenT<reco::TrackCollection> AlCaHcalIsotrkProducer::tok_genTrack_
private

Definition at line 189 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_geom_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> AlCaHcalIsotrkProducer::tok_geom_
private

Definition at line 204 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_hbhe_

edm::EDGetTokenT<HBHERecHitCollection> AlCaHcalIsotrkProducer::tok_hbhe_
private

Definition at line 194 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_htopo_

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> AlCaHcalIsotrkProducer::tok_htopo_
private

Definition at line 206 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_Muon_

edm::EDGetTokenT<reco::MuonCollection> AlCaHcalIsotrkProducer::tok_Muon_
private

Definition at line 198 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_parts_

edm::EDGetTokenT<reco::GenParticleCollection> AlCaHcalIsotrkProducer::tok_parts_
private

Definition at line 188 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_recVtx_

edm::EDGetTokenT<reco::VertexCollection> AlCaHcalIsotrkProducer::tok_recVtx_
private

Definition at line 190 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_resp_

edm::ESGetToken<HcalRespCorrs, HcalRespCorrsRcd> AlCaHcalIsotrkProducer::tok_resp_
private

Definition at line 207 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_sevlv_

edm::ESGetToken<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd> AlCaHcalIsotrkProducer::tok_sevlv_
private

Definition at line 203 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_trigEvt_

edm::EDGetTokenT<trigger::TriggerEvent> AlCaHcalIsotrkProducer::tok_trigEvt_
private

Definition at line 186 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ tok_trigRes_

edm::EDGetTokenT<edm::TriggerResults> AlCaHcalIsotrkProducer::tok_trigRes_
private

Definition at line 187 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ triggerEvent_

const edm::InputTag AlCaHcalIsotrkProducer::triggerEvent_
private

Definition at line 169 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ trigNames_

const std::vector<std::string> AlCaHcalIsotrkProducer::trigNames_
private

Definition at line 154 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ unCorrect_

const bool AlCaHcalIsotrkProducer::unCorrect_
private

Definition at line 165 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and storeEnergy().

◆ useL1Trigger_

const bool AlCaHcalIsotrkProducer::useL1Trigger_
private

Definition at line 164 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and produce().

◆ usePFThresh_

const bool AlCaHcalIsotrkProducer::usePFThresh_
private

Definition at line 176 of file AlCaHcalIsotrkProducer.cc.

Referenced by AlCaHcalIsotrkProducer(), and eThreshold().