CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
IsoTrig Class Reference

#include <IsoTrig/IsoTrig/src/IsoTrig.cc>

Inheritance diagram for IsoTrig:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 IsoTrig (const edm::ParameterSet &)
 
 ~IsoTrig () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
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 (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void chgIsolation (double &etaTriggered, double &phiTriggered, edm::Handle< reco::TrackCollection > &trkCollection, const edm::Event &theEvent)
 
void clearChgIsolnTreeVectors ()
 
void clearMipCutTreeVectors ()
 
double dEta (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dinvPt (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dP (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dPhi (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dPt (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dR (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
std::pair< double, double > etaPhiTrigger ()
 
void fillCuts (int, double, double, double, math::XYZTLorentzVector &, int, bool)
 
void fillDifferences (int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
 
void fillEnergy (int, int, double, double, math::XYZTLorentzVector &)
 
void fillHist (int, math::XYZTLorentzVector &)
 
double getDistInCM (double eta1, double phi1, double eta2, double phi2)
 
std::pair< double, double > GetEtaPhiAtEcal (double etaIP, double phiIP, double pT, int charge, double vtxZ)
 
void getGoodTracks (const edm::Event &, edm::Handle< reco::TrackCollection > &)
 
void pushChgIsolnTreeVecs (math::XYZTLorentzVector &Pixcand, math::XYZTLorentzVector &Trkcand, std::vector< double > &PixMaxP, double &TrkMaxP, bool &selTk)
 
void pushMipCutTreeVecs (math::XYZTLorentzVector &NFcand, math::XYZTLorentzVector &Trkcand, double &EmipNFcand, double &EmipTrkcand, double &mindR, double &mindP1, std::vector< bool > &Flags, double hCone)
 
void studyIsolation (edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
 
void studyMipCut (edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
 
void studyTiming (const edm::Event &theEvent)
 
void studyTrigger (edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
 
void StudyTrkEbyP (edm::Handle< reco::TrackCollection > &trkCollection)
 

Private Attributes

const double a_charIsoR_
 
const double a_coneR_
 
const double a_mipR_
 
const double a_neutIsoR_
 
const double a_neutR1_
 
const double a_neutR2_
 
edm::Handle< EcalRecHitCollectionbarrelRecHitsHandle_
 
edm::Handle< reco::BeamSpotbeamSpotH_
 
edm::ESHandle< MagneticFieldbFieldH_
 
double bfVal_
 
bool changed_
 
TTree * ChgIsolnTree_
 
const double cutCharge_
 
const double cutMip_
 
const double cutNeutral_
 
const bool doChgIsolTree_
 
const bool doL2L3_
 
const bool doMipCutTree_
 
const bool doStudyIsol_
 
const bool doTiming_
 
const bool doTrkResTree_
 
const double dr_L1_
 
edm::Handle< EcalRecHitCollectionendcapRecHitsHandle_
 
edm::Service< TFileServicefs_
 
TH1I * g_Accepts
 
TH1I * g_Pre
 
TH1I * g_PreHLT
 
TH1I * g_PreL1
 
TH1D * h_dEta [9]
 
TH1D * h_dEtaL1 [2]
 
TH1D * h_dinvPt [9]
 
TH1D * h_dP [9]
 
TH1D * h_dPhi [9]
 
TH1D * h_dPhiL1 [2]
 
TH1D * h_dPt [9]
 
TH1D * h_dRL1 [2]
 
TH1D * h_eCalo [5][6][48]
 
TH1D * h_eHcal [5][6][48]
 
TH1D * h_eMaxNearP [2]
 
TH1D * h_eMip [2]
 
TH1D * h_eNeutIso [2]
 
TH1D * h_EnIn
 
TH1D * h_EnOut
 
TH1D * h_eta [20]
 
TH1D * h_etaCalibTracks [5][2][2]
 
TH1D * h_etaMipTracks [5][2][2]
 
TH1I * h_Filters
 
TH1I * h_HLT
 
TH1D * h_L1ObjEnergy
 
TH1D * h_mindR [9]
 
TH2D * h_MipEnMatch
 
TH2D * h_MipEnNoMatch
 
TH1I * h_nHLT
 
TH1I * h_nL3Objs
 
TH1D * h_p [20]
 
TH1D * h_phi [20]
 
TH1I * h_Pre
 
TH1I * h_PreHLT
 
TH1D * h_PreHLTwt
 
TH1I * h_PreL1
 
TH1D * h_PreL1wt
 
TH1D * h_pt [20]
 
edm::Handle< HBHERecHitCollectionhbhe_
 
HLTPrescaleProvider hltPrescaleProvider_
 
const edm::InputTag l1CandTag_
 
const edm::InputTag l2CandTag_
 
math::XYZPoint leadPV_
 
const int maxRunNo_
 
const double minPTrackValue_
 
const int minRunNo_
 
TTree * MipCutTree_
 
edm::ESHandle< CaloGeometrypG_
 
const edm::InputTag pixCandTag_
 
const std::vector< double > pixelIsolationConeSizeAtEC_
 
std::vector< reco::TrackRefpixelTrackRefsHB_
 
std::vector< reco::TrackRefpixelTrackRefsHE_
 
const std::vector< edm::InputTagpixelTracksSources_
 
double pLimits_ [6]
 
const double prelimCone_
 
const std::string processName_
 
double rEB_
 
edm::Handle< reco::VertexCollectionrecVtxs_
 
spr::trackSelectionParameters selectionParameters_
 
std::vector< double > * t_ECone
 
std::vector< double > * t_NFcandEmip
 
std::vector< double > * t_NFcandEta
 
std::vector< double > * t_NFcandP
 
std::vector< double > * t_NFcandPhi
 
std::vector< double > * t_NFcandPt
 
std::vector< double > * t_NFTrkcandEmip
 
std::vector< double > * t_NFTrkcandEta
 
std::vector< double > * t_NFTrkcandP
 
std::vector< double > * t_NFTrkcandPhi
 
std::vector< double > * t_NFTrkcandPt
 
std::vector< bool > * t_NFTrkChgIsoFlag
 
std::vector< double > * t_NFTrkMinDP1
 
std::vector< double > * t_NFTrkMinDR
 
std::vector< bool > * t_NFTrkMipFlag
 
std::vector< bool > * t_NFTrkMissFlag
 
std::vector< bool > * t_NFTrkNeuIsoFlag
 
std::vector< bool > * t_NFTrkPropFlag
 
std::vector< bool > * t_NFTrkPVFlag
 
std::vector< bool > * t_NFTrkqltyFlag
 
std::vector< bool > * t_NFTrkselTkFlag
 
std::vector< int > * t_nGoodTk
 
std::vector< int > * t_nPixCand
 
std::vector< int > * t_nPixSeed
 
std::vector< double > * t_PixcandEta
 
std::vector< std::vector< double > > * t_PixcandMaxP
 
std::vector< double > * t_PixcandP
 
std::vector< double > * t_PixcandPhi
 
std::vector< double > * t_PixcandPt
 
std::vector< double > * t_PixTrkcandEta
 
std::vector< double > * t_PixTrkcandMaxP
 
std::vector< double > * t_PixTrkcandP
 
std::vector< double > * t_PixTrkcandPhi
 
std::vector< double > * t_PixTrkcandPt
 
std::vector< bool > * t_PixTrkcandselTk
 
std::vector< double > * t_timeL2Prod
 
std::vector< double > * t_TrkhCone
 
std::vector< bool > * t_TrkMissFlag
 
std::vector< bool > * t_TrkNuIsolFlag
 
std::vector< double > * t_TrkP
 
std::vector< bool > * t_TrkPVFlag
 
std::vector< bool > * t_TrkqltyFlag
 
std::vector< bool > * t_TrkselTkFlag
 
const double tauUnbiasCone_
 
std::string theTrackQuality_
 
TTree * TimingTree_
 
edm::EDGetTokenT< reco::BeamSpottok_bs_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EB_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EE_
 
edm::EDGetTokenT< reco::TrackCollectiontok_genTrack_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbhe_
 
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefstok_hlt_
 
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefstok_l1cand_
 
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollectiontok_l2cand_
 
edm::EDGetTokenT< LumiDetailstok_lumi_
 
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollectiontok_pixtk_
 
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
 
edm::EDGetTokenT< reco::VertexCollectiontok_recVtx_
 
edm::EDGetTokenT< SeedingLayerSetsHitstok_SeedingLayerHB_
 
edm::EDGetTokenT< SeedingLayerSetsHitstok_SeedingLayerHE_
 
edm::EDGetTokenT< SiPixelRecHitCollectiontok_SiPixelRecHits_
 
edm::EDGetTokenT< trigger::TriggerEventtok_trigEvt_
 
edm::EDGetTokenT< edm::TriggerResultstok_trigRes_
 
edm::EDGetTokenT< reco::VertexCollectiontok_verthb_
 
edm::EDGetTokenT< reco::VertexCollectiontok_verthe_
 
std::map< unsigned int, unsigned int > trigList_
 
const std::vector< std::string > trigNames_
 
std::map< unsigned int, const std::pair< int, int > > trigPreList_
 
TTree * TrkResTree_
 
std::vector< math::XYZTLorentzVectorvec_ [3]
 
const int verbosity_
 
const double vtxCutIsol_
 
const double vtxCutSeed_
 
double zEE_
 

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)
 
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<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)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 96 of file IsoTrig.cc.

Constructor & Destructor Documentation

IsoTrig::IsoTrig ( const edm::ParameterSet iConfig)
explicit

Definition at line 267 of file IsoTrig.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutIsoR_, a_neutR1_, a_neutR2_, cutCharge_, cutMip_, cutNeutral_, doChgIsolTree_, doTiming_, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, HLT_2018_cff::InputTag, dqmdumpme::k, TFileService::kSharedResource, l1CandTag_, l2CandTag_, spr::trackSelectionParameters::maxChi2, spr::trackSelectionParameters::maxDpOverP, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, spr::trackSelectionParameters::minLayerCrossed, spr::trackSelectionParameters::minOuterHit, spr::trackSelectionParameters::minPt, minPTrackValue_, spr::trackSelectionParameters::minQuality, pixCandTag_, pixelIsolationConeSizeAtEC_, pixelTracksSources_, pLimits_, prelimCone_, processName_, reco::TrackBase::qualityByName(), rEB_, selectionParameters_, tauUnbiasCone_, theTrackQuality_, tok_bs_, tok_EB_, tok_EE_, tok_genTrack_, tok_hbhe_, tok_hlt_, tok_l1cand_, tok_l2cand_, tok_lumi_, tok_pixtk_, tok_pixtks_, tok_recVtx_, tok_SeedingLayerHB_, tok_SeedingLayerHE_, tok_SiPixelRecHits_, tok_trigEvt_, tok_trigRes_, tok_verthb_, tok_verthe_, verbosity_, vtxCutIsol_, vtxCutSeed_, and zEE_.

268  : hltPrescaleProvider_(iConfig, consumesCollector(), *this),
269  trigNames_(iConfig.getUntrackedParameter<std::vector<std::string>>("Triggers")),
270  pixCandTag_(iConfig.getUntrackedParameter<edm::InputTag>("pixCandTag")),
271  l1CandTag_(iConfig.getUntrackedParameter<edm::InputTag>("l1CandTag")),
272  l2CandTag_(iConfig.getUntrackedParameter<edm::InputTag>("l2CandTag")),
273  pixelTracksSources_(iConfig.getUntrackedParameter<std::vector<edm::InputTag>>("pixelTracksSources")),
274  doL2L3_(iConfig.getUntrackedParameter<bool>("doL2L3", true)),
275  doTiming_(iConfig.getUntrackedParameter<bool>("doTimingTree", true)),
276  doMipCutTree_(iConfig.getUntrackedParameter<bool>("doMipCutTree", true)),
277  doTrkResTree_(iConfig.getUntrackedParameter<bool>("doTrkResTree", true)),
278  doChgIsolTree_(iConfig.getUntrackedParameter<bool>("doChgIsolTree", true)),
279  doStudyIsol_(iConfig.getUntrackedParameter<bool>("doStudyIsol", true)),
280  verbosity_(iConfig.getUntrackedParameter<int>("verbosity", 0)),
281  pixelIsolationConeSizeAtEC_(iConfig.getUntrackedParameter<std::vector<double>>("pixelIsolationConeSizeAtEC")),
282  minPTrackValue_(iConfig.getUntrackedParameter<double>("minPTrackValue")),
283  vtxCutSeed_(iConfig.getUntrackedParameter<double>("vertexCutSeed")),
284  vtxCutIsol_(iConfig.getUntrackedParameter<double>("vertexCutIsol")),
285  tauUnbiasCone_(iConfig.getUntrackedParameter<double>("tauUnbiasCone")),
286  prelimCone_(iConfig.getUntrackedParameter<double>("prelimCone")),
287  theTrackQuality_(iConfig.getUntrackedParameter<std::string>("trackQuality", "highPurity")),
288  processName_(iConfig.getUntrackedParameter<std::string>("processName", "HLT")),
289  dr_L1_(iConfig.getUntrackedParameter<double>("isolationL1", 1.0)),
290  a_coneR_(iConfig.getUntrackedParameter<double>("coneRadius", 34.98)),
291  a_charIsoR_(a_coneR_ + 28.9),
292  a_neutIsoR_(a_charIsoR_ * 0.726),
293  a_mipR_(iConfig.getUntrackedParameter<double>("coneRadiusMIP", 14.0)),
294  a_neutR1_(iConfig.getUntrackedParameter<double>("coneRadiusNeut1", 21.0)),
295  a_neutR2_(iConfig.getUntrackedParameter<double>("coneRadiusNeut2", 29.0)),
296  cutMip_(iConfig.getUntrackedParameter<double>("cutMIP", 1.0)),
297  cutCharge_(iConfig.getUntrackedParameter<double>("chargeIsolation", 2.0)),
298  cutNeutral_(iConfig.getUntrackedParameter<double>("neutralIsolation", 2.0)),
299  minRunNo_(iConfig.getUntrackedParameter<int>("minRun")),
300  maxRunNo_(iConfig.getUntrackedParameter<int>("maxRun")),
301  changed_(false),
302  t_timeL2Prod(nullptr),
303  t_nPixCand(nullptr),
304  t_nPixSeed(nullptr),
305  t_nGoodTk(nullptr),
306  t_TrkhCone(nullptr),
307  t_TrkP(nullptr),
308  t_TrkselTkFlag(nullptr),
309  t_TrkqltyFlag(nullptr),
310  t_TrkMissFlag(nullptr),
311  t_TrkPVFlag(nullptr),
312  t_TrkNuIsolFlag(nullptr),
313  t_PixcandP(nullptr),
314  t_PixcandPt(nullptr),
315  t_PixcandEta(nullptr),
316  t_PixcandPhi(nullptr),
317  t_PixcandMaxP(nullptr),
318  t_PixTrkcandP(nullptr),
319  t_PixTrkcandPt(nullptr),
320  t_PixTrkcandEta(nullptr),
321  t_PixTrkcandPhi(nullptr),
322  t_PixTrkcandMaxP(nullptr),
323  t_PixTrkcandselTk(nullptr),
324  t_NFcandP(nullptr),
325  t_NFcandPt(nullptr),
326  t_NFcandEta(nullptr),
327  t_NFcandPhi(nullptr),
328  t_NFcandEmip(nullptr),
329  t_NFTrkcandP(nullptr),
330  t_NFTrkcandPt(nullptr),
331  t_NFTrkcandEta(nullptr),
332  t_NFTrkcandPhi(nullptr),
333  t_NFTrkcandEmip(nullptr),
334  t_NFTrkMinDR(nullptr),
335  t_NFTrkMinDP1(nullptr),
336  t_NFTrkselTkFlag(nullptr),
337  t_NFTrkqltyFlag(nullptr),
338  t_NFTrkMissFlag(nullptr),
339  t_NFTrkPVFlag(nullptr),
340  t_NFTrkPropFlag(nullptr),
341  t_NFTrkChgIsoFlag(nullptr),
342  t_NFTrkNeuIsoFlag(nullptr),
343  t_NFTrkMipFlag(nullptr),
344  t_ECone(nullptr) {
345  usesResource(TFileService::kSharedResource);
346 
347  //now do whatever initialization is needed
349  selectionParameters_.minPt = iConfig.getUntrackedParameter<double>("minTrackPt", 10.0);
350  selectionParameters_.minQuality = trackQuality_;
351  selectionParameters_.maxDxyPV = iConfig.getUntrackedParameter<double>("maxDxyPV", 0.2);
352  selectionParameters_.maxDzPV = iConfig.getUntrackedParameter<double>("maxDzPV", 5.0);
353  selectionParameters_.maxChi2 = iConfig.getUntrackedParameter<double>("maxChi2", 5.0);
354  selectionParameters_.maxDpOverP = iConfig.getUntrackedParameter<double>("maxDpOverP", 0.1);
355  selectionParameters_.minOuterHit = iConfig.getUntrackedParameter<int>("minOuterHit", 4);
356  selectionParameters_.minLayerCrossed = iConfig.getUntrackedParameter<int>("minLayerCrossed", 8);
357  selectionParameters_.maxInMiss = iConfig.getUntrackedParameter<int>("maxInMiss", 0);
358  selectionParameters_.maxOutMiss = iConfig.getUntrackedParameter<int>("maxOutMiss", 0);
359 
360  // define tokens for access
361  tok_lumi_ = consumes<LumiDetails, edm::InLumi>(edm::InputTag("lumiProducer"));
362  edm::InputTag triggerEvent_("hltTriggerSummaryAOD", "", processName_);
363  tok_trigEvt_ = consumes<trigger::TriggerEvent>(triggerEvent_);
364  edm::InputTag theTriggerResultsLabel("TriggerResults", "", processName_);
365  tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel);
366  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
367  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
368  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
369  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
370  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
371  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
372  tok_pixtk_ = consumes<reco::IsolatedPixelTrackCandidateCollection>(pixCandTag_);
373  tok_l1cand_ = consumes<trigger::TriggerFilterObjectWithRefs>(l1CandTag_);
374  tok_l2cand_ = consumes<reco::IsolatedPixelTrackCandidateCollection>(l2CandTag_);
375  if (doTiming_) {
376  tok_verthb_ = consumes<reco::VertexCollection>(edm::InputTag("hltHITPixelVerticesHB"));
377  tok_verthe_ = consumes<reco::VertexCollection>(edm::InputTag("hltHITPixelVerticesHB"));
378  tok_hlt_ = consumes<trigger::TriggerFilterObjectWithRefs>(edm::InputTag("hltL1sL1SingleJet68"));
379  tok_SeedingLayerHB_ = consumes<SeedingLayerSetsHits>(edm::InputTag("hltPixelLayerTripletsHITHB"));
380  tok_SeedingLayerHE_ = consumes<SeedingLayerSetsHits>(edm::InputTag("hltPixelLayerTripletsHITHE"));
381  tok_SiPixelRecHits_ = consumes<SiPixelRecHitCollection>(edm::InputTag("hltSiPixelRecHits"));
382  }
383  if (doChgIsolTree_) {
384  for (unsigned int k = 0; k < pixelTracksSources_.size(); ++k) {
385  // edm::InputTag pix (pixelTracksSources_[k],"",processName_);
386  // tok_pixtks_.push_back(consumes<reco::TrackCollection>(pix));
387  tok_pixtks_.push_back(consumes<reco::TrackCollection>(pixelTracksSources_[k]));
388  }
389  }
390  if (verbosity_ >= 0) {
391  edm::LogVerbatim("IsoTrack") << "Parameters read from config file \n"
392  << "\t minPt " << selectionParameters_.minPt << "\t theTrackQuality "
393  << theTrackQuality_ << "\t minQuality " << selectionParameters_.minQuality
394  << "\t maxDxyPV " << selectionParameters_.maxDxyPV << "\t maxDzPV "
396  << "\t maxDpOverP " << selectionParameters_.maxDpOverP << "\t minOuterHit "
397  << selectionParameters_.minOuterHit << "\t minLayerCrossed "
398  << selectionParameters_.minLayerCrossed << "\t maxInMiss "
399  << selectionParameters_.maxInMiss << "\t maxOutMiss "
400  << selectionParameters_.maxOutMiss << "\t a_coneR " << a_coneR_ << "\t a_charIsoR "
401  << a_charIsoR_ << "\t a_neutIsoR " << a_neutIsoR_ << "\t a_mipR " << a_mipR_
402  << "\t a_neutR " << a_neutR1_ << ":" << a_neutR2_ << "\t cuts (MIP " << cutMip_
403  << " : Charge " << cutCharge_ << " : Neutral " << cutNeutral_ << ")";
404  edm::LogVerbatim("IsoTrack") << "Charge Isolation parameters:"
405  << "\t minPTrackValue " << minPTrackValue_ << "\t vtxCutSeed " << vtxCutSeed_
406  << "\t vtxCutIsol " << vtxCutIsol_ << "\t tauUnbiasCone " << tauUnbiasCone_
407  << "\t prelimCone " << prelimCone_ << "\t pixelIsolationConeSizeAtEC";
408  for (unsigned int k = 0; k < pixelIsolationConeSizeAtEC_.size(); ++k)
409  edm::LogVerbatim("IsoTrack") << "[" << k << "] " << pixelIsolationConeSizeAtEC_[k];
410  }
411  double pl[] = {20, 30, 40, 60, 80, 120};
412  for (int i = 0; i < 6; ++i)
413  pLimits_[i] = pl[i];
414  rEB_ = 123.8;
415  zEE_ = 317.0;
416 }
bool changed_
Definition: IsoTrig.cc:200
static const std::string kSharedResource
Definition: TFileService.h:76
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:225
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:222
const double a_coneR_
Definition: IsoTrig.cc:165
T getUntrackedParameter(std::string const &, T const &) const
std::string theTrackQuality_
Definition: IsoTrig.cc:161
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
Definition: IsoTrig.cc:185
const edm::InputTag l2CandTag_
Definition: IsoTrig.cc:153
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:239
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:243
const bool doChgIsolTree_
Definition: IsoTrig.cc:156
edm::EDGetTokenT< LumiDetails > tok_lumi_
Definition: IsoTrig.cc:169
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:227
const double a_charIsoR_
Definition: IsoTrig.cc:165
const double a_neutR2_
Definition: IsoTrig.cc:166
TrackQuality
track quality
Definition: TrackBase.h:150
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:236
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:229
const int verbosity_
Definition: IsoTrig.cc:157
const int maxRunNo_
Definition: IsoTrig.cc:168
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: IsoTrig.cc:176
const double a_neutIsoR_
Definition: IsoTrig.cc:165
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:206
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:209
double rEB_
Definition: IsoTrig.cc:163
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_pixtk_
Definition: IsoTrig.cc:183
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:242
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:226
const double minPTrackValue_
Definition: IsoTrig.cc:159
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:241
const double a_mipR_
Definition: IsoTrig.cc:166
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:217
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
Definition: IsoTrig.cc:170
const double tauUnbiasCone_
Definition: IsoTrig.cc:160
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:248
const double dr_L1_
Definition: IsoTrig.cc:165
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:240
const std::vector< edm::InputTag > pixelTracksSources_
Definition: IsoTrig.cc:154
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.cc:151
const bool doMipCutTree_
Definition: IsoTrig.cc:155
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
Definition: IsoTrig.cc:171
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:234
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHB_
Definition: IsoTrig.cc:180
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:215
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: IsoTrig.cc:175
const double prelimCone_
Definition: IsoTrig.cc:160
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:214
std::vector< double > * t_ECone
Definition: IsoTrig.cc:249
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: IsoTrig.cc:173
const double a_neutR1_
Definition: IsoTrig.cc:166
double zEE_
Definition: IsoTrig.cc:163
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:246
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
Definition: IsoTrig.cc:186
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:210
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:164
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:231
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHE_
Definition: IsoTrig.cc:181
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:204
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: IsoTrig.cc:177
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:218
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:233
const bool doTrkResTree_
Definition: IsoTrig.cc:156
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:237
const double cutCharge_
Definition: IsoTrig.cc:167
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:213
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: IsoTrig.cc:174
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:205
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:235
const bool doStudyIsol_
Definition: IsoTrig.cc:156
const edm::InputTag pixCandTag_
Definition: IsoTrig.cc:153
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:223
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
Definition: IsoTrig.cc:179
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:230
const int minRunNo_
Definition: IsoTrig.cc:168
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:212
const std::string processName_
Definition: IsoTrig.cc:162
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:221
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:238
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:184
const double vtxCutIsol_
Definition: IsoTrig.cc:159
const edm::InputTag l1CandTag_
Definition: IsoTrig.cc:153
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits_
Definition: IsoTrig.cc:182
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: IsoTrig.cc:178
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:219
reco::TrackBase::TrackQuality minQuality
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:220
const bool doTiming_
Definition: IsoTrig.cc:155
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:224
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:207
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
Definition: IsoTrig.cc:179
const std::vector< double > pixelIsolationConeSizeAtEC_
Definition: IsoTrig.cc:158
const double cutMip_
Definition: IsoTrig.cc:166
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
Definition: IsoTrig.cc:172
const double cutNeutral_
Definition: IsoTrig.cc:167
double pLimits_[6]
Definition: IsoTrig.cc:201
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:211
const std::vector< std::string > trigNames_
Definition: IsoTrig.cc:152
const double vtxCutSeed_
Definition: IsoTrig.cc:159
const bool doL2L3_
Definition: IsoTrig.cc:155
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:232
IsoTrig::~IsoTrig ( )
override

Definition at line 418 of file IsoTrig.cc.

References t_ECone, t_NFcandEmip, t_NFcandEta, t_NFcandP, t_NFcandPhi, t_NFcandPt, t_NFTrkcandEmip, t_NFTrkcandEta, t_NFTrkcandP, t_NFTrkcandPhi, t_NFTrkcandPt, t_NFTrkChgIsoFlag, t_NFTrkMinDP1, t_NFTrkMinDR, t_NFTrkMipFlag, t_NFTrkMissFlag, t_NFTrkNeuIsoFlag, t_NFTrkPropFlag, t_NFTrkPVFlag, t_NFTrkqltyFlag, t_NFTrkselTkFlag, t_nGoodTk, t_nPixCand, t_nPixSeed, t_PixcandEta, t_PixcandMaxP, t_PixcandP, t_PixcandPhi, t_PixcandPt, t_PixTrkcandEta, t_PixTrkcandMaxP, t_PixTrkcandP, t_PixTrkcandPhi, t_PixTrkcandPt, t_PixTrkcandselTk, t_timeL2Prod, t_TrkhCone, t_TrkMissFlag, t_TrkNuIsolFlag, t_TrkP, t_TrkPVFlag, t_TrkqltyFlag, and t_TrkselTkFlag.

418  {
419  // do anything here that needs to be done at desctruction time
420  // (e.g. close files, deallocate resources etc.)
421  if (t_timeL2Prod)
422  delete t_timeL2Prod;
423  if (t_nPixCand)
424  delete t_nPixCand;
425  if (t_nPixSeed)
426  delete t_nPixSeed;
427  if (t_nGoodTk)
428  delete t_nGoodTk;
429  if (t_TrkhCone)
430  delete t_TrkhCone;
431  if (t_TrkP)
432  delete t_TrkP;
433  if (t_TrkselTkFlag)
434  delete t_TrkselTkFlag;
435  if (t_TrkqltyFlag)
436  delete t_TrkqltyFlag;
437  if (t_TrkMissFlag)
438  delete t_TrkMissFlag;
439  if (t_TrkPVFlag)
440  delete t_TrkPVFlag;
441  if (t_TrkNuIsolFlag)
442  delete t_TrkNuIsolFlag;
443  if (t_PixcandP)
444  delete t_PixcandP;
445  if (t_PixcandPt)
446  delete t_PixcandPt;
447  if (t_PixcandEta)
448  delete t_PixcandEta;
449  if (t_PixcandPhi)
450  delete t_PixcandPhi;
451  if (t_PixcandMaxP)
452  delete t_PixcandMaxP;
453  if (t_PixTrkcandP)
454  delete t_PixTrkcandP;
455  if (t_PixTrkcandPt)
456  delete t_PixTrkcandPt;
457  if (t_PixTrkcandEta)
458  delete t_PixTrkcandEta;
459  if (t_PixTrkcandPhi)
460  delete t_PixTrkcandPhi;
461  if (t_PixTrkcandMaxP)
462  delete t_PixTrkcandMaxP;
463  if (t_PixTrkcandselTk)
464  delete t_PixTrkcandselTk;
465  if (t_NFcandP)
466  delete t_NFcandP;
467  if (t_NFcandPt)
468  delete t_NFcandPt;
469  if (t_NFcandEta)
470  delete t_NFcandEta;
471  if (t_NFcandPhi)
472  delete t_NFcandPhi;
473  if (t_NFcandEmip)
474  delete t_NFcandEmip;
475  if (t_NFTrkcandP)
476  delete t_NFTrkcandP;
477  if (t_NFTrkcandPt)
478  delete t_NFTrkcandPt;
479  if (t_NFTrkcandEta)
480  delete t_NFTrkcandEta;
481  if (t_NFTrkcandPhi)
482  delete t_NFTrkcandPhi;
483  if (t_NFTrkcandEmip)
484  delete t_NFTrkcandEmip;
485  if (t_NFTrkMinDR)
486  delete t_NFTrkMinDR;
487  if (t_NFTrkMinDP1)
488  delete t_NFTrkMinDP1;
489  if (t_NFTrkselTkFlag)
490  delete t_NFTrkselTkFlag;
491  if (t_NFTrkqltyFlag)
492  delete t_NFTrkqltyFlag;
493  if (t_NFTrkMissFlag)
494  delete t_NFTrkMissFlag;
495  if (t_NFTrkPVFlag)
496  delete t_NFTrkPVFlag;
497  if (t_NFTrkPropFlag)
498  delete t_NFTrkPropFlag;
499  if (t_NFTrkChgIsoFlag)
500  delete t_NFTrkChgIsoFlag;
501  if (t_NFTrkNeuIsoFlag)
502  delete t_NFTrkNeuIsoFlag;
503  if (t_NFTrkMipFlag)
504  delete t_NFTrkMipFlag;
505  if (t_ECone)
506  delete t_ECone;
507 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:225
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:222
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:239
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:243
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:227
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:236
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:229
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:206
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:209
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:242
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:226
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:241
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:217
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:248
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:240
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:234
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:215
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:214
std::vector< double > * t_ECone
Definition: IsoTrig.cc:249
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:210
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:231
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:204
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:218
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:233
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:237
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:213
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:205
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:235
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:223
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:230
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:212
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:221
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:238
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:219
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:220
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:224
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:207
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:211
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:232

Member Function Documentation

void IsoTrig::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 556 of file IsoTrig.cc.

References barrelRecHitsHandle_, beamSpotH_, Calorimetry_cff::bField, g4SimHits_cfi::BField, bFieldH_, bfVal_, edm::EventBase::bunchCrossing(), changed_, chgIsolation(), hitfit::clear(), doChgIsolTree_, doL2L3_, doMipCutTree_, doStudyIsol_, doTiming_, doTrkResTree_, endcapRecHitsHandle_, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), fastmath::etaphi(), etaPhiTrigger(), edm::EventID::event(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::filterTag(), spr::find(), edm::EventSetup::get(), edm::LuminosityBlock::getByToken(), edm::Event::getByToken(), getGoodTracks(), edm::Event::getLuminosityBlock(), trigger::TriggerEvent::getObjects(), h_Filters, h_HLT, h_L1ObjEnergy, h_nHLT, h_nL3Objs, h_Pre, h_PreHLT, h_PreHLTwt, h_PreL1, h_PreL1wt, hbhe_, ValidationMatrix::hlt, HltComparatorCreateWorkflow::hltConfig, HLTPrescaleProvider::hltConfigProvider(), hltPrescaleProvider_, mps_fire::i, trigger::TriggerObject::id(), edm::EventBase::id(), recoMuon::in, MagneticField::inTesla(), edm::HandleBase::isValid(), LumiDetails::kOCC1, label, edm::InputTag::label(), leadPV_, edm::EventBase::luminosityBlock(), spclusmultlumicorr_cfi::lumiProducer, LumiDetails::lumiValue(), PV3DBase< T, PVType, FrameType >::mag(), trigger::TriggerObject::mass(), HLTConfigProvider::moduleLabels(), LogMessageMonitor_cff::modules, dqmiodumpmetadata::n, pG_, trigger::TriggerObject::phi(), pixelTrackRefsHB_, pixelTrackRefsHE_, pixelTracksSources_, reco::BeamSpot::position(), hltrates_dqm_sourceclient-live_cfg::prescales, HLTPrescaleProvider::prescaleValues(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), trigger::TriggerObject::pt(), trigger::TriggerObject::px(), trigger::TriggerObject::py(), trigger::TriggerObject::pz(), recVtxs_, edm::EventID::run(), HLTConfigProvider::size(), findQualityFiles::size, trigger::TriggerEvent::sizeFilters(), AlCaHLTBitMon_QueryRunRegistry::string, studyIsolation(), studyMipCut(), studyTiming(), studyTrigger(), StudyTrkEbyP(), tok_bs_, tok_EB_, tok_EE_, tok_genTrack_, tok_hbhe_, tok_l1cand_, tok_l2cand_, tok_lumi_, tok_pixtk_, tok_pixtks_, tok_recVtx_, tok_trigEvt_, tok_trigRes_, PDWG_DiPhoton_SD_cff::triggerEvent, HLTConfigProvider::triggerIndex(), L1TEGammaOffline_cfi::triggerNames, edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), triggerResults, trigList_, trigNames_, trigPreList_, vec_, verbosity_, x, y, and z.

556  {
557  if (verbosity_ % 10 > 0)
558  edm::LogVerbatim("IsoTrack") << "Event starts====================================";
559 
560  int RunNo = iEvent.id().run();
561 
563 
564  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH_);
565  iSetup.get<CaloGeometryRecord>().get(pG_);
567  GlobalVector BField = bField->inTesla(GlobalPoint(0, 0, 0));
568  bfVal_ = BField.mag();
569 
571  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
572  iEvent.getByToken(tok_trigEvt_, triggerEventHandle);
573  if (!triggerEventHandle.isValid()) {
574  edm::LogWarning("IsoTrack") << "Error! Can't get the product hltTriggerSummaryAOD";
575 
576  } else {
577  triggerEvent = *(triggerEventHandle.product());
578  }
579  const trigger::TriggerObjectCollection &TOC(triggerEvent.getObjects());
582  iEvent.getByToken(tok_trigRes_, triggerResults);
583 
585  iEvent.getByToken(tok_genTrack_, trkCollection);
586 
589 
590  iEvent.getByToken(tok_hbhe_, hbhe_);
591 
593  iEvent.getByToken(tok_bs_, beamSpotH_);
594  if (!recVtxs_->empty() && !((*recVtxs_)[0].isFake())) {
595  leadPV_ = math::XYZPoint((*recVtxs_)[0].x(), (*recVtxs_)[0].y(), (*recVtxs_)[0].z());
596  } else if (beamSpotH_.isValid()) {
598  }
599 
600  if ((verbosity_ / 100) % 10 > 0) {
601  edm::LogVerbatim("IsoTrack") << "Primary Vertex " << leadPV_;
602  if (beamSpotH_.isValid())
603  edm::LogVerbatim("IsoTrack") << "Beam Spot " << beamSpotH_->position();
604  }
605  pixelTrackRefsHE_.clear();
606  pixelTrackRefsHB_.clear();
607  for (unsigned int iPix = 0; iPix < pixelTracksSources_.size(); iPix++) {
609  iEvent.getByToken(tok_pixtks_[iPix], iPixCol);
610  if (iPixCol.isValid()) {
611  for (reco::TrackCollection::const_iterator pit = iPixCol->begin(); pit != iPixCol->end(); pit++) {
612  if (iPix == 0)
613  pixelTrackRefsHB_.push_back(reco::TrackRef(iPixCol, pit - iPixCol->begin()));
614  pixelTrackRefsHE_.push_back(reco::TrackRef(iPixCol, pit - iPixCol->begin()));
615  }
616  }
617  }
618  if (doTiming_)
619  getGoodTracks(iEvent, trkCollection);
620 
621  for (unsigned int ifilter = 0; ifilter < triggerEvent.sizeFilters(); ++ifilter) {
622  std::string FilterNames[7] = {"hltL1sL1SingleJet68",
623  "hltIsolPixelTrackL2FilterHE",
624  "ecalIsolPixelTrackFilterHE",
625  "hltIsolPixelTrackL3FilterHE",
626  "hltIsolPixelTrackL2FilterHB",
627  "ecalIsolPixelTrackFilterHB",
628  "hltIsolPixelTrackL3FilterHB"};
629  std::string label = triggerEvent.filterTag(ifilter).label();
630  for (int i = 0; i < 7; i++) {
631  if (label == FilterNames[i])
632  h_Filters->Fill(i);
633  }
634  }
635  edm::InputTag lumiProducer("LumiProducer", "", "RECO");
637  iEvent.getLuminosityBlock().getByToken(tok_lumi_, Lumid);
638  float mybxlumi = -1;
639  if (Lumid.isValid())
640  mybxlumi = Lumid->lumiValue(LumiDetails::kOCC1, iEvent.bunchCrossing()) * 6.37;
641  if (verbosity_ % 10 > 0)
642  edm::LogVerbatim("IsoTrack") << "RunNo " << RunNo << " EvtNo " << iEvent.id().event() << " Lumi "
643  << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << " mybxlumi "
644  << mybxlumi;
645  if (!triggerResults.isValid()) {
646  edm::LogWarning("IsoTrack") << "Error! Can't get the product triggerResults";
647  // std::shared_ptr<cms::Exception> const & error = triggerResults.whyFailed();
648  // edm::LogWarning(error->category()) << error->what();
649  } else {
650  std::vector<std::string> modules;
651  h_nHLT->Fill(triggerResults->size());
652  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*triggerResults);
653 
654  const std::vector<std::string> &triggerNames_ = triggerNames.triggerNames();
655  if (verbosity_ % 10 > 1)
656  edm::LogVerbatim("IsoTrack") << "number of HLTs " << triggerNames_.size();
657  int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
658  for (unsigned int i = 0; i < triggerResults->size(); i++) {
659  unsigned int triggerindx = hltConfig.triggerIndex(triggerNames_[i]);
660  const std::vector<std::string> &moduleLabels(hltConfig.moduleLabels(triggerindx));
661 
662  for (unsigned int in = 0; in < trigNames_.size(); ++in) {
663  // if (triggerNames_[i].find(trigNames_[in].c_str())!=std::string::npos || triggerNames_[i]==" ") {
664  if (triggerNames_[i].find(trigNames_[in]) != std::string::npos) {
665  if (verbosity_ % 10 > 0)
666  edm::LogVerbatim("IsoTrack") << "trigger that i want " << triggerNames_[i] << " accept "
667  << triggerResults->accept(i);
668  hlt = triggerResults->accept(i);
669  h_HLT->Fill(hlt);
670  // if (hlt>0 || triggerNames_[i]==" ") {
671  if (hlt > 0) {
673  iEvent.getByToken(tok_pixtk_, Pixcands);
675  iEvent.getByToken(tok_l1cand_, L1cands);
676 
677  const std::pair<int, int> prescales(hltPrescaleProvider_.prescaleValues(iEvent, iSetup, triggerNames_[i]));
678  preL1 = prescales.first;
679  preHLT = prescales.second;
680  prescale = preL1 * preHLT;
681  if (verbosity_ % 10 > 0)
682  edm::LogVerbatim("IsoTrack")
683  << triggerNames_[i] << " accept " << hlt << " preL1 " << preL1 << " preHLT " << preHLT;
684  for (int iv = 0; iv < 3; ++iv)
685  vec_[iv].clear();
686  if (trigList_.find(RunNo) != trigList_.end()) {
687  trigList_[RunNo] += 1;
688  } else {
689  trigList_.insert(std::pair<unsigned int, unsigned int>(RunNo, 1));
690  trigPreList_.insert(std::pair<unsigned int, std::pair<int, int>>(RunNo, prescales));
691  }
692  //loop over all trigger filters in event (i.e. filters passed)
693  for (unsigned int ifilter = 0; ifilter < triggerEvent.sizeFilters(); ++ifilter) {
694  std::vector<int> Keys;
695  std::string label = triggerEvent.filterTag(ifilter).label();
696  //loop over keys to objects passing this filter
697  for (unsigned int imodule = 0; imodule < moduleLabels.size(); imodule++) {
698  if (label.find(moduleLabels[imodule]) != std::string::npos) {
699  if (verbosity_ % 10 > 0)
700  edm::LogVerbatim("IsoTrack") << "FILTERNAME " << label;
701  for (unsigned int ifiltrKey = 0; ifiltrKey < triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
702  Keys.push_back(triggerEvent.filterKeys(ifilter)[ifiltrKey]);
703  const trigger::TriggerObject &TO(TOC[Keys[ifiltrKey]]);
704  math::XYZTLorentzVector v4(TO.px(), TO.py(), TO.pz(), TO.energy());
705  if (label.find("L2Filter") != std::string::npos) {
706  vec_[1].push_back(v4);
707  } else if (label.find("L3Filter") != std::string::npos) {
708  vec_[2].push_back(v4);
709  } else {
710  vec_[0].push_back(v4);
711  h_L1ObjEnergy->Fill(TO.energy());
712  }
713  if (verbosity_ % 10 > 0)
714  edm::LogVerbatim("IsoTrack") << "key " << ifiltrKey << " : pt " << TO.pt() << " eta " << TO.eta()
715  << " phi " << TO.phi() << " mass " << TO.mass() << " Id " << TO.id();
716  }
717  }
718  }
719  }
720  std::vector<reco::TrackCollection::const_iterator> goodTks;
721  if (doL2L3_) {
722  h_nL3Objs->Fill(vec_[2].size());
723  studyTrigger(trkCollection, goodTks);
724  } else {
725  if (trkCollection.isValid()) {
726  reco::TrackCollection::const_iterator trkItr;
727  for (trkItr = trkCollection->begin(); trkItr != trkCollection->end(); trkItr++)
728  goodTks.push_back(trkItr);
729  }
730  }
731  // Now study isolation etc
732  if (doStudyIsol_)
733  studyIsolation(trkCollection, goodTks);
734  if (doTrkResTree_)
735  StudyTrkEbyP(trkCollection);
736 
737  std::pair<double, double> etaphi = etaPhiTrigger();
739  iEvent.getByToken(tok_l2cand_, L2cands);
740  if (!L2cands.isValid()) {
741  if (verbosity_ % 10 > 0)
742  edm::LogVerbatim("IsoTrack") << " trigCand is not valid ";
743  } else {
744  if (doMipCutTree_)
745  studyMipCut(trkCollection, L2cands);
746  }
747  if (!pixelTracksSources_.empty())
748  if (doChgIsolTree_ && !pixelTrackRefsHE_.empty())
749  chgIsolation(etaphi.first, etaphi.second, trkCollection, iEvent);
750  }
751  break;
752  }
753  }
754  }
755  h_PreL1->Fill(preL1);
756  h_PreHLT->Fill(preHLT);
757  h_Pre->Fill(prescale);
758  h_PreL1wt->Fill(preL1, mybxlumi);
759  h_PreHLTwt->Fill(preHLT, mybxlumi);
760 
761  // check if trigger names in (new) config
762  // edm::LogVerbatim("IsoTrack") << "changed " << changed_;
763  if (changed_) {
764  changed_ = false;
765  if ((verbosity_ / 10) % 10 > 1) {
766  edm::LogVerbatim("IsoTrack") << "New trigger menu found !!!";
767  const unsigned int n(hltConfig.size());
768  for (unsigned itrig = 0; itrig < triggerNames_.size(); itrig++) {
769  unsigned int triggerindx = hltConfig.triggerIndex(triggerNames_[itrig]);
770  if (triggerindx >= n)
771  edm::LogVerbatim("IsoTrack") << triggerNames_[itrig] << " " << triggerindx << " does not exist in"
772  << " the current menu";
773  else
774  edm::LogVerbatim("IsoTrack") << triggerNames_[itrig] << " " << triggerindx << " exists";
775  }
776  }
777  }
778  }
779  if (doTiming_)
780  studyTiming(iEvent);
781 }
RunNumber_t run() const
Definition: EventID.h:38
unsigned int size() const
number of trigger paths in trigger table
size
Write out results.
std::pair< T, T > etaphi(T x, T y, T z)
Definition: FastMath.h:162
bool changed_
Definition: IsoTrig.cc:200
EventNumber_t event() const
Definition: EventID.h:40
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
Definition: IsoTrig.cc:185
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:193
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
void chgIsolation(double &etaTriggered, double &phiTriggered, edm::Handle< reco::TrackCollection > &trkCollection, const edm::Event &theEvent)
Definition: IsoTrig.cc:1827
const bool doChgIsolTree_
Definition: IsoTrig.cc:156
edm::EDGetTokenT< LumiDetails > tok_lumi_
Definition: IsoTrig.cc:169
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:191
std::vector< reco::TrackRef > pixelTrackRefsHB_
Definition: IsoTrig.cc:188
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:189
void studyIsolation(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
Definition: IsoTrig.cc:1684
const int verbosity_
Definition: IsoTrig.cc:157
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: IsoTrig.cc:176
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
std::map< unsigned int, const std::pair< int, int > > trigPreList_
Definition: IsoTrig.cc:199
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
int bunchCrossing() const
Definition: EventBase.h:64
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:192
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_pixtk_
Definition: IsoTrig.cc:183
edm::Handle< reco::BeamSpot > beamSpotH_
Definition: IsoTrig.cc:194
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:264
TH1I * h_HLT
Definition: IsoTrig.cc:253
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::pair< double, double > etaPhiTrigger()
Definition: IsoTrig.cc:2139
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
Definition: IsoTrig.cc:170
float lumiValue(AlgoType algo, unsigned int bx) const
Definition: LumiDetails.cc:72
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
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:190
TH1D * h_L1ObjEnergy
Definition: IsoTrig.cc:255
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const std::vector< edm::InputTag > pixelTracksSources_
Definition: IsoTrig.cc:154
void studyMipCut(edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
Definition: IsoTrig.cc:1436
char const * label
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.cc:151
const bool doMipCutTree_
Definition: IsoTrig.cc:155
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
Definition: IsoTrig.cc:171
T mag() const
Definition: PV3DBase.h:64
void studyTrigger(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
Definition: IsoTrig.cc:1570
TH1I * h_nHLT
Definition: IsoTrig.cc:253
std::map< unsigned int, unsigned int > trigList_
Definition: IsoTrig.cc:198
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: IsoTrig.cc:175
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:151
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: IsoTrig.cc:173
TH1I * h_Pre
Definition: IsoTrig.cc:254
TH1I * h_PreHLT
Definition: IsoTrig.cc:253
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
Definition: IsoTrig.cc:186
TH1I * h_Filters
Definition: IsoTrig.cc:254
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:98
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: IsoTrig.cc:177
static std::string const triggerResults
Definition: EdmProvDump.cc:45
bool isValid() const
Definition: HandleBase.h:70
TH1D * h_PreL1wt
Definition: IsoTrig.cc:255
void studyTiming(const edm::Event &theEvent)
Definition: IsoTrig.cc:1325
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
const bool doTrkResTree_
Definition: IsoTrig.cc:156
std::vector< reco::TrackRef > pixelTrackRefsHE_
Definition: IsoTrig.cc:188
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
TH1I * h_PreL1
Definition: IsoTrig.cc:253
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
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: IsoTrig.cc:174
void StudyTrkEbyP(edm::Handle< reco::TrackCollection > &trkCollection)
Definition: IsoTrig.cc:1200
T const * product() const
Definition: Handle.h:69
const bool doStudyIsol_
Definition: IsoTrig.cc:156
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< size_type > Keys
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
edm::Handle< reco::VertexCollection > recVtxs_
Definition: IsoTrig.cc:195
HLTConfigProvider const & hltConfigProvider() const
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:184
edm::EventID id() const
Definition: EventBase.h:59
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: IsoTrig.cc:178
T get() const
Definition: EventSetup.h:73
const Point & position() const
position
Definition: BeamSpot.h:59
const bool doTiming_
Definition: IsoTrig.cc:155
math::XYZPoint leadPV_
Definition: IsoTrig.cc:196
TH1I * h_nL3Objs
Definition: IsoTrig.cc:254
void getGoodTracks(const edm::Event &, edm::Handle< reco::TrackCollection > &)
Definition: IsoTrig.cc:1956
T const * product() const
Definition: ESHandle.h:86
const std::vector< std::string > trigNames_
Definition: IsoTrig.cc:152
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:265
double bfVal_
Definition: IsoTrig.cc:163
TH1D * h_PreHLTwt
Definition: IsoTrig.cc:255
const bool doL2L3_
Definition: IsoTrig.cc:155
void IsoTrig::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 872 of file IsoTrig.cc.

References ChgIsolnTree_, L1TMuonDQMOffline_cfi::cuts, doChgIsolTree_, doL2L3_, doMipCutTree_, doTiming_, doTrkResTree_, fs_, h_dEta, h_dEtaL1, h_dinvPt, h_dP, h_dPhi, h_dPhiL1, h_dPt, h_dRL1, h_eCalo, h_eHcal, h_eMaxNearP, h_eMip, h_eNeutIso, h_EnIn, h_EnOut, h_eta, h_etaCalibTracks, h_etaMipTracks, h_Filters, h_HLT, h_L1ObjEnergy, h_mindR, h_MipEnMatch, h_MipEnNoMatch, h_nHLT, h_nL3Objs, h_p, h_phi, h_Pre, h_PreHLT, h_PreHLTwt, h_PreL1, h_PreL1wt, h_pt, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, jets_cff::levels, TFileService::make(), MipCutTree_, pLimits_, AlCaHLTBitMon_QueryRunRegistry::string, t_ECone, t_NFcandEmip, t_NFcandEta, t_NFcandP, t_NFcandPhi, t_NFcandPt, t_NFTrkcandEmip, t_NFTrkcandEta, t_NFTrkcandP, t_NFTrkcandPhi, t_NFTrkcandPt, t_NFTrkChgIsoFlag, t_NFTrkMinDP1, t_NFTrkMinDR, t_NFTrkMipFlag, t_NFTrkMissFlag, t_NFTrkNeuIsoFlag, t_NFTrkPropFlag, t_NFTrkPVFlag, t_NFTrkqltyFlag, t_NFTrkselTkFlag, t_nGoodTk, t_nPixCand, t_nPixSeed, t_PixcandEta, t_PixcandMaxP, t_PixcandP, t_PixcandPhi, t_PixcandPt, t_PixTrkcandEta, t_PixTrkcandMaxP, t_PixTrkcandP, t_PixTrkcandPhi, t_PixTrkcandPt, t_PixTrkcandselTk, t_timeL2Prod, t_TrkhCone, t_TrkMissFlag, t_TrkNuIsolFlag, t_TrkP, t_TrkPVFlag, t_TrkqltyFlag, t_TrkselTkFlag, TimingTree_, and TrkResTree_.

872  {
873  char hname[100], htit[100];
874  std::string levels[20] = {"L1", "L2", "L3", "Reco", "RecoMatch", "RecoNoMatch",
875  "L2Match", "L2NoMatch", "L3Match", "L3NoMatch", "HLTTrk", "HLTGoodTrk",
876  "HLTIsoTrk", "HLTMip", "HLTSelect", "nonHLTTrk", "nonHLTGoodTrk", "nonHLTIsoTrk",
877  "nonHLTMip", "nonHLTSelect"};
878  if (doTiming_) {
879  TimingTree_ = fs_->make<TTree>("TimingTree", "TimingTree");
880  t_timeL2Prod = new std::vector<double>();
881  t_nPixCand = new std::vector<int>();
882  t_nPixSeed = new std::vector<int>();
883  t_nGoodTk = new std::vector<int>();
884 
885  TimingTree_->Branch("t_timeL2Prod", "std::vector<double>", &t_timeL2Prod);
886  TimingTree_->Branch("t_nPixCand", "std::vector<int>", &t_nPixCand);
887  TimingTree_->Branch("t_nPixSeed", "std::vector<int>", &t_nPixSeed);
888  TimingTree_->Branch("t_nGoodTk", "std::vector<int>", &t_nGoodTk);
889  }
890  if (doTrkResTree_) {
891  TrkResTree_ = fs_->make<TTree>("TrkRestree", "TrkResTree");
892  t_TrkhCone = new std::vector<double>();
893  t_TrkP = new std::vector<double>();
894  t_TrkselTkFlag = new std::vector<bool>();
895  t_TrkqltyFlag = new std::vector<bool>();
896  t_TrkMissFlag = new std::vector<bool>();
897  t_TrkPVFlag = new std::vector<bool>();
898  t_TrkNuIsolFlag = new std::vector<bool>();
899 
900  TrkResTree_->Branch("t_TrkhCone", "std::vector<double>", &t_TrkhCone);
901  TrkResTree_->Branch("t_TrkP", "std::vector<double>", &t_TrkP);
902  TrkResTree_->Branch("t_TrkselTkFlag", "std::vector<bool>", &t_TrkselTkFlag);
903  TrkResTree_->Branch("t_TrkqltyFlag", "std::vector<bool>", &t_TrkqltyFlag);
904  TrkResTree_->Branch("t_TrkMissFlag", "std::vector<bool>", &t_TrkMissFlag);
905  TrkResTree_->Branch("t_TrkPVFlag", "std::vector<bool>", &t_TrkPVFlag);
906  TrkResTree_->Branch("t_TrkNuIsolFlag", "std::vector<bool>", &t_TrkNuIsolFlag);
907  }
908  if (doChgIsolTree_) {
909  ChgIsolnTree_ = fs_->make<TTree>("ChgIsolnTree", "ChgIsolnTree");
910  t_PixcandP = new std::vector<double>();
911  t_PixcandPt = new std::vector<double>();
912  t_PixcandEta = new std::vector<double>();
913  t_PixcandPhi = new std::vector<double>();
914  t_PixcandMaxP = new std::vector<std::vector<double>>();
915  t_PixTrkcandP = new std::vector<double>();
916  t_PixTrkcandPt = new std::vector<double>();
917  t_PixTrkcandEta = new std::vector<double>();
918  t_PixTrkcandPhi = new std::vector<double>();
919  t_PixTrkcandMaxP = new std::vector<double>();
920  t_PixTrkcandselTk = new std::vector<bool>();
921 
922  ChgIsolnTree_->Branch("t_PixcandP", "std::vector<double>", &t_PixcandP);
923  ChgIsolnTree_->Branch("t_PixcandPt", "std::vector<double>", &t_PixcandPt);
924  ChgIsolnTree_->Branch("t_PixcandEta", "std::vector<double>", &t_PixcandEta);
925  ChgIsolnTree_->Branch("t_PixcandPhi", "std::vector<double>", &t_PixcandPhi);
926  ChgIsolnTree_->Branch("t_PixcandMaxP", "std::vector<std::vector<double> >", &t_PixcandMaxP);
927  ChgIsolnTree_->Branch("t_PixTrkcandP", "std::vector<double>", &t_PixTrkcandP);
928  ChgIsolnTree_->Branch("t_PixTrkcandPt", "std::vector<double>", &t_PixTrkcandPt);
929  ChgIsolnTree_->Branch("t_PixTrkcandEta", "std::vector<double>", &t_PixTrkcandEta);
930  ChgIsolnTree_->Branch("t_PixTrkcandPhi", "std::vector<double>", &t_PixTrkcandPhi);
931  ChgIsolnTree_->Branch("t_PixTrkcandMaxP", "std::vector<double>", &t_PixTrkcandMaxP);
932  ChgIsolnTree_->Branch("t_PixTrkcandselTk", "std::vector<bool>", &t_PixTrkcandselTk);
933  }
934  if (doMipCutTree_) {
935  MipCutTree_ = fs_->make<TTree>("MipCutTree", "MipCutTree");
936  t_NFcandP = new std::vector<double>();
937  t_NFcandPt = new std::vector<double>();
938  t_NFcandEta = new std::vector<double>();
939  t_NFcandPhi = new std::vector<double>();
940  t_NFcandEmip = new std::vector<double>();
941  t_NFTrkcandP = new std::vector<double>();
942  t_NFTrkcandPt = new std::vector<double>();
943  t_NFTrkcandEta = new std::vector<double>();
944  t_NFTrkcandPhi = new std::vector<double>();
945  t_NFTrkcandEmip = new std::vector<double>();
946  t_NFTrkMinDR = new std::vector<double>();
947  t_NFTrkMinDP1 = new std::vector<double>();
948  t_NFTrkselTkFlag = new std::vector<bool>();
949  t_NFTrkqltyFlag = new std::vector<bool>();
950  t_NFTrkMissFlag = new std::vector<bool>();
951  t_NFTrkPVFlag = new std::vector<bool>();
952  t_NFTrkPropFlag = new std::vector<bool>();
953  t_NFTrkChgIsoFlag = new std::vector<bool>();
954  t_NFTrkNeuIsoFlag = new std::vector<bool>();
955  t_NFTrkMipFlag = new std::vector<bool>();
956  t_ECone = new std::vector<double>();
957 
958  MipCutTree_->Branch("t_NFcandP", "std::vector<double>", &t_NFcandP);
959  MipCutTree_->Branch("t_NFcandPt", "std::vector<double>", &t_NFcandPt);
960  MipCutTree_->Branch("t_NFcandEta", "std::vector<double>", &t_NFcandEta);
961  MipCutTree_->Branch("t_NFcandPhi", "std::vector<double>", &t_NFcandPhi);
962  MipCutTree_->Branch("t_NFcandEmip", "std::vector<double>", &t_NFcandEmip);
963  MipCutTree_->Branch("t_NFTrkcandP", "std::vector<double>", &t_NFTrkcandP);
964  MipCutTree_->Branch("t_NFTrkcandPt", "std::vector<double>", &t_NFTrkcandPt);
965  MipCutTree_->Branch("t_NFTrkcandEta", "std::vector<double>", &t_NFTrkcandEta);
966  MipCutTree_->Branch("t_NFTrkcandPhi", "std::vector<double>", &t_NFTrkcandPhi);
967  MipCutTree_->Branch("t_NFTrkcandEmip", "std::vector<double>", &t_NFTrkcandEmip);
968  MipCutTree_->Branch("t_NFTrkMinDR", "std::vector<double>", &t_NFTrkMinDR);
969  MipCutTree_->Branch("t_NFTrkMinDP1", "std::vector<double>", &t_NFTrkMinDP1);
970  MipCutTree_->Branch("t_NFTrkselTkFlag", "std::vector<bool>", &t_NFTrkselTkFlag);
971  MipCutTree_->Branch("t_NFTrkqltyFlag", "std::vector<bool>", &t_NFTrkqltyFlag);
972  MipCutTree_->Branch("t_NFTrkMissFlag", "std::vector<bool>", &t_NFTrkMissFlag);
973  MipCutTree_->Branch("t_NFTrkPVFlag", "std::vector<bool>", &t_NFTrkPVFlag);
974  MipCutTree_->Branch("t_NFTrkPropFlag", "std::vector<bool>", &t_NFTrkPropFlag);
975  MipCutTree_->Branch("t_NFTrkChgIsoFlag", "std::vector<bool>", &t_NFTrkChgIsoFlag);
976  MipCutTree_->Branch("t_NFTrkNeuIsoFlag", "std::vector<bool>", &t_NFTrkNeuIsoFlag);
977  MipCutTree_->Branch("t_NFTrkMipFlag", "std::vector<bool>", &t_NFTrkMipFlag);
978  MipCutTree_->Branch("t_ECone", "std::vector<double>", &t_ECone);
979  }
980  h_Filters = fs_->make<TH1I>("h_Filters", "Filter Accepts", 10, 0, 10);
981  std::string FilterNames[7] = {"hltL1sL1SingleJet68",
982  "hltIsolPixelTrackL2FilterHE",
983  "ecalIsolPixelTrackFilterHE",
984  "hltIsolPixelTrackL3FilterHE",
985  "hltIsolPixelTrackL2FilterHB",
986  "ecalIsolPixelTrackFilterHB",
987  "hltIsolPixelTrackL3FilterHB"};
988  for (int i = 0; i < 7; i++) {
989  h_Filters->GetXaxis()->SetBinLabel(i + 1, FilterNames[i].c_str());
990  }
991 
992  h_nHLT = fs_->make<TH1I>("h_nHLT", "Size of trigger Names", 1000, 1, 1000);
993  h_HLT = fs_->make<TH1I>("h_HLT", "HLT accept", 3, -1, 2);
994  h_PreL1 = fs_->make<TH1I>("h_PreL1", "L1 Prescale", 500, 0, 500);
995  h_PreHLT = fs_->make<TH1I>("h_PreHLT", "HLT Prescale", 50, 0, 50);
996  h_Pre = fs_->make<TH1I>("h_Pre", "Prescale", 3000, 0, 3000);
997 
998  h_PreL1wt = fs_->make<TH1D>("h_PreL1wt", "Weighted L1 Prescale", 500, 0, 500);
999  h_PreHLTwt = fs_->make<TH1D>("h_PreHLTwt", "Weighted HLT Prescale", 500, 0, 100);
1000  h_L1ObjEnergy = fs_->make<TH1D>("h_L1ObjEnergy", "Energy of L1Object", 500, 0.0, 500.0);
1001 
1002  h_EnIn = fs_->make<TH1D>("h_EnInEcal", "EnergyIn Ecal", 200, 0.0, 20.0);
1003  h_EnOut = fs_->make<TH1D>("h_EnOutEcal", "EnergyOut Ecal", 200, 0.0, 20.0);
1004  h_MipEnMatch =
1005  fs_->make<TH2D>("h_MipEnMatch", "MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
1006  h_MipEnNoMatch = fs_->make<TH2D>(
1007  "h_MipEnNoMatch", "MipEn: HLT level vs Reco Level (No Match Found)", 200, 0.0, 20.0, 200, 0.0, 20.0);
1008 
1009  if (doL2L3_) {
1010  h_nL3Objs = fs_->make<TH1I>("h_nL3Objs", "Number of L3 objects", 10, 0, 10);
1011 
1012  std::string pairs[9] = {"L2L3",
1013  "L2L3Match",
1014  "L2L3NoMatch",
1015  "L3Reco",
1016  "L3RecoMatch",
1017  "L3RecoNoMatch",
1018  "NewFilterReco",
1019  "NewFilterRecoMatch",
1020  "NewFilterRecoNoMatch"};
1021  for (int ipair = 0; ipair < 9; ipair++) {
1022  sprintf(hname, "h_dEta%s", pairs[ipair].c_str());
1023  sprintf(htit, "#Delta#eta for %s", pairs[ipair].c_str());
1024  h_dEta[ipair] = fs_->make<TH1D>(hname, htit, 200, -10.0, 10.0);
1025  h_dEta[ipair]->GetXaxis()->SetTitle("d#eta");
1026 
1027  sprintf(hname, "h_dPhi%s", pairs[ipair].c_str());
1028  sprintf(htit, "#Delta#phi for %s", pairs[ipair].c_str());
1029  h_dPhi[ipair] = fs_->make<TH1D>(hname, htit, 140, -7.0, 7.0);
1030  h_dPhi[ipair]->GetXaxis()->SetTitle("d#phi");
1031 
1032  sprintf(hname, "h_dPt%s", pairs[ipair].c_str());
1033  sprintf(htit, "#Delta dp_{T} for %s objects", pairs[ipair].c_str());
1034  h_dPt[ipair] = fs_->make<TH1D>(hname, htit, 400, -200.0, 200.0);
1035  h_dPt[ipair]->GetXaxis()->SetTitle("dp_{T} (GeV)");
1036 
1037  sprintf(hname, "h_dP%s", pairs[ipair].c_str());
1038  sprintf(htit, "#Delta p for %s objects", pairs[ipair].c_str());
1039  h_dP[ipair] = fs_->make<TH1D>(hname, htit, 400, -200.0, 200.0);
1040  h_dP[ipair]->GetXaxis()->SetTitle("dP (GeV)");
1041 
1042  sprintf(hname, "h_dinvPt%s", pairs[ipair].c_str());
1043  sprintf(htit, "#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
1044  h_dinvPt[ipair] = fs_->make<TH1D>(hname, htit, 500, -0.4, 0.1);
1045  h_dinvPt[ipair]->GetXaxis()->SetTitle("d(1/p_{T})");
1046  sprintf(hname, "h_mindR%s", pairs[ipair].c_str());
1047  sprintf(htit, "min(#Delta R) for %s objects", pairs[ipair].c_str());
1048  h_mindR[ipair] = fs_->make<TH1D>(hname, htit, 500, 0.0, 1.0);
1049  h_mindR[ipair]->GetXaxis()->SetTitle("dR");
1050  }
1051 
1052  for (int lvl = 0; lvl < 2; lvl++) {
1053  sprintf(hname, "h_dEtaL1%s", levels[lvl + 1].c_str());
1054  sprintf(htit, "#Delta#eta for L1 and %s objects", levels[lvl + 1].c_str());
1055  h_dEtaL1[lvl] = fs_->make<TH1D>(hname, htit, 400, -10.0, 10.0);
1056 
1057  sprintf(hname, "h_dPhiL1%s", levels[lvl + 1].c_str());
1058  sprintf(htit, "#Delta#phi for L1 and %s objects", levels[lvl + 1].c_str());
1059  h_dPhiL1[lvl] = fs_->make<TH1D>(hname, htit, 280, -7.0, 7.0);
1060 
1061  sprintf(hname, "h_dRL1%s", levels[lvl + 1].c_str());
1062  sprintf(htit, "#Delta R for L1 and %s objects", levels[lvl + 1].c_str());
1063  h_dRL1[lvl] = fs_->make<TH1D>(hname, htit, 100, 0.0, 10.0);
1064  }
1065  }
1066 
1067  int levmin = (doL2L3_ ? 0 : 10);
1068  for (int ilevel = levmin; ilevel < 20; ilevel++) {
1069  sprintf(hname, "h_p%s", levels[ilevel].c_str());
1070  sprintf(htit, "p for %s objects", levels[ilevel].c_str());
1071  h_p[ilevel] = fs_->make<TH1D>(hname, htit, 100, 0.0, 500.0);
1072  h_p[ilevel]->GetXaxis()->SetTitle("p (GeV)");
1073 
1074  sprintf(hname, "h_pt%s", levels[ilevel].c_str());
1075  sprintf(htit, "p_{T} for %s objects", levels[ilevel].c_str());
1076  h_pt[ilevel] = fs_->make<TH1D>(hname, htit, 100, 0.0, 500.0);
1077  h_pt[ilevel]->GetXaxis()->SetTitle("p_{T} (GeV)");
1078 
1079  sprintf(hname, "h_eta%s", levels[ilevel].c_str());
1080  sprintf(htit, "#eta for %s objects", levels[ilevel].c_str());
1081  h_eta[ilevel] = fs_->make<TH1D>(hname, htit, 100, -5.0, 5.0);
1082  h_eta[ilevel]->GetXaxis()->SetTitle("#eta");
1083 
1084  sprintf(hname, "h_phi%s", levels[ilevel].c_str());
1085  sprintf(htit, "#phi for %s objects", levels[ilevel].c_str());
1086  h_phi[ilevel] = fs_->make<TH1D>(hname, htit, 70, -3.5, 3.50);
1087  h_phi[ilevel]->GetXaxis()->SetTitle("#phi");
1088  }
1089 
1090  std::string cuts[2] = {"HLTMatched", "HLTNotMatched"};
1091  std::string cuts2[2] = {"All", "Away from L1"};
1092  for (int icut = 0; icut < 2; icut++) {
1093  sprintf(hname, "h_eMip%s", cuts[icut].c_str());
1094  sprintf(htit, "eMip for %s tracks", cuts[icut].c_str());
1095  h_eMip[icut] = fs_->make<TH1D>(hname, htit, 200, 0.0, 10.0);
1096  h_eMip[icut]->GetXaxis()->SetTitle("E_{Mip} (GeV)");
1097 
1098  sprintf(hname, "h_eMaxNearP%s", cuts[icut].c_str());
1099  sprintf(htit, "eMaxNearP for %s tracks", cuts[icut].c_str());
1100  h_eMaxNearP[icut] = fs_->make<TH1D>(hname, htit, 240, -2.0, 10.0);
1101  h_eMaxNearP[icut]->GetXaxis()->SetTitle("E_{MaxNearP} (GeV)");
1102 
1103  sprintf(hname, "h_eNeutIso%s", cuts[icut].c_str());
1104  sprintf(htit, "eNeutIso for %s ", cuts[icut].c_str());
1105  h_eNeutIso[icut] = fs_->make<TH1D>(hname, htit, 200, 0.0, 10.0);
1106  h_eNeutIso[icut]->GetXaxis()->SetTitle("E_{NeutIso} (GeV)");
1107 
1108  for (int kcut = 0; kcut < 2; ++kcut) {
1109  for (int lim = 0; lim < 5; ++lim) {
1110  sprintf(hname, "h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1111  sprintf(htit,
1112  "#eta for %s isolated MIP tracks (%4.1f < p < %5.1f Gev/c %s)",
1113  cuts[icut].c_str(),
1114  pLimits_[lim],
1115  pLimits_[lim + 1],
1116  cuts2[kcut].c_str());
1117  h_etaCalibTracks[lim][icut][kcut] = fs_->make<TH1D>(hname, htit, 60, -30.0, 30.0);
1118  h_etaCalibTracks[lim][icut][kcut]->GetXaxis()->SetTitle("i#eta");
1119 
1120  sprintf(hname, "h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1121  sprintf(htit,
1122  "#eta for %s charge isolated MIP tracks (%4.1f < p < %5.1f Gev/c %s)",
1123  cuts[icut].c_str(),
1124  pLimits_[lim],
1125  pLimits_[lim + 1],
1126  cuts2[kcut].c_str());
1127  h_etaMipTracks[lim][icut][kcut] = fs_->make<TH1D>(hname, htit, 60, -30.0, 30.0);
1128  h_etaMipTracks[lim][icut][kcut]->GetXaxis()->SetTitle("i#eta");
1129  }
1130  }
1131  }
1132 
1133  std::string ecut1[3] = {"all", "HLTMatched", "HLTNotMatched"};
1134  std::string ecut2[2] = {"without", "with"};
1135  int etac[48] = {-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16,
1136  -17, -18, -19, -20, -21, -22, -23, -24, 1, 2, 3, 4, 5, 6, 7, 8,
1137  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
1138  for (int icut = 0; icut < 6; icut++) {
1139  // int i1 = (icut>3 ? 1 : 0);
1140  int i1 = (icut > 2 ? 1 : 0);
1141  int i2 = icut - i1 * 3;
1142  for (int kcut = 0; kcut < 48; kcut++) {
1143  for (int lim = 0; lim < 5; ++lim) {
1144  sprintf(hname, "h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1145  sprintf(htit,
1146  "HCAL energy for #eta=%d for %s tracks (p=%4.1f:%5.1f Gev) %s neutral isolation",
1147  etac[kcut],
1148  ecut1[i2].c_str(),
1149  pLimits_[lim],
1150  pLimits_[lim + 1],
1151  ecut2[i1].c_str());
1152  h_eHcal[lim][icut][kcut] = fs_->make<TH1D>(hname, htit, 750, 0.0, 150.0);
1153  h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle("Energy (GeV)");
1154  sprintf(hname, "h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1155  sprintf(htit,
1156  "Calorimter energy for #eta=%d for %s tracks (p=%4.1f:%5.1f Gev) %s neutral isolation",
1157  etac[kcut],
1158  ecut1[i2].c_str(),
1159  pLimits_[lim],
1160  pLimits_[lim + 1],
1161  ecut2[i1].c_str());
1162  h_eCalo[lim][icut][kcut] = fs_->make<TH1D>(hname, htit, 750, 0.0, 150.0);
1163  h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle("Energy (GeV)");
1164  }
1165  }
1166  }
1167 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:225
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:222
edm::Service< TFileService > fs_
Definition: IsoTrig.cc:202
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:239
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:243
const bool doChgIsolTree_
Definition: IsoTrig.cc:156
TH1D * h_phi[20]
Definition: IsoTrig.cc:256
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:227
TH1D * h_EnIn
Definition: IsoTrig.cc:251
TH1D * h_dEta[9]
Definition: IsoTrig.cc:258
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:236
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:229
TH1D * h_dEtaL1[2]
Definition: IsoTrig.cc:257
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:206
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:209
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:242
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:226
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:241
TH1I * h_HLT
Definition: IsoTrig.cc:253
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:217
TH1D * h_dP[9]
Definition: IsoTrig.cc:258
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:248
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:240
TH1D * h_EnOut
Definition: IsoTrig.cc:251
TH1D * h_dPhiL1[2]
Definition: IsoTrig.cc:257
TH1D * h_L1ObjEnergy
Definition: IsoTrig.cc:255
const bool doMipCutTree_
Definition: IsoTrig.cc:155
TH1D * h_dPhi[9]
Definition: IsoTrig.cc:258
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:234
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:215
TH1I * h_nHLT
Definition: IsoTrig.cc:253
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:214
std::vector< double > * t_ECone
Definition: IsoTrig.cc:249
TH1I * h_Pre
Definition: IsoTrig.cc:254
TH1I * h_PreHLT
Definition: IsoTrig.cc:253
TH1D * h_dinvPt[9]
Definition: IsoTrig.cc:259
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:210
TH1D * h_eta[20]
Definition: IsoTrig.cc:256
TH1I * h_Filters
Definition: IsoTrig.cc:254
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:231
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:204
TH1D * h_eHcal[5][6][48]
Definition: IsoTrig.cc:262
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:218
TH1D * h_PreL1wt
Definition: IsoTrig.cc:255
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:233
TH1D * h_eMaxNearP[2]
Definition: IsoTrig.cc:260
const bool doTrkResTree_
Definition: IsoTrig.cc:156
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:237
TH2D * h_MipEnMatch
Definition: IsoTrig.cc:252
TH1D * h_p[20]
Definition: IsoTrig.cc:256
TH1D * h_eNeutIso[2]
Definition: IsoTrig.cc:260
TH1I * h_PreL1
Definition: IsoTrig.cc:253
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:213
TTree * ChgIsolnTree_
Definition: IsoTrig.cc:203
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:205
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:235
TH1D * h_eCalo[5][6][48]
Definition: IsoTrig.cc:262
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:223
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:230
TH1D * h_pt[20]
Definition: IsoTrig.cc:256
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:212
TH1D * h_etaMipTracks[5][2][2]
Definition: IsoTrig.cc:261
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:221
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:238
TTree * MipCutTree_
Definition: IsoTrig.cc:203
TH1D * h_mindR[9]
Definition: IsoTrig.cc:259
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:219
TTree * TrkResTree_
Definition: IsoTrig.cc:203
TH1D * h_dPt[9]
Definition: IsoTrig.cc:258
TH2D * h_MipEnNoMatch
Definition: IsoTrig.cc:252
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:220
const bool doTiming_
Definition: IsoTrig.cc:155
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:224
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:207
TH1I * h_nL3Objs
Definition: IsoTrig.cc:254
TH1D * h_dRL1[2]
Definition: IsoTrig.cc:257
double pLimits_[6]
Definition: IsoTrig.cc:201
TH1D * h_etaCalibTracks[5][2][2]
Definition: IsoTrig.cc:261
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:211
TH1D * h_PreHLTwt
Definition: IsoTrig.cc:255
TTree * TimingTree_
Definition: IsoTrig.cc:203
const bool doL2L3_
Definition: IsoTrig.cc:155
TH1D * h_eMip[2]
Definition: IsoTrig.cc:259
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:232
void IsoTrig::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 1195 of file IsoTrig.cc.

References changed_, hltPrescaleProvider_, HLTPrescaleProvider::init(), processName_, and edm::RunBase::run().

1195  {
1196  edm::LogWarning("IsoTrack") << "Run " << iRun.run() << " hltconfig.init "
1197  << hltPrescaleProvider_.init(iRun, iSetup, processName_, changed_);
1198 }
bool changed_
Definition: IsoTrig.cc:200
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.cc:151
const std::string processName_
Definition: IsoTrig.cc:162
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
void IsoTrig::chgIsolation ( double &  etaTriggered,
double &  phiTriggered,
edm::Handle< reco::TrackCollection > &  trkCollection,
const edm::Event theEvent 
)
private

Definition at line 1827 of file IsoTrig.cc.

References a_charIsoR_, Calorimetry_cff::bField, bFieldH_, ALCARECOTkAlJpsiMuMu_cff::charge, spr::chargeIsolationCone(), ChgIsolnTree_, clearChgIsolnTreeVectors(), PbPb_ZMuSkimMuonDPG_cff::deltaR, flavorHistoryFilter_cfi::dr, dR(), PVValHelper::dxy, PVValHelper::dz, PVValHelper::eta, getDistInCM(), GetEtaPhiAtEcal(), spr::goodTrack(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, cmsLHEtoEOSManager::l, leadPV_, RecoMuonValidator_cfi::maxP, minPTrackValue_, nTracks(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), pG_, phi, pixelIsolationConeSizeAtEC_, pixelTrackRefsHE_, position, prelimCone_, edm::ESHandle< T >::product(), spr::propagateCALO(), DiDispStaMuonMonitor_cfi::pt, pushChgIsolnTreeVecs(), multPhiCorr_741_25nsDY_cfi::px, reco::TrackBase::px(), multPhiCorr_741_25nsDY_cfi::py, reco::TrackBase::py(), reco::TrackBase::pz(), dttmaxenums::R, recVtxs_, edm::second(), selectionParameters_, tauUnbiasCone_, theTrackQuality_, verbosity_, vtxCutIsol_, vtxCutSeed_, and z.

Referenced by analyze(), and endRun().

1830  {
1832  if (verbosity_ % 10 > 0)
1833  edm::LogVerbatim("IsoTrack") << "Inside chgIsolation() with eta/phi Triggered: " << etaTriggered << "/"
1834  << phiTriggered;
1835  std::vector<double> maxP;
1836 
1837  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1838  const MagneticField *bField = bFieldH_.product();
1839  const CaloGeometry *geo = pG_.product();
1840  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1841  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections1, ((verbosity_ / 100) % 10 > 2));
1842  if (verbosity_ % 10 > 0)
1843  edm::LogVerbatim("IsoTrack") << "Propagated TrkCollection";
1844  for (unsigned int k = 0; k < pixelIsolationConeSizeAtEC_.size(); ++k)
1845  maxP.push_back(0);
1846  unsigned i = pixelTrackRefsHE_.size();
1847  std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1848  //loop to select isolated tracks
1849  for (unsigned iS = 0; iS < pixelTrackRefsHE_.size(); iS++) {
1850  if (pixelTrackRefsHE_[iS]->p() > minPTrackValue_) {
1851  bool vtxMatch = false;
1852  //associate to vertex (in Z)
1853  unsigned int ivSel = recVtxs_->size();
1854  double minDZ = 100;
1855  for (unsigned int iv = 0; iv < recVtxs_->size(); ++iv) {
1856  if (fabs(pixelTrackRefsHE_[iS]->dz((*recVtxs_)[iv].position())) < minDZ) {
1857  minDZ = fabs(pixelTrackRefsHE_[iS]->dz((*recVtxs_)[iv].position()));
1858  ivSel = iv;
1859  }
1860  }
1861  //cut on dYX:
1862  if (ivSel == recVtxs_->size()) {
1863  vtxMatch = true;
1864  } else if (fabs(pixelTrackRefsHE_[iS]->dxy((*recVtxs_)[ivSel].position())) < vtxCutSeed_) {
1865  vtxMatch = true;
1866  }
1867  //select tracks not matched to triggered L1 jet
1868  double R = deltaR(etaTriggered, phiTriggered, pixelTrackRefsHE_[iS]->eta(), pixelTrackRefsHE_[iS]->phi());
1869  if (R > tauUnbiasCone_ && vtxMatch) {
1870  //propagate seed track to ECAL surface:
1871  std::pair<double, double> seedCooAtEC;
1872  // in case vertex is found:
1873  if (minDZ != 100)
1874  seedCooAtEC = GetEtaPhiAtEcal(pixelTrackRefsHE_[iS]->eta(),
1875  pixelTrackRefsHE_[iS]->phi(),
1876  pixelTrackRefsHE_[iS]->pt(),
1877  pixelTrackRefsHE_[iS]->charge(),
1878  (*recVtxs_)[ivSel].z());
1879  //in case vertex is not found:
1880  else
1881  seedCooAtEC = GetEtaPhiAtEcal(pixelTrackRefsHE_[iS]->eta(),
1882  pixelTrackRefsHE_[iS]->phi(),
1883  pixelTrackRefsHE_[iS]->pt(),
1884  pixelTrackRefsHE_[iS]->charge(),
1885  0);
1886  VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1887  }
1888  }
1889  }
1890  for (unsigned int l = 0; l < VecSeedsatEC.size(); l++) {
1891  unsigned int iSeed = VecSeedsatEC[l].first;
1893  pixelTrackRefsHE_[iSeed]->py(),
1894  pixelTrackRefsHE_[iSeed]->pz(),
1895  pixelTrackRefsHE_[iSeed]->p());
1896 
1897  for (unsigned int j = 0; j < VecSeedsatEC.size(); j++) {
1898  unsigned int iSurr = VecSeedsatEC[j].first;
1899  if (iSeed != iSurr) {
1900  //define preliminary cone around seed track impact point from which tracks will be extrapolated:
1901  // edm::Ref<reco::IsolatedPixelTrackCandidateCollection> cand2ref =
1902  // edm::Ref<reco::IsolatedPixelTrackCandidateCollection>(L2cands, iSurr);
1903  if (deltaR(pixelTrackRefsHE_[iSeed]->eta(),
1904  pixelTrackRefsHE_[iSeed]->phi(),
1905  pixelTrackRefsHE_[iSurr]->eta(),
1906  pixelTrackRefsHE_[iSurr]->phi()) < prelimCone_) {
1907  unsigned int ivSel = recVtxs_->size();
1908  double minDZ2 = 100;
1909  for (unsigned int iv = 0; iv < recVtxs_->size(); ++iv) {
1910  if (fabs(pixelTrackRefsHE_[iSurr]->dz((*recVtxs_)[iv].position())) < minDZ2) {
1911  minDZ2 = fabs(pixelTrackRefsHE_[iSurr]->dz((*recVtxs_)[iv].position()));
1912  ivSel = iv;
1913  }
1914  }
1915  //cut ot dXY:
1916  if (minDZ2 == 100 || fabs(pixelTrackRefsHE_[iSurr]->dxy((*recVtxs_)[ivSel].position())) < vtxCutIsol_) {
1917  //calculate distance at ECAL surface and update isolation:
1918  double dist = getDistInCM(VecSeedsatEC[i].second.first,
1919  VecSeedsatEC[i].second.second,
1920  VecSeedsatEC[j].second.first,
1921  VecSeedsatEC[j].second.second);
1922  for (unsigned int k = 0; k < pixelIsolationConeSizeAtEC_.size(); ++k) {
1923  if (dist < pixelIsolationConeSizeAtEC_[k]) {
1924  if (pixelTrackRefsHE_[iSurr]->p() > maxP[k])
1925  maxP[k] = pixelTrackRefsHE_[iSurr]->p();
1926  }
1927  }
1928  }
1929  }
1930  }
1931  }
1932 
1933  double conehmaxNearP = -1;
1934  bool selectTk = false;
1935  double mindR = 999.9;
1936  int nTracks = 0;
1937  math::XYZTLorentzVector mindRvec;
1938  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++) {
1939  int nNearTRKs = 0;
1940  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
1941  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
1942  double dr = dR(v1, v2);
1943  if (dr < mindR) {
1944  selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_, ((verbosity_ / 100) % 10 > 1));
1945  conehmaxNearP = spr::chargeIsolationCone(
1946  nTracks, trkCaloDirections1, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 1));
1947  mindR = dr;
1948  mindRvec = v2;
1949  }
1950  }
1951  pushChgIsolnTreeVecs(v1, mindRvec, maxP, conehmaxNearP, selectTk);
1952  }
1953  ChgIsolnTree_->Fill();
1954 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
std::string theTrackQuality_
Definition: IsoTrig.cc:161
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
const double a_charIsoR_
Definition: IsoTrig.cc:165
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:189
const int verbosity_
Definition: IsoTrig.cc:157
std::pair< double, double > GetEtaPhiAtEcal(double etaIP, double phiIP, double pT, int charge, double vtxZ)
Definition: IsoTrig.cc:2155
const double minPTrackValue_
Definition: IsoTrig.cc:159
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:605
const double tauUnbiasCone_
Definition: IsoTrig.cc:160
U second(std::pair< T, U > const &p)
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:190
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const double prelimCone_
Definition: IsoTrig.cc:160
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:164
void clearChgIsolnTreeVectors()
Definition: IsoTrig.cc:783
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:611
std::vector< reco::TrackRef > pixelTrackRefsHE_
Definition: IsoTrig.cc:188
double getDistInCM(double eta1, double phi1, double eta2, double phi2)
Definition: IsoTrig.cc:2218
TTree * ChgIsolnTree_
Definition: IsoTrig.cc:203
edm::Handle< reco::VertexCollection > recVtxs_
Definition: IsoTrig.cc:195
const double vtxCutIsol_
Definition: IsoTrig.cc:159
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2123
static int position[264][3]
Definition: ReadPGInfo.cc:289
math::XYZPoint leadPV_
Definition: IsoTrig.cc:196
const std::vector< double > pixelIsolationConeSizeAtEC_
Definition: IsoTrig.cc:158
T const * product() const
Definition: ESHandle.h:86
const double vtxCutSeed_
Definition: IsoTrig.cc:159
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
void pushChgIsolnTreeVecs(math::XYZTLorentzVector &Pixcand, math::XYZTLorentzVector &Trkcand, std::vector< double > &PixMaxP, double &TrkMaxP, bool &selTk)
Definition: IsoTrig.cc:823
void IsoTrig::clearChgIsolnTreeVectors ( )
private

Definition at line 783 of file IsoTrig.cc.

References hitfit::clear(), mps_fire::i, t_PixcandEta, t_PixcandMaxP, t_PixcandP, t_PixcandPhi, t_PixcandPt, t_PixTrkcandEta, t_PixTrkcandMaxP, t_PixTrkcandP, t_PixTrkcandPhi, t_PixTrkcandPt, and t_PixTrkcandselTk.

Referenced by chgIsolation(), and endRun().

783  {
784  t_PixcandP->clear();
785  t_PixcandPt->clear();
786  t_PixcandEta->clear();
787  t_PixcandPhi->clear();
788  for (unsigned int i = 0; i < t_PixcandMaxP->size(); i++)
789  t_PixcandMaxP[i].clear();
790  t_PixcandMaxP->clear();
791  t_PixTrkcandP->clear();
792  t_PixTrkcandPt->clear();
793  t_PixTrkcandEta->clear();
794  t_PixTrkcandPhi->clear();
795  t_PixTrkcandMaxP->clear();
796  t_PixTrkcandselTk->clear();
797 }
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:225
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:222
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:227
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:226
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:217
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:151
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:218
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:223
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:221
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:219
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:220
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:224
void IsoTrig::clearMipCutTreeVectors ( )
private

Definition at line 799 of file IsoTrig.cc.

References t_ECone, t_NFcandEmip, t_NFcandEta, t_NFcandP, t_NFcandPhi, t_NFcandPt, t_NFTrkcandEmip, t_NFTrkcandEta, t_NFTrkcandP, t_NFTrkcandPhi, t_NFTrkcandPt, t_NFTrkChgIsoFlag, t_NFTrkMinDP1, t_NFTrkMinDR, t_NFTrkMipFlag, t_NFTrkMissFlag, t_NFTrkNeuIsoFlag, t_NFTrkPropFlag, t_NFTrkPVFlag, t_NFTrkqltyFlag, and t_NFTrkselTkFlag.

Referenced by endRun(), and studyMipCut().

799  {
800  t_NFcandP->clear();
801  t_NFcandPt->clear();
802  t_NFcandEta->clear();
803  t_NFcandPhi->clear();
804  t_NFcandEmip->clear();
805  t_NFTrkcandP->clear();
806  t_NFTrkcandPt->clear();
807  t_NFTrkcandEta->clear();
808  t_NFTrkcandPhi->clear();
809  t_NFTrkcandEmip->clear();
810  t_NFTrkMinDR->clear();
811  t_NFTrkMinDP1->clear();
812  t_NFTrkselTkFlag->clear();
813  t_NFTrkqltyFlag->clear();
814  t_NFTrkMissFlag->clear();
815  t_NFTrkPVFlag->clear();
816  t_NFTrkPropFlag->clear();
817  t_NFTrkChgIsoFlag->clear();
818  t_NFTrkNeuIsoFlag->clear();
819  t_NFTrkMipFlag->clear();
820  t_ECone->clear();
821 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:239
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:243
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:236
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:229
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:242
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:241
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:248
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:240
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:234
std::vector< double > * t_ECone
Definition: IsoTrig.cc:249
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:231
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:233
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:237
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:235
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:230
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:238
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:232
double IsoTrig::dEta ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 2106 of file IsoTrig.cc.

Referenced by dR(), endRun(), fillDifferences(), and studyTrigger().

2106 { return (vec1.eta() - vec2.eta()); }
std::vector< double > vec1
Definition: HCALResponse.h:15
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
double IsoTrig::dinvPt ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 2135 of file IsoTrig.cc.

Referenced by endRun(), and fillDifferences().

2135  {
2136  return ((1 / vec1.pt()) - (1 / vec2.pt()));
2137 }
std::vector< double > vec1
Definition: HCALResponse.h:15
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
double IsoTrig::dP ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 2131 of file IsoTrig.cc.

References funct::abs().

Referenced by endRun(), and fillDifferences().

2131  {
2132  return (std::abs(vec1.r() - vec2.r()));
2133 }
std::vector< double > vec1
Definition: HCALResponse.h:15
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
double IsoTrig::dPhi ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 2108 of file IsoTrig.cc.

References M_PI.

Referenced by dR(), endRun(), fillDifferences(), and studyTrigger().

2108  {
2109  double phi1 = vec1.phi();
2110  if (phi1 < 0)
2111  phi1 += 2.0 * M_PI;
2112  double phi2 = vec2.phi();
2113  if (phi2 < 0)
2114  phi2 += 2.0 * M_PI;
2115  double dphi = phi1 - phi2;
2116  if (dphi > M_PI)
2117  dphi -= 2. * M_PI;
2118  else if (dphi < -M_PI)
2119  dphi += 2. * M_PI;
2120  return dphi;
2121 }
std::vector< double > vec1
Definition: HCALResponse.h:15
#define M_PI
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
double IsoTrig::dPt ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 2129 of file IsoTrig.cc.

Referenced by endRun(), and fillDifferences().

2129 { return (vec1.pt() - vec2.pt()); }
std::vector< double > vec1
Definition: HCALResponse.h:15
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
double IsoTrig::dR ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 2123 of file IsoTrig.cc.

References dEta(), dPhi(), and mathSSE::sqrt().

Referenced by chgIsolation(), endRun(), fillDifferences(), getGoodTracks(), studyIsolation(), studyMipCut(), and studyTrigger().

2123  {
2124  double deta = dEta(vec1, vec2);
2125  double dphi = dPhi(vec1, vec2);
2126  return std::sqrt(deta * deta + dphi * dphi);
2127 }
std::vector< double > vec1
Definition: HCALResponse.h:15
T sqrt(T t)
Definition: SSEVec.h:19
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2108
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2106
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
void IsoTrig::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1170 of file IsoTrig.cc.

References dqmdumpme::first, fs_, g_Accepts, g_Pre, g_PreHLT, g_PreL1, mps_fire::i, TFileService::make(), maxRunNo_, minRunNo_, dqmiodumpmetadata::n, edm::second(), trigList_, trigNames_, and trigPreList_.

Referenced by o2olib.O2ORunMgr::executeJob().

1170  {
1171  unsigned int preL1, preHLT;
1172  std::map<unsigned int, unsigned int>::iterator itr;
1173  std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
1174  edm::LogWarning("IsoTrack") << trigNames_.size() << "Triggers were run. RunNo vs HLT accepts for";
1175  for (unsigned int i = 0; i < trigNames_.size(); ++i)
1176  edm::LogWarning("IsoTrack") << "[" << i << "]: " << trigNames_[i];
1177  unsigned int n = maxRunNo_ - minRunNo_ + 1;
1178  g_Pre = fs_->make<TH1I>("h_PrevsRN", "PreScale Vs Run Number", n, minRunNo_, maxRunNo_);
1179  g_PreL1 = fs_->make<TH1I>("h_PreL1vsRN", "L1 PreScale Vs Run Number", n, minRunNo_, maxRunNo_);
1180  g_PreHLT = fs_->make<TH1I>("h_PreHLTvsRN", "HLT PreScale Vs Run Number", n, minRunNo_, maxRunNo_);
1181  g_Accepts = fs_->make<TH1I>("h_HLTAcceptsvsRN", "HLT Accepts Vs Run Number", n, minRunNo_, maxRunNo_);
1182 
1183  for (itr = trigList_.begin(), itrPre = trigPreList_.begin(); itr != trigList_.end(); itr++, itrPre++) {
1184  preL1 = (itrPre->second).first;
1185  preHLT = (itrPre->second).second;
1186  edm::LogVerbatim("IsoTrack") << itr->first << " " << itr->second << " " << itrPre->first << " " << preL1 << " "
1187  << preHLT;
1188  g_Accepts->Fill(itr->first, itr->second);
1189  g_PreL1->Fill(itr->first, preL1);
1190  g_PreHLT->Fill(itr->first, preHLT);
1191  g_Pre->Fill(itr->first, preL1 * preHLT);
1192  }
1193 }
edm::Service< TFileService > fs_
Definition: IsoTrig.cc:202
const int maxRunNo_
Definition: IsoTrig.cc:168
TH1I * g_PreHLT
Definition: IsoTrig.cc:263
std::map< unsigned int, const std::pair< int, int > > trigPreList_
Definition: IsoTrig.cc:199
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
U second(std::pair< T, U > const &p)
std::map< unsigned int, unsigned int > trigList_
Definition: IsoTrig.cc:198
TH1I * g_Pre
Definition: IsoTrig.cc:263
const int minRunNo_
Definition: IsoTrig.cc:168
TH1I * g_PreL1
Definition: IsoTrig.cc:263
const std::vector< std::string > trigNames_
Definition: IsoTrig.cc:152
TH1I * g_Accepts
Definition: IsoTrig.cc:263
void IsoTrig::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate
std::pair< double, double > IsoTrig::etaPhiTrigger ( )
private

Definition at line 2139 of file IsoTrig.cc.

References PVValHelper::eta, dqmdumpme::k, phi, DiDispStaMuonMonitor_cfi::pt, muonTiming_cfi::ptmax, and vec_.

Referenced by analyze(), and endRun().

2139  {
2140  double eta(0), phi(0), ptmax(0);
2141  for (unsigned int k = 0; k < vec_[0].size(); ++k) {
2142  if (k == 0) {
2143  eta = vec_[0][k].eta();
2144  phi = vec_[0][k].phi();
2145  ptmax = vec_[0][k].pt();
2146  } else if (vec_[0][k].pt() > ptmax) {
2147  eta = vec_[0][k].eta();
2148  phi = vec_[0][k].phi();
2149  ptmax = vec_[0][k].pt();
2150  }
2151  }
2152  return std::pair<double, double>(eta, phi);
2153 }
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:264
void IsoTrig::fillCuts ( int  indx,
double  eMipDR,
double  conehmaxNearP,
double  e_inCone,
math::XYZTLorentzVector vec,
int  ieta,
bool  cut 
)
private

Definition at line 2069 of file IsoTrig.cc.

References cutCharge_, cutMip_, cutNeutral_, h_eMaxNearP, h_eMip, h_eNeutIso, h_etaCalibTracks, h_etaMipTracks, and pLimits_.

Referenced by endRun(), and studyIsolation().

2070  {
2071  h_eMip[indx]->Fill(eMipDR);
2072  h_eMaxNearP[indx]->Fill(conehmaxNearP);
2073  h_eNeutIso[indx]->Fill(e_inCone);
2074  if ((conehmaxNearP < cutCharge_) && (eMipDR < cutMip_)) {
2075  for (int lim = 0; lim < 5; ++lim) {
2076  if ((vec.r() > pLimits_[lim]) && (vec.r() <= pLimits_[lim + 1])) {
2077  h_etaMipTracks[lim][indx][0]->Fill((double)(ieta));
2078  if (cut)
2079  h_etaMipTracks[lim][indx][1]->Fill((double)(ieta));
2080  if (e_inCone < cutNeutral_) {
2081  h_etaCalibTracks[lim][indx][0]->Fill((double)(ieta));
2082  if (cut)
2083  h_etaCalibTracks[lim][indx][1]->Fill((double)(ieta));
2084  }
2085  }
2086  }
2087  }
2088 }
TH1D * h_eMaxNearP[2]
Definition: IsoTrig.cc:260
TH1D * h_eNeutIso[2]
Definition: IsoTrig.cc:260
const double cutCharge_
Definition: IsoTrig.cc:167
TH1D * h_etaMipTracks[5][2][2]
Definition: IsoTrig.cc:261
const double cutMip_
Definition: IsoTrig.cc:166
const double cutNeutral_
Definition: IsoTrig.cc:167
double pLimits_[6]
Definition: IsoTrig.cc:201
TH1D * h_etaCalibTracks[5][2][2]
Definition: IsoTrig.cc:261
TH1D * h_eMip[2]
Definition: IsoTrig.cc:259
void IsoTrig::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 509 of file IsoTrig.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), HLT_2018_cff::InputTag, AlCaHLTBitMon_QueryRunRegistry::string, and triggerMatcherToHLTDebug_cfi::tags.

509  {
510  std::vector<std::string> triggers = {"HLT_IsoTrackHB"};
511  std::vector<edm::InputTag> tags = {edm::InputTag("hltHITPixelTracksHB"), edm::InputTag("hltHITPixelTracksHE")};
512  std::vector<double> cones = {35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 63.9, 70.0};
514  desc.addUntracked<std::vector<std::string>>("Triggers", triggers);
515  desc.addUntracked<edm::InputTag>("pixCandTag", edm::InputTag(" "));
516  desc.addUntracked<edm::InputTag>("l1CandTag", edm::InputTag("hltL1sV0SingleJet60"));
517  desc.addUntracked<edm::InputTag>("l2CandTag", edm::InputTag("isolEcalPixelTrackProd"));
518  desc.addUntracked<bool>("doL2L3", false);
519  desc.addUntracked<bool>("doTimingTree", false);
520  desc.addUntracked<bool>("doMipCutTree", false);
521  desc.addUntracked<bool>("doTrkResTree", true);
522  desc.addUntracked<bool>("doChgIsolTree", false);
523  desc.addUntracked<bool>("doStudyIsol", false);
524  desc.addUntracked<int>("verbosity", 0);
525  desc.addUntracked<std::string>("processName", "HLT");
526  desc.addUntracked<std::string>("trackQuality", "highPurity");
527  desc.addUntracked<double>("minTrackPt", 10.0);
528  desc.addUntracked<double>("maxDxyPV", 0.02);
529  desc.addUntracked<double>("maxDzPV", 0.02);
530  desc.addUntracked<double>("maxChi2", 5.0);
531  desc.addUntracked<double>("maxDpOverP", 0.1);
532  desc.addUntracked<int>("minOuterHit", 4);
533  desc.addUntracked<int>("minLayerCrossed", 8);
534  desc.addUntracked<int>("maxInMiss", 0);
535  desc.addUntracked<int>("maxOutMiss", 0);
536  desc.addUntracked<double>("isolationL1", 1.0);
537  desc.addUntracked<double>("coneRadius", 34.98);
538  desc.addUntracked<double>("coneRadiusMIP", 14.0);
539  desc.addUntracked<double>("coneRadiusNeut1", 21.0);
540  desc.addUntracked<double>("coneRadiusNeut2", 29.0);
541  desc.addUntracked<double>("cutMIP", 1.0);
542  desc.addUntracked<double>("chargeIsolation", 2.0);
543  desc.addUntracked<double>("neutralIsolation", 2.0);
544  desc.addUntracked<int>("minRun", 190456);
545  desc.addUntracked<int>("maxRun", 203002);
546  desc.addUntracked<std::vector<edm::InputTag>>("pixelTracksSources", tags);
547  desc.addUntracked<std::vector<double>>("pixelIsolationConeSizeAtEC", cones);
548  desc.addUntracked<double>("minPTrackValue", 0.0);
549  desc.addUntracked<double>("vertexCutSeed", 101.0);
550  desc.addUntracked<double>("vertexCutIsol", 101.0);
551  desc.addUntracked<double>("tauUnbiasCone", 1.2);
552  desc.addUntracked<double>("prelimCone", 1.0);
553  descriptions.add("isoTrigHB", desc);
554 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void IsoTrig::fillDifferences ( int  indx,
math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2,
bool  debug 
)
private

Definition at line 2051 of file IsoTrig.cc.

References dEta(), dinvPt(), dP(), Calorimetry_cff::dp, dPhi(), dPt(), flavorHistoryFilter_cfi::dr, dR(), h_dEta, h_dinvPt, h_dP, h_dPhi, h_dPt, and h_mindR.

Referenced by endRun(), studyMipCut(), and studyTrigger().

2051  {
2052  double dr = dR(vec1, vec2);
2053  double deta = dEta(vec1, vec2);
2054  double dphi = dPhi(vec1, vec2);
2055  double dpt = dPt(vec1, vec2);
2056  double dp = dP(vec1, vec2);
2057  double dinvpt = dinvPt(vec1, vec2);
2058  h_dEta[indx]->Fill(deta);
2059  h_dPhi[indx]->Fill(dphi);
2060  h_dPt[indx]->Fill(dpt);
2061  h_dP[indx]->Fill(dp);
2062  h_dinvPt[indx]->Fill(dinvpt);
2063  h_mindR[indx]->Fill(dr);
2064  if (debug)
2065  edm::LogVerbatim("IsoTrack") << "mindR for index " << indx << " is " << dr << " deta " << deta << " dphi " << dphi
2066  << " dpt " << dpt << " dinvpt " << dinvpt;
2067 }
TH1D * h_dEta[9]
Definition: IsoTrig.cc:258
double dP(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2131
TH1D * h_dP[9]
Definition: IsoTrig.cc:258
double dinvPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2135
TH1D * h_dPhi[9]
Definition: IsoTrig.cc:258
std::vector< double > vec1
Definition: HCALResponse.h:15
TH1D * h_dinvPt[9]
Definition: IsoTrig.cc:259
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2108
#define debug
Definition: HDRShower.cc:19
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2106
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2123
TH1D * h_mindR[9]
Definition: IsoTrig.cc:259
TH1D * h_dPt[9]
Definition: IsoTrig.cc:258
double dPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2129
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
void IsoTrig::fillEnergy ( int  indx,
int  ieta,
double  hCone,
double  eMipDR,
math::XYZTLorentzVector vec 
)
private

Definition at line 2090 of file IsoTrig.cc.

References h_eCalo, h_eHcal, LEDCalibrationChannels::ieta, GetRecoTauVFromDQM_MC_cff::kk, and pLimits_.

Referenced by endRun(), and studyIsolation().

2090  {
2091  int kk(-1);
2092  if (ieta > 0 && ieta < 25)
2093  kk = 23 + ieta;
2094  else if (ieta > -25 && ieta < 0)
2095  kk = -(ieta + 1);
2096  if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
2097  for (int lim = 0; lim < 5; ++lim) {
2098  if ((vec.r() > pLimits_[lim]) && (vec.r() <= pLimits_[lim + 1])) {
2099  h_eHcal[lim][indx][kk]->Fill(hCone);
2100  h_eCalo[lim][indx][kk]->Fill(hCone + eMipDR);
2101  }
2102  }
2103  }
2104 }
TH1D * h_eHcal[5][6][48]
Definition: IsoTrig.cc:262
TH1D * h_eCalo[5][6][48]
Definition: IsoTrig.cc:262
double pLimits_[6]
Definition: IsoTrig.cc:201
void IsoTrig::fillHist ( int  indx,
math::XYZTLorentzVector vec 
)
private

Definition at line 2044 of file IsoTrig.cc.

References h_eta, h_p, h_phi, and h_pt.

Referenced by endRun(), studyIsolation(), and studyTrigger().

2044  {
2045  h_p[indx]->Fill(vec.r());
2046  h_pt[indx]->Fill(vec.pt());
2047  h_eta[indx]->Fill(vec.eta());
2048  h_phi[indx]->Fill(vec.phi());
2049 }
TH1D * h_phi[20]
Definition: IsoTrig.cc:256
TH1D * h_eta[20]
Definition: IsoTrig.cc:256
TH1D * h_p[20]
Definition: IsoTrig.cc:256
TH1D * h_pt[20]
Definition: IsoTrig.cc:256
double IsoTrig::getDistInCM ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 2218 of file IsoTrig.cc.

References angle(), funct::cos(), DEFINE_FWK_MODULE, JetChargeProducer_cfi::exp, M_PI, rEB_, funct::sin(), funct::tan(), and zEE_.

Referenced by chgIsolation(), and endRun().

2218  {
2219  double Rec;
2220  double theta1 = 2 * atan(exp(-eta1));
2221  double theta2 = 2 * atan(exp(-eta2));
2222  if (fabs(eta1) < 1.479)
2223  Rec = rEB_; //radius of ECAL barrel
2224  else if (fabs(eta1) > 1.479 && fabs(eta1) < 7.0)
2225  Rec = tan(theta1) * zEE_; //distance from IP to ECAL endcap
2226  else
2227  return 1000;
2228 
2229  //|vect| times tg of acos(scalar product)
2230  double angle =
2231  acos((sin(theta1) * sin(theta2) * (sin(phi1) * sin(phi2) + cos(phi1) * cos(phi2)) + cos(theta1) * cos(theta2)));
2232  if (angle < 0.5 * M_PI)
2233  return fabs((Rec / sin(theta1)) * tan(angle));
2234  else
2235  return 1000;
2236 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double rEB_
Definition: IsoTrig.cc:163
double zEE_
Definition: IsoTrig.cc:163
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define M_PI
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
std::pair< double, double > IsoTrig::GetEtaPhiAtEcal ( double  etaIP,
double  phiIP,
double  pT,
int  charge,
double  vtxZ 
)
private

Definition at line 2155 of file IsoTrig.cc.

References zMuMuMuonUserData::alpha, bfVal_, ALCARECOTkAlJpsiMuMu_cff::charge, SiPixelRawToDigiRegional_cfi::deltaPhi, JetChargeProducer_cfi::exp, dqm-mbProfile::log, M_PI, rEB_, funct::sin(), funct::tan(), theta(), z, and zEE_.

Referenced by chgIsolation(), and endRun().

2155  {
2156  double deltaPhi = 0;
2157  double etaEC = 100;
2158  double phiEC = 100;
2159 
2160  double Rcurv = 9999999;
2161  if (bfVal_ != 0)
2162  Rcurv = pT * 33.3 * 100 / (bfVal_ * 10); //r(m)=pT(GeV)*33.3/B(kG)
2163 
2164  double ecDist = zEE_;
2165  double ecRad = rEB_; //radius of ECAL barrel (cm)
2166  double theta = 2 * atan(exp(-etaIP));
2167  double zNew = 0;
2168  if (theta > 0.5 * M_PI)
2169  theta = M_PI - theta;
2170  if (fabs(etaIP) < 1.479) {
2171  if ((0.5 * ecRad / Rcurv) > 1) {
2172  etaEC = 10000;
2173  deltaPhi = 0;
2174  } else {
2175  deltaPhi = -charge * asin(0.5 * ecRad / Rcurv);
2176  double alpha1 = 2 * asin(0.5 * ecRad / Rcurv);
2177  double z = ecRad / tan(theta);
2178  if (etaIP > 0)
2179  zNew = z * (Rcurv * alpha1) / ecRad + vtxZ; //new z-coordinate of track
2180  else
2181  zNew = -z * (Rcurv * alpha1) / ecRad + vtxZ; //new z-coordinate of track
2182  double zAbs = fabs(zNew);
2183  if (zAbs < ecDist) {
2184  etaEC = -log(tan(0.5 * atan(ecRad / zAbs)));
2185  deltaPhi = -charge * asin(0.5 * ecRad / Rcurv);
2186  }
2187  if (zAbs > ecDist) {
2188  zAbs = (fabs(etaIP) / etaIP) * ecDist;
2189  double Zflight = fabs(zAbs - vtxZ);
2190  double alpha = (Zflight * ecRad) / (z * Rcurv);
2191  double Rec = 2 * Rcurv * sin(alpha / 2);
2192  deltaPhi = -charge * alpha / 2;
2193  etaEC = -log(tan(0.5 * atan(Rec / ecDist)));
2194  }
2195  }
2196  } else {
2197  zNew = (fabs(etaIP) / etaIP) * ecDist;
2198  double Zflight = fabs(zNew - vtxZ);
2199  double Rvirt = fabs(Zflight * tan(theta));
2200  double Rec = 2 * Rcurv * sin(Rvirt / (2 * Rcurv));
2201  deltaPhi = -(charge) * (Rvirt / (2 * Rcurv));
2202  etaEC = -log(tan(0.5 * atan(Rec / ecDist)));
2203  }
2204 
2205  if (zNew < 0)
2206  etaEC = -etaEC;
2207  phiEC = phiIP + deltaPhi;
2208 
2209  if (phiEC < -M_PI)
2210  phiEC += 2 * M_PI;
2211  if (phiEC > M_PI)
2212  phiEC -= 2 * M_PI;
2213 
2214  std::pair<double, double> retVal(etaEC, phiEC);
2215  return retVal;
2216 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
double rEB_
Definition: IsoTrig.cc:163
double zEE_
Definition: IsoTrig.cc:163
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define M_PI
alpha
zGenParticlesMatch = cms.InputTag(""),
double bfVal_
Definition: IsoTrig.cc:163
void IsoTrig::getGoodTracks ( const edm::Event iEvent,
edm::Handle< reco::TrackCollection > &  trkCollection 
)
private

Definition at line 1956 of file IsoTrig.cc.

References a_charIsoR_, a_mipR_, barrelRecHitsHandle_, Calorimetry_cff::bField, bFieldH_, spr::chargeIsolationCone(), funct::cos(), dR(), spr::eCone_ecal(), endcapRecHitsHandle_, edm::Event::getByToken(), trigger::TriggerRefsCollections::getObjects(), spr::goodTrack(), cuy::ii, edm::HandleBase::isValid(), leadPV_, nTracks(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), pG_, edm::ESHandle< T >::product(), spr::propagateCALO(), DiDispStaMuonMonitor_cfi::pt, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameters_, funct::sin(), t_nGoodTk, theTrackQuality_, tok_l1cand_, trigger::TriggerL1CenJet, trigger::TriggerL1ForJet, trigger::TriggerL1TauJet, and verbosity_.

Referenced by analyze(), and endRun().

1956  {
1957  t_nGoodTk->clear();
1958  std::vector<int> nGood(4, 0);
1959  if (trkCollection.isValid()) {
1960  // get handles to calogeometry and calotopology
1961  const CaloGeometry *geo = pG_.product();
1962  const MagneticField *bField = bFieldH_.product();
1963  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1964  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, ((verbosity_ / 100) % 10 > 2));
1965 
1966  // get the trigger jet
1968  iEvent.getByToken(tok_l1cand_, l1trigobj);
1969 
1970  std::vector<edm::Ref<l1extra::L1JetParticleCollection>> l1tauobjref;
1971  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
1972  std::vector<edm::Ref<l1extra::L1JetParticleCollection>> l1jetobjref;
1973  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
1974  std::vector<edm::Ref<l1extra::L1JetParticleCollection>> l1forjetobjref;
1975  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
1976 
1977  double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1978  for (unsigned int p = 0; p < l1tauobjref.size(); p++) {
1979  if (l1tauobjref[p]->pt() > ptTriggered) {
1980  ptTriggered = l1tauobjref[p]->pt();
1981  phiTriggered = l1tauobjref[p]->phi();
1982  etaTriggered = l1tauobjref[p]->eta();
1983  }
1984  }
1985  for (unsigned int p = 0; p < l1jetobjref.size(); p++) {
1986  if (l1jetobjref[p]->pt() > ptTriggered) {
1987  ptTriggered = l1jetobjref[p]->pt();
1988  phiTriggered = l1jetobjref[p]->phi();
1989  etaTriggered = l1jetobjref[p]->eta();
1990  }
1991  }
1992  for (unsigned int p = 0; p < l1forjetobjref.size(); p++) {
1993  if (l1forjetobjref[p]->pt() > ptTriggered) {
1994  ptTriggered = l1forjetobjref[p]->pt();
1995  phiTriggered = l1forjetobjref[p]->phi();
1996  etaTriggered = l1forjetobjref[p]->eta();
1997  }
1998  }
1999  double pTriggered = ptTriggered * cosh(etaTriggered);
2000  math::XYZTLorentzVector pTrigger(
2001  ptTriggered * cos(phiTriggered), ptTriggered * sin(phiTriggered), pTriggered * tanh(etaTriggered), pTriggered);
2002 
2003  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
2004  unsigned int nTracks(0);
2005  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++, nTracks++) {
2006  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
2007  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
2008  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_, ((verbosity_ / 100) % 10 > 1));
2009  double mindR = dR(v4, pTrigger);
2010  if ((verbosity_ / 100) % 10 > 1)
2011  edm::LogVerbatim("IsoTrack") << "Track ECAL " << trkDetItr->okECAL << " HCAL " << trkDetItr->okHCAL << " Flag "
2012  << selectTk;
2013  if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
2014  int nRH_eMipDR(0), nNearTRKs(0);
2015  double eMipDR = spr::eCone_ecal(geo,
2018  trkDetItr->pointHCAL,
2019  trkDetItr->pointECAL,
2020  a_mipR_,
2021  trkDetItr->directionECAL,
2022  nRH_eMipDR);
2023  double conehmaxNearP =
2024  spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 1));
2025  if (conehmaxNearP < 2.0 && eMipDR < 1.0) {
2026  if (pTrack->p() >= 20 && pTrack->p() < 30) {
2027  ++nGood[0];
2028  } else if (pTrack->p() >= 30 && pTrack->p() < 40) {
2029  ++nGood[1];
2030  } else if (pTrack->p() >= 40 && pTrack->p() < 60) {
2031  ++nGood[2];
2032  } else if (pTrack->p() >= 60 && pTrack->p() < 100) {
2033  ++nGood[3];
2034  }
2035  }
2036  }
2037  }
2038  }
2039 
2040  for (unsigned int ii = 0; ii < nGood.size(); ++ii)
2041  t_nGoodTk->push_back(nGood[ii]);
2042 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
std::string theTrackQuality_
Definition: IsoTrig.cc:161
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:193
const double a_charIsoR_
Definition: IsoTrig.cc:165
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:189
const int verbosity_
Definition: IsoTrig.cc:157
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:192
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:605
const double a_mipR_
Definition: IsoTrig.cc:166
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:190
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:164
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
ii
Definition: cuy.py:590
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:611
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:184
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2123
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:207
math::XYZPoint leadPV_
Definition: IsoTrig.cc:196
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
void IsoTrig::pushChgIsolnTreeVecs ( math::XYZTLorentzVector Pixcand,
math::XYZTLorentzVector Trkcand,
std::vector< double > &  PixMaxP,
double &  TrkMaxP,
bool &  selTk 
)
private

Definition at line 823 of file IsoTrig.cc.

References t_PixcandEta, t_PixcandMaxP, t_PixcandP, t_PixcandPhi, t_PixcandPt, t_PixTrkcandEta, t_PixTrkcandMaxP, t_PixTrkcandP, t_PixTrkcandPhi, t_PixTrkcandPt, and t_PixTrkcandselTk.

Referenced by chgIsolation(), and endRun().

827  {
828  t_PixcandP->push_back(Pixcand.r());
829  t_PixcandPt->push_back(Pixcand.pt());
830  t_PixcandEta->push_back(Pixcand.eta());
831  t_PixcandPhi->push_back(Pixcand.phi());
832  t_PixcandMaxP->push_back(PixMaxP);
833  t_PixTrkcandP->push_back(Trkcand.r());
834  t_PixTrkcandPt->push_back(Trkcand.pt());
835  t_PixTrkcandEta->push_back(Trkcand.eta());
836  t_PixTrkcandPhi->push_back(Trkcand.phi());
837  t_PixTrkcandMaxP->push_back(TrkMaxP);
838  t_PixTrkcandselTk->push_back(selTk);
839 }
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:225
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:222
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:227
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:226
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:217
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:218
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:223
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:221
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:219
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:220
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:224
void IsoTrig::pushMipCutTreeVecs ( math::XYZTLorentzVector NFcand,
math::XYZTLorentzVector Trkcand,
double &  EmipNFcand,
double &  EmipTrkcand,
double &  mindR,
double &  mindP1,
std::vector< bool > &  Flags,
double  hCone 
)
private

Definition at line 841 of file IsoTrig.cc.

References t_ECone, t_NFcandEmip, t_NFcandEta, t_NFcandP, t_NFcandPhi, t_NFcandPt, t_NFTrkcandEmip, t_NFTrkcandEta, t_NFTrkcandP, t_NFTrkcandPhi, t_NFTrkcandPt, t_NFTrkChgIsoFlag, t_NFTrkMinDP1, t_NFTrkMinDR, t_NFTrkMipFlag, t_NFTrkMissFlag, t_NFTrkNeuIsoFlag, t_NFTrkPropFlag, t_NFTrkPVFlag, t_NFTrkqltyFlag, and t_NFTrkselTkFlag.

Referenced by endRun(), and studyMipCut().

848  {
849  t_NFcandP->push_back(NFcand.r());
850  t_NFcandPt->push_back(NFcand.pt());
851  t_NFcandEta->push_back(NFcand.eta());
852  t_NFcandPhi->push_back(NFcand.phi());
853  t_NFcandEmip->push_back(EmipNFcand);
854  t_NFTrkcandP->push_back(Trkcand.r());
855  t_NFTrkcandPt->push_back(Trkcand.pt());
856  t_NFTrkcandEta->push_back(Trkcand.eta());
857  t_NFTrkcandPhi->push_back(Trkcand.phi());
858  t_NFTrkcandEmip->push_back(EmipTrkcand);
859  t_NFTrkMinDR->push_back(mindR);
860  t_NFTrkMinDP1->push_back(mindP1);
861  t_NFTrkselTkFlag->push_back(Flags[0]);
862  t_NFTrkqltyFlag->push_back(Flags[1]);
863  t_NFTrkMissFlag->push_back(Flags[2]);
864  t_NFTrkPVFlag->push_back(Flags[3]);
865  t_NFTrkPropFlag->push_back(Flags[4]);
866  t_NFTrkChgIsoFlag->push_back(Flags[5]);
867  t_NFTrkNeuIsoFlag->push_back(Flags[6]);
868  t_NFTrkMipFlag->push_back(Flags[7]);
869  t_ECone->push_back(hCone);
870 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:239
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:243
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:236
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:229
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:242
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:241
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:248
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:240
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:234
std::vector< double > * t_ECone
Definition: IsoTrig.cc:249
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:231
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:233
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:237
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:235
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:230
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:238
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:232
void IsoTrig::studyIsolation ( edm::Handle< reco::TrackCollection > &  trkCollection,
std::vector< reco::TrackCollection::const_iterator > &  goodTks 
)
private

Definition at line 1684 of file IsoTrig.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutR1_, a_neutR2_, barrelRecHitsHandle_, Calorimetry_cff::bField, bFieldH_, spr::chargeIsolationCone(), cutCharge_, cutMip_, cutNeutral_, PbPb_ZMuSkimMuonDPG_cff::deltaR, doL2L3_, dR(), dr_L1_, StorageManager_cfg::e1, spr::eCone_ecal(), spr::eCone_hcal(), endcapRecHitsHandle_, fillCuts(), fillEnergy(), fillHist(), spr::find(), spr::goodTrack(), hbhe_, hit::id, LEDCalibrationChannels::ieta, HcalDetId::ieta(), edm::HandleBase::isValid(), dqmdumpme::k, leadPV_, nTracks(), reco::TrackBase::p(), pG_, edm::ESHandle< T >::product(), spr::propagateCALO(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameters_, theTrackQuality_, vec_, and verbosity_.

Referenced by analyze(), and endRun().

1685  {
1686  if (trkCollection.isValid()) {
1687  // get handles to calogeometry and calotopology
1688  const CaloGeometry *geo = pG_.product();
1689  const MagneticField *bField = bFieldH_.product();
1690  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1691  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, ((verbosity_ / 100) % 10 > 2));
1692 
1693  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1694  if ((verbosity_ / 1000) % 10 > 1) {
1695  edm::LogVerbatim("IsoTrack") << "n of barrelRecHitsHandle " << barrelRecHitsHandle_->size();
1697  ++hit) {
1698  edm::LogVerbatim("IsoTrack") << "hit : detid(ieta,iphi) " << (EBDetId)(hit->id()) << " time " << hit->time()
1699  << " energy " << hit->energy();
1700  }
1701  edm::LogVerbatim("IsoTrack") << "n of endcapRecHitsHandle " << endcapRecHitsHandle_->size();
1703  ++hit) {
1704  edm::LogVerbatim("IsoTrack") << "hit : detid(ieta,iphi) " << (EEDetId)(hit->id()) << " time " << hit->time()
1705  << " energy " << hit->energy();
1706  }
1707  edm::LogVerbatim("IsoTrack") << "n of hbhe " << hbhe_->size();
1708  for (HBHERecHitCollection::const_iterator hit = hbhe_->begin(); hit != hbhe_->end(); ++hit) {
1709  edm::LogVerbatim("IsoTrack") << "hit : detid(ieta,iphi) " << hit->id() << " time " << hit->time() << " energy "
1710  << hit->energy();
1711  }
1712  }
1713  unsigned int nTracks = 0, ngoodTk = 0, nselTk = 0;
1714  int ieta = 999;
1715  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++, nTracks++) {
1716  bool l3Track = (std::find(goodTks.begin(), goodTks.end(), trkDetItr->trkItr) != goodTks.end());
1717  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
1718  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
1719  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_, ((verbosity_ / 100) % 10 > 1));
1720  double eMipDR = 9999., e_inCone = 0, conehmaxNearP = 0, mindR = 999.9, hCone = 0;
1721  if (trkDetItr->okHCAL) {
1722  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
1723  ieta = detId.ieta();
1724  }
1725  for (unsigned k = 0; k < vec_[0].size(); ++k) {
1726  double deltaR = dR(v4, vec_[0][k]);
1727  if (deltaR < mindR)
1728  mindR = deltaR;
1729  }
1730  if ((verbosity_ / 100) % 10 > 1)
1731  edm::LogVerbatim("IsoTrack") << "Track ECAL " << trkDetItr->okECAL << " HCAL " << trkDetItr->okHCAL << " Flag "
1732  << selectTk;
1733  if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1734  ngoodTk++;
1735  int nRH_eMipDR = 0, nNearTRKs = 0;
1736  double e1 = spr::eCone_ecal(geo,
1739  trkDetItr->pointHCAL,
1740  trkDetItr->pointECAL,
1741  a_neutR1_,
1742  trkDetItr->directionECAL,
1743  nRH_eMipDR);
1744  double e2 = spr::eCone_ecal(geo,
1747  trkDetItr->pointHCAL,
1748  trkDetItr->pointECAL,
1749  a_neutR2_,
1750  trkDetItr->directionECAL,
1751  nRH_eMipDR);
1752  eMipDR = spr::eCone_ecal(geo,
1755  trkDetItr->pointHCAL,
1756  trkDetItr->pointECAL,
1757  a_mipR_,
1758  trkDetItr->directionECAL,
1759  nRH_eMipDR);
1760  conehmaxNearP =
1761  spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 1));
1762  e_inCone = e2 - e1;
1763  double distFromHotCell = -99.0;
1764  int nRecHitsCone = -99, ietaHotCell = -99, iphiHotCell = -99;
1765  GlobalPoint gposHotCell(0., 0., 0.);
1766  std::vector<DetId> coneRecHitDetIds;
1767  hCone = spr::eCone_hcal(geo,
1768  hbhe_,
1769  trkDetItr->pointHCAL,
1770  trkDetItr->pointECAL,
1771  a_coneR_,
1772  trkDetItr->directionHCAL,
1773  nRecHitsCone,
1774  coneRecHitDetIds,
1775  distFromHotCell,
1776  ietaHotCell,
1777  iphiHotCell,
1778  gposHotCell,
1779  -1);
1780  if (eMipDR < 1.0)
1781  nselTk++;
1782  }
1783  if (l3Track) {
1784  fillHist(10, v4);
1785  if (selectTk) {
1786  fillHist(11, v4);
1787  fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR > dr_L1_));
1788  if (conehmaxNearP < cutCharge_) {
1789  fillHist(12, v4);
1790  if (eMipDR < cutMip_) {
1791  fillHist(13, v4);
1792  fillEnergy(1, ieta, hCone, eMipDR, v4);
1793  fillEnergy(0, ieta, hCone, eMipDR, v4);
1794  if (e_inCone < cutNeutral_) {
1795  fillHist(14, v4);
1796  fillEnergy(4, ieta, hCone, eMipDR, v4);
1797  fillEnergy(3, ieta, hCone, eMipDR, v4);
1798  }
1799  }
1800  }
1801  }
1802  } else if (doL2L3_) {
1803  fillHist(15, v4);
1804  if (selectTk) {
1805  fillHist(16, v4);
1806  fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR > dr_L1_));
1807  if (conehmaxNearP < cutCharge_) {
1808  fillHist(17, v4);
1809  if (eMipDR < cutMip_) {
1810  fillHist(18, v4);
1811  fillEnergy(2, ieta, hCone, eMipDR, v4);
1812  fillEnergy(0, ieta, hCone, eMipDR, v4);
1813  if (e_inCone < cutNeutral_) {
1814  fillHist(19, v4);
1815  fillEnergy(5, ieta, hCone, eMipDR, v4);
1816  fillEnergy(3, ieta, hCone, eMipDR, v4);
1817  }
1818  }
1819  }
1820  }
1821  }
1822  }
1823  // edm::LogVerbatim("IsoTrack") << "Number of tracks selected offline " << nselTk;
1824  }
1825 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
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)
const double a_coneR_
Definition: IsoTrig.cc:165
std::string theTrackQuality_
Definition: IsoTrig.cc:161
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:193
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:191
const double a_charIsoR_
Definition: IsoTrig.cc:165
const double a_neutR2_
Definition: IsoTrig.cc:166
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:189
const int verbosity_
Definition: IsoTrig.cc:157
std::vector< EcalRecHit >::const_iterator const_iterator
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:192
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:264
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:605
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
const double a_mipR_
Definition: IsoTrig.cc:166
const double dr_L1_
Definition: IsoTrig.cc:165
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:190
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void fillHist(int, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2044
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const double a_neutR1_
Definition: IsoTrig.cc:166
void fillEnergy(int, int, double, double, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2090
int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:164
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:611
unsigned int id
const double cutCharge_
Definition: IsoTrig.cc:167
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2123
math::XYZPoint leadPV_
Definition: IsoTrig.cc:196
const double cutMip_
Definition: IsoTrig.cc:166
const double cutNeutral_
Definition: IsoTrig.cc:167
T const * product() const
Definition: ESHandle.h:86
void fillCuts(int, double, double, double, math::XYZTLorentzVector &, int, bool)
Definition: IsoTrig.cc:2069
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
const bool doL2L3_
Definition: IsoTrig.cc:155
void IsoTrig::studyMipCut ( edm::Handle< reco::TrackCollection > &  trkCollection,
edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &  L2cands 
)
private

Definition at line 1436 of file IsoTrig.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutR1_, a_neutR2_, funct::abs(), barrelRecHitsHandle_, Calorimetry_cff::bField, bFieldH_, spr::chargeIsolationCone(), clearMipCutTreeVectors(), cutCharge_, cutMip_, cutNeutral_, flavorHistoryFilter_cfi::dr, dR(), StorageManager_cfg::e1, spr::eCone_ecal(), spr::eCone_hcal(), endcapRecHitsHandle_, reco::TrackBase::eta(), fillDifferences(), spr::goodTrack(), h_EnIn, h_EnOut, h_MipEnMatch, h_MipEnNoMatch, hbhe_, mps_fire::i, edm::HandleBase::isValid(), leadPV_, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, MipCutTree_, nTracks(), reco::TrackBase::p(), pG_, reco::TrackBase::phi(), edm::ESHandle< T >::product(), spr::propagateCALO(), reco::TrackBase::pt(), pushMipCutTreeVecs(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameters_, theTrackQuality_, and verbosity_.

Referenced by analyze(), and endRun().

1437  {
1439  if (verbosity_ % 10 > 0)
1440  edm::LogVerbatim("IsoTrack") << "inside studymipcut";
1441  if (!trkCollection.isValid()) {
1442  edm::LogWarning("IsoTrack") << "trkCollection.isValid is false";
1443  } else {
1444  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1445  const MagneticField *bField = bFieldH_.product();
1446  const CaloGeometry *geo = pG_.product();
1447  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1448  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections1, ((verbosity_ / 100) % 10 > 2));
1449  if (verbosity_ % 10 > 0)
1450  edm::LogVerbatim("IsoTrack") << "Number of L2cands:" << L2cands->size() << " to be matched to something out of "
1451  << trkCaloDirections1.size() << " reco tracks";
1452  for (unsigned int i = 0; i < L2cands->size(); i++) {
1455  double enIn = candref->energyIn();
1456  h_EnIn->Fill(candref->energyIn());
1457  h_EnOut->Fill(candref->energyOut());
1459  candref->track()->px(), candref->track()->py(), candref->track()->pz(), candref->track()->p());
1460  if (verbosity_ % 10 > 1)
1461  edm::LogVerbatim("IsoTrack") << "HLT Level Candidate eta/phi/pt/enIn:" << candref->track()->eta() << "/"
1462  << candref->track()->phi() << "/" << candref->track()->pt() << "/"
1463  << candref->energyIn();
1464  math::XYZTLorentzVector mindRvec;
1465  double mindR = 999.9, mindP1 = 999.9, eMipDR = 0.0;
1466  std::vector<bool> selFlags;
1467  unsigned int nTracks = 0;
1468  double conehmaxNearP = 0, hCone = 0;
1469  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++) {
1470  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
1471  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
1472  double dr = dR(v1, v2);
1473  double dp1 = std::abs(1. / v1.r() - 1. / v2.r());
1474  if (verbosity_ % 1000 > 0)
1475  edm::LogVerbatim("IsoTrack") << "This recotrack(eta/phi/pt) " << pTrack->eta() << "/" << pTrack->phi() << "/"
1476  << pTrack->pt() << " has dr/dp= " << dr << "/" << dp1;
1477  if (dr < mindR) {
1478  mindR = dr;
1479  mindP1 = dp1;
1480  mindRvec = v2;
1481  int nRH_eMipDR = 0, nNearTRKs = 0;
1482  eMipDR = spr::eCone_ecal(geo,
1485  trkDetItr->pointHCAL,
1486  trkDetItr->pointECAL,
1487  a_mipR_,
1488  trkDetItr->directionECAL,
1489  nRH_eMipDR);
1490  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_, ((verbosity_ / 100) % 10 > 1));
1492  oneCutParameters.maxDxyPV = 10;
1493  oneCutParameters.maxDzPV = 100;
1494  oneCutParameters.maxInMiss = 2;
1495  oneCutParameters.maxOutMiss = 2;
1496  bool qltyFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters, ((verbosity_ / 100) % 10 > 1));
1497  oneCutParameters = selectionParameters_;
1498  oneCutParameters.maxDxyPV = 10;
1499  oneCutParameters.maxDzPV = 100;
1500  bool qltyMissFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters, ((verbosity_ / 100) % 10 > 1));
1501  oneCutParameters = selectionParameters_;
1502  oneCutParameters.maxInMiss = 2;
1503  oneCutParameters.maxOutMiss = 2;
1504  bool qltyPVFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters, ((verbosity_ / 100) % 10 > 1));
1505  conehmaxNearP = spr::chargeIsolationCone(
1506  nTracks, trkCaloDirections1, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 1));
1507  double e1 = spr::eCone_ecal(geo,
1510  trkDetItr->pointHCAL,
1511  trkDetItr->pointECAL,
1512  a_neutR1_,
1513  trkDetItr->directionECAL,
1514  nRH_eMipDR);
1515  double e2 = spr::eCone_ecal(geo,
1518  trkDetItr->pointHCAL,
1519  trkDetItr->pointECAL,
1520  a_neutR2_,
1521  trkDetItr->directionECAL,
1522  nRH_eMipDR);
1523  double e_inCone = e2 - e1;
1524  bool chgIsolFlag = (conehmaxNearP < cutCharge_);
1525  bool mipFlag = (eMipDR < cutMip_);
1526  bool neuIsolFlag = (e_inCone < cutNeutral_);
1527  bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1528  selFlags.clear();
1529  selFlags.push_back(selectTk);
1530  selFlags.push_back(qltyFlag);
1531  selFlags.push_back(qltyMissFlag);
1532  selFlags.push_back(qltyPVFlag);
1533  selFlags.push_back(trkpropFlag);
1534  selFlags.push_back(chgIsolFlag);
1535  selFlags.push_back(neuIsolFlag);
1536  selFlags.push_back(mipFlag);
1537  double distFromHotCell = -99.0;
1538  int nRecHitsCone = -99, ietaHotCell = -99, iphiHotCell = -99;
1539  GlobalPoint gposHotCell(0., 0., 0.);
1540  std::vector<DetId> coneRecHitDetIds;
1541  hCone = spr::eCone_hcal(geo,
1542  hbhe_,
1543  trkDetItr->pointHCAL,
1544  trkDetItr->pointECAL,
1545  a_coneR_,
1546  trkDetItr->directionHCAL,
1547  nRecHitsCone,
1548  coneRecHitDetIds,
1549  distFromHotCell,
1550  ietaHotCell,
1551  iphiHotCell,
1552  gposHotCell,
1553  -1);
1554  }
1555  }
1556  pushMipCutTreeVecs(v1, mindRvec, enIn, eMipDR, mindR, mindP1, selFlags, hCone);
1557  fillDifferences(6, v1, mindRvec, (verbosity_ % 10 > 0));
1558  if (mindR >= 0.05) {
1559  fillDifferences(8, v1, mindRvec, (verbosity_ % 10 > 0));
1560  h_MipEnNoMatch->Fill(candref->energyIn(), eMipDR);
1561  } else {
1562  fillDifferences(7, v1, mindRvec, (verbosity_ % 10 > 0));
1563  h_MipEnMatch->Fill(candref->energyIn(), eMipDR);
1564  }
1565  }
1566  }
1567  MipCutTree_->Fill();
1568 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
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)
const double a_coneR_
Definition: IsoTrig.cc:165
std::string theTrackQuality_
Definition: IsoTrig.cc:161
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:193
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:191
TH1D * h_EnIn
Definition: IsoTrig.cc:251
const double a_charIsoR_
Definition: IsoTrig.cc:165
const double a_neutR2_
Definition: IsoTrig.cc:166
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:189
const int verbosity_
Definition: IsoTrig.cc:157
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:192
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
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:605
const double a_mipR_
Definition: IsoTrig.cc:166
void pushMipCutTreeVecs(math::XYZTLorentzVector &NFcand, math::XYZTLorentzVector &Trkcand, double &EmipNFcand, double &EmipTrkcand, double &mindR, double &mindP1, std::vector< bool > &Flags, double hCone)
Definition: IsoTrig.cc:841
TH1D * h_EnOut
Definition: IsoTrig.cc:251
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:190
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const double a_neutR1_
Definition: IsoTrig.cc:166
double pt() const
track transverse momentum
Definition: TrackBase.h:602
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:164
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:611
TH2D * h_MipEnMatch
Definition: IsoTrig.cc:252
const double cutCharge_
Definition: IsoTrig.cc:167
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2123
TTree * MipCutTree_
Definition: IsoTrig.cc:203
void clearMipCutTreeVectors()
Definition: IsoTrig.cc:799
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
Definition: IsoTrig.cc:2051
TH2D * h_MipEnNoMatch
Definition: IsoTrig.cc:252
math::XYZPoint leadPV_
Definition: IsoTrig.cc:196
const double cutMip_
Definition: IsoTrig.cc:166
const double cutNeutral_
Definition: IsoTrig.cc:167
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
void IsoTrig::studyTiming ( const edm::Event theEvent)
private

Definition at line 1325 of file IsoTrig.cc.

References PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::dxy, PVValHelper::dz, PVValHelper::eta, edm::Event::getByToken(), trigger::TriggerRefsCollections::getObjects(), AlCaHLTBitMon_ParallelJobs::p, phi, pixelTrackRefsHB_, pixelTrackRefsHE_, edm::Handle< T >::product(), DiDispStaMuonMonitor_cfi::pt, dttmaxenums::R, TrackInfoProducer_cfi::rechits, SeedingLayerSetsHits::size(), edmNew::DetSetVector< T >::size(), t_nPixCand, t_nPixSeed, t_timeL2Prod, tauUnbiasCone_, TimingTree_, tok_l1cand_, tok_SeedingLayerHB_, tok_SeedingLayerHE_, tok_SiPixelRecHits_, tok_verthb_, tok_verthe_, trigger::TriggerL1CenJet, trigger::TriggerL1ForJet, trigger::TriggerL1TauJet, verbosity_, and vtxCutSeed_.

Referenced by analyze(), and endRun().

1325  {
1326  t_timeL2Prod->clear();
1327  t_nPixCand->clear();
1328  t_nPixSeed->clear();
1329 
1330  if (verbosity_ % 10 > 0) {
1331  edm::Handle<SeedingLayerSetsHits> hblayers, helayers;
1332  theEvent.getByToken(tok_SeedingLayerHB_, hblayers);
1333  theEvent.getByToken(tok_SeedingLayerHE_, helayers);
1334  const SeedingLayerSetsHits *layershb = hblayers.product();
1335  const SeedingLayerSetsHits *layershe = helayers.product();
1336  edm::LogVerbatim("IsoTrack") << "size of Seeding TripletLayers hb/he " << layershb->size() << "/"
1337  << layershe->size();
1339  theEvent.getByToken(tok_SiPixelRecHits_, rchts);
1340  const SiPixelRecHitCollection *rechits = rchts.product();
1341  edm::LogVerbatim("IsoTrack") << "size of SiPixelRechits " << rechits->size();
1342  }
1343  int nCandHB = pixelTrackRefsHB_.size(), nCandHE = pixelTrackRefsHE_.size();
1344  int nSeedHB = 0, nSeedHE = 0;
1345 
1346  if (nCandHE > 0) {
1347  edm::Handle<reco::VertexCollection> pVertHB, pVertHE;
1348  theEvent.getByToken(tok_verthb_, pVertHB);
1349  theEvent.getByToken(tok_verthe_, pVertHE);
1351  theEvent.getByToken(tok_l1cand_, l1trigobj);
1352 
1353  std::vector<edm::Ref<l1extra::L1JetParticleCollection>> l1tauobjref;
1354  std::vector<edm::Ref<l1extra::L1JetParticleCollection>> l1jetobjref;
1355  std::vector<edm::Ref<l1extra::L1JetParticleCollection>> l1forjetobjref;
1356 
1357  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
1358  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
1359  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
1360 
1361  double ptTriggered = -10;
1362  double etaTriggered = -100;
1363  double phiTriggered = -100;
1364  for (unsigned int p = 0; p < l1tauobjref.size(); p++) {
1365  if (l1tauobjref[p]->pt() > ptTriggered) {
1366  ptTriggered = l1tauobjref[p]->pt();
1367  phiTriggered = l1tauobjref[p]->phi();
1368  etaTriggered = l1tauobjref[p]->eta();
1369  }
1370  }
1371  for (unsigned int p = 0; p < l1jetobjref.size(); p++) {
1372  if (l1jetobjref[p]->pt() > ptTriggered) {
1373  ptTriggered = l1jetobjref[p]->pt();
1374  phiTriggered = l1jetobjref[p]->phi();
1375  etaTriggered = l1jetobjref[p]->eta();
1376  }
1377  }
1378  for (unsigned int p = 0; p < l1forjetobjref.size(); p++) {
1379  if (l1forjetobjref[p]->pt() > ptTriggered) {
1380  ptTriggered = l1forjetobjref[p]->pt();
1381  phiTriggered = l1forjetobjref[p]->phi();
1382  etaTriggered = l1forjetobjref[p]->eta();
1383  }
1384  }
1385  for (unsigned iS = 0; iS < pixelTrackRefsHE_.size(); iS++) {
1386  reco::VertexCollection::const_iterator vitSel;
1387  double minDZ = 100;
1388  bool vtxMatch;
1389  for (reco::VertexCollection::const_iterator vit = pVertHE->begin(); vit != pVertHE->end(); vit++) {
1390  if (fabs(pixelTrackRefsHE_[iS]->dz(vit->position())) < minDZ) {
1391  minDZ = fabs(pixelTrackRefsHE_[iS]->dz(vit->position()));
1392  vitSel = vit;
1393  }
1394  }
1395  //cut on dYX:
1396  if ((fabs(pixelTrackRefsHE_[iS]->dxy(vitSel->position())) < vtxCutSeed_) || (minDZ == 100))
1397  vtxMatch = true;
1398 
1399  //select tracks not matched to triggered L1 jet
1400  double R = deltaR(etaTriggered, phiTriggered, pixelTrackRefsHE_[iS]->eta(), pixelTrackRefsHE_[iS]->phi());
1401  if (R > tauUnbiasCone_ && vtxMatch)
1402  nSeedHE++;
1403  }
1404  for (unsigned iS = 0; iS < pixelTrackRefsHB_.size(); iS++) {
1405  reco::VertexCollection::const_iterator vitSel;
1406  double minDZ = 100;
1407  bool vtxMatch(false);
1408  for (reco::VertexCollection::const_iterator vit = pVertHB->begin(); vit != pVertHB->end(); vit++) {
1409  if (fabs(pixelTrackRefsHB_[iS]->dz(vit->position())) < minDZ) {
1410  minDZ = fabs(pixelTrackRefsHB_[iS]->dz(vit->position()));
1411  vitSel = vit;
1412  }
1413  }
1414  //cut on dYX:
1415  if ((fabs(pixelTrackRefsHB_[iS]->dxy(vitSel->position())) < 101.0) || (minDZ == 100))
1416  vtxMatch = true;
1417 
1418  //select tracks not matched to triggered L1 jet
1419  double R = deltaR(etaTriggered, phiTriggered, pixelTrackRefsHB_[iS]->eta(), pixelTrackRefsHB_[iS]->phi());
1420  if (R > 1.2 && vtxMatch)
1421  nSeedHB++;
1422  }
1423 
1424  if (verbosity_ % 10 > 0) {
1425  edm::LogVerbatim("IsoTrack") << "(HB/HE) nCand: " << nCandHB << "/" << nCandHE << "nSeed: " << nSeedHB << "/"
1426  << nSeedHE;
1427  }
1428  }
1429  t_nPixSeed->push_back(nSeedHB);
1430  t_nPixSeed->push_back(nSeedHE);
1431  t_nPixCand->push_back(nCandHB);
1432  t_nPixCand->push_back(nCandHE);
1433 
1434  TimingTree_->Fill();
1435 }
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< reco::TrackRef > pixelTrackRefsHB_
Definition: IsoTrig.cc:188
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const int verbosity_
Definition: IsoTrig.cc:157
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:206
const double tauUnbiasCone_
Definition: IsoTrig.cc:160
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHB_
Definition: IsoTrig.cc:180
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHE_
Definition: IsoTrig.cc:181
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:204
std::vector< reco::TrackRef > pixelTrackRefsHE_
Definition: IsoTrig.cc:188
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:205
T const * product() const
Definition: Handle.h:69
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
Definition: IsoTrig.cc:179
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:184
size_type size() const
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits_
Definition: IsoTrig.cc:182
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
Definition: IsoTrig.cc:179
unsigned short size() const
Get the number of SeedingLayerSets.
const double vtxCutSeed_
Definition: IsoTrig.cc:159
TTree * TimingTree_
Definition: IsoTrig.cc:203
void IsoTrig::studyTrigger ( edm::Handle< reco::TrackCollection > &  trkCollection,
std::vector< reco::TrackCollection::const_iterator > &  goodTks 
)
private

Definition at line 1570 of file IsoTrig.cc.

References funct::abs(), PbPb_ZMuSkimMuonDPG_cff::deltaR, dEta(), Calorimetry_cff::dp, dPhi(), flavorHistoryFilter_cfi::dr, dR(), fillDifferences(), fillHist(), h_dEtaL1, h_dPhiL1, h_dRL1, mps_fire::i, edm::HandleBase::isValid(), dqmiolumiharvest::j, dqmdumpme::k, mathSSE::sqrt(), vec_, and verbosity_.

Referenced by analyze(), and endRun().

1571  {
1572  if (verbosity_ % 10 > 0)
1573  edm::LogVerbatim("IsoTrack") << "Inside StudyTrigger";
1575  for (int j = 0; j < 3; j++) {
1576  for (unsigned int k = 0; k < vec_[j].size(); k++) {
1577  if (verbosity_ % 10 > 0)
1578  edm::LogVerbatim("IsoTrack") << "vec[" << j << "][" << k << "] pt " << vec_[j][k].pt() << " eta "
1579  << vec_[j][k].eta() << " phi " << vec_[j][k].phi();
1580  fillHist(j, vec_[j][k]);
1581  }
1582  }
1583 
1584  double deta, dphi, dr;
1586  for (int lvl = 1; lvl < 3; lvl++) {
1587  for (unsigned int i = 0; i < vec_[lvl].size(); i++) {
1588  deta = dEta(vec_[0][0], vec_[lvl][i]);
1589  dphi = dPhi(vec_[0][0], vec_[lvl][i]);
1590  dr = dR(vec_[0][0], vec_[lvl][i]);
1591  if (verbosity_ % 10 > 1)
1592  edm::LogVerbatim("IsoTrack") << "lvl " << lvl << " i " << i << " deta " << deta << " dphi " << dphi << " dR "
1593  << dr;
1594  h_dEtaL1[lvl - 1]->Fill(deta);
1595  h_dPhiL1[lvl - 1]->Fill(dphi);
1596  h_dRL1[lvl - 1]->Fill(std::sqrt(dr));
1597  }
1598  }
1599 
1600  math::XYZTLorentzVector mindRvec;
1601  double mindR;
1602  for (unsigned int k = 0; k < vec_[2].size(); ++k) {
1604  mindR = 999.9;
1605  if (verbosity_ % 10 > 1)
1606  edm::LogVerbatim("IsoTrack") << "L3obj: pt " << vec_[2][k].pt() << " eta " << vec_[2][k].eta() << " phi "
1607  << vec_[2][k].phi();
1608  for (unsigned int j = 0; j < vec_[1].size(); j++) {
1609  dr = dR(vec_[2][k], vec_[1][j]);
1610  if (dr < mindR) {
1611  mindR = dr;
1612  mindRvec = vec_[1][j];
1613  }
1614  }
1615  fillDifferences(0, vec_[2][k], mindRvec, (verbosity_ % 10 > 0));
1616  if (mindR < 0.03) {
1617  fillDifferences(1, vec_[2][k], mindRvec, (verbosity_ % 10 > 0));
1618  fillHist(6, mindRvec);
1619  fillHist(8, vec_[2][k]);
1620  } else {
1621  fillDifferences(2, vec_[2][k], mindRvec, (verbosity_ % 10 > 0));
1622  fillHist(7, mindRvec);
1623  fillHist(9, vec_[2][k]);
1624  }
1625 
1627  mindR = 999.9;
1628  if (verbosity_ % 10 > 0)
1629  edm::LogVerbatim("IsoTrack") << "Now Matching L3 track with reco: L3 Track (eta, phi) " << vec_[2][k].eta() << ":"
1630  << vec_[2][k].phi() << " L2 Track " << mindRvec.eta() << ":" << mindRvec.phi()
1631  << " dR " << mindR;
1632  reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1633  if (trkCollection.isValid()) {
1634  double mindP(9999.9);
1635  reco::TrackCollection::const_iterator trkItr;
1636  for (trkItr = trkCollection->begin(); trkItr != trkCollection->end(); trkItr++) {
1637  math::XYZTLorentzVector v4(trkItr->px(), trkItr->py(), trkItr->pz(), trkItr->p());
1638  double deltaR = dR(v4, vec_[2][k]);
1639  double dp = std::abs(v4.r() / vec_[2][k].r() - 1.0);
1640  if (deltaR < mindR) {
1641  mindR = deltaR;
1642  mindP = dp;
1643  mindRvec = v4;
1644  goodTk = trkItr;
1645  }
1646  if ((verbosity_ / 10) % 10 > 1 && deltaR < 1.0)
1647  edm::LogVerbatim("IsoTrack") << "reco track: pt " << v4.pt() << " eta " << v4.eta() << " phi " << v4.phi()
1648  << " DR " << deltaR;
1649  }
1650  if (verbosity_ % 10 > 0)
1651  edm::LogVerbatim("IsoTrack") << "Now Matching at Reco level in step 1 DR: " << mindR << ":" << mindP
1652  << " eta:phi " << mindRvec.eta() << ":" << mindRvec.phi();
1653  if (mindR < 0.03 && mindP > 0.1) {
1654  for (trkItr = trkCollection->begin(); trkItr != trkCollection->end(); trkItr++) {
1655  math::XYZTLorentzVector v4(trkItr->px(), trkItr->py(), trkItr->pz(), trkItr->p());
1656  double deltaR = dR(v4, vec_[2][k]);
1657  double dp = std::abs(v4.r() / vec_[2][k].r() - 1.0);
1658  if (dp < mindP && deltaR < 0.03) {
1659  mindR = deltaR;
1660  mindP = dp;
1661  mindRvec = v4;
1662  goodTk = trkItr;
1663  }
1664  }
1665  if (verbosity_ % 10 > 0)
1666  edm::LogVerbatim("IsoTrack") << "Now Matching at Reco level in step 2 DR: " << mindR << ":" << mindP
1667  << " eta:phi " << mindRvec.eta() << ":" << mindRvec.phi();
1668  }
1669  fillDifferences(3, vec_[2][k], mindRvec, (verbosity_ % 10 > 0));
1670  fillHist(3, mindRvec);
1671  if (mindR < 0.03) {
1672  fillDifferences(4, vec_[2][k], mindRvec, (verbosity_ % 10 > 0));
1673  fillHist(4, mindRvec);
1674  } else {
1675  fillDifferences(5, vec_[2][k], mindRvec, (verbosity_ % 10 > 0));
1676  fillHist(5, mindRvec);
1677  }
1678  if (goodTk != trkCollection->end())
1679  goodTks.push_back(goodTk);
1680  }
1681  }
1682 }
const int verbosity_
Definition: IsoTrig.cc:157
TH1D * h_dEtaL1[2]
Definition: IsoTrig.cc:257
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:264
TH1D * h_dPhiL1[2]
Definition: IsoTrig.cc:257
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void fillHist(int, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2044
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:70
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2108
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2106
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2123
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
Definition: IsoTrig.cc:2051
TH1D * h_dRL1[2]
Definition: IsoTrig.cc:257
void IsoTrig::StudyTrkEbyP ( edm::Handle< reco::TrackCollection > &  trkCollection)
private

Definition at line 1200 of file IsoTrig.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutR1_, a_neutR2_, barrelRecHitsHandle_, Calorimetry_cff::bField, bFieldH_, spr::chargeIsolationCone(), cutCharge_, cutMip_, cutNeutral_, StorageManager_cfg::e1, spr::eCone_ecal(), spr::eCone_hcal(), endcapRecHitsHandle_, spr::goodTrack(), hbhe_, edm::HandleBase::isValid(), leadPV_, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, nTracks(), reco::TrackBase::p(), pG_, edm::ESHandle< T >::product(), spr::propagateCALO(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameters_, t_TrkhCone, t_TrkMissFlag, t_TrkNuIsolFlag, t_TrkP, t_TrkPVFlag, t_TrkqltyFlag, t_TrkselTkFlag, theTrackQuality_, TrkResTree_, and verbosity_.

Referenced by analyze(), and endRun().

1200  {
1201  t_TrkselTkFlag->clear();
1202  t_TrkqltyFlag->clear();
1203  t_TrkMissFlag->clear();
1204  t_TrkPVFlag->clear();
1205  t_TrkNuIsolFlag->clear();
1206  t_TrkhCone->clear();
1207  t_TrkP->clear();
1208 
1209  if (!trkCollection.isValid()) {
1210  edm::LogVerbatim("IsoTrack") << "trkCollection.isValid is false";
1211  } else {
1212  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1213  const MagneticField *bField = bFieldH_.product();
1214  const CaloGeometry *geo = pG_.product();
1215  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1216  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections1, ((verbosity_ / 100) % 10 > 2));
1217  unsigned int nTracks = 0;
1218  int nRH_eMipDR = 0, nNearTRKs = 0;
1219  std::vector<bool> selFlags;
1220  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++) {
1221  double conehmaxNearP = 0, hCone = 0, eMipDR = 0.0;
1222  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
1223  if (verbosity_ % 10 > 0)
1224  edm::LogVerbatim("IsoTrack") << "track no. " << nTracks << " p(): " << pTrack->p();
1225  if (pTrack->p() > 20) {
1226  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
1227  eMipDR = spr::eCone_ecal(geo,
1230  trkDetItr->pointHCAL,
1231  trkDetItr->pointECAL,
1232  a_mipR_,
1233  trkDetItr->directionECAL,
1234  nRH_eMipDR);
1235  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_, ((verbosity_ / 100) % 10 > 1));
1237  oneCutParameters.maxDxyPV = 10;
1238  oneCutParameters.maxDzPV = 100;
1239  oneCutParameters.maxInMiss = 2;
1240  oneCutParameters.maxOutMiss = 2;
1241  bool qltyFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters, ((verbosity_ / 100) % 10 > 1));
1242  oneCutParameters = selectionParameters_;
1243  oneCutParameters.maxDxyPV = 10;
1244  oneCutParameters.maxDzPV = 100;
1245  bool qltyMissFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters, ((verbosity_ / 100) % 10 > 1));
1246  oneCutParameters = selectionParameters_;
1247  oneCutParameters.maxInMiss = 2;
1248  oneCutParameters.maxOutMiss = 2;
1249  bool qltyPVFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters, ((verbosity_ / 100) % 10 > 1));
1250  if ((verbosity_ / 1000) % 10 > 1)
1251  edm::LogVerbatim("IsoTrack") << "sel " << selectTk << "ntracks " << nTracks << " a_charIsoR " << a_charIsoR_
1252  << " nNearTRKs " << nNearTRKs;
1253  conehmaxNearP = spr::chargeIsolationCone(
1254  nTracks, trkCaloDirections1, a_charIsoR_, nNearTRKs, ((verbosity_ / 100) % 10 > 1));
1255  if ((verbosity_ / 1000) % 10 > 1)
1256  edm::LogVerbatim("IsoTrack") << "coneh " << conehmaxNearP << "ok " << trkDetItr->okECAL << " "
1257  << trkDetItr->okHCAL;
1258  double e1 = spr::eCone_ecal(geo,
1261  trkDetItr->pointHCAL,
1262  trkDetItr->pointECAL,
1263  a_neutR1_,
1264  trkDetItr->directionECAL,
1265  nRH_eMipDR);
1266  double e2 = spr::eCone_ecal(geo,
1269  trkDetItr->pointHCAL,
1270  trkDetItr->pointECAL,
1271  a_neutR2_,
1272  trkDetItr->directionECAL,
1273  nRH_eMipDR);
1274  double e_inCone = e2 - e1;
1275  bool chgIsolFlag = (conehmaxNearP < cutCharge_);
1276  bool mipFlag = (eMipDR < cutMip_);
1277  bool neuIsolFlag = (e_inCone < cutNeutral_);
1278  bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1279  selFlags.clear();
1280  selFlags.push_back(selectTk);
1281  selFlags.push_back(qltyFlag);
1282  selFlags.push_back(qltyMissFlag);
1283  selFlags.push_back(qltyPVFlag);
1284  if (verbosity_ % 10 > 0)
1285  edm::LogVerbatim("IsoTrack") << "emip: " << eMipDR << "<" << cutMip_ << "(" << mipFlag << ")"
1286  << " ; ok: " << trkDetItr->okECAL << "/" << trkDetItr->okHCAL
1287  << " ; chgiso: " << conehmaxNearP << "<" << cutCharge_ << "(" << chgIsolFlag
1288  << ")";
1289 
1290  if (chgIsolFlag && mipFlag && trkpropFlag) {
1291  double distFromHotCell = -99.0;
1292  int nRecHitsCone = -99, ietaHotCell = -99, iphiHotCell = -99;
1293  GlobalPoint gposHotCell(0., 0., 0.);
1294  std::vector<DetId> coneRecHitDetIds;
1295  hCone = spr::eCone_hcal(geo,
1296  hbhe_,
1297  trkDetItr->pointHCAL,
1298  trkDetItr->pointECAL,
1299  a_coneR_,
1300  trkDetItr->directionHCAL,
1301  nRecHitsCone,
1302  coneRecHitDetIds,
1303  distFromHotCell,
1304  ietaHotCell,
1305  iphiHotCell,
1306  gposHotCell,
1307  -1);
1308  // push vectors into the Tree
1309  t_TrkselTkFlag->push_back(selFlags[0]);
1310  t_TrkqltyFlag->push_back(selFlags[1]);
1311  t_TrkMissFlag->push_back(selFlags[2]);
1312  t_TrkPVFlag->push_back(selFlags[3]);
1313  t_TrkNuIsolFlag->push_back(neuIsolFlag);
1314  t_TrkhCone->push_back(hCone);
1315  t_TrkP->push_back(pTrack->p());
1316  }
1317  }
1318  }
1319  if (verbosity_ % 10 > 0)
1320  edm::LogVerbatim("IsoTrack") << "Filling " << t_TrkP->size() << " tracks in TrkRestree out of " << nTracks;
1321  }
1322  TrkResTree_->Fill();
1323 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
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)
const double a_coneR_
Definition: IsoTrig.cc:165
std::string theTrackQuality_
Definition: IsoTrig.cc:161
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:193
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:191
const double a_charIsoR_
Definition: IsoTrig.cc:165
const double a_neutR2_
Definition: IsoTrig.cc:166
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:189
const int verbosity_
Definition: IsoTrig.cc:157
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:192
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:209
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:605
const double a_mipR_
Definition: IsoTrig.cc:166
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:190
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:215
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:214
const double a_neutR1_
Definition: IsoTrig.cc:166
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:210
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:164
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:611
const double cutCharge_
Definition: IsoTrig.cc:167
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:213
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:212
TTree * TrkResTree_
Definition: IsoTrig.cc:203
math::XYZPoint leadPV_
Definition: IsoTrig.cc:196
const double cutMip_
Definition: IsoTrig.cc:166
const double cutNeutral_
Definition: IsoTrig.cc:167
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:211
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608

Member Data Documentation

const double IsoTrig::a_charIsoR_
private
const double IsoTrig::a_coneR_
private

Definition at line 165 of file IsoTrig.cc.

Referenced by IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

const double IsoTrig::a_mipR_
private

Definition at line 166 of file IsoTrig.cc.

Referenced by getGoodTracks(), IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

const double IsoTrig::a_neutIsoR_
private

Definition at line 165 of file IsoTrig.cc.

Referenced by IsoTrig().

const double IsoTrig::a_neutR1_
private

Definition at line 166 of file IsoTrig.cc.

Referenced by IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

const double IsoTrig::a_neutR2_
private

Definition at line 166 of file IsoTrig.cc.

Referenced by IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

edm::Handle<EcalRecHitCollection> IsoTrig::barrelRecHitsHandle_
private

Definition at line 192 of file IsoTrig.cc.

Referenced by analyze(), getGoodTracks(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

edm::Handle<reco::BeamSpot> IsoTrig::beamSpotH_
private

Definition at line 194 of file IsoTrig.cc.

Referenced by analyze().

edm::ESHandle<MagneticField> IsoTrig::bFieldH_
private
double IsoTrig::bfVal_
private

Definition at line 163 of file IsoTrig.cc.

Referenced by analyze(), and GetEtaPhiAtEcal().

bool IsoTrig::changed_
private

Definition at line 200 of file IsoTrig.cc.

Referenced by analyze(), and beginRun().

TTree * IsoTrig::ChgIsolnTree_
private

Definition at line 203 of file IsoTrig.cc.

Referenced by beginJob(), and chgIsolation().

const double IsoTrig::cutCharge_
private

Definition at line 167 of file IsoTrig.cc.

Referenced by fillCuts(), IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

const double IsoTrig::cutMip_
private

Definition at line 166 of file IsoTrig.cc.

Referenced by fillCuts(), IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

const double IsoTrig::cutNeutral_
private

Definition at line 167 of file IsoTrig.cc.

Referenced by fillCuts(), IsoTrig(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

const bool IsoTrig::doChgIsolTree_
private

Definition at line 156 of file IsoTrig.cc.

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

const bool IsoTrig::doL2L3_
private

Definition at line 155 of file IsoTrig.cc.

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

const bool IsoTrig::doMipCutTree_
private

Definition at line 155 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

const bool IsoTrig::doStudyIsol_
private

Definition at line 156 of file IsoTrig.cc.

Referenced by analyze().

const bool IsoTrig::doTiming_
private

Definition at line 155 of file IsoTrig.cc.

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

const bool IsoTrig::doTrkResTree_
private

Definition at line 156 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

const double IsoTrig::dr_L1_
private

Definition at line 165 of file IsoTrig.cc.

Referenced by studyIsolation().

edm::Handle<EcalRecHitCollection> IsoTrig::endcapRecHitsHandle_
private

Definition at line 193 of file IsoTrig.cc.

Referenced by analyze(), getGoodTracks(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

edm::Service<TFileService> IsoTrig::fs_
private

Definition at line 202 of file IsoTrig.cc.

Referenced by beginJob(), and endJob().

TH1I * IsoTrig::g_Accepts
private

Definition at line 263 of file IsoTrig.cc.

Referenced by endJob().

TH1I* IsoTrig::g_Pre
private

Definition at line 263 of file IsoTrig.cc.

Referenced by endJob().

TH1I * IsoTrig::g_PreHLT
private

Definition at line 263 of file IsoTrig.cc.

Referenced by endJob().

TH1I * IsoTrig::g_PreL1
private

Definition at line 263 of file IsoTrig.cc.

Referenced by endJob().

TH1D* IsoTrig::h_dEta[9]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D* IsoTrig::h_dEtaL1[2]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and studyTrigger().

TH1D* IsoTrig::h_dinvPt[9]
private

Definition at line 259 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dP[9]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dPhi[9]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dPhiL1[2]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and studyTrigger().

TH1D * IsoTrig::h_dPt[9]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dRL1[2]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and studyTrigger().

TH1D * IsoTrig::h_eCalo[5][6][48]
private

Definition at line 262 of file IsoTrig.cc.

Referenced by beginJob(), and fillEnergy().

TH1D* IsoTrig::h_eHcal[5][6][48]
private

Definition at line 262 of file IsoTrig.cc.

Referenced by beginJob(), and fillEnergy().

TH1D* IsoTrig::h_eMaxNearP[2]
private

Definition at line 260 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_eMip[2]
private

Definition at line 259 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_eNeutIso[2]
private

Definition at line 260 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D* IsoTrig::h_EnIn
private

Definition at line 251 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH1D * IsoTrig::h_EnOut
private

Definition at line 251 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH1D * IsoTrig::h_eta[20]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

TH1D* IsoTrig::h_etaCalibTracks[5][2][2]
private

Definition at line 261 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_etaMipTracks[5][2][2]
private

Definition at line 261 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1I * IsoTrig::h_Filters
private

Definition at line 254 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_HLT
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_L1ObjEnergy
private

Definition at line 255 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_mindR[9]
private

Definition at line 259 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH2D* IsoTrig::h_MipEnMatch
private

Definition at line 252 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH2D * IsoTrig::h_MipEnNoMatch
private

Definition at line 252 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH1I* IsoTrig::h_nHLT
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_nL3Objs
private

Definition at line 254 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D* IsoTrig::h_p[20]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

TH1D * IsoTrig::h_phi[20]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

TH1I* IsoTrig::h_Pre
private

Definition at line 254 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_PreHLT
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_PreHLTwt
private

Definition at line 255 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_PreL1
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D* IsoTrig::h_PreL1wt
private

Definition at line 255 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_pt[20]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

edm::Handle<HBHERecHitCollection> IsoTrig::hbhe_
private

Definition at line 191 of file IsoTrig.cc.

Referenced by analyze(), studyIsolation(), studyMipCut(), and StudyTrkEbyP().

HLTPrescaleProvider IsoTrig::hltPrescaleProvider_
private

Definition at line 151 of file IsoTrig.cc.

Referenced by analyze(), and beginRun().

const edm::InputTag IsoTrig::l1CandTag_
private

Definition at line 153 of file IsoTrig.cc.

Referenced by IsoTrig().

const edm::InputTag IsoTrig::l2CandTag_
private

Definition at line 153 of file IsoTrig.cc.

Referenced by IsoTrig().

math::XYZPoint IsoTrig::leadPV_
private
const int IsoTrig::maxRunNo_
private

Definition at line 168 of file IsoTrig.cc.

Referenced by endJob().

const double IsoTrig::minPTrackValue_
private

Definition at line 159 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

const int IsoTrig::minRunNo_
private

Definition at line 168 of file IsoTrig.cc.

Referenced by endJob().

TTree* IsoTrig::MipCutTree_
private

Definition at line 203 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

edm::ESHandle<CaloGeometry> IsoTrig::pG_
private
const edm::InputTag IsoTrig::pixCandTag_
private

Definition at line 153 of file IsoTrig.cc.

Referenced by IsoTrig().

const std::vector<double> IsoTrig::pixelIsolationConeSizeAtEC_
private

Definition at line 158 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

std::vector<reco::TrackRef> IsoTrig::pixelTrackRefsHB_
private

Definition at line 188 of file IsoTrig.cc.

Referenced by analyze(), and studyTiming().

std::vector<reco::TrackRef> IsoTrig::pixelTrackRefsHE_
private

Definition at line 188 of file IsoTrig.cc.

Referenced by analyze(), chgIsolation(), and studyTiming().

const std::vector<edm::InputTag> IsoTrig::pixelTracksSources_
private

Definition at line 154 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

double IsoTrig::pLimits_[6]
private

Definition at line 201 of file IsoTrig.cc.

Referenced by beginJob(), fillCuts(), fillEnergy(), and IsoTrig().

const double IsoTrig::prelimCone_
private

Definition at line 160 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

const std::string IsoTrig::processName_
private

Definition at line 162 of file IsoTrig.cc.

Referenced by beginRun(), and IsoTrig().

double IsoTrig::rEB_
private

Definition at line 163 of file IsoTrig.cc.

Referenced by getDistInCM(), GetEtaPhiAtEcal(), and IsoTrig().

edm::Handle<reco::VertexCollection> IsoTrig::recVtxs_
private

Definition at line 195 of file IsoTrig.cc.

Referenced by analyze(), and chgIsolation().

spr::trackSelectionParameters IsoTrig::selectionParameters_
private
std::vector<double>* IsoTrig::t_ECone
private

Definition at line 249 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFcandEmip
private

Definition at line 233 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFcandEta
private

Definition at line 231 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFcandP
private

Definition at line 229 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFcandPhi
private

Definition at line 232 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFcandPt
private

Definition at line 230 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkcandEmip
private

Definition at line 238 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkcandEta
private

Definition at line 236 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkcandP
private

Definition at line 234 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkcandPhi
private

Definition at line 237 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkcandPt
private

Definition at line 235 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkChgIsoFlag
private

Definition at line 246 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkMinDP1
private

Definition at line 240 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_NFTrkMinDR
private

Definition at line 239 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkMipFlag
private

Definition at line 248 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkMissFlag
private

Definition at line 243 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkNeuIsoFlag
private

Definition at line 247 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkPropFlag
private

Definition at line 245 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkPVFlag
private

Definition at line 244 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkqltyFlag
private

Definition at line 242 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_NFTrkselTkFlag
private

Definition at line 241 of file IsoTrig.cc.

Referenced by beginJob(), clearMipCutTreeVectors(), pushMipCutTreeVecs(), and ~IsoTrig().

std::vector<int>* IsoTrig::t_nGoodTk
private

Definition at line 207 of file IsoTrig.cc.

Referenced by beginJob(), getGoodTracks(), and ~IsoTrig().

std::vector<int>* IsoTrig::t_nPixCand
private

Definition at line 205 of file IsoTrig.cc.

Referenced by beginJob(), studyTiming(), and ~IsoTrig().

std::vector<int>* IsoTrig::t_nPixSeed
private

Definition at line 206 of file IsoTrig.cc.

Referenced by beginJob(), studyTiming(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixcandEta
private

Definition at line 219 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<std::vector<double> >* IsoTrig::t_PixcandMaxP
private

Definition at line 221 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixcandP
private

Definition at line 217 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixcandPhi
private

Definition at line 220 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixcandPt
private

Definition at line 218 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixTrkcandEta
private

Definition at line 224 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixTrkcandMaxP
private

Definition at line 226 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixTrkcandP
private

Definition at line 222 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixTrkcandPhi
private

Definition at line 225 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_PixTrkcandPt
private

Definition at line 223 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_PixTrkcandselTk
private

Definition at line 227 of file IsoTrig.cc.

Referenced by beginJob(), clearChgIsolnTreeVectors(), pushChgIsolnTreeVecs(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_timeL2Prod
private

Definition at line 204 of file IsoTrig.cc.

Referenced by beginJob(), studyTiming(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_TrkhCone
private

Definition at line 209 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_TrkMissFlag
private

Definition at line 213 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_TrkNuIsolFlag
private

Definition at line 215 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

std::vector<double>* IsoTrig::t_TrkP
private

Definition at line 210 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_TrkPVFlag
private

Definition at line 214 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_TrkqltyFlag
private

Definition at line 212 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

std::vector<bool>* IsoTrig::t_TrkselTkFlag
private

Definition at line 211 of file IsoTrig.cc.

Referenced by beginJob(), StudyTrkEbyP(), and ~IsoTrig().

const double IsoTrig::tauUnbiasCone_
private

Definition at line 160 of file IsoTrig.cc.

Referenced by chgIsolation(), IsoTrig(), and studyTiming().

std::string IsoTrig::theTrackQuality_
private
TTree * IsoTrig::TimingTree_
private

Definition at line 203 of file IsoTrig.cc.

Referenced by beginJob(), and studyTiming().

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

Definition at line 175 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 176 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 177 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 173 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 178 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

Definition at line 172 of file IsoTrig.cc.

Referenced by IsoTrig().

Definition at line 184 of file IsoTrig.cc.

Referenced by analyze(), getGoodTracks(), IsoTrig(), and studyTiming().

Definition at line 185 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

edm::EDGetTokenT<LumiDetails> IsoTrig::tok_lumi_
private

Definition at line 169 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

Definition at line 183 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

std::vector<edm::EDGetTokenT<reco::TrackCollection> > IsoTrig::tok_pixtks_
private

Definition at line 186 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 174 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

edm::EDGetTokenT<SeedingLayerSetsHits> IsoTrig::tok_SeedingLayerHB_
private

Definition at line 180 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

edm::EDGetTokenT<SeedingLayerSetsHits> IsoTrig::tok_SeedingLayerHE_
private

Definition at line 181 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

edm::EDGetTokenT<SiPixelRecHitCollection> IsoTrig::tok_SiPixelRecHits_
private

Definition at line 182 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 170 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 171 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

edm::EDGetTokenT<reco::VertexCollection> IsoTrig::tok_verthb_
private

Definition at line 179 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

edm::EDGetTokenT<reco::VertexCollection> IsoTrig::tok_verthe_
private

Definition at line 179 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

std::map<unsigned int, unsigned int> IsoTrig::trigList_
private

Definition at line 198 of file IsoTrig.cc.

Referenced by analyze(), and endJob().

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

Definition at line 152 of file IsoTrig.cc.

Referenced by analyze(), and endJob().

std::map<unsigned int, const std::pair<int, int> > IsoTrig::trigPreList_
private

Definition at line 199 of file IsoTrig.cc.

Referenced by analyze(), and endJob().

TTree * IsoTrig::TrkResTree_
private

Definition at line 203 of file IsoTrig.cc.

Referenced by beginJob(), and StudyTrkEbyP().

std::vector<math::XYZTLorentzVector> IsoTrig::vec_[3]
private

Definition at line 264 of file IsoTrig.cc.

Referenced by analyze(), etaPhiTrigger(), studyIsolation(), and studyTrigger().

const int IsoTrig::verbosity_
private
const double IsoTrig::vtxCutIsol_
private

Definition at line 159 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

const double IsoTrig::vtxCutSeed_
private

Definition at line 159 of file IsoTrig.cc.

Referenced by chgIsolation(), IsoTrig(), and studyTiming().

double IsoTrig::zEE_
private

Definition at line 163 of file IsoTrig.cc.

Referenced by getDistInCM(), GetEtaPhiAtEcal(), and IsoTrig().