CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HcalIsoTrkAnalyzer Class Reference
Inheritance diagram for HcalIsoTrkAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HcalIsoTrkAnalyzer (edm::ParameterSet const &)
 
 ~HcalIsoTrkAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginJob () override
 
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 > fillTree (std::vector< math::XYZTLorentzVector > &vecL1, std::vector< math::XYZTLorentzVector > &vecL3, math::XYZPoint &leadPV, std::vector< spr::propagatedTrackDirection > &trkCaloDirections, std::vector< spr::propagatedTrackID > &trkCaloDets, const CaloGeometry *geo, const CaloTopology *topo, const HcalTopology *theHBHETopology, const EcalChannelStatus *theEcalChStatus, const EcalSeverityLevelAlgo *theEcalSevlv, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, edm::Handle< CaloTowerCollection > &towerHandle, edm::Handle< reco::GenParticleCollection > &genParticles, const HcalRespCorrs *respCorrs, const edm::Handle< reco::MuonCollection > &muonh)
 
DetId newId (const DetId &)
 
bool notaMuon (const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
 
double rhoh (const edm::Handle< CaloTowerCollection > &)
 
void storeEnergy (int indx, const HcalRespCorrs *respCorrs, const std::vector< DetId > &ids, std::vector< double > &edet, double &eHcal, std::vector< unsigned int > *detIds, std::vector< double > *hitEnergies)
 
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 int dataType_
 
const std::vector< int > debEvents_
 
bool debug_
 
const double eEcalMax_
 
const double eIsolate1_
 
const double eIsolate2_
 
std::vector< double > etabins_
 
double etadist_
 
double etahalfdist_
 
edm::Service< TFileServicefs
 
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 labelRecVtx_
 
const std::string labelTower_
 
const double maxRestrictionP_
 
const int mode_
 
const std::vector< int > newDepth_
 
unsigned int nHigh_
 
unsigned int nLow_
 
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 int prescaleHigh_
 
const int prescaleLow_
 
const std::string processName_
 
const double pTrackHigh_
 
const double pTrackLow_
 
const double pTrackMin_
 
spr::trackSelectionParameters selectionParameter_
 
const double slopeRestrictionP_
 
int t_allvertex
 
int t_DataType
 
std::vector< unsigned int > * t_DetIds
 
std::vector< unsigned int > * t_DetIds1
 
std::vector< unsigned int > * t_DetIds3
 
double t_eAnnular
 
double t_eHcal
 
double t_eHcal10
 
double t_eHcal30
 
double t_emaxNearP
 
double t_eMipDR
 
double t_eMipDR2
 
double t_eMipDR3
 
double t_eMipDR4
 
double t_eMipDR5
 
int t_Event
 
unsigned int t_EventNo
 
double t_EventWeight
 
double t_gentrackP
 
int t_goodPV
 
double t_hAnnular
 
std::vector< double > * t_HitEnergies
 
std::vector< double > * t_HitEnergies1
 
std::vector< double > * t_HitEnergies3
 
std::vector< bool > * t_hltbits
 
double t_hmaxNearP
 
int t_ieta
 
std::vector< int > * t_ietaAll
 
std::vector< int > * t_ietaGood
 
int t_iphi
 
bool t_L1Bit
 
double t_l1eta
 
double t_l1phi
 
double t_l1pt
 
double t_l3eta
 
double t_l3phi
 
double t_l3pt
 
double t_mindR1
 
double t_mindR2
 
int t_nTrk
 
int t_nVtx
 
double t_p
 
double t_phi
 
double t_pt
 
bool t_qltyFlag
 
bool t_qltyMissFlag
 
bool t_qltyPVFlag
 
double t_rhoh
 
int t_Run
 
unsigned int t_RunNo
 
bool t_selectTk
 
int t_Tracks
 
int t_TracksLoose
 
int t_TracksProp
 
int t_TracksSaved
 
int t_TracksTight
 
std::vector< int > * t_trackType
 
std::vector< bool > * t_trgbits
 
bool t_TrigPass
 
bool t_TrigPassSel
 
const std::string theTrackQuality_
 
const edm::InputTag theTriggerResultsLabel_
 
edm::EDGetTokenT< BXVector
< GlobalAlgBlk > > 
tok_alg_
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
tok_bFieldH_
 
edm::EDGetTokenT< reco::BeamSpottok_bs_
 
edm::EDGetTokenT
< CaloTowerCollection
tok_cala_
 
edm::ESGetToken< CaloTopology,
CaloTopologyRecord
tok_caloTopology_
 
edm::ESGetToken
< HcalDDDRecConstants,
HcalRecNumberingRecord
tok_ddrec_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EB_
 
edm::ESGetToken
< EcalChannelStatus,
EcalChannelStatusRcd
tok_ecalChStatus_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EE_
 
edm::EDGetTokenT
< GenEventInfoProduct
tok_ew_
 
edm::EDGetTokenT
< reco::TrackCollection
tok_genTrack_
 
edm::ESGetToken< CaloGeometry,
CaloGeometryRecord
tok_geom_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbhe_
 
edm::ESGetToken< HcalTopology,
HcalRecNumberingRecord
tok_htopo_
 
edm::EDGetTokenT
< reco::MuonCollection
tok_Muon_
 
edm::EDGetTokenT
< reco::GenParticleCollection
tok_parts_
 
edm::EDGetTokenT
< reco::VertexCollection
tok_recVtx_
 
edm::ESGetToken< HcalRespCorrs,
HcalRespCorrsRcd
tok_resp_
 
edm::ESGetToken
< EcalSeverityLevelAlgo,
EcalSeverityLevelAlgoRcd
tok_sevlv_
 
edm::EDGetTokenT
< trigger::TriggerEvent
tok_trigEvt_
 
edm::EDGetTokenT
< edm::TriggerResults
tok_trigRes_
 
TTree * tree
 
TTree * tree2
 
const edm::InputTag triggerEvent_
 
const std::vector< std::string > trigNames_
 
const bool unCorrect_
 
const bool useL1Trigger_
 
const int useRaw_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 91 of file HcalIsoTrkAnalyzer.cc.

Constructor & Destructor Documentation

HcalIsoTrkAnalyzer::HcalIsoTrkAnalyzer ( edm::ParameterSet const &  iConfig)
explicit

Definition at line 215 of file HcalIsoTrkAnalyzer.cc.

References a_charIsoR_, a_coneR1_, a_coneR2_, a_coneR_, a_mipR2_, a_mipR3_, a_mipR4_, a_mipR5_, a_mipR_, collapseDepth_, edm::EDConsumerBase::consumesCollector(), dataType_, debEvents_, eEcalMax_, eIsolate1_, eIsolate2_, PVValHelper::eta, etabins_, etadist_, etahalfdist_, l1t::Event, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalScale_, hep17_, hitEthrEB_, hitEthrEE0_, hitEthrEE1_, hitEthrEE2_, hitEthrEE3_, hitEthrEEHi_, hitEthrEELo_, mps_fire::i, ignoreTrigger_, HLT_FULL_cff::InputTag, isotrackApplyRegressor::k, relval_steps::k2, TFileService::kSharedResource, l1Filter_, l1GtUtils_, l1TrigName_, l2Filter_, l3Filter_, labelEB_, labelEE_, labelGenTrack_, labelHBHE_, 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, mode_, newDepth_, oldDepth_, oldDet_, oldEta_, oldID_, phi, phibins_, phidist_, phihalfdist_, prescaleHigh_, prescaleLow_, 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_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 useRaw_.

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

Definition at line 94 of file HcalIsoTrkAnalyzer.cc.

94 {}

Member Function Documentation

void HcalIsoTrkAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 401 of file HcalIsoTrkAnalyzer.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::bField, edm::EventBase::bunchCrossing(), dataType_, debEvents_, debug_, l1t::L1TGlobalUtil::decisionsFinal(), fileCollector::done, dR(), runTauDisplay::dr, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), edm::EventID::event(), fillTree(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::filterTag(), spr::find(), genParticleCandidates2GenParticles_cfi::genParticles, edm::Event::getByToken(), edm::EventSetup::getData(), trigger::TriggerEvent::getObjects(), ValidationMatrix::hlt, hltConfig_, mps_fire::i, trigger::TriggerObject::id(), edm::EventBase::id(), ignoreTrigger_, edm::HandleBase::isValid(), isotrackApplyRegressor::k, l1Filter_, l1GtUtils_, l1TrigName_, l2Filter_, l3Filter_, label, edm::InputTag::label(), labelEB_, labelEE_, labelGenTrack_, labelHBHE_, edm::EventBase::luminosityBlock(), trigger::TriggerObject::mass(), HLTConfigProvider::moduleLabels(), TrackingSourceConfig_Tier0_Cosmic_cff::modules, names, convertSQLiteXML::ok, trigger::TriggerObject::phi(), edm::Handle< T >::product(), spr::propagateCALO(), trigger::TriggerObject::pt(), trigger::TriggerObject::px(), trigger::TriggerObject::py(), trigger::TriggerObject::pz(), l1t::L1TGlobalUtil::retrieveL1(), edm::EventID::run(), trigger::TriggerEvent::sizeFilters(), AlCaHLTBitMon_QueryRunRegistry::string, t_allvertex, t_DataType, t_Event, t_EventNo, t_EventWeight, t_goodPV, t_hltbits, t_ietaAll, t_ietaGood, t_L1Bit, t_l1eta, t_l1phi, t_l1pt, t_l3eta, t_l3phi, t_l3pt, t_nVtx, t_Run, t_RunNo, t_Tracks, t_TracksLoose, t_TracksProp, t_TracksSaved, t_TracksTight, t_trackType, t_trgbits, t_TrigPass, t_TrigPassSel, theTrackQuality_, tok_alg_, tok_bFieldH_, tok_bs_, tok_cala_, tok_caloTopology_, tok_EB_, tok_ecalChStatus_, 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_, tree2, triggerEvent_, HLTConfigProvider::triggerIndex(), edm::TriggerNames::triggerNames(), L1TMuonDQMOffline_cfi::triggerNames, edm::Event::triggerNames(), triggerResults, trigNames_, useL1Trigger_, x, y, and z.

401  {
402  t_Run = iEvent.id().run();
403  t_Event = iEvent.id().event();
405  debug_ = (debEvents_.empty())
406  ? true
407  : (std::find(debEvents_.begin(), debEvents_.end(), iEvent.id().event()) != debEvents_.end());
408 #ifdef EDM_ML_DEBUG
409  if (debug_)
410  edm::LogVerbatim("HcalIsoTrack") << "Run " << t_Run << " Event " << t_Event << " type " << t_DataType
411  << " Luminosity " << iEvent.luminosityBlock() << " Bunch "
412  << iEvent.bunchCrossing();
413 #endif
414  //Get magnetic field and ECAL channel status
415  const MagneticField* bField = &iSetup.getData(tok_bFieldH_);
416  const EcalChannelStatus* theEcalChStatus = &iSetup.getData(tok_ecalChStatus_);
417  const EcalSeverityLevelAlgo* theEcalSevlv = &iSetup.getData(tok_sevlv_);
418 
419  // get handles to calogeometry and calotopology
420  const CaloGeometry* geo = &iSetup.getData(tok_geom_);
421  const CaloTopology* caloTopology = &iSetup.getData(tok_caloTopology_);
422  const HcalTopology* theHBHETopology = &iSetup.getData(tok_htopo_);
423  const HcalRespCorrs* respCorrs = &iSetup.getData(tok_resp_);
424 
425  //=== genParticle information
427  iEvent.getByToken(tok_parts_, genParticles);
428 
429  bool okC(true);
430  //Get track collection
432  iEvent.getByToken(tok_genTrack_, trkCollection);
433  if (!trkCollection.isValid()) {
434  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelGenTrack_;
435  okC = false;
436  }
437 
438  //Get muon collection
440  iEvent.getByToken(tok_Muon_, muonh);
441 
442  //event weight for FLAT sample
443  t_EventWeight = 1.0;
445  iEvent.getByToken(tok_ew_, genEventInfo);
446  if (genEventInfo.isValid())
447  t_EventWeight = genEventInfo->weight();
448 
449  //Define the best vertex and the beamspot
451  iEvent.getByToken(tok_recVtx_, recVtxs);
452  edm::Handle<reco::BeamSpot> beamSpotH;
453  iEvent.getByToken(tok_bs_, beamSpotH);
454  math::XYZPoint leadPV(0, 0, 0);
455  t_goodPV = t_nVtx = 0;
456  if (recVtxs.isValid() && !(recVtxs->empty())) {
457  t_nVtx = recVtxs->size();
458  for (unsigned int k = 0; k < recVtxs->size(); ++k) {
459  if (!((*recVtxs)[k].isFake()) && ((*recVtxs)[k].ndof() > 4)) {
460  if (t_goodPV == 0)
461  leadPV = math::XYZPoint((*recVtxs)[k].x(), (*recVtxs)[k].y(), (*recVtxs)[k].z());
462  t_goodPV++;
463  }
464  }
465  }
466  if (t_goodPV == 0 && beamSpotH.isValid()) {
467  leadPV = beamSpotH->position();
468  }
470 #ifdef EDM_ML_DEBUG
471  if (debug_) {
472  edm::LogVerbatim("HcalIsoTrack") << "Primary Vertex " << leadPV << " out of " << t_goodPV << " vertex";
473  if (beamSpotH.isValid())
474  edm::LogVerbatim("HcalIsoTrack") << " Beam Spot " << beamSpotH->position();
475  }
476 #endif
477  // RecHits
478  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
479  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
480  if (!barrelRecHitsHandle.isValid()) {
481  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEB_;
482  okC = false;
483  }
484  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
485  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
486  if (!endcapRecHitsHandle.isValid()) {
487  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelEE_;
488  okC = false;
489  }
491  iEvent.getByToken(tok_hbhe_, hbhe);
492  if (!hbhe.isValid()) {
493  edm::LogWarning("HcalIsoTrack") << "Cannot access the collection " << labelHBHE_;
494  okC = false;
495  }
497  iEvent.getByToken(tok_cala_, caloTower);
498 
499  //Propagate tracks to calorimeter surface)
500  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
501  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, false);
502  std::vector<spr::propagatedTrackID> trkCaloDets;
503  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDets, false);
504  std::vector<math::XYZTLorentzVector> vecL1, vecL3;
505  t_RunNo = iEvent.id().run();
506  t_EventNo = iEvent.id().event();
507  t_Tracks = trkCollection->size();
508  t_TracksProp = trkCaloDirections.size();
509  t_ietaAll->clear();
510  t_ietaGood->clear();
511  t_trackType->clear();
512  t_trgbits->clear();
513  t_hltbits->clear();
514 #ifdef EDM_ML_DEBUG
515  if (debug_)
516  edm::LogVerbatim("HcalIsoTrack") << "# of propagated tracks " << t_TracksProp << " out of " << t_Tracks
517  << " with Trigger " << ignoreTrigger_;
518 #endif
519 
520  //Trigger
521  t_trgbits->assign(trigNames_.size(), false);
522  t_hltbits->assign(trigNames_.size(), false);
524  t_L1Bit = true;
525  t_TrigPass = false;
526 
528  if (!ignoreTrigger_) {
529  //L1
531  const std::vector<std::pair<std::string, bool>>& finalDecisions = l1GtUtils_->decisionsFinal();
532  for (const auto& decision : finalDecisions) {
533  if (decision.first.find(l1TrigName_) != std::string::npos) {
534  t_L1Bit = decision.second;
535  break;
536  }
537  }
538 #ifdef EDM_ML_DEBUG
539  if (debug_)
540  edm::LogVerbatim("HcalIsoTrack") << "Trigger Information for " << l1TrigName_ << " is " << t_L1Bit
541  << " from a list of " << finalDecisions.size() << " decisions";
542 #endif
543 
544  //HLT
545  iEvent.getByToken(tok_trigRes_, triggerResults);
546  if (triggerResults.isValid()) {
547  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
548  const std::vector<std::string>& names = triggerNames.triggerNames();
549  if (!trigNames_.empty()) {
550  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
551  int hlt = triggerResults->accept(iHLT);
552  for (unsigned int i = 0; i < trigNames_.size(); ++i) {
553  if (names[iHLT].find(trigNames_[i]) != std::string::npos) {
554  t_trgbits->at(i) = (hlt > 0);
555  t_hltbits->at(i) = (hlt > 0);
556  if (hlt > 0)
557  t_TrigPass = true;
558 #ifdef EDM_ML_DEBUG
559  if (debug_)
560  edm::LogVerbatim("HcalIsoTrack")
561  << "This trigger " << names[iHLT] << " Flag " << hlt << ":" << t_trgbits->at(i);
562 #endif
563  }
564  }
565  }
566  }
567  }
568 #ifdef EDM_ML_DEBUG
569  if (debug_)
570  edm::LogVerbatim("HcalIsoTrack") << "HLT Information shows " << t_TrigPass << ":" << trigNames_.empty() << ":"
571  << okC;
572 #endif
573  }
574 
575  std::array<int, 3> ntksave{{0, 0, 0}};
576  if (ignoreTrigger_ || useL1Trigger_) {
577  t_l1pt = t_l1eta = t_l1phi = 0;
578  t_l3pt = t_l3eta = t_l3phi = 0;
579  if (ignoreTrigger_ || t_L1Bit)
580  ntksave = fillTree(vecL1,
581  vecL3,
582  leadPV,
583  trkCaloDirections,
584  trkCaloDets,
585  geo,
586  caloTopology,
587  theHBHETopology,
588  theEcalChStatus,
589  theEcalSevlv,
590  barrelRecHitsHandle,
591  endcapRecHitsHandle,
592  hbhe,
593  caloTower,
594  genParticles,
595  respCorrs,
596  muonh);
597  t_TracksSaved = ntksave[0];
598  t_TracksLoose = ntksave[1];
599  t_TracksTight = ntksave[2];
600  } else {
601  trigger::TriggerEvent triggerEvent;
602  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
603  iEvent.getByToken(tok_trigEvt_, triggerEventHandle);
604  if (!triggerEventHandle.isValid()) {
605  edm::LogWarning("HcalIsoTrack") << "Error! Can't get the product " << triggerEvent_.label();
606  } else if (okC) {
607  triggerEvent = *(triggerEventHandle.product());
608  const trigger::TriggerObjectCollection& TOC(triggerEvent.getObjects());
609  bool done(false);
610  if (triggerResults.isValid()) {
611  std::vector<std::string> modules;
612  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
613  const std::vector<std::string>& names = triggerNames.triggerNames();
614  for (unsigned int iHLT = 0; iHLT < triggerResults->size(); iHLT++) {
615  bool ok = (t_TrigPass) || (trigNames_.empty());
616  if (ok) {
617  unsigned int triggerindx = hltConfig_.triggerIndex(names[iHLT]);
618  const std::vector<std::string>& moduleLabels(hltConfig_.moduleLabels(triggerindx));
619  std::vector<math::XYZTLorentzVector> vecL2;
620  vecL1.clear();
621  vecL3.clear();
622  //loop over all trigger filters in event (i.e. filters passed)
623  for (unsigned int ifilter = 0; ifilter < triggerEvent.sizeFilters(); ++ifilter) {
624  std::vector<int> Keys;
625  std::string label = triggerEvent.filterTag(ifilter).label();
626  //loop over keys to objects passing this filter
627  for (unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
628  if (label.find(moduleLabels[imodule]) != std::string::npos) {
629 #ifdef EDM_ML_DEBUG
630  if (debug_)
631  edm::LogVerbatim("HcalIsoTrack") << "FilterName " << label;
632 #endif
633  for (unsigned int ifiltrKey = 0; ifiltrKey < triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
634  Keys.push_back(triggerEvent.filterKeys(ifilter)[ifiltrKey]);
635  const trigger::TriggerObject& TO(TOC[Keys[ifiltrKey]]);
636  math::XYZTLorentzVector v4(TO.px(), TO.py(), TO.pz(), TO.energy());
637  if (label.find(l2Filter_) != std::string::npos) {
638  vecL2.push_back(v4);
639  } else if (label.find(l3Filter_) != std::string::npos) {
640  vecL3.push_back(v4);
641  } else if ((label.find(l1Filter_) != std::string::npos) || (l1Filter_.empty())) {
642  vecL1.push_back(v4);
643  }
644 #ifdef EDM_ML_DEBUG
645  if (debug_)
646  edm::LogVerbatim("HcalIsoTrack")
647  << "key " << ifiltrKey << " : pt " << TO.pt() << " eta " << TO.eta() << " phi " << TO.phi()
648  << " mass " << TO.mass() << " Id " << TO.id();
649 #endif
650  }
651 #ifdef EDM_ML_DEBUG
652  if (debug_)
653  edm::LogVerbatim("HcalIsoTrack")
654  << "sizes " << vecL1.size() << ":" << vecL2.size() << ":" << vecL3.size();
655 #endif
656  }
657  }
658  }
660  math::XYZTLorentzVector mindRvec1;
661  double mindR1(999);
662  for (unsigned int i = 0; i < vecL2.size(); i++) {
663  double dr = dR(vecL1[0], vecL2[i]);
664 #ifdef EDM_ML_DEBUG
665  if (debug_)
666  edm::LogVerbatim("HcalIsoTrack") << "lvl2[" << i << "] dR " << dr;
667 #endif
668  if (dr < mindR1) {
669  mindR1 = dr;
670  mindRvec1 = vecL2[i];
671  }
672  }
673 #ifdef EDM_ML_DEBUG
674  if (debug_)
675  edm::LogVerbatim("HcalIsoTrack") << "L2 object closest to L1 " << mindRvec1 << " at Dr " << mindR1;
676 #endif
677 
678  if (!vecL1.empty()) {
679  t_l1pt = vecL1[0].pt();
680  t_l1eta = vecL1[0].eta();
681  t_l1phi = vecL1[0].phi();
682  } else {
683  t_l1pt = t_l1eta = t_l1phi = 0;
684  }
685  if (!vecL3.empty()) {
686  t_l3pt = vecL3[0].pt();
687  t_l3eta = vecL3[0].eta();
688  t_l3phi = vecL3[0].phi();
689  } else {
690  t_l3pt = t_l3eta = t_l3phi = 0;
691  }
692  // Now fill in the tree for each selected track
693  if (!done) {
694  ntksave = fillTree(vecL1,
695  vecL3,
696  leadPV,
697  trkCaloDirections,
698  trkCaloDets,
699  geo,
700  caloTopology,
701  theHBHETopology,
702  theEcalChStatus,
703  theEcalSevlv,
704  barrelRecHitsHandle,
705  endcapRecHitsHandle,
706  hbhe,
707  caloTower,
708  genParticles,
709  respCorrs,
710  muonh);
711  t_TracksSaved += ntksave[0];
712  t_TracksLoose += ntksave[1];
713  t_TracksTight += ntksave[2];
714  done = true;
715  }
716  }
717  }
718  }
719  }
720  }
721 #ifdef EDM_ML_DEBUG
722  if (debug_)
723  edm::LogVerbatim("HcalIsoTrack") << "Final results on selected tracks " << t_TracksSaved << ":" << t_TracksLoose
724  << ":" << t_TracksTight;
725 #endif
727  tree2->Fill();
728 }
const std::string labelHBHE_
const std::vector< std::string > trigNames_
Log< level::Info, true > LogVerbatim
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const std::string l1TrigName_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_bFieldH_
std::vector< int > * t_ietaAll
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
edm::EDGetTokenT< BXVector< GlobalAlgBlk > > tok_alg_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Strings const & triggerNames() const
Definition: TriggerNames.cc:48
const std::string names[nVars_]
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
edm::EDGetTokenT< reco::MuonCollection > tok_Muon_
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
char const * label
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
const std::string labelGenTrack_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
std::array< int, 3 > fillTree(std::vector< math::XYZTLorentzVector > &vecL1, std::vector< math::XYZTLorentzVector > &vecL3, math::XYZPoint &leadPV, std::vector< spr::propagatedTrackDirection > &trkCaloDirections, std::vector< spr::propagatedTrackID > &trkCaloDets, const CaloGeometry *geo, const CaloTopology *topo, const HcalTopology *theHBHETopology, const EcalChannelStatus *theEcalChStatus, const EcalSeverityLevelAlgo *theEcalSevlv, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, edm::Handle< CaloTowerCollection > &towerHandle, edm::Handle< reco::GenParticleCollection > &genParticles, const HcalRespCorrs *respCorrs, const edm::Handle< reco::MuonCollection > &muonh)
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
l1t::L1TGlobalUtil * l1GtUtils_
std::vector< bool > * t_hltbits
edm::ESGetToken< HcalRespCorrs, HcalRespCorrsRcd > tok_resp_
static std::string const triggerResults
Definition: EdmProvDump.cc:44
HLTConfigProvider hltConfig_
bool isValid() const
Definition: HandleBase.h:70
const std::string l3Filter_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_htopo_
std::vector< bool > * t_trgbits
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:108
const std::vector< int > debEvents_
const std::string l2Filter_
T const * product() const
Definition: Handle.h:70
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< size_type > Keys
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
const std::string labelEB_
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
std::string const & label() const
Definition: InputTag.h:36
const std::vector< std::pair< std::string, bool > > & decisionsFinal()
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
const edm::InputTag triggerEvent_
Log< level::Warning, false > LogWarning
std::vector< int > * t_ietaGood
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
edm::EDGetTokenT< CaloTowerCollection > tok_cala_
const std::string labelEE_
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
const std::string l1Filter_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
const std::string theTrackQuality_
std::vector< int > * t_trackType
void HcalIsoTrkAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 730 of file HcalIsoTrkAnalyzer.cc.

References fs, TFileService::make(), t_allvertex, t_DataType, t_DetIds, t_DetIds1, t_DetIds3, t_eAnnular, t_eHcal, t_eHcal10, t_eHcal30, t_emaxNearP, t_eMipDR, t_eMipDR2, t_eMipDR3, t_eMipDR4, t_eMipDR5, t_Event, t_EventNo, t_EventWeight, t_gentrackP, t_goodPV, t_hAnnular, t_HitEnergies, t_HitEnergies1, t_HitEnergies3, t_hltbits, t_hmaxNearP, t_ieta, t_ietaAll, t_ietaGood, t_iphi, t_L1Bit, t_l1eta, t_l1phi, t_l1pt, t_l3eta, t_l3phi, t_l3pt, t_mindR1, t_mindR2, t_nTrk, t_nVtx, t_p, t_phi, t_pt, t_qltyFlag, t_qltyMissFlag, t_qltyPVFlag, t_rhoh, t_Run, t_RunNo, t_selectTk, t_Tracks, t_TracksLoose, t_TracksProp, t_TracksSaved, t_TracksTight, t_trackType, t_trgbits, t_TrigPass, t_TrigPassSel, tree, and tree2.

730  {
731  tree = fs->make<TTree>("CalibTree", "CalibTree");
732 
733  tree->Branch("t_Run", &t_Run, "t_Run/I");
734  tree->Branch("t_Event", &t_Event, "t_Event/I");
735  tree->Branch("t_DataType", &t_DataType, "t_DataType/I");
736  tree->Branch("t_ieta", &t_ieta, "t_ieta/I");
737  tree->Branch("t_iphi", &t_iphi, "t_iphi/I");
738  tree->Branch("t_EventWeight", &t_EventWeight, "t_EventWeight/D");
739  tree->Branch("t_nVtx", &t_nVtx, "t_nVtx/I");
740  tree->Branch("t_nTrk", &t_nTrk, "t_nTrk/I");
741  tree->Branch("t_goodPV", &t_goodPV, "t_goodPV/I");
742  tree->Branch("t_l1pt", &t_l1pt, "t_l1pt/D");
743  tree->Branch("t_l1eta", &t_l1eta, "t_l1eta/D");
744  tree->Branch("t_l1phi", &t_l1phi, "t_l1phi/D");
745  tree->Branch("t_l3pt", &t_l3pt, "t_l3pt/D");
746  tree->Branch("t_l3eta", &t_l3eta, "t_l3eta/D");
747  tree->Branch("t_l3phi", &t_l3phi, "t_l3phi/D");
748  tree->Branch("t_p", &t_p, "t_p/D");
749  tree->Branch("t_pt", &t_pt, "t_pt/D");
750  tree->Branch("t_phi", &t_phi, "t_phi/D");
751  tree->Branch("t_mindR1", &t_mindR1, "t_mindR1/D");
752  tree->Branch("t_mindR2", &t_mindR2, "t_mindR2/D");
753  tree->Branch("t_eMipDR", &t_eMipDR, "t_eMipDR/D");
754  tree->Branch("t_eMipDR2", &t_eMipDR2, "t_eMipDR2/D");
755  tree->Branch("t_eMipDR3", &t_eMipDR3, "t_eMipDR3/D");
756  tree->Branch("t_eMipDR4", &t_eMipDR4, "t_eMipDR4/D");
757  tree->Branch("t_eMipDR5", &t_eMipDR5, "t_eMipDR5/D");
758  tree->Branch("t_eHcal", &t_eHcal, "t_eHcal/D");
759  tree->Branch("t_eHcal10", &t_eHcal10, "t_eHcal10/D");
760  tree->Branch("t_eHcal30", &t_eHcal30, "t_eHcal30/D");
761  tree->Branch("t_hmaxNearP", &t_hmaxNearP, "t_hmaxNearP/D");
762  tree->Branch("t_emaxNearP", &t_emaxNearP, "t_emaxNearP/D");
763  tree->Branch("t_eAnnular", &t_eAnnular, "t_eAnnular/D");
764  tree->Branch("t_hAnnular", &t_hAnnular, "t_hAnnular/D");
765  tree->Branch("t_rhoh", &t_rhoh, "t_rhoh/D");
766  tree->Branch("t_selectTk", &t_selectTk, "t_selectTk/O");
767  tree->Branch("t_qltyFlag", &t_qltyFlag, "t_qltyFlag/O");
768  tree->Branch("t_qltyMissFlag", &t_qltyMissFlag, "t_qltyMissFlag/O");
769  tree->Branch("t_qltyPVFlag", &t_qltyPVFlag, "t_qltyPVFlag/O");
770  tree->Branch("t_gentrackP", &t_gentrackP, "t_gentrackP/D");
771 
772  t_DetIds = new std::vector<unsigned int>();
773  t_DetIds1 = new std::vector<unsigned int>();
774  t_DetIds3 = new std::vector<unsigned int>();
775  t_HitEnergies = new std::vector<double>();
776  t_HitEnergies1 = new std::vector<double>();
777  t_HitEnergies3 = new std::vector<double>();
778  t_trgbits = new std::vector<bool>();
779  tree->Branch("t_DetIds", "std::vector<unsigned int>", &t_DetIds);
780  tree->Branch("t_HitEnergies", "std::vector<double>", &t_HitEnergies);
781  tree->Branch("t_trgbits", "std::vector<bool>", &t_trgbits);
782  tree->Branch("t_DetIds1", "std::vector<unsigned int>", &t_DetIds1);
783  tree->Branch("t_DetIds3", "std::vector<unsigned int>", &t_DetIds3);
784  tree->Branch("t_HitEnergies1", "std::vector<double>", &t_HitEnergies1);
785  tree->Branch("t_HitEnergies3", "std::vector<double>", &t_HitEnergies3);
786 
787  tree2 = fs->make<TTree>("EventInfo", "Event Information");
788 
789  tree2->Branch("t_RunNo", &t_RunNo, "t_RunNo/i");
790  tree2->Branch("t_EventNo", &t_EventNo, "t_EventNo/i");
791  tree2->Branch("t_Tracks", &t_Tracks, "t_Tracks/I");
792  tree2->Branch("t_TracksProp", &t_TracksProp, "t_TracksProp/I");
793  tree2->Branch("t_TracksSaved", &t_TracksSaved, "t_TracksSaved/I");
794  tree2->Branch("t_TracksLoose", &t_TracksLoose, "t_TracksLoose/I");
795  tree2->Branch("t_TracksTight", &t_TracksTight, "t_TracksTight/I");
796  tree2->Branch("t_TrigPass", &t_TrigPass, "t_TrigPass/O");
797  tree2->Branch("t_TrigPassSel", &t_TrigPassSel, "t_TrigPassSel/O");
798  tree2->Branch("t_L1Bit", &t_L1Bit, "t_L1Bit/O");
799  tree2->Branch("t_allvertex", &t_allvertex, "t_allvertex/I");
800  t_hltbits = new std::vector<bool>();
801  t_ietaAll = new std::vector<int>();
802  t_ietaGood = new std::vector<int>();
803  t_trackType = new std::vector<int>();
804  tree2->Branch("t_ietaAll", "std::vector<int>", &t_ietaAll);
805  tree2->Branch("t_ietaGood", "std::vector<int>", &t_ietaGood);
806  tree2->Branch("t_trackType", "std::vector<int>", &t_trackType);
807  tree2->Branch("t_hltbits", "std::vector<bool>", &t_hltbits);
808 }
std::vector< int > * t_ietaAll
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > * t_HitEnergies
std::vector< unsigned int > * t_DetIds
std::vector< double > * t_HitEnergies1
std::vector< double > * t_HitEnergies3
edm::Service< TFileService > fs
std::vector< bool > * t_hltbits
std::vector< bool > * t_trgbits
std::vector< unsigned int > * t_DetIds1
std::vector< int > * t_ietaGood
std::vector< unsigned int > * t_DetIds3
std::vector< int > * t_trackType
void HcalIsoTrkAnalyzer::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 811 of file HcalIsoTrkAnalyzer.cc.

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

811  {
812  hdc_ = &iSetup.getData(tok_ddrec_);
813 
814  if (!ignoreTrigger_) {
815  bool changed_(true);
816  bool flag = hltConfig_.init(iRun, iSetup, processName_, changed_);
817  edm::LogVerbatim("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run() << " process " << processName_
818  << " init flag " << flag << " change flag " << changed_;
819  // check if trigger names in (new) config
820  if (changed_) {
821 #ifdef EDM_ML_DEBUG
822  edm::LogVerbatim("HcalIsoTrack") << "New trigger menu found !!!";
823 #endif
824  const unsigned int n(hltConfig_.size());
825  for (unsigned itrig = 0; itrig < trigNames_.size(); itrig++) {
826  unsigned int triggerindx = hltConfig_.triggerIndex(trigNames_[itrig]);
827  if (triggerindx >= n) {
828  edm::LogWarning("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " does not exist in "
829  << "the current menu";
830 #ifdef EDM_ML_DEBUG
831  } else {
832  edm::LogVerbatim("HcalIsoTrack") << trigNames_[itrig] << " " << triggerindx << " exists";
833 #endif
834  }
835  }
836  }
837  }
838 }
unsigned int size() const
number of trigger paths in trigger table
const std::vector< std::string > trigNames_
Log< level::Info, true > LogVerbatim
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
HLTConfigProvider hltConfig_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_ddrec_
const std::string processName_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const HcalDDDRecConstants * hdc_
Log< level::Warning, false > LogWarning
double HcalIsoTrkAnalyzer::dR ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 1322 of file HcalIsoTrkAnalyzer.cc.

References reco::deltaR().

Referenced by analyze(), fillTree(), notaMuon(), and trackP().

1322  {
1323  return reco::deltaR(vec1.eta(), vec1.phi(), vec2.eta(), vec2.phi());
1324 }
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
void HcalIsoTrkAnalyzer::endRun ( edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivate

Definition at line 841 of file HcalIsoTrkAnalyzer.cc.

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

841  {
842  nRun_++;
843  edm::LogVerbatim("HcalIsoTrack") << "endRun[" << nRun_ << "] " << iRun.run();
844 }
Log< level::Info, true > LogVerbatim
double HcalIsoTrkAnalyzer::eThreshold ( const DetId id,
const CaloGeometry geo 
) const
private

Definition at line 1374 of file HcalIsoTrkAnalyzer.cc.

References funct::abs(), EcalBarrel, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), CaloGeometry::getPosition(), hitEthrEB_, hitEthrEE0_, hitEthrEE1_, hitEthrEE2_, hitEthrEE3_, hitEthrEEHi_, and hitEthrEELo_.

Referenced by fillTree().

1374  {
1375  const GlobalPoint& pos = geo->getPosition(id);
1376  double eta = std::abs(pos.eta());
1377  double eThr(hitEthrEB_);
1378  if (id.subdetId() != EcalBarrel) {
1379  eThr = (((eta * hitEthrEE3_ + hitEthrEE2_) * eta + hitEthrEE1_) * eta + hitEthrEE0_);
1380  if (eThr < hitEthrEELo_)
1381  eThr = hitEthrEELo_;
1382  else if (eThr > hitEthrEEHi_)
1383  eThr = hitEthrEEHi_;
1384  }
1385  return eThr;
1386 }
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
T eta() const
Definition: PV3DBase.h:73
void HcalIsoTrkAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 846 of file HcalIsoTrkAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, patZpeak::events, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

846  {
848  std::vector<std::string> trig = {"HLT_PFJet40",
849  "HLT_PFJet60",
850  "HLT_PFJet80",
851  "HLT_PFJet140",
852  "HLT_PFJet200",
853  "HLT_PFJet260",
854  "HLT_PFJet320",
855  "HLT_PFJet400",
856  "HLT_PFJet450",
857  "HLT_PFJet500"};
858  desc.add<std::vector<std::string>>("triggers", trig);
859  desc.add<std::string>("processName", "HLT");
860  desc.add<std::string>("l1Filter", "");
861  desc.add<std::string>("l2Filter", "L2Filter");
862  desc.add<std::string>("l3Filter", "Filter");
863  // following 10 parameters are parameters to select good tracks
864  desc.add<std::string>("trackQuality", "highPurity");
865  desc.add<double>("minTrackPt", 1.0);
866  desc.add<double>("maxDxyPV", 0.02);
867  desc.add<double>("maxDzPV", 0.02);
868  desc.add<double>("maxChi2", 5.0);
869  desc.add<double>("maxDpOverP", 0.1);
870  desc.add<int>("minOuterHit", 4);
871  desc.add<int>("minLayerCrossed", 8);
872  desc.add<int>("maxInMiss", 0);
873  desc.add<int>("maxOutMiss", 0);
874  // Minimum momentum of selected isolated track and signal zone
875  desc.add<double>("minimumTrackP", 10.0);
876  desc.add<double>("coneRadius", 34.98);
877  // signal zone in ECAL and MIP energy cutoff
878  desc.add<double>("coneRadiusMIP", 14.0);
879  desc.add<double>("coneRadiusMIP2", 18.0);
880  desc.add<double>("coneRadiusMIP3", 20.0);
881  desc.add<double>("coneRadiusMIP4", 22.0);
882  desc.add<double>("coneRadiusMIP5", 24.0);
883  desc.add<double>("maximumEcalEnergy", 2.0);
884  // following 4 parameters are for isolation cuts and described in the code
885  desc.add<double>("maxTrackP", 8.0);
886  desc.add<double>("slopeTrackP", 0.05090504066);
887  desc.add<double>("isolationEnergyTight", 2.0);
888  desc.add<double>("isolationEnergyLoose", 10.0);
889  // energy thershold for ECAL (from Egamma group)
890  desc.add<double>("EBHitEnergyThreshold", 0.08);
891  desc.add<double>("EEHitEnergyThreshold0", 0.30);
892  desc.add<double>("EEHitEnergyThreshold1", 0.00);
893  desc.add<double>("EEHitEnergyThreshold2", 0.00);
894  desc.add<double>("EEHitEnergyThreshold3", 0.00);
895  desc.add<double>("EEHitEnergyThresholdLow", 0.30);
896  desc.add<double>("EEHitEnergyThresholdHigh", 0.30);
897  // prescale factors
898  desc.add<double>("momentumLow", 40.0);
899  desc.add<double>("momentumHigh", 60.0);
900  desc.add<int>("prescaleLow", 1);
901  desc.add<int>("prescaleHigh", 1);
902  // various labels for collections used in the code
903  desc.add<edm::InputTag>("labelTriggerEvent", edm::InputTag("hltTriggerSummaryAOD", "", "HLT"));
904  desc.add<edm::InputTag>("labelTriggerResult", edm::InputTag("TriggerResults", "", "HLT"));
905  desc.add<std::string>("labelTrack", "generalTracks");
906  desc.add<std::string>("labelVertex", "offlinePrimaryVertices");
907  desc.add<std::string>("labelEBRecHit", "EcalRecHitsEB");
908  desc.add<std::string>("labelEERecHit", "EcalRecHitsEE");
909  desc.add<std::string>("labelHBHERecHit", "hbhereco");
910  desc.add<std::string>("labelBeamSpot", "offlineBeamSpot");
911  desc.add<std::string>("labelCaloTower", "towerMaker");
912  desc.add<std::string>("labelMuon", "muons");
913  desc.add<edm::InputTag>("algInputTag", edm::InputTag("gtStage2Digis"));
914  desc.add<edm::InputTag>("extInputTag", edm::InputTag("gtStage2Digis"));
915  desc.addUntracked<std::string>("moduleName", "");
916  desc.addUntracked<std::string>("producerName", "");
917  // Various flags used for selecting tracks, choice of energy Method2/0
918  // Data type 0/1 for single jet trigger or others
919  desc.addUntracked<int>("useRaw", 0);
920  desc.addUntracked<bool>("ignoreTriggers", false);
921  desc.addUntracked<bool>("useL1Trigger", false);
922  desc.addUntracked<double>("hcalScale", 1.0);
923  desc.addUntracked<int>("dataType", 0);
924  desc.addUntracked<bool>("unCorrect", false);
925  desc.addUntracked<bool>("collapseDepth", false);
926  desc.addUntracked<std::string>("l1TrigName", "L1_SingleJet60");
927  desc.addUntracked<int>("outMode", 11);
928  std::vector<int> dummy;
929  desc.addUntracked<std::vector<int>>("oldID", dummy);
930  desc.addUntracked<std::vector<int>>("newDepth", dummy);
931  desc.addUntracked<bool>("hep17", false);
932  std::vector<int> events;
933  desc.add<std::vector<int>>("debugEvents", events);
934  descriptions.add("HcalIsoTrkAnalyzer", desc);
935 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple events
Definition: patZpeak.py:20
std::array< int, 3 > HcalIsoTrkAnalyzer::fillTree ( std::vector< math::XYZTLorentzVector > &  vecL1,
std::vector< math::XYZTLorentzVector > &  vecL3,
math::XYZPoint leadPV,
std::vector< spr::propagatedTrackDirection > &  trkCaloDirections,
std::vector< spr::propagatedTrackID > &  trkCaloDets,
const CaloGeometry geo,
const CaloTopology topo,
const HcalTopology theHBHETopology,
const EcalChannelStatus theEcalChStatus,
const EcalSeverityLevelAlgo theEcalSevlv,
edm::Handle< EcalRecHitCollection > &  barrelRecHitsHandle,
edm::Handle< EcalRecHitCollection > &  endcapRecHitsHandle,
edm::Handle< HBHERecHitCollection > &  hbhe,
edm::Handle< CaloTowerCollection > &  towerHandle,
edm::Handle< reco::GenParticleCollection > &  genParticles,
const HcalRespCorrs respCorrs,
const edm::Handle< reco::MuonCollection > &  muonh 
)
private

Definition at line 937 of file HcalIsoTrkAnalyzer.cc.

References a_charIsoR_, a_coneR1_, a_coneR2_, a_coneR_, a_mipR2_, a_mipR3_, a_mipR4_, a_mipR5_, a_mipR_, funct::abs(), accept(), spr::chargeIsolationCone(), spr::chargeIsolationEcal(), debug_, dR(), runTauDisplay::dr, spr::eCone_ecal(), spr::eCone_hcal(), spr::eECALmatrix(), eEcalMax_, spr::eHCALmatrix(), eIsolate1_, eIsolate2_, reco::TrackBase::eta(), eThreshold(), funct::exp(), spr::goodTrack(), HcalDetId::ieta(), HcalDetId::iphi(), edm::HandleBase::isValid(), isotrackApplyRegressor::k, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, maxRestrictionP_, newId(), nHigh_, nLow_, notaMuon(), BeamSpotPI::nTracks, oldID_, reco::TrackBase::p(), reco::TrackBase::phi(), prescaleHigh_, prescaleLow_, reco::TrackBase::pt(), pTrackHigh_, pTrackLow_, pTrackMin_, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), rhoh(), selectionParameter_, slopeRestrictionP_, storeEnergy(), t_DetIds, t_DetIds1, t_DetIds3, t_eAnnular, t_eHcal, t_eHcal10, t_eHcal30, t_emaxNearP, t_eMipDR, t_eMipDR2, t_eMipDR3, t_eMipDR4, t_eMipDR5, t_EventNo, t_gentrackP, t_hAnnular, t_HitEnergies, t_HitEnergies1, t_HitEnergies3, t_hmaxNearP, t_ieta, t_ietaAll, t_ietaGood, t_iphi, t_mindR1, t_mindR2, t_nTrk, t_p, t_phi, t_pt, t_qltyFlag, t_qltyMissFlag, t_qltyPVFlag, t_rhoh, t_RunNo, t_selectTk, t_trackType, t_trgbits, trackP(), tree, and useRaw_.

Referenced by analyze(), and core.AutoFillTreeProducer.AutoFillTreeProducer::process().

953  {
954  int nSave(0), nLoose(0), nTight(0);
955  //Loop over tracks
956  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
957  unsigned int nTracks(0), nselTracks(0);
958  t_nTrk = trkCaloDirections.size();
959  t_rhoh = (tower.isValid()) ? rhoh(tower) : 0;
960  for (trkDetItr = trkCaloDirections.begin(), nTracks = 0; trkDetItr != trkCaloDirections.end();
961  trkDetItr++, nTracks++) {
962  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
963  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
964  t_p = pTrack->p();
965  t_pt = pTrack->pt();
966  t_phi = pTrack->phi();
967 
968 #ifdef EDM_ML_DEBUG
969  if (debug_)
970  edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) : " << t_pt << "|"
971  << pTrack->eta() << "|" << t_phi << "|" << t_p;
972 #endif
973  t_mindR2 = 999;
974  for (unsigned int k = 0; k < vecL3.size(); ++k) {
975  double dr = dR(vecL3[k], v4);
976  if (dr < t_mindR2) {
977  t_mindR2 = dr;
978  }
979  }
980  t_mindR1 = (!vecL1.empty()) ? dR(vecL1[0], v4) : 999;
981 #ifdef EDM_ML_DEBUG
982  if (debug_)
983  edm::LogVerbatim("HcalIsoTrack") << "Closest L3 object at dr : " << t_mindR2 << " and from L1 " << t_mindR1;
984 #endif
985 
986  t_ieta = t_iphi = 0;
987  if (trkDetItr->okHCAL) {
988  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
989  t_ieta = detId.ieta();
990  t_iphi = detId.iphi();
991  if (t_p > 40.0 && t_p <= 60.0)
992  t_ietaAll->emplace_back(t_ieta);
993  }
994  //Selection of good track
995  t_selectTk = spr::goodTrack(pTrack, leadPV, selectionParameter_, false);
997  oneCutParameters.maxDxyPV = 10;
998  oneCutParameters.maxDzPV = 100;
999  oneCutParameters.maxInMiss = 2;
1000  oneCutParameters.maxOutMiss = 2;
1001  bool qltyFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
1002  oneCutParameters = selectionParameter_;
1003  oneCutParameters.maxDxyPV = 10;
1004  oneCutParameters.maxDzPV = 100;
1005  t_qltyMissFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
1006  oneCutParameters = selectionParameter_;
1007  oneCutParameters.maxInMiss = 2;
1008  oneCutParameters.maxOutMiss = 2;
1009  t_qltyPVFlag = spr::goodTrack(pTrack, leadPV, oneCutParameters, false);
1010  double eIsolation = maxRestrictionP_ * exp(slopeRestrictionP_ * std::abs((double)t_ieta));
1011  if (eIsolation < eIsolate1_)
1012  eIsolation = eIsolate1_;
1013  if (eIsolation < eIsolate2_)
1014  eIsolation = eIsolate2_;
1015 #ifdef EDM_ML_DEBUG
1016  if (debug_)
1017  edm::LogVerbatim("HcalIsoTrack") << "qltyFlag|okECAL|okHCAL : " << qltyFlag << "|" << trkDetItr->okECAL << "|"
1018  << trkDetItr->okHCAL << " eIsolation " << eIsolation;
1019 #endif
1020  t_qltyFlag = (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL);
1021  bool notMuon = (muonh.isValid()) ? notaMuon(pTrack, muonh) : true;
1022  if (t_qltyFlag && notMuon) {
1023  nselTracks++;
1024  int nNearTRKs(0);
1026  std::vector<DetId> eIds;
1027  std::vector<double> eHit;
1028  t_eMipDR = spr::eCone_ecal(geo,
1029  barrelRecHitsHandle,
1030  endcapRecHitsHandle,
1031  trkDetItr->pointHCAL,
1032  trkDetItr->pointECAL,
1033  a_mipR_,
1034  trkDetItr->directionECAL,
1035  eIds,
1036  eHit);
1037  double eEcal(0);
1038  for (unsigned int k = 0; k < eIds.size(); ++k) {
1039  if (eHit[k] > eThreshold(eIds[k], geo))
1040  eEcal += eHit[k];
1041  }
1042 #ifdef EDM_ML_DEBUG
1043  if (debug_)
1044  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR << ":" << eEcal;
1045 #endif
1046  t_eMipDR = eEcal;
1049  std::vector<DetId> eIds2;
1050  std::vector<double> eHit2;
1051  t_eMipDR2 = spr::eCone_ecal(geo,
1052  barrelRecHitsHandle,
1053  endcapRecHitsHandle,
1054  trkDetItr->pointHCAL,
1055  trkDetItr->pointECAL,
1056  a_mipR2_,
1057  trkDetItr->directionECAL,
1058  eIds2,
1059  eHit2);
1060  double eEcal2(0);
1061  for (unsigned int k = 0; k < eIds2.size(); ++k) {
1062  if (eHit2[k] > eThreshold(eIds2[k], geo))
1063  eEcal2 += eHit2[k];
1064  }
1065 #ifdef EDM_ML_DEBUG
1066  if (debug_)
1067  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR2 << ":" << eEcal2;
1068 #endif
1069  t_eMipDR2 = eEcal2;
1072  std::vector<DetId> eIds3;
1073  std::vector<double> eHit3;
1074  t_eMipDR3 = spr::eCone_ecal(geo,
1075  barrelRecHitsHandle,
1076  endcapRecHitsHandle,
1077  trkDetItr->pointHCAL,
1078  trkDetItr->pointECAL,
1079  a_mipR3_,
1080  trkDetItr->directionECAL,
1081  eIds3,
1082  eHit3);
1083  double eEcal3(0);
1084  for (unsigned int k = 0; k < eIds3.size(); ++k) {
1085  if (eHit3[k] > eThreshold(eIds3[k], geo))
1086  eEcal3 += eHit3[k];
1087  }
1088 #ifdef EDM_ML_DEBUG
1089  if (debug_)
1090  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR3 << ":" << eEcal3;
1091 #endif
1092  t_eMipDR3 = eEcal3;
1095  std::vector<DetId> eIds4;
1096  std::vector<double> eHit4;
1097  t_eMipDR4 = spr::eCone_ecal(geo,
1098  barrelRecHitsHandle,
1099  endcapRecHitsHandle,
1100  trkDetItr->pointHCAL,
1101  trkDetItr->pointECAL,
1102  a_mipR4_,
1103  trkDetItr->directionECAL,
1104  eIds4,
1105  eHit4);
1106  double eEcal4(0);
1107  for (unsigned int k = 0; k < eIds4.size(); ++k) {
1108  if (eHit4[k] > eThreshold(eIds4[k], geo))
1109  eEcal4 += eHit4[k];
1110  }
1111 #ifdef EDM_ML_DEBUG
1112  if (debug_)
1113  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR4 << ":" << eEcal4;
1114 #endif
1115  t_eMipDR4 = eEcal4;
1118  std::vector<DetId> eIds5;
1119  std::vector<double> eHit5;
1120  t_eMipDR5 = spr::eCone_ecal(geo,
1121  barrelRecHitsHandle,
1122  endcapRecHitsHandle,
1123  trkDetItr->pointHCAL,
1124  trkDetItr->pointECAL,
1125  a_mipR5_,
1126  trkDetItr->directionECAL,
1127  eIds5,
1128  eHit5);
1129  double eEcal5(0);
1130  for (unsigned int k = 0; k < eIds5.size(); ++k) {
1131  if (eHit5[k] > eThreshold(eIds5[k], geo))
1132  eEcal5 += eHit5[k];
1133  }
1134 #ifdef EDM_ML_DEBUG
1135  if (debug_)
1136  edm::LogVerbatim("HcalIsoTrack") << "eMIP before and after: " << t_eMipDR5 << ":" << eEcal5;
1137 #endif
1138  t_eMipDR5 = eEcal5;
1140 
1141  t_emaxNearP = spr::chargeIsolationEcal(nTracks, trkCaloDets, geo, caloTopology, 15, 15);
1142  const DetId cellE(trkDetItr->detIdECAL);
1143  std::pair<double, bool> e11x11P = spr::eECALmatrix(cellE,
1144  barrelRecHitsHandle,
1145  endcapRecHitsHandle,
1146  *theEcalChStatus,
1147  geo,
1148  caloTopology,
1149  theEcalSevlv,
1150  5,
1151  5,
1152  -100.0,
1153  -100.0,
1154  -100.0,
1155  100.0);
1156  std::pair<double, bool> e15x15P = spr::eECALmatrix(cellE,
1157  barrelRecHitsHandle,
1158  endcapRecHitsHandle,
1159  *theEcalChStatus,
1160  geo,
1161  caloTopology,
1162  theEcalSevlv,
1163  7,
1164  7,
1165  -100.0,
1166  -100.0,
1167  -100.0,
1168  100.0);
1169  if (e11x11P.second && e15x15P.second) {
1170  t_eAnnular = (e15x15P.first - e11x11P.first);
1171  } else {
1172  t_eAnnular = -(e15x15P.first - e11x11P.first);
1173  }
1174  t_hmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, false);
1175  const DetId cellH(trkDetItr->detIdHCAL);
1176  double h5x5 = spr::eHCALmatrix(
1177  theHBHETopology, cellH, hbhe, 2, 2, false, true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1178  double h7x7 = spr::eHCALmatrix(
1179  theHBHETopology, cellH, hbhe, 3, 3, false, true, -100.0, -100.0, -100.0, -100.0, -100.0, 100.0);
1180  t_hAnnular = h7x7 - h5x5;
1181 #ifdef EDM_ML_DEBUG
1182  if (debug_)
1183  edm::LogVerbatim("HcalIsoTrack") << "max p Near (Ecal) " << t_emaxNearP << " (Hcal) " << t_hmaxNearP
1184  << " Annular E (Ecal) " << e11x11P.first << ":" << e15x15P.first << ":"
1185  << t_eAnnular << " (Hcal) " << h5x5 << ":" << h7x7 << ":" << t_hAnnular;
1186 #endif
1187  t_gentrackP = trackP(pTrack, genParticles);
1188  if (t_eMipDR < eEcalMax_ && t_hmaxNearP < eIsolation) {
1189  t_DetIds->clear();
1190  t_HitEnergies->clear();
1191  t_DetIds1->clear();
1192  t_HitEnergies1->clear();
1193  t_DetIds3->clear();
1194  t_HitEnergies3->clear();
1195  int nRecHits(-999), nRecHits1(-999), nRecHits3(-999);
1196  std::vector<DetId> ids, ids1, ids3;
1197  std::vector<double> edet0, edet1, edet3;
1198  t_eHcal = spr::eCone_hcal(geo,
1199  hbhe,
1200  trkDetItr->pointHCAL,
1201  trkDetItr->pointECAL,
1202  a_coneR_,
1203  trkDetItr->directionHCAL,
1204  nRecHits,
1205  ids,
1206  edet0,
1207  useRaw_);
1208  if (!oldID_.empty()) {
1209  for (unsigned k = 0; k < ids.size(); ++k)
1210  ids[k] = newId(ids[k]);
1211  }
1212  storeEnergy(0, respCorrs, ids, edet0, t_eHcal, t_DetIds, t_HitEnergies);
1213 
1214  //----- hcal energy in the extended cone 1 (a_coneR+10) --------------
1215  t_eHcal10 = spr::eCone_hcal(geo,
1216  hbhe,
1217  trkDetItr->pointHCAL,
1218  trkDetItr->pointECAL,
1219  a_coneR1_,
1220  trkDetItr->directionHCAL,
1221  nRecHits1,
1222  ids1,
1223  edet1,
1224  useRaw_);
1225  if (!oldID_.empty()) {
1226  for (unsigned k = 0; k < ids1.size(); ++k)
1227  ids1[k] = newId(ids1[k]);
1228  }
1229  storeEnergy(1, respCorrs, ids1, edet1, t_eHcal10, t_DetIds1, t_HitEnergies1);
1230 
1231  //----- hcal energy in the extended cone 3 (a_coneR+30) --------------
1232  t_eHcal30 = spr::eCone_hcal(geo,
1233  hbhe,
1234  trkDetItr->pointHCAL,
1235  trkDetItr->pointECAL,
1236  a_coneR2_,
1237  trkDetItr->directionHCAL,
1238  nRecHits3,
1239  ids3,
1240  edet3,
1241  useRaw_);
1242  if (!oldID_.empty()) {
1243  for (unsigned k = 0; k < ids3.size(); ++k)
1244  ids3[k] = newId(ids3[k]);
1245  }
1246  storeEnergy(3, respCorrs, ids3, edet3, t_eHcal30, t_DetIds3, t_HitEnergies3);
1247 
1248 #ifdef EDM_ML_DEBUG
1249  if (debug_) {
1250  edm::LogVerbatim("HcalIsoTrack")
1251  << "This track : " << nTracks << " (pt|eta|phi|p) : " << t_pt << "|" << pTrack->eta() << "|" << t_phi
1252  << "|" << t_p << " Generator Level p " << t_gentrackP;
1253  edm::LogVerbatim("HcalIsoTrack")
1254  << "e_MIP " << t_eMipDR << " Chg Isolation " << t_hmaxNearP << " eHcal" << t_eHcal << " ieta " << t_ieta
1255  << " Quality " << t_qltyMissFlag << ":" << t_qltyPVFlag << ":" << t_selectTk;
1256  for (unsigned int ll = 0; ll < t_DetIds->size(); ll++) {
1257  edm::LogVerbatim("HcalIsoTrack")
1258  << "det id is = " << t_DetIds->at(ll) << " hit enery is = " << t_HitEnergies->at(ll);
1259  }
1260  for (unsigned int ll = 0; ll < t_DetIds1->size(); ll++) {
1261  edm::LogVerbatim("HcalIsoTrack")
1262  << "det id is = " << t_DetIds1->at(ll) << " hit enery is = " << t_HitEnergies1->at(ll);
1263  }
1264  for (unsigned int ll = 0; ll < t_DetIds3->size(); ll++) {
1265  edm::LogVerbatim("HcalIsoTrack")
1266  << "det id is = " << t_DetIds3->at(ll) << " hit enery is = " << t_HitEnergies3->at(ll);
1267  }
1268  }
1269 #endif
1270  bool accept(false);
1271  if (t_p > pTrackMin_) {
1272  if (t_p < pTrackLow_) {
1273  ++nLow_;
1274  if (prescaleLow_ <= 1)
1275  accept = true;
1276  else if (nLow_ % prescaleLow_ == 1)
1277  accept = true;
1278  } else if (t_p > pTrackHigh_) {
1279  ++nHigh_;
1280  if (prescaleHigh_ <= 1)
1281  accept = true;
1282  else if (nHigh_ % prescaleHigh_ == 1)
1283  accept = true;
1284  } else {
1285  accept = true;
1286  }
1287  }
1288  if (accept) {
1289  tree->Fill();
1290  edm::LogVerbatim("HcalIsoTrackX") << "Run " << t_RunNo << " Event " << t_EventNo;
1291  nSave++;
1292  int type(0);
1293  if (t_eMipDR < 1.0) {
1294  if (t_hmaxNearP < eIsolate2_) {
1295  ++nLoose;
1296  type = 1;
1297  }
1298  if (t_hmaxNearP < eIsolate1_) {
1299  ++nTight;
1300  type = 2;
1301  }
1302  }
1303  if (t_p > 40.0 && t_p <= 60.0 && t_selectTk) {
1304  t_ietaGood->emplace_back(t_ieta);
1305  t_trackType->emplace_back(type);
1306  }
1307 #ifdef EDM_ML_DEBUG
1308  if (debug_) {
1309  for (unsigned int k = 0; k < t_trgbits->size(); k++) {
1310  edm::LogVerbatim("HcalIsoTrack") << "trigger bit is = " << t_trgbits->at(k);
1311  }
1312  }
1313 #endif
1314  }
1315  }
1316  }
1317  }
1318  std::array<int, 3> i3{{nSave, nLoose, nTight}};
1319  return i3;
1320 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
Log< level::Info, true > LogVerbatim
spr::trackSelectionParameters selectionParameter_
const double maxRestrictionP_
std::vector< int > * t_ietaAll
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
std::vector< double > * t_HitEnergies
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
void storeEnergy(int indx, const HcalRespCorrs *respCorrs, const std::vector< DetId > &ids, std::vector< double > &edet, double &eHcal, std::vector< unsigned int > *detIds, std::vector< double > *hitEnergies)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
std::vector< unsigned int > * t_DetIds
std::vector< double > * t_HitEnergies1
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
std::vector< double > * t_HitEnergies3
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
double trackP(const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
double pt() const
track transverse momentum
Definition: TrackBase.h:637
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
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)
bool isValid() const
Definition: HandleBase.h:70
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
std::vector< bool > * t_trgbits
const double slopeRestrictionP_
Definition: DetId.h:17
double rhoh(const edm::Handle< CaloTowerCollection > &)
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
double eThreshold(const DetId &id, const CaloGeometry *geo) const
std::vector< unsigned int > * t_DetIds1
std::vector< int > * t_ietaGood
std::vector< unsigned int > * t_DetIds3
const std::vector< int > oldID_
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
bool notaMuon(const reco::Track *pTrack0, const edm::Handle< reco::MuonCollection > &muonh)
DetId newId(const DetId &)
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)
std::vector< int > * t_trackType
DetId HcalIsoTrkAnalyzer::newId ( const DetId id)
private

Definition at line 1388 of file HcalIsoTrkAnalyzer.cc.

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

Referenced by fillTree().

1388  {
1389  HcalDetId hid(id);
1390  if (hep17_ && ((hid.iphi() < 63) || (hid.iphi() > 66) || (hid.zside() < 0)))
1391  return id;
1392  for (unsigned int k = 0; k < oldID_.size(); ++k) {
1393  if ((hid.subdetId() == oldDet_[k]) && (hid.ietaAbs() == oldEta_[k]) && (hid.depth() == oldDepth_[k])) {
1394  return static_cast<DetId>(HcalDetId(hid.subdet(), hid.ieta(), hid.iphi(), newDepth_[k]));
1395  }
1396  }
1397  return id;
1398 }
std::vector< int > oldEta_
uint16_t *__restrict__ id
std::vector< int > oldDepth_
Definition: DetId.h:17
std::vector< int > oldDet_
const std::vector< int > newDepth_
const std::vector< int > oldID_
bool HcalIsoTrkAnalyzer::notaMuon ( const reco::Track pTrack0,
const edm::Handle< reco::MuonCollection > &  muonh 
)
private

Definition at line 1461 of file HcalIsoTrkAnalyzer.cc.

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

Referenced by fillTree().

1461  {
1462  bool flag(true);
1463  for (reco::MuonCollection::const_iterator recMuon = muonh->begin(); recMuon != muonh->end(); ++recMuon) {
1464  if (recMuon->innerTrack().isNonnull()) {
1465  const reco::Track* pTrack = (recMuon->innerTrack()).get();
1466  bool mediumMuon = (((recMuon->isPFMuon()) && (recMuon->isGlobalMuon() || recMuon->isTrackerMuon())) &&
1467  (recMuon->innerTrack()->validFraction() > 0.49));
1468  if (mediumMuon) {
1469  double chiGlobal = ((recMuon->globalTrack().isNonnull()) ? recMuon->globalTrack()->normalizedChi2() : 999);
1470  bool goodGlob = (recMuon->isGlobalMuon() && chiGlobal < 3 &&
1471  recMuon->combinedQuality().chi2LocalPosition < 12 && recMuon->combinedQuality().trkKink < 20);
1472  mediumMuon = muon::segmentCompatibility(*recMuon) > (goodGlob ? 0.303 : 0.451);
1473  }
1474  if (mediumMuon) {
1475  double dR = reco::deltaR(pTrack->eta(), pTrack->phi(), pTrack0->eta(), pTrack0->phi());
1476  if (dR < 0.1) {
1477  flag = false;
1478  break;
1479  }
1480  }
1481  }
1482  }
1483  return flag;
1484 }
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
double HcalIsoTrkAnalyzer::rhoh ( const edm::Handle< CaloTowerCollection > &  tower)
private

Definition at line 1342 of file HcalIsoTrkAnalyzer.cc.

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

Referenced by fillTree().

1342  {
1343  std::vector<double> sumPFNallSMDQH2;
1344  sumPFNallSMDQH2.reserve(phibins_.size() * etabins_.size());
1345 
1346  for (auto eta : etabins_) {
1347  for (auto phi : phibins_) {
1348  double hadder = 0;
1349  for (const auto& pf_it : (*tower)) {
1350  if (fabs(eta - pf_it.eta()) > etahalfdist_)
1351  continue;
1352  if (fabs(reco::deltaPhi(phi, pf_it.phi())) > phihalfdist_)
1353  continue;
1354  hadder += pf_it.hadEt();
1355  }
1356  sumPFNallSMDQH2.emplace_back(hadder);
1357  }
1358  }
1359 
1360  double evt_smdq(0);
1361  std::sort(sumPFNallSMDQH2.begin(), sumPFNallSMDQH2.end());
1362  if (sumPFNallSMDQH2.size() % 2)
1363  evt_smdq = sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 1) / 2];
1364  else
1365  evt_smdq = (sumPFNallSMDQH2[sumPFNallSMDQH2.size() / 2] + sumPFNallSMDQH2[(sumPFNallSMDQH2.size() - 2) / 2]) / 2.;
1366  double rhoh = evt_smdq / (etadist_ * phidist_);
1367 #ifdef EDM_ML_DEBUG
1368  if (debug_)
1369  edm::LogVerbatim("HcalIsoTrack") << "Rho " << evt_smdq << ":" << rhoh;
1370 #endif
1371  return rhoh;
1372 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
Log< level::Info, true > LogVerbatim
std::vector< double > etabins_
std::vector< double > phibins_
double rhoh(const edm::Handle< CaloTowerCollection > &)
void HcalIsoTrkAnalyzer::storeEnergy ( int  indx,
const HcalRespCorrs respCorrs,
const std::vector< DetId > &  ids,
std::vector< double > &  edet,
double &  eHcal,
std::vector< unsigned int > *  detIds,
std::vector< double > *  hitEnergies 
)
private

Definition at line 1400 of file HcalIsoTrkAnalyzer.cc.

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

Referenced by fillTree().

1406  {
1407  double ehcal(0);
1408  if (unCorrect_) {
1409  for (unsigned int k = 0; k < ids.size(); ++k) {
1410  double corr = (respCorrs->getValues(ids[k]))->getValue();
1411  if (corr != 0)
1412  edet[k] /= corr;
1413  ehcal += edet[k];
1414  }
1415  } else {
1416  for (const auto& en : edet)
1417  ehcal += en;
1418  }
1419  if ((std::abs(ehcal - eHcal) > 0.001) && (!unCorrect_))
1420  edm::LogWarning("HcalIsoTrack") << "Check inconsistent energies: " << indx << " " << eHcal << ":" << ehcal
1421  << " from " << ids.size() << " cells";
1422  eHcal = hcalScale_ * ehcal;
1423 
1424  if (collapseDepth_) {
1425  std::map<HcalDetId, double> hitMap;
1426  for (unsigned int k = 0; k < ids.size(); ++k) {
1427  HcalDetId id = hdc_->mergedDepthDetId(HcalDetId(ids[k]));
1428  auto itr = hitMap.find(id);
1429  if (itr == hitMap.end()) {
1430  hitMap[id] = edet[k];
1431  } else {
1432  (itr->second) += edet[k];
1433  }
1434  }
1435  detIds->reserve(hitMap.size());
1436  hitEnergies->reserve(hitMap.size());
1437  for (const auto& hit : hitMap) {
1438  detIds->emplace_back(hit.first.rawId());
1439  hitEnergies->emplace_back(hit.second);
1440  }
1441  } else {
1442  detIds->reserve(ids.size());
1443  hitEnergies->reserve(ids.size());
1444  for (unsigned int k = 0; k < ids.size(); ++k) {
1445  detIds->emplace_back(ids[k].rawId());
1446  hitEnergies->emplace_back(edet[k]);
1447  }
1448  }
1449 #ifdef EDM_ML_DEBUG
1450  if (debug_) {
1451  edm::LogVerbatim("HcalIsoTrack") << "Input to storeEnergy with " << ids.size() << " cells";
1452  for (unsigned int k = 0; k < ids.size(); ++k)
1453  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << HcalDetId(ids[k]) << " E " << edet[k];
1454  edm::LogVerbatim("HcalIsoTrack") << "Output of storeEnergy with " << detIds->size() << " cells and Etot " << eHcal;
1455  for (unsigned int k = 0; k < detIds->size(); ++k)
1456  edm::LogVerbatim("HcalIsoTrack") << "Hit [" << k << "] " << HcalDetId((*detIds)[k]) << " E " << (*hitEnergies)[k];
1457  }
1458 #endif
1459 }
Log< level::Info, true > LogVerbatim
uint16_t *__restrict__ id
HcalDetId mergedDepthDetId(const HcalDetId &id) const
const Item * getValues(DetId fId, bool throwOnFail=true) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HcalDDDRecConstants * hdc_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Log< level::Warning, false > LogWarning
double HcalIsoTrkAnalyzer::trackP ( const reco::Track pTrack,
const edm::Handle< reco::GenParticleCollection > &  genParticles 
)
private

Definition at line 1326 of file HcalIsoTrkAnalyzer.cc.

References reco::deltaR(), dR(), reco::TrackBase::eta(), edm::HandleBase::isValid(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::phi(), and isotrackTrainRegressor::pmom.

Referenced by fillTree().

1327  {
1328  double pmom = -1.0;
1329  if (genParticles.isValid()) {
1330  double mindR(999.9);
1331  for (const auto& p : (*genParticles)) {
1332  double dR = reco::deltaR(pTrack->eta(), pTrack->phi(), p.momentum().Eta(), p.momentum().Phi());
1333  if (dR < mindR) {
1334  mindR = dR;
1335  pmom = p.momentum().R();
1336  }
1337  }
1338  }
1339  return pmom;
1340 }
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
bool isValid() const
Definition: HandleBase.h:70
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)

Member Data Documentation

double HcalIsoTrkAnalyzer::a_charIsoR_
private

Definition at line 162 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

double HcalIsoTrkAnalyzer::a_coneR1_
private

Definition at line 162 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

double HcalIsoTrkAnalyzer::a_coneR2_
private

Definition at line 162 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::a_coneR_
private

Definition at line 143 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::a_mipR2_
private

Definition at line 143 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::a_mipR3_
private

Definition at line 143 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::a_mipR4_
private

Definition at line 144 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::a_mipR5_
private

Definition at line 144 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::a_mipR_
private

Definition at line 143 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const bool HcalIsoTrkAnalyzer::collapseDepth_
private

Definition at line 151 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and storeEnergy().

const int HcalIsoTrkAnalyzer::dataType_
private

Definition at line 149 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 160 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

bool HcalIsoTrkAnalyzer::debug_
private

Definition at line 212 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), fillTree(), rhoh(), and storeEnergy().

const double HcalIsoTrkAnalyzer::eEcalMax_
private

Definition at line 144 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::eIsolate1_
private

Definition at line 146 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::eIsolate2_
private

Definition at line 146 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

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

Definition at line 164 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and rhoh().

double HcalIsoTrkAnalyzer::etadist_
private

Definition at line 166 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and rhoh().

double HcalIsoTrkAnalyzer::etahalfdist_
private

Definition at line 166 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and rhoh().

edm::Service<TFileService> HcalIsoTrkAnalyzer::fs
private

Definition at line 136 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob().

const double HcalIsoTrkAnalyzer::hcalScale_
private

Definition at line 146 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and storeEnergy().

const HcalDDDRecConstants* HcalIsoTrkAnalyzer::hdc_
private

Definition at line 163 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginRun(), and storeEnergy().

const bool HcalIsoTrkAnalyzer::hep17_
private

Definition at line 159 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and newId().

const double HcalIsoTrkAnalyzer::hitEthrEB_
private

Definition at line 152 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::hitEthrEE0_
private

Definition at line 152 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::hitEthrEE1_
private

Definition at line 152 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::hitEthrEE2_
private

Definition at line 153 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::hitEthrEE3_
private

Definition at line 153 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::hitEthrEEHi_
private

Definition at line 154 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::hitEthrEELo_
private

Definition at line 154 of file HcalIsoTrkAnalyzer.cc.

Referenced by eThreshold(), and HcalIsoTrkAnalyzer().

HLTConfigProvider HcalIsoTrkAnalyzer::hltConfig_
private

Definition at line 137 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginRun().

const bool HcalIsoTrkAnalyzer::ignoreTrigger_
private

Definition at line 150 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginRun(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::l1Filter_
private

Definition at line 141 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

l1t::L1TGlobalUtil* HcalIsoTrkAnalyzer::l1GtUtils_
private

Definition at line 135 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::l1TrigName_
private

Definition at line 157 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::l2Filter_
private

Definition at line 142 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::l3Filter_
private

Definition at line 142 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::labelEB_
private

Definition at line 156 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::labelEE_
private

Definition at line 157 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::labelGenTrack_
private

Definition at line 156 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::labelHBHE_
private

Definition at line 157 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::labelRecVtx_
private

Definition at line 156 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::labelTower_
private

Definition at line 157 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::maxRestrictionP_
private

Definition at line 145 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const int HcalIsoTrkAnalyzer::mode_
private

Definition at line 149 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer().

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

Definition at line 158 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and newId().

unsigned int HcalIsoTrkAnalyzer::nHigh_
private

Definition at line 161 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree().

unsigned int HcalIsoTrkAnalyzer::nLow_
private

Definition at line 161 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree().

unsigned int HcalIsoTrkAnalyzer::nRun_
private

Definition at line 161 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginRun(), and endRun().

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

Definition at line 165 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and newId().

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

Definition at line 165 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and newId().

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

Definition at line 165 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and newId().

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

Definition at line 158 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), HcalIsoTrkAnalyzer(), and newId().

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

Definition at line 164 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and rhoh().

double HcalIsoTrkAnalyzer::phidist_
private

Definition at line 166 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and rhoh().

double HcalIsoTrkAnalyzer::phihalfdist_
private

Definition at line 166 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and rhoh().

const int HcalIsoTrkAnalyzer::prescaleHigh_
private

Definition at line 148 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const int HcalIsoTrkAnalyzer::prescaleLow_
private

Definition at line 148 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const std::string HcalIsoTrkAnalyzer::processName_
private

Definition at line 141 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginRun(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::pTrackHigh_
private

Definition at line 147 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::pTrackLow_
private

Definition at line 147 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::pTrackMin_
private

Definition at line 144 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

spr::trackSelectionParameters HcalIsoTrkAnalyzer::selectionParameter_
private

Definition at line 139 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

const double HcalIsoTrkAnalyzer::slopeRestrictionP_
private

Definition at line 145 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().

int HcalIsoTrkAnalyzer::t_allvertex
private

Definition at line 209 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

int HcalIsoTrkAnalyzer::t_DataType
private

Definition at line 192 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

std::vector<unsigned int>* HcalIsoTrkAnalyzer::t_DetIds
private

Definition at line 204 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<unsigned int> * HcalIsoTrkAnalyzer::t_DetIds1
private

Definition at line 204 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<unsigned int> * HcalIsoTrkAnalyzer::t_DetIds3
private

Definition at line 204 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eAnnular
private

Definition at line 200 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eHcal
private

Definition at line 201 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eHcal10
private

Definition at line 201 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eHcal30
private

Definition at line 201 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_emaxNearP
private

Definition at line 200 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eMipDR
private

Definition at line 198 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eMipDR2
private

Definition at line 198 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eMipDR3
private

Definition at line 198 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eMipDR4
private

Definition at line 198 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_eMipDR5
private

Definition at line 199 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_Event
private

Definition at line 192 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

unsigned int HcalIsoTrkAnalyzer::t_EventNo
private

Definition at line 191 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_EventWeight
private

Definition at line 194 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_gentrackP
private

Definition at line 199 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_goodPV
private

Definition at line 193 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_hAnnular
private

Definition at line 200 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<double>* HcalIsoTrkAnalyzer::t_HitEnergies
private

Definition at line 205 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<double> * HcalIsoTrkAnalyzer::t_HitEnergies1
private

Definition at line 205 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<double> * HcalIsoTrkAnalyzer::t_HitEnergies3
private

Definition at line 205 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<bool> * HcalIsoTrkAnalyzer::t_hltbits
private

Definition at line 206 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_hmaxNearP
private

Definition at line 199 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_ieta
private

Definition at line 192 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

std::vector<int>* HcalIsoTrkAnalyzer::t_ietaAll
private

Definition at line 210 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginJob(), and fillTree().

std::vector<int> * HcalIsoTrkAnalyzer::t_ietaGood
private

Definition at line 210 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_iphi
private

Definition at line 192 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

bool HcalIsoTrkAnalyzer::t_L1Bit
private

Definition at line 207 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_l1eta
private

Definition at line 195 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_l1phi
private

Definition at line 195 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_l1pt
private

Definition at line 195 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_l3eta
private

Definition at line 196 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_l3phi
private

Definition at line 196 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_l3pt
private

Definition at line 196 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_mindR1
private

Definition at line 197 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_mindR2
private

Definition at line 197 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_nTrk
private

Definition at line 193 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_nVtx
private

Definition at line 193 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HcalIsoTrkAnalyzer::t_p
private

Definition at line 194 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_phi
private

Definition at line 194 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_pt
private

Definition at line 194 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

bool HcalIsoTrkAnalyzer::t_qltyFlag
private

Definition at line 202 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

bool HcalIsoTrkAnalyzer::t_qltyMissFlag
private

Definition at line 202 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

bool HcalIsoTrkAnalyzer::t_qltyPVFlag
private

Definition at line 203 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

double HcalIsoTrkAnalyzer::t_rhoh
private

Definition at line 201 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_Run
private

Definition at line 192 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

unsigned int HcalIsoTrkAnalyzer::t_RunNo
private

Definition at line 191 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginJob(), and fillTree().

bool HcalIsoTrkAnalyzer::t_selectTk
private

Definition at line 202 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginJob(), and fillTree().

int HcalIsoTrkAnalyzer::t_Tracks
private

Definition at line 208 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

int HcalIsoTrkAnalyzer::t_TracksLoose
private

Definition at line 209 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

int HcalIsoTrkAnalyzer::t_TracksProp
private

Definition at line 208 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

int HcalIsoTrkAnalyzer::t_TracksSaved
private

Definition at line 208 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

int HcalIsoTrkAnalyzer::t_TracksTight
private

Definition at line 209 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

std::vector<int> * HcalIsoTrkAnalyzer::t_trackType
private

Definition at line 210 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginJob(), and fillTree().

std::vector<bool>* HcalIsoTrkAnalyzer::t_trgbits
private

Definition at line 206 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginJob(), and fillTree().

bool HcalIsoTrkAnalyzer::t_TrigPass
private

Definition at line 203 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

bool HcalIsoTrkAnalyzer::t_TrigPassSel
private

Definition at line 203 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

const std::string HcalIsoTrkAnalyzer::theTrackQuality_
private

Definition at line 140 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const edm::InputTag HcalIsoTrkAnalyzer::theTriggerResultsLabel_
private

Definition at line 155 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer().

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

Definition at line 178 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 182 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 172 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 176 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 186 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 181 of file HcalIsoTrkAnalyzer.cc.

Referenced by beginRun(), and HcalIsoTrkAnalyzer().

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

Definition at line 173 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 183 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 174 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 177 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 170 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 185 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 175 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 187 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 179 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 169 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 171 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 188 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 184 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 167 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 168 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

TTree* HcalIsoTrkAnalyzer::tree
private
TTree * HcalIsoTrkAnalyzer::tree2
private

Definition at line 190 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and beginJob().

const edm::InputTag HcalIsoTrkAnalyzer::triggerEvent_
private

Definition at line 155 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

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

Definition at line 138 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), beginRun(), and HcalIsoTrkAnalyzer().

const bool HcalIsoTrkAnalyzer::unCorrect_
private

Definition at line 151 of file HcalIsoTrkAnalyzer.cc.

Referenced by HcalIsoTrkAnalyzer(), and storeEnergy().

const bool HcalIsoTrkAnalyzer::useL1Trigger_
private

Definition at line 150 of file HcalIsoTrkAnalyzer.cc.

Referenced by analyze(), and HcalIsoTrkAnalyzer().

const int HcalIsoTrkAnalyzer::useRaw_
private

Definition at line 149 of file HcalIsoTrkAnalyzer.cc.

Referenced by fillTree(), and HcalIsoTrkAnalyzer().