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::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 IsoTrig (const edm::ParameterSet &)
 
 ~IsoTrig ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
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 &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
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

double a_charIsoR
 
double a_coneR
 
double a_mipR
 
double a_neutIsoR
 
double a_neutR1
 
double a_neutR2
 
edm::Handle< EcalRecHitCollectionbarrelRecHitsHandle
 
edm::Handle< reco::BeamSpotbeamSpotH
 
edm::ESHandle< MagneticFieldbFieldH
 
double bfVal
 
bool changed
 
TTree * ChgIsolnTree
 
double cutCharge
 
double cutMip
 
double cutNeutral
 
bool doChgIsolTree
 
bool doL2L3
 
bool doMipCutTree
 
bool doStudyIsol
 
bool doTiming
 
bool doTrkResTree
 
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_
 
edm::InputTag L1candTag_
 
edm::InputTag L2candTag_
 
math::XYZPoint leadPV
 
int maxRunNo
 
double minPTrackValue_
 
int minRunNo
 
TTree * MipCutTree
 
edm::ESHandle< CaloGeometrypG
 
edm::InputTag PixcandTag_
 
std::vector< double > pixelIsolationConeSizeAtEC_
 
std::vector< reco::TrackRefpixelTrackRefsHB
 
std::vector< reco::TrackRefpixelTrackRefsHE
 
std::vector< edm::InputTagpixelTracksSources_
 
double pLimits [6]
 
double prelimCone_
 
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
 
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
 
std::vector< std::string > trigNames
 
std::map< unsigned int, const std::pair< int, int > > TrigPreList
 
TTree * TrkResTree
 
std::vector< math::XYZTLorentzVectorvec [3]
 
int verbosity
 
double vtxCutIsol_
 
double vtxCutSeed_
 
double zEE_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer 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 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 67 of file IsoTrig.h.

Constructor & Destructor Documentation

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

Definition at line 29 of file IsoTrig.cc.

References a_charIsoR, a_coneR, a_mipR, a_neutIsoR, a_neutR1, a_neutR2, gather_cfg::cout, cutCharge, cutMip, cutNeutral, doChgIsolTree, doL2L3, doMipCutTree, doStudyIsol, doTiming, doTrkResTree, dr_L1, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, gen::k, L1candTag_, L2candTag_, spr::trackSelectionParameters::maxChi2, spr::trackSelectionParameters::maxDpOverP, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, maxRunNo, spr::trackSelectionParameters::minLayerCrossed, spr::trackSelectionParameters::minOuterHit, spr::trackSelectionParameters::minPt, minPTrackValue_, spr::trackSelectionParameters::minQuality, minRunNo, PixcandTag_, pixelIsolationConeSizeAtEC_, pixelTracksSources_, pLimits, prelimCone_, processName, reco::TrackBase::qualityByName(), rEB_, selectionParameters, AlCaHLTBitMon_QueryRunRegistry::string, 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_, trigNames, verbosity, vtxCutIsol_, vtxCutSeed_, and zEE_.

29  :
30  hltPrescaleProvider_(iConfig, consumesCollector(), *this),
31  changed(false), t_timeL2Prod(0), t_nPixCand(0), t_nPixSeed(0), t_nGoodTk(0),
43  //now do whatever initialization is neededOA
44  trigNames = iConfig.getUntrackedParameter<std::vector<std::string> >("Triggers");
45  PixcandTag_ = iConfig.getParameter<edm::InputTag> ("PixcandTag");
46  L1candTag_ = iConfig.getParameter<edm::InputTag> ("L1candTag");
47  L2candTag_ = iConfig.getParameter<edm::InputTag> ("L2candTag");
48  doL2L3 = iConfig.getUntrackedParameter<bool>("DoL2L3",true);
49  doTiming = iConfig.getUntrackedParameter<bool>("DoTimingTree",true);
50  doMipCutTree = iConfig.getUntrackedParameter<bool>("DoMipCutTree",true);
51  doTrkResTree = iConfig.getUntrackedParameter<bool>("DoTrkResTree",true);
52  doChgIsolTree = iConfig.getUntrackedParameter<bool>("DoChgIsolTree",true);
53  doStudyIsol = iConfig.getUntrackedParameter<bool>("DoStudyIsol",true);
54  verbosity = iConfig.getUntrackedParameter<int>("Verbosity",0);
55  theTrackQuality = iConfig.getUntrackedParameter<std::string>("TrackQuality","highPurity");
56  processName = iConfig.getUntrackedParameter<std::string>("ProcessName","HLT");
58  selectionParameters.minPt = iConfig.getUntrackedParameter<double>("MinTrackPt", 10.0);
59  selectionParameters.minQuality = trackQuality_;
60  selectionParameters.maxDxyPV = iConfig.getUntrackedParameter<double>("MaxDxyPV", 0.2);
61  selectionParameters.maxDzPV = iConfig.getUntrackedParameter<double>("MaxDzPV", 5.0);
62  selectionParameters.maxChi2 = iConfig.getUntrackedParameter<double>("MaxChi2", 5.0);
63  selectionParameters.maxDpOverP = iConfig.getUntrackedParameter<double>("MaxDpOverP", 0.1);
64  selectionParameters.minOuterHit = iConfig.getUntrackedParameter<int>("MinOuterHit", 4);
65  selectionParameters.minLayerCrossed = iConfig.getUntrackedParameter<int>("MinLayerCrossed", 8);
66  selectionParameters.maxInMiss = iConfig.getUntrackedParameter<int>("MaxInMiss", 0);
67  selectionParameters.maxOutMiss = iConfig.getUntrackedParameter<int>("MaxOutMiss", 0);
68  dr_L1 = iConfig.getUntrackedParameter<double>("IsolationL1",1.0);
69  a_coneR = iConfig.getUntrackedParameter<double>("ConeRadius",34.98);
70  a_charIsoR = a_coneR + 28.9;
71  a_neutIsoR = a_charIsoR*0.726;
72  a_mipR = iConfig.getUntrackedParameter<double>("ConeRadiusMIP",14.0);
73  a_neutR1 = iConfig.getUntrackedParameter<double>("ConeRadiusNeut1",21.0);
74  a_neutR2 = iConfig.getUntrackedParameter<double>("ConeRadiusNeut2",29.0);
75  cutMip = iConfig.getUntrackedParameter<double>("MIPCut", 1.0);
76  cutCharge = iConfig.getUntrackedParameter<double>("ChargeIsolation", 2.0);
77  cutNeutral = iConfig.getUntrackedParameter<double>("NeutralIsolation", 2.0);
78  minRunNo = iConfig.getUntrackedParameter<int>("minRun");
79  maxRunNo = iConfig.getUntrackedParameter<int>("maxRun");
80  pixelTracksSources_ = iConfig.getUntrackedParameter<std::vector<edm::InputTag> >("PixelTracksSources");
81  pixelIsolationConeSizeAtEC_ = iConfig.getUntrackedParameter<std::vector<double> >("PixelIsolationConeSizeAtEC");
82  minPTrackValue_ = iConfig.getUntrackedParameter<double>("MinPTrackValue");
83  vtxCutSeed_ = iConfig.getUntrackedParameter<double>("VertexCutSeed");
84  vtxCutIsol_ = iConfig.getUntrackedParameter<double>("VertexCutIsol");
85  tauUnbiasCone_ = iConfig.getUntrackedParameter<double>("TauUnbiasCone");
86  prelimCone_ = iConfig.getUntrackedParameter<double>("PrelimCone");
87  // define tokens for access
88  tok_lumi = consumes<LumiDetails, edm::InLumi>(edm::InputTag("lumiProducer"));
89  edm::InputTag triggerEvent_ ("hltTriggerSummaryAOD","",processName);
90  tok_trigEvt = consumes<trigger::TriggerEvent>(triggerEvent_);
91  edm::InputTag theTriggerResultsLabel ("TriggerResults","",processName);
92  tok_trigRes = consumes<edm::TriggerResults>(theTriggerResultsLabel);
93  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
94  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
95  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
96  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEB"));
97  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEE"));
98  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
99  tok_pixtk_ = consumes<reco::IsolatedPixelTrackCandidateCollection>(PixcandTag_);
100  tok_l1cand_ = consumes<trigger::TriggerFilterObjectWithRefs>(L1candTag_);
101  tok_l2cand_ = consumes<reco::IsolatedPixelTrackCandidateCollection>(L2candTag_);
102  if (doTiming) {
103  tok_verthb_ = consumes<reco::VertexCollection>(edm::InputTag("hltHITPixelVerticesHB"));
104  tok_verthe_ = consumes<reco::VertexCollection>(edm::InputTag("hltHITPixelVerticesHB"));
105  tok_hlt_ = consumes<trigger::TriggerFilterObjectWithRefs>(edm::InputTag("hltL1sL1SingleJet68"));
106  tok_SeedingLayerhb = consumes<SeedingLayerSetsHits>(edm::InputTag("hltPixelLayerTripletsHITHB"));
107  tok_SeedingLayerhe = consumes<SeedingLayerSetsHits>(edm::InputTag("hltPixelLayerTripletsHITHE"));
108  tok_SiPixelRecHits = consumes<SiPixelRecHitCollection>(edm::InputTag("hltSiPixelRecHits"));
109  }
110  if(doChgIsolTree) {
111  for (unsigned int k=0; k<pixelTracksSources_.size(); ++k) {
112  // edm::InputTag pix (pixelTracksSources_[k],"",processName);
113  // tok_pixtks_.push_back(consumes<reco::TrackCollection>(pix));
114  tok_pixtks_.push_back(consumes<reco::TrackCollection>(pixelTracksSources_[k]));
115  }
116  }
117 #ifdef DebugLog
118  if (verbosity>=0) {
119  std::cout <<"Parameters read from config file \n"
120  <<"\t minPt " << selectionParameters.minPt
121  <<"\t theTrackQuality " << theTrackQuality
122  <<"\t minQuality " << selectionParameters.minQuality
123  <<"\t maxDxyPV " << selectionParameters.maxDxyPV
124  <<"\t maxDzPV " << selectionParameters.maxDzPV
125  <<"\t maxChi2 " << selectionParameters.maxChi2
126  <<"\t maxDpOverP " << selectionParameters.maxDpOverP
127  <<"\t minOuterHit " << selectionParameters.minOuterHit
128  <<"\t minLayerCrossed " << selectionParameters.minLayerCrossed
129  <<"\t maxInMiss " << selectionParameters.maxInMiss
130  <<"\t maxOutMiss " << selectionParameters.maxOutMiss
131  <<"\t a_coneR " << a_coneR
132  <<"\t a_charIsoR " << a_charIsoR
133  <<"\t a_neutIsoR " << a_neutIsoR
134  <<"\t a_mipR " << a_mipR
135  <<"\t a_neutR " << a_neutR1 << ":" << a_neutR2
136  <<"\t cuts (MIP " << cutMip << " : Charge " << cutCharge
137  <<" : Neutral " << cutNeutral << ")"
138  << std::endl;
139  std::cout <<"Charge Isolation parameters:"
140  <<"\t minPTrackValue " << minPTrackValue_
141  <<"\t vtxCutSeed " << vtxCutSeed_
142  <<"\t vtxCutIsol " << vtxCutIsol_
143  <<"\t tauUnbiasCone " << tauUnbiasCone_
144  <<"\t prelimCone " << prelimCone_
145  <<"\t pixelIsolationConeSizeAtEC";
146  for (unsigned int k=0; k<pixelIsolationConeSizeAtEC_.size(); ++k)
148  std::cout << std::endl;
149  }
150 #endif
151  double pl[] = {20,30,40,60,80,120};
152  for (int i=0; i<6; ++i) pLimits[i] = pl[i];
153  rEB_ = 123.8;
154  zEE_ = 317.0;
155 }
double prelimCone_
Definition: IsoTrig.h:133
T getParameter(std::string const &) const
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.h:213
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.h:194
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.h:191
T getUntrackedParameter(std::string const &, T const &) const
double tauUnbiasCone_
Definition: IsoTrig.h:133
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
Definition: IsoTrig.h:155
double a_coneR
Definition: IsoTrig.h:136
edm::InputTag L1candTag_
Definition: IsoTrig.h:125
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.h:208
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.h:212
double dr_L1
Definition: IsoTrig.h:136
edm::EDGetTokenT< LumiDetails > tok_lumi
Definition: IsoTrig.h:140
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.h:196
bool doStudyIsol
Definition: IsoTrig.h:128
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits
Definition: IsoTrig.h:152
TrackQuality
track quality
Definition: TrackBase.h:151
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.h:205
std::vector< double > * t_NFcandP
Definition: IsoTrig.h:198
bool doTiming
Definition: IsoTrig.h:127
std::string theTrackQuality
Definition: IsoTrig.h:135
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: IsoTrig.h:147
bool changed
Definition: IsoTrig.h:170
std::vector< int > * t_nPixSeed
Definition: IsoTrig.h:175
std::vector< double > * t_TrkhCone
Definition: IsoTrig.h:178
double rEB_
Definition: IsoTrig.h:130
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_pixtk_
Definition: IsoTrig.h:153
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.h:211
bool doTrkResTree
Definition: IsoTrig.h:128
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.h:195
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.h:210
std::vector< double > * t_PixcandP
Definition: IsoTrig.h:186
std::vector< std::string > trigNames
Definition: IsoTrig.h:124
double vtxCutIsol_
Definition: IsoTrig.h:132
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.h:217
double a_neutIsoR
Definition: IsoTrig.h:136
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.h:209
edm::InputTag PixcandTag_
Definition: IsoTrig.h:125
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.h:123
int maxRunNo
Definition: IsoTrig.h:138
int verbosity
Definition: IsoTrig.h:129
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.h:203
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.h:184
double a_mipR
Definition: IsoTrig.h:136
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: IsoTrig.h:146
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.h:183
std::vector< double > * t_ECone
Definition: IsoTrig.h:218
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: IsoTrig.h:144
double cutNeutral
Definition: IsoTrig.h:137
double a_charIsoR
Definition: IsoTrig.h:136
double zEE_
Definition: IsoTrig.h:130
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.h:215
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
Definition: IsoTrig.h:156
std::vector< double > * t_TrkP
Definition: IsoTrig.h:179
double minPTrackValue_
Definition: IsoTrig.h:132
double cutCharge
Definition: IsoTrig.h:137
std::vector< double > * t_NFcandEta
Definition: IsoTrig.h:200
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.h:173
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: IsoTrig.h:148
bool doL2L3
Definition: IsoTrig.h:127
std::vector< double > * t_PixcandPt
Definition: IsoTrig.h:187
double a_neutR2
Definition: IsoTrig.h:137
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.h:202
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.h:214
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.h:206
int k[5][pyjets_maxn]
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
Definition: IsoTrig.h:142
int minRunNo
Definition: IsoTrig.h:138
edm::InputTag L2candTag_
Definition: IsoTrig.h:125
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.h:182
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: IsoTrig.h:145
std::vector< int > * t_nPixCand
Definition: IsoTrig.h:174
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.h:204
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.h:192
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
Definition: IsoTrig.h:150
bool doChgIsolTree
Definition: IsoTrig.h:128
std::vector< double > * t_NFcandPt
Definition: IsoTrig.h:199
spr::trackSelectionParameters selectionParameters
Definition: IsoTrig.h:134
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.h:181
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.h:190
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.h:207
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.h:154
std::vector< edm::InputTag > pixelTracksSources_
Definition: IsoTrig.h:126
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerhb
Definition: IsoTrig.h:151
double a_neutR1
Definition: IsoTrig.h:137
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: IsoTrig.h:149
std::vector< double > * t_PixcandEta
Definition: IsoTrig.h:188
reco::TrackBase::TrackQuality minQuality
double vtxCutSeed_
Definition: IsoTrig.h:132
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerhe
Definition: IsoTrig.h:151
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.h:216
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.h:189
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.h:193
bool doMipCutTree
Definition: IsoTrig.h:127
std::vector< int > * t_nGoodTk
Definition: IsoTrig.h:176
double pLimits[6]
Definition: IsoTrig.h:139
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
Definition: IsoTrig.h:150
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
Definition: IsoTrig.h:143
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.h:180
double cutMip
Definition: IsoTrig.h:137
std::string processName
Definition: IsoTrig.h:135
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
Definition: IsoTrig.h:141
std::vector< double > pixelIsolationConeSizeAtEC_
Definition: IsoTrig.h:131
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.h:201
IsoTrig::~IsoTrig ( )

Definition at line 157 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.

157  {
158  // do anything here that needs to be done at desctruction time
159  // (e.g. close files, deallocate resources etc.)
160  if (t_timeL2Prod) delete t_timeL2Prod;
161  if (t_nPixCand) delete t_nPixCand;
162  if (t_nPixSeed) delete t_nPixSeed;
163  if (t_nGoodTk) delete t_nGoodTk;
164  if (t_TrkhCone) delete t_TrkhCone;
165  if (t_TrkP) delete t_TrkP;
166  if (t_TrkselTkFlag) delete t_TrkselTkFlag;
167  if (t_TrkqltyFlag) delete t_TrkqltyFlag;
168  if (t_TrkMissFlag) delete t_TrkMissFlag;
169  if (t_TrkPVFlag) delete t_TrkPVFlag;
170  if (t_TrkNuIsolFlag) delete t_TrkNuIsolFlag;
171  if (t_PixcandP) delete t_PixcandP;
172  if (t_PixcandPt) delete t_PixcandPt;
173  if (t_PixcandEta) delete t_PixcandEta;
174  if (t_PixcandPhi) delete t_PixcandPhi;
175  if (t_PixcandMaxP) delete t_PixcandMaxP;
176  if (t_PixTrkcandP) delete t_PixTrkcandP;
177  if (t_PixTrkcandPt) delete t_PixTrkcandPt;
178  if (t_PixTrkcandEta) delete t_PixTrkcandEta;
179  if (t_PixTrkcandPhi) delete t_PixTrkcandPhi;
182  if (t_NFcandP) delete t_NFcandP;
183  if (t_NFcandPt) delete t_NFcandPt;
184  if (t_NFcandEta) delete t_NFcandEta;
185  if (t_NFcandPhi) delete t_NFcandPhi;
186  if (t_NFcandEmip) delete t_NFcandEmip;
187  if (t_NFTrkcandP) delete t_NFTrkcandP;
188  if (t_NFTrkcandPt) delete t_NFTrkcandPt;
189  if (t_NFTrkcandEta) delete t_NFTrkcandEta;
190  if (t_NFTrkcandPhi) delete t_NFTrkcandPhi;
191  if (t_NFTrkcandEmip) delete t_NFTrkcandEmip;
192  if (t_NFTrkMinDR) delete t_NFTrkMinDR;
193  if (t_NFTrkMinDP1) delete t_NFTrkMinDP1;
195  if (t_NFTrkqltyFlag) delete t_NFTrkqltyFlag;
196  if (t_NFTrkMissFlag) delete t_NFTrkMissFlag;
197  if (t_NFTrkPVFlag) delete t_NFTrkPVFlag;
198  if (t_NFTrkPropFlag) delete t_NFTrkPropFlag;
201  if (t_NFTrkMipFlag) delete t_NFTrkMipFlag;
202  if (t_ECone) delete t_ECone;
203 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.h:213
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.h:194
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.h:191
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.h:208
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.h:212
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.h:196
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.h:205
std::vector< double > * t_NFcandP
Definition: IsoTrig.h:198
std::vector< int > * t_nPixSeed
Definition: IsoTrig.h:175
std::vector< double > * t_TrkhCone
Definition: IsoTrig.h:178
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.h:211
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.h:195
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.h:210
std::vector< double > * t_PixcandP
Definition: IsoTrig.h:186
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.h:217
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.h:209
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.h:203
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.h:184
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.h:183
std::vector< double > * t_ECone
Definition: IsoTrig.h:218
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.h:215
std::vector< double > * t_TrkP
Definition: IsoTrig.h:179
std::vector< double > * t_NFcandEta
Definition: IsoTrig.h:200
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.h:173
std::vector< double > * t_PixcandPt
Definition: IsoTrig.h:187
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.h:202
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.h:214
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.h:206
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.h:182
std::vector< int > * t_nPixCand
Definition: IsoTrig.h:174
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.h:204
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.h:192
std::vector< double > * t_NFcandPt
Definition: IsoTrig.h:199
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.h:181
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.h:190
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.h:207
std::vector< double > * t_PixcandEta
Definition: IsoTrig.h:188
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.h:216
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.h:189
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.h:193
std::vector< int > * t_nGoodTk
Definition: IsoTrig.h:176
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.h:180
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.h:201

Member Function Documentation

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

Definition at line 213 of file IsoTrig.cc.

References barrelRecHitsHandle, beamSpotH, ecalTB2006H4_GenSimDigiReco_cfg::bField, g4SimHits_cfi::BField, bFieldH, bfVal, edm::EventBase::bunchCrossing(), changed, chgIsolation(), hitfit::clear(), gather_cfg::cout, doChgIsolTree, doL2L3, doMipCutTree, doStudyIsol, doTiming, doTrkResTree, endcapRecHitsHandle, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), fastmath::etaphi(), etaPhiTrigger(), edm::EventID::event(), HcalObjRepresent::Fill(), 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, HLTPrescaleProvider::hltConfigProvider(), hltPrescaleProvider_, mps_fire::i, trigger::TriggerObject::id(), edm::EventBase::id(), recoMuon::in, MagneticField::inTesla(), edm::HandleBase::isValid(), LumiDetails::kOCC1, edm::InputTag::label(), diffTwoXMLs::label, leadPV, edm::EventBase::luminosityBlock(), lumiProducer_cfi::lumiProducer, LumiDetails::lumiValue(), PV3DBase< T, PVType, FrameType >::mag(), trigger::TriggerObject::mass(), HLTConfigProvider::moduleLabels(), ErrorSummaryFilter_cfi::modules, gen::n, pG, trigger::TriggerObject::phi(), pixelTrackRefsHB, pixelTrackRefsHE, pixelTracksSources_, reco::BeamSpot::position(), 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, HLTConfigProvider::triggerIndex(), edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), triggerResults, TrigList, trigNames, TrigPreList, vec, verbosity, x, y, and z.

213  {
214 #ifdef DebugLog
215  if (verbosity%10 > 0) std::cout << "Event starts====================================" << std::endl;
216 #endif
217  int RunNo = iEvent.id().run();
218 
220 
221  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
222  iSetup.get<CaloGeometryRecord>().get(pG);
223  const MagneticField *bField = bFieldH.product();
224  GlobalVector BField=bField->inTesla(GlobalPoint(0,0,0));
225  bfVal = BField.mag();
226 
227  trigger::TriggerEvent triggerEvent;
228  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
229  iEvent.getByToken(tok_trigEvt, triggerEventHandle);
230  if (!triggerEventHandle.isValid()) {
231  edm::LogWarning("IsoTrack") << "Error! Can't get the product hltTriggerSummaryAOD";
232 
233  } else {
234  triggerEvent = *(triggerEventHandle.product());
235  }
236  const trigger::TriggerObjectCollection& TOC(triggerEvent.getObjects());
239  iEvent.getByToken(tok_trigRes, triggerResults);
240 
242  iEvent.getByToken(tok_genTrack_, trkCollection);
243 
246 
247  iEvent.getByToken(tok_hbhe_, hbhe);
248 
249  iEvent.getByToken(tok_recVtx_, recVtxs);
250  iEvent.getByToken(tok_bs_, beamSpotH);
251  if (recVtxs->size()>0 && !((*recVtxs)[0].isFake())) {
252  leadPV = math::XYZPoint( (*recVtxs)[0].x(),(*recVtxs)[0].y(), (*recVtxs)[0].z() );
253  } else if (beamSpotH.isValid()) {
255  }
256 #ifdef DebugLog
257  if ((verbosity/100)%10>0) {
258  std::cout << "Primary Vertex " << leadPV;
259  if (beamSpotH.isValid()) std::cout << " Beam Spot "
260  << beamSpotH->position();
261  std::cout << std::endl;
262  }
263 #endif
264  pixelTrackRefsHE.clear(); pixelTrackRefsHB.clear();
265  for (unsigned int iPix=0; iPix<pixelTracksSources_.size(); iPix++) {
267  iEvent.getByToken(tok_pixtks_[iPix],iPixCol);
268  if(iPixCol.isValid()){
269  for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
270  if(iPix==0)
271  pixelTrackRefsHB.push_back(reco::TrackRef(iPixCol,pit-iPixCol->begin()));
272  pixelTrackRefsHE.push_back(reco::TrackRef(iPixCol,pit-iPixCol->begin()));
273  }
274  }
275  }
276  if (doTiming) getGoodTracks(iEvent, trkCollection);
277 
278  for (unsigned int ifilter=0; ifilter<triggerEvent.sizeFilters();
279  ++ifilter) {
280  std::string FilterNames[7] = {"hltL1sL1SingleJet68", "hltIsolPixelTrackL2FilterHE", "ecalIsolPixelTrackFilterHE", "hltIsolPixelTrackL3FilterHE",
281  "hltIsolPixelTrackL2FilterHB", "ecalIsolPixelTrackFilterHB", "hltIsolPixelTrackL3FilterHB"};
282  std::string label = triggerEvent.filterTag(ifilter).label();
283  for(int i=0; i<7; i++) {
284  if(label==FilterNames[i]) h_Filters->Fill(i);
285  }
286  }
287  edm::InputTag lumiProducer("LumiProducer", "", "RECO");
289  iEvent.getLuminosityBlock().getByToken(tok_lumi, Lumid);
290  float mybxlumi=-1;
291  if (Lumid.isValid())
292  mybxlumi=Lumid->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37;
293 #ifdef DebugLog
294  if (verbosity%10 > 0)
295  std::cout << "RunNo " << RunNo << " EvtNo " << iEvent.id().event()
296  << " Lumi " << iEvent.luminosityBlock() << " Bunch "
297  << iEvent.bunchCrossing() << " mybxlumi " << mybxlumi
298  << std::endl;
299 #endif
300  if (!triggerResults.isValid()) {
301  edm::LogWarning("IsoTrack") << "Error! Can't get the product triggerResults";
302  // boost::shared_ptr<cms::Exception> const & error = triggerResults.whyFailed();
303  // edm::LogWarning(error->category()) << error->what();
304  } else {
305  std::vector<std::string> modules;
306  h_nHLT->Fill(triggerResults->size());
307  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
308 
309  const std::vector<std::string> & triggerNames_ = triggerNames.triggerNames();
310 #ifdef DebugLog
311  if (verbosity%10 > 1)
312  std::cout << "number of HLTs " << triggerNames_.size() << std::endl;
313 #endif
314  int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
315  for (unsigned int i=0; i<triggerResults->size(); i++) {
316  unsigned int triggerindx = hltConfig.triggerIndex(triggerNames_[i]);
317  const std::vector<std::string>& moduleLabels(hltConfig.moduleLabels(triggerindx));
318 
319  for (unsigned int in=0; in<trigNames.size(); ++in) {
320  // if (triggerNames_[i].find(trigNames[in].c_str())!=std::string::npos || triggerNames_[i]==" ") {
321  if (triggerNames_[i].find(trigNames[in].c_str())!=std::string::npos) {
322 #ifdef DebugLog
323  if (verbosity%10 > 0) std::cout << "trigger that i want " << triggerNames_[i] << " accept " << triggerResults->accept(i) << std::endl;
324 #endif
325  hlt = triggerResults->accept(i);
326  h_HLT -> Fill(hlt);
327  // if (hlt>0 || triggerNames_[i]==" ") {
328  if (hlt>0) {
330  iEvent.getByToken(tok_pixtk_,Pixcands);
332  iEvent.getByToken(tok_l1cand_, L1cands);
333 
334  const std::pair<int,int> prescales(hltPrescaleProvider_.prescaleValues(iEvent,iSetup,triggerNames_[i]));
335  preL1 = prescales.first;
336  preHLT = prescales.second;
337  prescale = preL1*preHLT;
338 #ifdef DebugLog
339  if (verbosity%10 > 0)
340  std::cout << triggerNames_[i] << " accept " << hlt << " preL1 "
341  << preL1 << " preHLT " << preHLT << std::endl;
342 #endif
343  for (int iv=0; iv<3; ++iv) vec[iv].clear();
344  if (TrigList.find(RunNo) != TrigList.end() ) {
345  TrigList[RunNo] += 1;
346  } else {
347  TrigList.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
348  TrigPreList.insert(std::pair<unsigned int, std::pair<int, int>>(RunNo,prescales));
349  }
350  //loop over all trigger filters in event (i.e. filters passed)
351  for (unsigned int ifilter=0; ifilter<triggerEvent.sizeFilters();
352  ++ifilter) {
353  std::vector<int> Keys;
354  std::string label = triggerEvent.filterTag(ifilter).label();
355  //loop over keys to objects passing this filter
356  for (unsigned int imodule=0; imodule<moduleLabels.size();
357  imodule++) {
358  if (label.find(moduleLabels[imodule]) != std::string::npos) {
359 #ifdef DebugLog
360  if (verbosity%10 > 0) std::cout << "FILTERNAME " << label << std::endl;
361 #endif
362  for (unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
363  Keys.push_back(triggerEvent.filterKeys(ifilter)[ifiltrKey]);
364  const trigger::TriggerObject& TO(TOC[Keys[ifiltrKey]]);
365  math::XYZTLorentzVector v4(TO.px(), TO.py(), TO.pz(), TO.energy());
366  if (label.find("L2Filter") != std::string::npos) {
367  vec[1].push_back(v4);
368  } else if (label.find("L3Filter") != std::string::npos) {
369  vec[2].push_back(v4);
370  } else {
371  vec[0].push_back(v4);
372  h_L1ObjEnergy->Fill(TO.energy());
373  }
374 #ifdef DebugLog
375  if (verbosity%10 > 0)
376  std::cout << "key " << ifiltrKey << " : pt " << TO.pt() << " eta " << TO.eta() << " phi " << TO.phi() << " mass " << TO.mass() << " Id " << TO.id() << std::endl;
377 #endif
378  }
379  }
380  }
381  }
382  std::vector<reco::TrackCollection::const_iterator> goodTks;
383  if (doL2L3) {
384  h_nL3Objs -> Fill(vec[2].size());
385  studyTrigger(trkCollection, goodTks);
386  } else {
387  if (trkCollection.isValid()) {
388  reco::TrackCollection::const_iterator trkItr;
389  for (trkItr=trkCollection->begin();
390  trkItr!=trkCollection->end(); trkItr++)
391  goodTks.push_back(trkItr);
392  }
393  }
394  // Now study isolation etc
395  if (doStudyIsol) studyIsolation(trkCollection, goodTks);
396  if (doTrkResTree) StudyTrkEbyP(trkCollection);
397 
398  std::pair<double,double> etaphi = etaPhiTrigger();
400  iEvent.getByToken(tok_l2cand_,L2cands);
401  if (!L2cands.isValid()) {
402 #ifdef DebugLog
403  if (verbosity%10 > 0) std::cout << " trigCand is not valid " << std::endl;
404 #endif
405  } else {
406  if(doMipCutTree) studyMipCut(trkCollection, L2cands);
407  }
408  if (pixelTracksSources_.size()>0)
409  if(doChgIsolTree && pixelTrackRefsHE.size()>0) chgIsolation(etaphi.first, etaphi.second, trkCollection, iEvent);
410  }
411  break;
412  }
413  }
414  }
415  h_PreL1 -> Fill(preL1);
416  h_PreHLT -> Fill(preHLT);
417  h_Pre -> Fill(prescale);
418  h_PreL1wt -> Fill(preL1, mybxlumi);
419  h_PreHLTwt -> Fill(preHLT, mybxlumi);
420 
421  // check if trigger names in (new) config
422  // std::cout << "changed " <<changed << std::endl;
423  if (changed) {
424  changed = false;
425 #ifdef DebugLog
426  if ((verbosity/10)%10 > 1) {
427  std::cout << "New trigger menu found !!!" << std::endl;
428  const unsigned int n(hltConfig.size());
429  for (unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
430  unsigned int triggerindx = hltConfig.triggerIndex(triggerNames_[itrig]);
431  std::cout << triggerNames_[itrig] << " " << triggerindx << " ";
432  if (triggerindx >= n)
433  std::cout << "does not exist in the current menu" << std::endl;
434  else
435  std::cout << "exists" << std::endl;
436  }
437  }
438 #endif
439  }
440  }
441  if (doTiming) studyTiming(iEvent);
442 }
RunNumber_t run() const
Definition: EventID.h:39
unsigned int size() const
number of trigger paths in trigger table
size
Write out results.
EventNumber_t event() const
Definition: EventID.h:41
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
Definition: IsoTrig.h:155
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
void chgIsolation(double &etaTriggered, double &phiTriggered, edm::Handle< reco::TrackCollection > &trkCollection, const edm::Event &theEvent)
Definition: IsoTrig.cc:1420
std::vector< reco::TrackRef > pixelTrackRefsHE
Definition: IsoTrig.h:158
edm::EDGetTokenT< LumiDetails > tok_lumi
Definition: IsoTrig.h:140
bool doStudyIsol
Definition: IsoTrig.h:128
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void studyIsolation(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
Definition: IsoTrig.cc:1303
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle
Definition: IsoTrig.h:162
bool doTiming
Definition: IsoTrig.h:127
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: IsoTrig.h:147
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
math::XYZPoint leadPV
Definition: IsoTrig.h:166
std::vector< reco::TrackRef > pixelTrackRefsHB
Definition: IsoTrig.h:158
int bunchCrossing() const
Definition: EventBase.h:66
bool changed
Definition: IsoTrig.h:170
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_pixtk_
Definition: IsoTrig.h:153
bool doTrkResTree
Definition: IsoTrig.h:128
TH1I * h_HLT
Definition: IsoTrig.h:222
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
std::vector< std::string > trigNames
Definition: IsoTrig.h:124
std::pair< double, double > etaPhiTrigger()
Definition: IsoTrig.cc:1714
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
float lumiValue(AlgoType algo, unsigned int bx) const
Definition: LumiDetails.cc:92
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:22
TH1D * h_L1ObjEnergy
Definition: IsoTrig.h:224
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void studyMipCut(edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
Definition: IsoTrig.cc:1056
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.h:123
double bfVal
Definition: IsoTrig.h:130
int verbosity
Definition: IsoTrig.h:129
edm::ESHandle< CaloGeometry > pG
Definition: IsoTrig.h:160
T mag() const
Definition: PV3DBase.h:67
void studyTrigger(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
Definition: IsoTrig.cc:1171
edm::Handle< HBHERecHitCollection > hbhe
Definition: IsoTrig.h:161
TH1I * h_nHLT
Definition: IsoTrig.h:222
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: IsoTrig.h:146
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: IsoTrig.h:144
TH1I * h_Pre
Definition: IsoTrig.h:223
TH1I * h_PreHLT
Definition: IsoTrig.h:222
edm::Handle< reco::VertexCollection > recVtxs
Definition: IsoTrig.h:165
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
Definition: IsoTrig.h:156
std::pair< T, T > etaphi(T x, T y, T z)
Definition: FastMath.h:128
TH1I * h_Filters
Definition: IsoTrig.h:223
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:86
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: IsoTrig.h:148
bool doL2L3
Definition: IsoTrig.h:127
static std::string const triggerResults
Definition: EdmProvDump.cc:41
bool isValid() const
Definition: HandleBase.h:74
TH1D * h_PreL1wt
Definition: IsoTrig.h:224
std::map< unsigned int, const std::pair< int, int > > TrigPreList
Definition: IsoTrig.h:169
void studyTiming(const edm::Event &theEvent)
Definition: IsoTrig.cc:945
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
TH1I * h_PreL1
Definition: IsoTrig.h:222
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
Definition: IsoTrig.h:142
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:103
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: IsoTrig.h:145
void StudyTrkEbyP(edm::Handle< reco::TrackCollection > &trkCollection)
Definition: IsoTrig.cc:831
T const * product() const
Definition: Handle.h:81
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< size_type > Keys
edm::Handle< reco::BeamSpot > beamSpotH
Definition: IsoTrig.h:164
const T & get() const
Definition: EventSetup.h:56
bool doChgIsolTree
Definition: IsoTrig.h:128
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.
std::map< unsigned int, unsigned int > TrigList
Definition: IsoTrig.h:168
HLTConfigProvider const & hltConfigProvider() const
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.h:154
std::vector< edm::InputTag > pixelTracksSources_
Definition: IsoTrig.h:126
edm::EventID id() const
Definition: EventBase.h:60
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: IsoTrig.h:149
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle
Definition: IsoTrig.h:163
const Point & position() const
position
Definition: BeamSpot.h:62
bool doMipCutTree
Definition: IsoTrig.h:127
edm::ESHandle< MagneticField > bFieldH
Definition: IsoTrig.h:159
TH1I * h_nL3Objs
Definition: IsoTrig.h:223
void getGoodTracks(const edm::Event &, edm::Handle< reco::TrackCollection > &)
Definition: IsoTrig.cc:1531
T const * product() const
Definition: ESHandle.h:86
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:239
TH1D * h_PreHLTwt
Definition: IsoTrig.h:224
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
Definition: IsoTrig.h:141
void IsoTrig::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 529 of file IsoTrig.cc.

References ChgIsolnTree, particleFlowClusterECALTimeSelected_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, jetCorrFactors_cfi::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.

529  {
530  char hname[100], htit[100];
531  std::string levels[20] = {"L1", "L2", "L3",
532  "Reco", "RecoMatch", "RecoNoMatch",
533  "L2Match", "L2NoMatch", "L3Match", "L3NoMatch",
534  "HLTTrk", "HLTGoodTrk", "HLTIsoTrk", "HLTMip", "HLTSelect",
535  "nonHLTTrk", "nonHLTGoodTrk", "nonHLTIsoTrk", "nonHLTMip", "nonHLTSelect"};
536  if (doTiming) {
537  TimingTree = fs->make<TTree>("TimingTree", "TimingTree");
538  t_timeL2Prod = new std::vector<double>();
539  t_nPixCand = new std::vector<int>();
540  t_nPixSeed = new std::vector<int>();
541  t_nGoodTk = new std::vector<int>();
542 
543  TimingTree->Branch("t_timeL2Prod", "std::vector<double>", &t_timeL2Prod);
544  TimingTree->Branch("t_nPixCand", "std::vector<int>", &t_nPixCand);
545  TimingTree->Branch("t_nPixSeed", "std::vector<int>", &t_nPixSeed);
546  TimingTree->Branch("t_nGoodTk", "std::vector<int>", &t_nGoodTk);
547  }
548  if (doTrkResTree) {
549  TrkResTree = fs->make<TTree>("TrkRestree", "TrkRestree");
550  t_TrkhCone = new std::vector<double>();
551  t_TrkP = new std::vector<double>();
552  t_TrkselTkFlag = new std::vector<bool>();
553  t_TrkqltyFlag = new std::vector<bool>();
554  t_TrkMissFlag = new std::vector<bool>();
555  t_TrkPVFlag = new std::vector<bool>();
556  t_TrkNuIsolFlag= new std::vector<bool>();
557 
558  TrkResTree->Branch("t_TrkhCone", "std::vector<double>", &t_TrkhCone);
559  TrkResTree->Branch("t_TrkP", "std::vector<double>", &t_TrkP);
560  TrkResTree->Branch("t_TrkselTkFlag", "std::vector<bool>", &t_TrkselTkFlag);
561  TrkResTree->Branch("t_TrkqltyFlag", "std::vector<bool>", &t_TrkqltyFlag);
562  TrkResTree->Branch("t_TrkMissFlag", "std::vector<bool>", &t_TrkMissFlag);
563  TrkResTree->Branch("t_TrkPVFlag", "std::vector<bool>", &t_TrkPVFlag);
564  TrkResTree->Branch("t_TrkNuIsolFlag","std::vector<bool>", &t_TrkNuIsolFlag);
565  }
566  if (doChgIsolTree) {
567  ChgIsolnTree = fs->make<TTree>("ChgIsolnTree", "ChgIsolntree");
568  t_PixcandP = new std::vector<double>();
569  t_PixcandPt = new std::vector<double>();
570  t_PixcandEta = new std::vector<double>();
571  t_PixcandPhi = new std::vector<double>();
572  t_PixcandMaxP = new std::vector<std::vector<double> >();
573  t_PixTrkcandP = new std::vector<double>();
574  t_PixTrkcandPt = new std::vector<double>();
575  t_PixTrkcandEta = new std::vector<double>();
576  t_PixTrkcandPhi = new std::vector<double>();
577  t_PixTrkcandMaxP = new std::vector<double>();
578  t_PixTrkcandselTk = new std::vector<bool>();
579 
580  ChgIsolnTree->Branch("t_PixcandP", "std::vector<double>", &t_PixcandP);
581  ChgIsolnTree->Branch("t_PixcandPt", "std::vector<double>", &t_PixcandPt);
582  ChgIsolnTree->Branch("t_PixcandEta", "std::vector<double>", &t_PixcandEta);
583  ChgIsolnTree->Branch("t_PixcandPhi", "std::vector<double>", &t_PixcandPhi);
584  ChgIsolnTree->Branch("t_PixcandMaxP", "std::vector<std::vector<double> >", &t_PixcandMaxP);
585  ChgIsolnTree->Branch("t_PixTrkcandP", "std::vector<double>", &t_PixTrkcandP);
586  ChgIsolnTree->Branch("t_PixTrkcandPt", "std::vector<double>", &t_PixTrkcandPt );
587  ChgIsolnTree->Branch("t_PixTrkcandEta", "std::vector<double>", &t_PixTrkcandEta );
588  ChgIsolnTree->Branch("t_PixTrkcandPhi", "std::vector<double>", &t_PixTrkcandPhi );
589  ChgIsolnTree->Branch("t_PixTrkcandMaxP", "std::vector<double>", &t_PixTrkcandMaxP);
590  ChgIsolnTree->Branch("t_PixTrkcandselTk","std::vector<bool>", &t_PixTrkcandselTk);
591  }
592  if (doMipCutTree) {
593  MipCutTree = fs->make<TTree>("MipCutTree", "MipCuttree");
594  t_NFcandP = new std::vector<double>();
595  t_NFcandPt = new std::vector<double>();
596  t_NFcandEta = new std::vector<double>();
597  t_NFcandPhi = new std::vector<double>();
598  t_NFcandEmip = new std::vector<double>();
599  t_NFTrkcandP = new std::vector<double>();
600  t_NFTrkcandPt = new std::vector<double>();
601  t_NFTrkcandEta = new std::vector<double>();
602  t_NFTrkcandPhi = new std::vector<double>();
603  t_NFTrkcandEmip = new std::vector<double>();
604  t_NFTrkMinDR = new std::vector<double>();
605  t_NFTrkMinDP1 = new std::vector<double>();
606  t_NFTrkselTkFlag = new std::vector<bool>();
607  t_NFTrkqltyFlag = new std::vector<bool>();
608  t_NFTrkMissFlag = new std::vector<bool>();
609  t_NFTrkPVFlag = new std::vector<bool>();
610  t_NFTrkPropFlag = new std::vector<bool>();
611  t_NFTrkChgIsoFlag= new std::vector<bool>();
612  t_NFTrkNeuIsoFlag= new std::vector<bool>();
613  t_NFTrkMipFlag = new std::vector<bool>();
614  t_ECone = new std::vector<double>();
615 
616  MipCutTree->Branch("t_NFcandP", "std::vector<double>", &t_NFcandP);
617  MipCutTree->Branch("t_NFcandPt", "std::vector<double>", &t_NFcandPt);
618  MipCutTree->Branch("t_NFcandEta", "std::vector<double>", &t_NFcandEta);
619  MipCutTree->Branch("t_NFcandPhi", "std::vector<double>", &t_NFcandPhi);
620  MipCutTree->Branch("t_NFcandEmip", "std::vector<double>", &t_NFcandEmip);
621  MipCutTree->Branch("t_NFTrkcandP", "std::vector<double>", &t_NFTrkcandP);
622  MipCutTree->Branch("t_NFTrkcandPt", "std::vector<double>", &t_NFTrkcandPt );
623  MipCutTree->Branch("t_NFTrkcandEta", "std::vector<double>", &t_NFTrkcandEta );
624  MipCutTree->Branch("t_NFTrkcandPhi", "std::vector<double>", &t_NFTrkcandPhi );
625  MipCutTree->Branch("t_NFTrkcandEmip", "std::vector<double>", &t_NFTrkcandEmip);
626  MipCutTree->Branch("t_NFTrkMinDR", "std::vector<double>", &t_NFTrkMinDR);
627  MipCutTree->Branch("t_NFTrkMinDP1", "std::vector<double>", &t_NFTrkMinDP1);
628  MipCutTree->Branch("t_NFTrkselTkFlag", "std::vector<bool>", &t_NFTrkselTkFlag);
629  MipCutTree->Branch("t_NFTrkqltyFlag", "std::vector<bool>", &t_NFTrkqltyFlag);
630  MipCutTree->Branch("t_NFTrkMissFlag", "std::vector<bool>", &t_NFTrkMissFlag);
631  MipCutTree->Branch("t_NFTrkPVFlag", "std::vector<bool>", &t_NFTrkPVFlag);
632  MipCutTree->Branch("t_NFTrkPropFlag", "std::vector<bool>", &t_NFTrkPropFlag);
633  MipCutTree->Branch("t_NFTrkChgIsoFlag","std::vector<bool>", &t_NFTrkChgIsoFlag);
634  MipCutTree->Branch("t_NFTrkNeuIsoFlag","std::vector<bool>", &t_NFTrkNeuIsoFlag);
635  MipCutTree->Branch("t_NFTrkMipFlag", "std::vector<bool>", &t_NFTrkMipFlag);
636  MipCutTree->Branch("t_ECone", "std::vector<double>", &t_ECone);
637  }
638  h_Filters = fs->make<TH1I>("h_Filters", "Filter Accepts", 10, 0, 10);
639  std::string FilterNames[7] = {"hltL1sL1SingleJet68", "hltIsolPixelTrackL2FilterHE", "ecalIsolPixelTrackFilterHE", "hltIsolPixelTrackL3FilterHE",
640  "hltIsolPixelTrackL2FilterHB", "ecalIsolPixelTrackFilterHB", "hltIsolPixelTrackL3FilterHB"};
641  for(int i=0; i<7; i++) {
642  h_Filters->GetXaxis()->SetBinLabel(i+1, FilterNames[i].c_str());
643  }
644 
645  h_nHLT = fs->make<TH1I>("h_nHLT" , "Size of trigger Names", 1000, 1, 1000);
646  h_HLT = fs->make<TH1I>("h_HLT" , "HLT accept", 3, -1, 2);
647  h_PreL1 = fs->make<TH1I>("h_PreL1", "L1 Prescale", 500, 0, 500);
648  h_PreHLT = fs->make<TH1I>("h_PreHLT", "HLT Prescale", 50, 0, 50);
649  h_Pre = fs->make<TH1I>("h_Pre", "Prescale", 3000, 0, 3000);
650 
651  h_PreL1wt = fs->make<TH1D>("h_PreL1wt", "Weighted L1 Prescale", 500, 0, 500);
652  h_PreHLTwt = fs->make<TH1D>("h_PreHLTwt", "Weighted HLT Prescale", 500, 0, 100);
653  h_L1ObjEnergy = fs->make<TH1D>("h_L1ObjEnergy", "Energy of L1Object", 500, 0.0, 500.0);
654 
655  h_EnIn = fs->make<TH1D>("h_EnInEcal", "EnergyIn Ecal", 200, 0.0, 20.0);
656  h_EnOut = fs->make<TH1D>("h_EnOutEcal", "EnergyOut Ecal", 200, 0.0, 20.0);
657  h_MipEnMatch = fs->make<TH2D>("h_MipEnMatch", "MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
658  h_MipEnNoMatch = fs->make<TH2D>("h_MipEnNoMatch", "MipEn: HLT level vs Reco Level (No Match Found)", 200, 0.0, 20.0, 200, 0.0, 20.0);
659 
660  if (doL2L3) {
661  h_nL3Objs = fs->make<TH1I>("h_nL3Objs", "Number of L3 objects", 10, 0, 10);
662 
663  std::string pairs[9] = {"L2L3", "L2L3Match", "L2L3NoMatch", "L3Reco", "L3RecoMatch", "L3RecoNoMatch", "NewFilterReco", "NewFilterRecoMatch", "NewFilterRecoNoMatch"};
664  for (int ipair=0; ipair<9; ipair++) {
665  sprintf(hname, "h_dEta%s", pairs[ipair].c_str());
666  sprintf(htit, "#Delta#eta for %s", pairs[ipair].c_str());
667  h_dEta[ipair] = fs->make<TH1D>(hname, htit, 200, -10.0, 10.0);
668  h_dEta[ipair]->GetXaxis()->SetTitle("d#eta");
669 
670  sprintf(hname, "h_dPhi%s", pairs[ipair].c_str());
671  sprintf(htit, "#Delta#phi for %s", pairs[ipair].c_str());
672  h_dPhi[ipair] = fs->make<TH1D>(hname, htit, 140, -7.0, 7.0);
673  h_dPhi[ipair]->GetXaxis()->SetTitle("d#phi");
674 
675  sprintf(hname, "h_dPt%s", pairs[ipair].c_str());
676  sprintf(htit, "#Delta dp_{T} for %s objects", pairs[ipair].c_str());
677  h_dPt[ipair] = fs->make<TH1D>(hname, htit, 400, -200.0, 200.0);
678  h_dPt[ipair]->GetXaxis()->SetTitle("dp_{T} (GeV)");
679 
680  sprintf(hname, "h_dP%s", pairs[ipair].c_str());
681  sprintf(htit, "#Delta p for %s objects", pairs[ipair].c_str());
682  h_dP[ipair] = fs->make<TH1D>(hname, htit, 400, -200.0, 200.0);
683  h_dP[ipair]->GetXaxis()->SetTitle("dP (GeV)");
684 
685  sprintf(hname, "h_dinvPt%s", pairs[ipair].c_str());
686  sprintf(htit, "#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
687  h_dinvPt[ipair] = fs->make<TH1D>(hname, htit, 500, -0.4, 0.1);
688  h_dinvPt[ipair]->GetXaxis()->SetTitle("d(1/p_{T})");
689  sprintf(hname, "h_mindR%s", pairs[ipair].c_str());
690  sprintf(htit, "min(#Delta R) for %s objects", pairs[ipair].c_str());
691  h_mindR[ipair] = fs->make<TH1D>(hname, htit, 500, 0.0, 1.0);
692  h_mindR[ipair]->GetXaxis()->SetTitle("dR");
693  }
694 
695  for (int lvl=0; lvl<2; lvl++) {
696  sprintf(hname, "h_dEtaL1%s", levels[lvl+1].c_str());
697  sprintf(htit, "#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
698  h_dEtaL1[lvl] = fs->make<TH1D>(hname, htit, 400, -10.0, 10.0);
699 
700  sprintf(hname, "h_dPhiL1%s", levels[lvl+1].c_str());
701  sprintf(htit, "#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
702  h_dPhiL1[lvl] = fs->make<TH1D>(hname, htit, 280, -7.0, 7.0);
703 
704  sprintf(hname, "h_dRL1%s", levels[lvl+1].c_str());
705  sprintf(htit, "#Delta R for L1 and %s objects", levels[lvl+1].c_str());
706  h_dRL1[lvl] = fs->make<TH1D>(hname, htit, 100, 0.0, 10.0);
707  }
708  }
709 
710  int levmin = (doL2L3 ? 0 : 10);
711  for (int ilevel=levmin; ilevel<20; ilevel++) {
712  sprintf(hname, "h_p%s", levels[ilevel].c_str());
713  sprintf(htit, "p for %s objects", levels[ilevel].c_str());
714  h_p[ilevel] = fs->make<TH1D>(hname, htit, 100, 0.0, 500.0);
715  h_p[ilevel]->GetXaxis()->SetTitle("p (GeV)");
716 
717  sprintf(hname, "h_pt%s", levels[ilevel].c_str());
718  sprintf(htit, "p_{T} for %s objects", levels[ilevel].c_str());
719  h_pt[ilevel] = fs->make<TH1D>(hname, htit, 100, 0.0, 500.0);
720  h_pt[ilevel]->GetXaxis()->SetTitle("p_{T} (GeV)");
721 
722  sprintf(hname, "h_eta%s", levels[ilevel].c_str());
723  sprintf(htit, "#eta for %s objects", levels[ilevel].c_str());
724  h_eta[ilevel] = fs->make<TH1D>(hname, htit, 100, -5.0, 5.0);
725  h_eta[ilevel]->GetXaxis()->SetTitle("#eta");
726 
727  sprintf(hname, "h_phi%s", levels[ilevel].c_str());
728  sprintf(htit, "#phi for %s objects", levels[ilevel].c_str());
729  h_phi[ilevel] = fs->make<TH1D>(hname, htit, 70, -3.5, 3.50);
730  h_phi[ilevel]->GetXaxis()->SetTitle("#phi");
731  }
732 
733  std::string cuts[2] = {"HLTMatched", "HLTNotMatched"};
734  std::string cuts2[2] = {"All", "Away from L1"};
735  for (int icut=0; icut<2; icut++) {
736  sprintf(hname, "h_eMip%s", cuts[icut].c_str());
737  sprintf(htit, "eMip for %s tracks", cuts[icut].c_str());
738  h_eMip[icut] =fs->make<TH1D>(hname, htit, 200, 0.0, 10.0);
739  h_eMip[icut]->GetXaxis()->SetTitle("E_{Mip} (GeV)");
740 
741  sprintf(hname, "h_eMaxNearP%s", cuts[icut].c_str());
742  sprintf(htit, "eMaxNearP for %s tracks", cuts[icut].c_str());
743  h_eMaxNearP[icut]=fs->make<TH1D>(hname, htit, 240, -2.0, 10.0);
744  h_eMaxNearP[icut]->GetXaxis()->SetTitle("E_{MaxNearP} (GeV)");
745 
746  sprintf(hname, "h_eNeutIso%s", cuts[icut].c_str());
747  sprintf(htit, "eNeutIso for %s ", cuts[icut].c_str());
748  h_eNeutIso[icut] =fs->make<TH1D>(hname, htit, 200, 0.0, 10.0);
749  h_eNeutIso[icut]->GetXaxis()->SetTitle("E_{NeutIso} (GeV)");
750 
751  for (int kcut=0; kcut<2; ++kcut) {
752  for (int lim=0; lim<5; ++lim) {
753  sprintf(hname, "h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
754  sprintf(htit, "#eta for %s isolated MIP tracks (%4.1f < p < %5.1f Gev/c %s)", cuts[icut].c_str(), pLimits[lim], pLimits[lim+1], cuts2[kcut].c_str());
755  h_etaCalibTracks[lim][icut][kcut]=fs->make<TH1D>(hname, htit, 60, -30.0, 30.0);
756  h_etaCalibTracks[lim][icut][kcut]->GetXaxis()->SetTitle("i#eta");
757 
758  sprintf(hname, "h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
759  sprintf(htit, "#eta for %s charge isolated MIP tracks (%4.1f < p < %5.1f Gev/c %s)", cuts[icut].c_str(), pLimits[lim], pLimits[lim+1], cuts2[kcut].c_str());
760  h_etaMipTracks[lim][icut][kcut]=fs->make<TH1D>(hname, htit, 60, -30.0, 30.0);
761  h_etaMipTracks[lim][icut][kcut]->GetXaxis()->SetTitle("i#eta");
762  }
763  }
764  }
765 
766  std::string ecut1[3] = {"all","HLTMatched","HLTNotMatched"};
767  std::string ecut2[2] = {"without","with"};
768  int etac[48] = {-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,
769  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
770  for (int icut=0; icut<6; icut++) {
771  // int i1 = (icut>3 ? 1 : 0);
772  int i1 = (icut>2 ? 1 : 0);
773  int i2 = icut - i1*3;
774  for (int kcut=0; kcut<48; kcut++) {
775  for (int lim=0; lim<5; ++lim) {
776  sprintf(hname, "h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
777  sprintf(htit, "HCAL energy for #eta=%d for %s tracks (p=%4.1f:%5.1f Gev) %s neutral isolation", etac[kcut], ecut1[i2].c_str(), pLimits[lim], pLimits[lim+1], ecut2[i1].c_str());
778  h_eHcal[lim][icut][kcut]=fs->make<TH1D>(hname, htit, 750, 0.0, 150.0);
779  h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle("Energy (GeV)");
780  sprintf(hname, "h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
781  sprintf(htit, "Calorimter energy for #eta=%d for %s tracks (p=%4.1f:%5.1f Gev) %s neutral isolation", etac[kcut], ecut1[i2].c_str(), pLimits[lim], pLimits[lim+1], ecut2[i1].c_str());
782  h_eCalo[lim][icut][kcut]=fs->make<TH1D>(hname, htit, 750, 0.0, 150.0);
783  h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle("Energy (GeV)");
784  }
785  }
786  }
787 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.h:213
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.h:194
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.h:191
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.h:208
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.h:212
TH1D * h_phi[20]
Definition: IsoTrig.h:225
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.h:196
TH1D * h_EnIn
Definition: IsoTrig.h:220
TH1D * h_dEta[9]
Definition: IsoTrig.h:227
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.h:205
std::vector< double > * t_NFcandP
Definition: IsoTrig.h:198
TH1D * h_dEtaL1[2]
Definition: IsoTrig.h:226
bool doTiming
Definition: IsoTrig.h:127
std::vector< int > * t_nPixSeed
Definition: IsoTrig.h:175
std::vector< double > * t_TrkhCone
Definition: IsoTrig.h:178
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.h:211
bool doTrkResTree
Definition: IsoTrig.h:128
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.h:195
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.h:210
TH1I * h_HLT
Definition: IsoTrig.h:222
std::vector< double > * t_PixcandP
Definition: IsoTrig.h:186
TH1D * h_dP[9]
Definition: IsoTrig.h:227
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.h:217
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.h:209
TH1D * h_EnOut
Definition: IsoTrig.h:220
TH1D * h_dPhiL1[2]
Definition: IsoTrig.h:226
TH1D * h_L1ObjEnergy
Definition: IsoTrig.h:224
TH1D * h_dPhi[9]
Definition: IsoTrig.h:227
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.h:203
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.h:184
TH1I * h_nHLT
Definition: IsoTrig.h:222
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.h:183
std::vector< double > * t_ECone
Definition: IsoTrig.h:218
TTree * ChgIsolnTree
Definition: IsoTrig.h:172
TH1I * h_Pre
Definition: IsoTrig.h:223
TH1I * h_PreHLT
Definition: IsoTrig.h:222
TH1D * h_dinvPt[9]
Definition: IsoTrig.h:228
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.h:215
std::vector< double > * t_TrkP
Definition: IsoTrig.h:179
TH1D * h_eta[20]
Definition: IsoTrig.h:225
TH1I * h_Filters
Definition: IsoTrig.h:223
std::vector< double > * t_NFcandEta
Definition: IsoTrig.h:200
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.h:173
TH1D * h_eHcal[5][6][48]
Definition: IsoTrig.h:231
TTree * MipCutTree
Definition: IsoTrig.h:172
bool doL2L3
Definition: IsoTrig.h:127
std::vector< double > * t_PixcandPt
Definition: IsoTrig.h:187
TH1D * h_PreL1wt
Definition: IsoTrig.h:224
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.h:202
TH1D * h_eMaxNearP[2]
Definition: IsoTrig.h:229
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.h:214
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.h:206
TH2D * h_MipEnMatch
Definition: IsoTrig.h:221
TH1D * h_p[20]
Definition: IsoTrig.h:225
TH1D * h_eNeutIso[2]
Definition: IsoTrig.h:229
TH1I * h_PreL1
Definition: IsoTrig.h:222
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.h:182
std::vector< int > * t_nPixCand
Definition: IsoTrig.h:174
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.h:204
TH1D * h_eCalo[5][6][48]
Definition: IsoTrig.h:231
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.h:192
bool doChgIsolTree
Definition: IsoTrig.h:128
std::vector< double > * t_NFcandPt
Definition: IsoTrig.h:199
TH1D * h_pt[20]
Definition: IsoTrig.h:225
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.h:181
TH1D * h_etaMipTracks[5][2][2]
Definition: IsoTrig.h:230
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.h:190
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.h:207
TH1D * h_mindR[9]
Definition: IsoTrig.h:228
std::vector< double > * t_PixcandEta
Definition: IsoTrig.h:188
TH1D * h_dPt[9]
Definition: IsoTrig.h:227
TH2D * h_MipEnNoMatch
Definition: IsoTrig.h:221
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.h:216
TTree * TrkResTree
Definition: IsoTrig.h:172
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.h:189
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.h:193
bool doMipCutTree
Definition: IsoTrig.h:127
edm::Service< TFileService > fs
Definition: IsoTrig.h:171
std::vector< int > * t_nGoodTk
Definition: IsoTrig.h:176
TTree * TimingTree
Definition: IsoTrig.h:172
double pLimits[6]
Definition: IsoTrig.h:139
TH1I * h_nL3Objs
Definition: IsoTrig.h:223
TH1D * h_dRL1[2]
Definition: IsoTrig.h:226
TH1D * h_etaCalibTracks[5][2][2]
Definition: IsoTrig.h:230
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.h:180
TH1D * h_PreHLTwt
Definition: IsoTrig.h:224
levels
correction levels
TH1D * h_eMip[2]
Definition: IsoTrig.h:228
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.h:201
void IsoTrig::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 826 of file IsoTrig.cc.

826 {}
void IsoTrig::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 817 of file IsoTrig.cc.

References changed, hltPrescaleProvider_, HLTPrescaleProvider::init(), processName, and edm::RunBase::run().

817  {
818  edm::LogWarning ("IsoTrack") << "Run " << iRun.run() << " hltconfig.init "
820 }
bool changed
Definition: IsoTrig.h:170
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.h:123
std::string processName
Definition: IsoTrig.h:135
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 1420 of file IsoTrig.cc.

References a_charIsoR, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH, ALCARECOTkAlJpsiMuMu_cff::charge, spr::chargeIsolationCone(), ChgIsolnTree, clearChgIsolnTreeVectors(), gather_cfg::cout, deltaR(), dR(), runTauDisplay::dr, particleFlowDisplacedVertexCandidate_cfi::dxy, allConversions_cfi::dz, stringResolutionProvider_cfi::eta, getDistInCM(), GetEtaPhiAtEcal(), spr::goodTrack(), mps_fire::i, gen::k, checklumidiff::l, leadPV, NewRecoMuonValidator_cfi::maxP, minPTrackValue_, nTracks(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), pG, phi, pixelIsolationConeSizeAtEC_, pixelTrackRefsHE, position, prelimCone_, edm::ESHandle< T >::product(), spr::propagateCALO(), EnergyCorrector::pt, pushChgIsolnTreeVecs(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), dttmaxenums::R, recVtxs, edm::second(), selectionParameters, tauUnbiasCone_, theTrackQuality, verbosity, vtxCutIsol_, vtxCutSeed_, and z.

Referenced by analyze().

1422  {
1424 #ifdef DebugLog
1425  if (verbosity%10>0) std::cout << "Inside chgIsolation() with eta/phi Triggered: " << etaTriggered << "/" << phiTriggered << std::endl;
1426 #endif
1427  std::vector<double> maxP;
1428 
1429  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1430  const MagneticField *bField = bFieldH.product();
1431  const CaloGeometry* geo = pG.product();
1432  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1433  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDirections1, ((verbosity/100)%10>2));
1434 #ifdef DebugLog
1435  if (verbosity%10>0) std::cout << "Propagated TrkCollection" << std::endl;
1436 #endif
1437  for (unsigned int k=0; k<pixelIsolationConeSizeAtEC_.size(); ++k)
1438  maxP.push_back(0);
1439  unsigned i = pixelTrackRefsHE.size();
1440  std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1441  //loop to select isolated tracks
1442  for (unsigned iS=0; iS<pixelTrackRefsHE.size(); iS++) {
1443  if (pixelTrackRefsHE[iS]->p() > minPTrackValue_) {
1444  bool vtxMatch = false;
1445  //associate to vertex (in Z)
1446  unsigned int ivSel = recVtxs->size();
1447  double minDZ = 100;
1448  for (unsigned int iv = 0; iv < recVtxs->size(); ++iv) {
1449  if (fabs(pixelTrackRefsHE[iS]->dz((*recVtxs)[iv].position()))<minDZ) {
1450  minDZ = fabs(pixelTrackRefsHE[iS]->dz((*recVtxs)[iv].position()));
1451  ivSel = iv;
1452  }
1453  }
1454  //cut on dYX:
1455  if (ivSel == recVtxs->size()) {
1456  vtxMatch = true;
1457  } else if (fabs(pixelTrackRefsHE[iS]->dxy((*recVtxs)[ivSel].position()))<vtxCutSeed_){
1458  vtxMatch = true;
1459  }
1460  //select tracks not matched to triggered L1 jet
1461  double R = deltaR(etaTriggered, phiTriggered, pixelTrackRefsHE[iS]->eta(),
1462  pixelTrackRefsHE[iS]->phi());
1463  if (R > tauUnbiasCone_ && vtxMatch) {
1464  //propagate seed track to ECAL surface:
1465  std::pair<double,double> seedCooAtEC;
1466  // in case vertex is found:
1467  if (minDZ!=100) seedCooAtEC=GetEtaPhiAtEcal(pixelTrackRefsHE[iS]->eta(), pixelTrackRefsHE[iS]->phi(), pixelTrackRefsHE[iS]->pt(), pixelTrackRefsHE[iS]->charge(), (*recVtxs)[ivSel].z());
1468  //in case vertex is not found:
1469  else seedCooAtEC=GetEtaPhiAtEcal(pixelTrackRefsHE[iS]->eta(), pixelTrackRefsHE[iS]->phi(), pixelTrackRefsHE[iS]->pt(), pixelTrackRefsHE[iS]->charge(), 0);
1470  VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1471  }
1472  }
1473  }
1474  for (unsigned int l=0; l<VecSeedsatEC.size(); l++) {
1475  unsigned int iSeed = VecSeedsatEC[l].first;
1476  math::XYZTLorentzVector v1(pixelTrackRefsHE[iSeed]->px(),pixelTrackRefsHE[iSeed]->py(),
1477  pixelTrackRefsHE[iSeed]->pz(),pixelTrackRefsHE[iSeed]->p());
1478 
1479  for (unsigned int j=0; j<VecSeedsatEC.size(); j++) {
1480  unsigned int iSurr = VecSeedsatEC[j].first;
1481  if (iSeed != iSurr) {
1482  //define preliminary cone around seed track impact point from which tracks will be extrapolated:
1483  // edm::Ref<reco::IsolatedPixelTrackCandidateCollection> cand2ref =
1484  // edm::Ref<reco::IsolatedPixelTrackCandidateCollection>(L2cands, iSurr);
1485  if (deltaR(pixelTrackRefsHE[iSeed]->eta(), pixelTrackRefsHE[iSeed]->phi(), pixelTrackRefsHE[iSurr]->eta(),
1486  pixelTrackRefsHE[iSurr]->phi()) < prelimCone_) {
1487  unsigned int ivSel = recVtxs->size();
1488  double minDZ2=100;
1489  for (unsigned int iv = 0; iv < recVtxs->size(); ++iv) {
1490  if (fabs(pixelTrackRefsHE[iSurr]->dz((*recVtxs)[iv].position()))<minDZ2) {
1491  minDZ2 = fabs(pixelTrackRefsHE[iSurr]->dz((*recVtxs)[iv].position()));
1492  ivSel = iv;
1493  }
1494  }
1495  //cut ot dXY:
1496  if (minDZ2==100 || fabs(pixelTrackRefsHE[iSurr]->dxy((*recVtxs)[ivSel].position()))<vtxCutIsol_) {
1497  //calculate distance at ECAL surface and update isolation:
1498  double dist = getDistInCM(VecSeedsatEC[i].second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[j].second.first, VecSeedsatEC[j].second.second);
1499  for (unsigned int k=0; k<pixelIsolationConeSizeAtEC_.size(); ++k) {
1500  if (dist<pixelIsolationConeSizeAtEC_[k]) {
1501  if (pixelTrackRefsHE[iSurr]->p() > maxP[k])
1502  maxP[k] = pixelTrackRefsHE[iSurr]->p();
1503  }
1504  }
1505  }
1506  }
1507  }
1508  }
1509 
1510  double conehmaxNearP = -1; bool selectTk=false;
1511  double mindR=999.9; int nTracks=0;
1512  math::XYZTLorentzVector mindRvec;
1513  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1514  int nNearTRKs=0;
1515  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1516  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(),
1517  pTrack->pz(), pTrack->p());
1518  double dr = dR(v1,v2);
1519  if (dr<mindR) {
1520  selectTk = spr::goodTrack(pTrack,leadPV,selectionParameters,((verbosity/100)%10>1));
1521  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections1, a_charIsoR, nNearTRKs, ((verbosity/100)%10>1));
1522  mindR = dr;
1523  mindRvec = v2;
1524  }
1525  }
1526  pushChgIsolnTreeVecs(v1, mindRvec, maxP, conehmaxNearP, selectTk);
1527  }
1528  ChgIsolnTree->Fill();
1529 }
double prelimCone_
Definition: IsoTrig.h:133
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
double tauUnbiasCone_
Definition: IsoTrig.h:133
const unsigned int nTracks(const reco::Vertex &sv)
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
std::vector< reco::TrackRef > pixelTrackRefsHE
Definition: IsoTrig.h:158
std::string theTrackQuality
Definition: IsoTrig.h:135
math::XYZPoint leadPV
Definition: IsoTrig.h:166
std::pair< double, double > GetEtaPhiAtEcal(double etaIP, double phiIP, double pT, int charge, double vtxZ)
Definition: IsoTrig.cc:1730
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:622
double vtxCutIsol_
Definition: IsoTrig.h:132
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int verbosity
Definition: IsoTrig.h:129
edm::ESHandle< CaloGeometry > pG
Definition: IsoTrig.h:160
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
TTree * ChgIsolnTree
Definition: IsoTrig.h:172
double a_charIsoR
Definition: IsoTrig.h:136
edm::Handle< reco::VertexCollection > recVtxs
Definition: IsoTrig.h:165
double minPTrackValue_
Definition: IsoTrig.h:132
void clearChgIsolnTreeVectors()
Definition: IsoTrig.cc:444
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
int k[5][pyjets_maxn]
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double getDistInCM(double eta1, double phi1, double eta2, double phi2)
Definition: IsoTrig.cc:1789
spr::trackSelectionParameters selectionParameters
Definition: IsoTrig.h:134
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1696
static int position[264][3]
Definition: ReadPGInfo.cc:509
double vtxCutSeed_
Definition: IsoTrig.h:132
edm::ESHandle< MagneticField > bFieldH
Definition: IsoTrig.h:159
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
std::vector< double > pixelIsolationConeSizeAtEC_
Definition: IsoTrig.h:131
void pushChgIsolnTreeVecs(math::XYZTLorentzVector &Pixcand, math::XYZTLorentzVector &Trkcand, std::vector< double > &PixMaxP, double &TrkMaxP, bool &selTk)
Definition: IsoTrig.cc:484
void IsoTrig::clearChgIsolnTreeVectors ( )
private

Definition at line 444 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().

444  {
445  t_PixcandP ->clear();
446  t_PixcandPt ->clear();
447  t_PixcandEta ->clear();
448  t_PixcandPhi ->clear();
449  for(unsigned int i=0; i< t_PixcandMaxP->size(); i++)
450  t_PixcandMaxP[i].clear();
451  t_PixcandMaxP ->clear();
452  t_PixTrkcandP ->clear();
453  t_PixTrkcandPt ->clear();
454  t_PixTrkcandEta ->clear();
455  t_PixTrkcandPhi ->clear();
456  t_PixTrkcandMaxP ->clear();
457  t_PixTrkcandselTk ->clear();
458 }
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.h:194
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.h:191
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.h:196
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.h:195
std::vector< double > * t_PixcandP
Definition: IsoTrig.h:186
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
std::vector< double > * t_PixcandPt
Definition: IsoTrig.h:187
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.h:192
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.h:190
std::vector< double > * t_PixcandEta
Definition: IsoTrig.h:188
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.h:189
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.h:193
void IsoTrig::clearMipCutTreeVectors ( )
private

Definition at line 460 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 studyMipCut().

460  {
461  t_NFcandP ->clear();
462  t_NFcandPt ->clear();
463  t_NFcandEta ->clear();
464  t_NFcandPhi ->clear();
465  t_NFcandEmip ->clear();
466  t_NFTrkcandP ->clear();
467  t_NFTrkcandPt ->clear();
468  t_NFTrkcandEta ->clear();
469  t_NFTrkcandPhi ->clear();
470  t_NFTrkcandEmip ->clear();
471  t_NFTrkMinDR ->clear();
472  t_NFTrkMinDP1 ->clear();
473  t_NFTrkselTkFlag ->clear();
474  t_NFTrkqltyFlag ->clear();
475  t_NFTrkMissFlag ->clear();
476  t_NFTrkPVFlag ->clear();
477  t_NFTrkPropFlag ->clear();
478  t_NFTrkChgIsoFlag->clear();
479  t_NFTrkNeuIsoFlag->clear();
480  t_NFTrkMipFlag ->clear();
481  t_ECone ->clear();
482 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.h:213
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.h:208
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.h:212
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.h:205
std::vector< double > * t_NFcandP
Definition: IsoTrig.h:198
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.h:211
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.h:210
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.h:217
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.h:209
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.h:203
std::vector< double > * t_ECone
Definition: IsoTrig.h:218
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.h:215
std::vector< double > * t_NFcandEta
Definition: IsoTrig.h:200
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.h:202
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.h:214
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.h:206
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.h:204
std::vector< double > * t_NFcandPt
Definition: IsoTrig.h:199
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.h:207
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.h:216
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.h:201
double IsoTrig::dEta ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 1680 of file IsoTrig.cc.

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

1680  {
1681  return (vec1.eta()-vec2.eta());
1682 }
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 1710 of file IsoTrig.cc.

Referenced by fillDifferences().

1710  {
1711  return ((1/vec1.pt())-(1/vec2.pt()));
1712 }
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 1706 of file IsoTrig.cc.

References funct::abs().

Referenced by fillDifferences().

1706  {
1707  return (std::abs(vec1.r()-vec2.r()));
1708 }
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 1684 of file IsoTrig.cc.

References M_PI.

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

1684  {
1685 
1686  double phi1 = vec1.phi();
1687  if (phi1 < 0) phi1 += 2.0*M_PI;
1688  double phi2 = vec2.phi();
1689  if (phi2 < 0) phi2 += 2.0*M_PI;
1690  double dphi = phi1-phi2;
1691  if (dphi > M_PI) dphi -= 2.*M_PI;
1692  else if (dphi < -M_PI) dphi += 2.*M_PI;
1693  return dphi;
1694 }
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 1702 of file IsoTrig.cc.

Referenced by fillDifferences().

1702  {
1703  return (vec1.pt()-vec2.pt());
1704 }
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 1696 of file IsoTrig.cc.

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

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

1696  {
1697  double deta = dEta(vec1,vec2);
1698  double dphi = dPhi(vec1,vec2);
1699  return std::sqrt(deta*deta + dphi*dphi);
1700 }
std::vector< double > vec1
Definition: HCALResponse.h:15
T sqrt(T t)
Definition: SSEVec.h:18
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1684
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1680
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
void IsoTrig::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 790 of file IsoTrig.cc.

References gather_cfg::cout, plotBeamSpotDB::first, fs, g_Accepts, g_Pre, g_PreHLT, g_PreL1, mps_fire::i, TFileService::make(), maxRunNo, minRunNo, gen::n, edm::second(), TrigList, trigNames, and TrigPreList.

Referenced by o2olib.O2ORunMgr::executeJob().

790  {
791  unsigned int preL1, preHLT;
792  std::map<unsigned int, unsigned int>::iterator itr;
793  std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
794  edm::LogWarning ("IsoTrack") << trigNames.size() << "Triggers were run. RunNo vs HLT accepts for";
795  for (unsigned int i=0; i<trigNames.size(); ++i)
796  edm::LogWarning("IsoTrack") << "[" << i << "]: " << trigNames[i];
797  unsigned int n = maxRunNo - minRunNo +1;
798  g_Pre = fs->make<TH1I>("h_PrevsRN", "PreScale Vs Run Number", n, minRunNo, maxRunNo);
799  g_PreL1 = fs->make<TH1I>("h_PreL1vsRN", "L1 PreScale Vs Run Number", n, minRunNo, maxRunNo);
800  g_PreHLT = fs->make<TH1I>("h_PreHLTvsRN", "HLT PreScale Vs Run Number", n, minRunNo, maxRunNo);
801  g_Accepts = fs->make<TH1I>("h_HLTAcceptsvsRN", "HLT Accepts Vs Run Number", n, minRunNo, maxRunNo);
802 
803  for (itr=TrigList.begin(), itrPre=TrigPreList.begin(); itr!=TrigList.end(); itr++, itrPre++) {
804  preL1 = (itrPre->second).first;
805  preHLT = (itrPre->second).second;
806 #ifdef DebugLog
807  std::cout << itr->first << " " << itr->second << " " << itrPre->first << " " << preL1 << " " << preHLT << std::endl;
808 #endif
809  g_Accepts->Fill(itr->first, itr->second);
810  g_PreL1->Fill(itr->first, preL1);
811  g_PreHLT->Fill(itr->first, preHLT);
812  g_Pre->Fill(itr->first, preL1*preHLT);
813  }
814 }
TH1I * g_PreHLT
Definition: IsoTrig.h:232
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< std::string > trigNames
Definition: IsoTrig.h:124
U second(std::pair< T, U > const &p)
int maxRunNo
Definition: IsoTrig.h:138
std::map< unsigned int, const std::pair< int, int > > TrigPreList
Definition: IsoTrig.h:169
int minRunNo
Definition: IsoTrig.h:138
TH1I * g_Pre
Definition: IsoTrig.h:232
std::map< unsigned int, unsigned int > TrigList
Definition: IsoTrig.h:168
edm::Service< TFileService > fs
Definition: IsoTrig.h:171
TH1I * g_PreL1
Definition: IsoTrig.h:232
TH1I * g_Accepts
Definition: IsoTrig.h:232
void IsoTrig::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 828 of file IsoTrig.cc.

828 {}
void IsoTrig::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 823 of file IsoTrig.cc.

823 {}
std::pair< double, double > IsoTrig::etaPhiTrigger ( )
private

Definition at line 1714 of file IsoTrig.cc.

References stringResolutionProvider_cfi::eta, gen::k, phi, EnergyCorrector::pt, and vec.

Referenced by analyze().

1714  {
1715  double eta(0), phi(0), ptmax(0);
1716  for (unsigned int k=0; k<vec[0].size(); ++k) {
1717  if (k == 0) {
1718  eta = vec[0][k].eta();
1719  phi = vec[0][k].phi();
1720  ptmax = vec[0][k].pt();
1721  } else if (vec[0][k].pt() > ptmax) {
1722  eta = vec[0][k].eta();
1723  phi = vec[0][k].phi();
1724  ptmax = vec[0][k].pt();
1725  }
1726  }
1727  return std::pair<double,double>(eta,phi);
1728 }
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
int k[5][pyjets_maxn]
void IsoTrig::fillCuts ( int  indx,
double  eMipDR,
double  conehmaxNearP,
double  e_inCone,
math::XYZTLorentzVector vec,
int  ieta,
bool  cut 
)
private

Definition at line 1648 of file IsoTrig.cc.

References cutCharge, cutMip, cutNeutral, h_eMaxNearP, h_eMip, h_eNeutIso, h_etaCalibTracks, h_etaMipTracks, and pLimits.

Referenced by studyIsolation().

1648  {
1649  h_eMip[indx] ->Fill(eMipDR);
1650  h_eMaxNearP[indx]->Fill(conehmaxNearP);
1651  h_eNeutIso[indx] ->Fill(e_inCone);
1652  if ((conehmaxNearP < cutCharge) && (eMipDR < cutMip)) {
1653  for (int lim=0; lim<5; ++lim) {
1654  if ((vec.r()>pLimits[lim]) && (vec.r()<=pLimits[lim+1])) {
1655  h_etaMipTracks[lim][indx][0]->Fill((double)(ieta));
1656  if (cut) h_etaMipTracks[lim][indx][1]->Fill((double)(ieta));
1657  if (e_inCone < cutNeutral) {
1658  h_etaCalibTracks[lim][indx][0]->Fill((double)(ieta));
1659  if (cut) h_etaCalibTracks[lim][indx][1]->Fill((double)(ieta));
1660  }
1661  }
1662  }
1663  }
1664 }
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
double cutNeutral
Definition: IsoTrig.h:137
double cutCharge
Definition: IsoTrig.h:137
TH1D * h_eMaxNearP[2]
Definition: IsoTrig.h:229
TH1D * h_eNeutIso[2]
Definition: IsoTrig.h:229
TH1D * h_etaMipTracks[5][2][2]
Definition: IsoTrig.h:230
double pLimits[6]
Definition: IsoTrig.h:139
TH1D * h_etaCalibTracks[5][2][2]
Definition: IsoTrig.h:230
double cutMip
Definition: IsoTrig.h:137
TH1D * h_eMip[2]
Definition: IsoTrig.h:228
void IsoTrig::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 205 of file IsoTrig.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

205  {
206  //The following says we do not know what parameters are allowed so do no validation
207  // Please change this to state exactly what you do use, even if it is no parameters
209  desc.setUnknown();
210  descriptions.addDefault(desc);
211 }
void addDefault(ParameterSetDescription const &psetDescription)
void IsoTrig::fillDifferences ( int  indx,
math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2,
bool  debug 
)
private

Definition at line 1629 of file IsoTrig.cc.

References gather_cfg::cout, dEta(), dinvPt(), reco::dp, dP(), dPhi(), dPt(), dR(), runTauDisplay::dr, h_dEta, h_dinvPt, h_dP, h_dPhi, h_dPt, and h_mindR.

Referenced by studyMipCut(), and studyTrigger().

1630  {
1631  double dr = dR(vec1,vec2);
1632  double deta = dEta(vec1, vec2);
1633  double dphi = dPhi(vec1, vec2);
1634  double dpt = dPt(vec1, vec2);
1635  double dp = dP(vec1, vec2);
1636  double dinvpt = dinvPt(vec1, vec2);
1637  h_dEta[indx] ->Fill(deta);
1638  h_dPhi[indx] ->Fill(dphi);
1639  h_dPt[indx] ->Fill(dpt);
1640  h_dP[indx] ->Fill(dp);
1641  h_dinvPt[indx]->Fill(dinvpt);
1642  h_mindR[indx] ->Fill(dr);
1643 #ifdef DebugLog
1644  if (debug) std::cout << "mindR for index " << indx << " is " << dr << " deta " << deta << " dphi " << dphi << " dpt " << dpt << " dinvpt " << dinvpt <<std::endl;
1645 #endif
1646 }
TH1D * h_dEta[9]
Definition: IsoTrig.h:227
double dP(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1706
TH1D * h_dP[9]
Definition: IsoTrig.h:227
double dinvPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1710
TH1D * h_dPhi[9]
Definition: IsoTrig.h:227
std::vector< double > vec1
Definition: HCALResponse.h:15
TH1D * h_dinvPt[9]
Definition: IsoTrig.h:228
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1684
#define debug
Definition: HDRShower.cc:19
auto dp
Definition: deltaR.h:22
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1680
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1696
TH1D * h_mindR[9]
Definition: IsoTrig.h:228
TH1D * h_dPt[9]
Definition: IsoTrig.h:227
double dPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1702
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 1666 of file IsoTrig.cc.

References h_eCalo, h_eHcal, GetRecoTauVFromDQM_MC_cff::kk, and pLimits.

Referenced by studyIsolation().

1666  {
1667  int kk(-1);
1668  if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1669  else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1670  if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1671  for (int lim=0; lim<5; ++lim) {
1672  if ((vec.r()>pLimits[lim]) && (vec.r()<=pLimits[lim+1])) {
1673  h_eHcal[lim][indx][kk] ->Fill(hCone);
1674  h_eCalo[lim][indx][kk] ->Fill(hCone+eMipDR);
1675  }
1676  }
1677  }
1678 }
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
TH1D * h_eHcal[5][6][48]
Definition: IsoTrig.h:231
TH1D * h_eCalo[5][6][48]
Definition: IsoTrig.h:231
double pLimits[6]
Definition: IsoTrig.h:139
void IsoTrig::fillHist ( int  indx,
math::XYZTLorentzVector vec 
)
private

Definition at line 1622 of file IsoTrig.cc.

References h_eta, h_p, h_phi, and h_pt.

Referenced by studyIsolation(), and studyTrigger().

1622  {
1623  h_p[indx]->Fill(vec.r());
1624  h_pt[indx]->Fill(vec.pt());
1625  h_eta[indx]->Fill(vec.eta());
1626  h_phi[indx]->Fill(vec.phi());
1627 }
TH1D * h_phi[20]
Definition: IsoTrig.h:225
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
TH1D * h_eta[20]
Definition: IsoTrig.h:225
TH1D * h_p[20]
Definition: IsoTrig.h:225
TH1D * h_pt[20]
Definition: IsoTrig.h:225
double IsoTrig::getDistInCM ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 1789 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().

1789  {
1790  double Rec;
1791  double theta1=2*atan(exp(-eta1));
1792  double theta2=2*atan(exp(-eta2));
1793  if (fabs(eta1)<1.479) Rec=rEB_; //radius of ECAL barrel
1794  else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=tan(theta1)*zEE_; //distance from IP to ECAL endcap
1795  else return 1000;
1796 
1797  //|vect| times tg of acos(scalar product)
1798  double angle=acos((sin(theta1)*sin(theta2)*(sin(phi1)*sin(phi2)+cos(phi1)*cos(phi2))+cos(theta1)*cos(theta2)));
1799  if (angle<0.5*M_PI) return fabs((Rec/sin(theta1))*tan(angle));
1800  else return 1000;
1801 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double rEB_
Definition: IsoTrig.h:130
double zEE_
Definition: IsoTrig.h:130
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 1730 of file IsoTrig.cc.

References alpha, bfVal, ALCARECOTkAlJpsiMuMu_cff::charge, MuonCkfTrajectoryBuilder_cfi::deltaPhi, JetChargeProducer_cfi::exp, cmsBatch::log, M_PI, rEB_, funct::sin(), funct::tan(), theta(), z, and zEE_.

Referenced by chgIsolation().

1732  {
1733 
1734  double deltaPhi=0;
1735  double etaEC = 100;
1736  double phiEC = 100;
1737 
1738  double Rcurv = 9999999;
1739  if (bfVal!=0) Rcurv=pT*33.3*100/(bfVal*10); //r(m)=pT(GeV)*33.3/B(kG)
1740 
1741  double ecDist = zEE_;
1742  double ecRad = rEB_; //radius of ECAL barrel (cm)
1743  double theta = 2*atan(exp(-etaIP));
1744  double zNew = 0;
1745  if (theta>0.5*M_PI) theta=M_PI-theta;
1746  if (fabs(etaIP)<1.479) {
1747  if ((0.5*ecRad/Rcurv)>1) {
1748  etaEC = 10000;
1749  deltaPhi = 0;
1750  } else {
1751  deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
1752  double alpha1 = 2*asin(0.5*ecRad/Rcurv);
1753  double z = ecRad/tan(theta);
1754  if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ; //new z-coordinate of track
1755  else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ; //new z-coordinate of track
1756  double zAbs=fabs(zNew);
1757  if (zAbs<ecDist) {
1758  etaEC = -log(tan(0.5*atan(ecRad/zAbs)));
1759  deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
1760  }
1761  if (zAbs>ecDist) {
1762  zAbs = (fabs(etaIP)/etaIP)*ecDist;
1763  double Zflight = fabs(zAbs-vtxZ);
1764  double alpha = (Zflight*ecRad)/(z*Rcurv);
1765  double Rec = 2*Rcurv*sin(alpha/2);
1766  deltaPhi =-charge*alpha/2;
1767  etaEC =-log(tan(0.5*atan(Rec/ecDist)));
1768  }
1769  }
1770  } else {
1771  zNew = (fabs(etaIP)/etaIP)*ecDist;
1772  double Zflight = fabs(zNew-vtxZ);
1773  double Rvirt = fabs(Zflight*tan(theta));
1774  double Rec = 2*Rcurv*sin(Rvirt/(2*Rcurv));
1775  deltaPhi =-(charge)*(Rvirt/(2*Rcurv));
1776  etaEC =-log(tan(0.5*atan(Rec/ecDist)));
1777  }
1778 
1779  if (zNew<0) etaEC=-etaEC;
1780  phiEC = phiIP+deltaPhi;
1781 
1782  if (phiEC<-M_PI) phiEC += 2*M_PI;
1783  if (phiEC>M_PI) phiEC -= 2*M_PI;
1784 
1785  std::pair<double,double> retVal(etaEC,phiEC);
1786  return retVal;
1787 }
float alpha
Definition: AMPTWrapper.h:95
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
double rEB_
Definition: IsoTrig.h:130
double bfVal
Definition: IsoTrig.h:130
double zEE_
Definition: IsoTrig.h:130
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define M_PI
void IsoTrig::getGoodTracks ( const edm::Event iEvent,
edm::Handle< reco::TrackCollection > &  trkCollection 
)
private

Definition at line 1531 of file IsoTrig.cc.

References a_charIsoR, a_mipR, barrelRecHitsHandle, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH, spr::chargeIsolationCone(), funct::cos(), gather_cfg::cout, 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(), EnergyCorrector::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().

1532  {
1533 
1534  t_nGoodTk->clear();
1535  std::vector<int> nGood(4,0);
1536  if (trkCollection.isValid()) {
1537  // get handles to calogeometry and calotopology
1538  const CaloGeometry* geo = pG.product();
1539  const MagneticField *bField = bFieldH.product();
1540  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1541  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDirections, ((verbosity/100)%10>2));
1542 
1543  // get the trigger jet
1545  iEvent.getByToken(tok_l1cand_, l1trigobj);
1546 
1547  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1548  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
1549  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1550  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
1551  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1552  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
1553 
1554  double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1555  for (unsigned int p=0; p<l1tauobjref.size(); p++) {
1556  if (l1tauobjref[p]->pt()>ptTriggered) {
1557  ptTriggered = l1tauobjref[p]->pt();
1558  phiTriggered = l1tauobjref[p]->phi();
1559  etaTriggered = l1tauobjref[p]->eta();
1560  }
1561  }
1562  for (unsigned int p=0; p<l1jetobjref.size(); p++) {
1563  if (l1jetobjref[p]->pt()>ptTriggered) {
1564  ptTriggered = l1jetobjref[p]->pt();
1565  phiTriggered = l1jetobjref[p]->phi();
1566  etaTriggered = l1jetobjref[p]->eta();
1567  }
1568  }
1569  for (unsigned int p=0; p<l1forjetobjref.size(); p++) {
1570  if (l1forjetobjref[p]->pt()>ptTriggered) {
1571  ptTriggered=l1forjetobjref[p]->pt();
1572  phiTriggered=l1forjetobjref[p]->phi();
1573  etaTriggered=l1forjetobjref[p]->eta();
1574  }
1575  }
1576  double pTriggered = ptTriggered*cosh(etaTriggered);
1577  math::XYZTLorentzVector pTrigger(ptTriggered*cos(phiTriggered),
1578  ptTriggered*sin(phiTriggered),
1579  pTriggered*tanh(etaTriggered), pTriggered);
1580 
1581  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1582  unsigned int nTracks(0);
1583  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1584  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1585  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(),
1586  pTrack->pz(), pTrack->p());
1587  bool selectTk = spr::goodTrack(pTrack,leadPV,selectionParameters,((verbosity/100)%10>1));
1588  double mindR = dR(v4, pTrigger);
1589 #ifdef DebugLog
1590  if ((verbosity/100)%10 > 1) std::cout << "Track ECAL " << trkDetItr->okECAL << " HCAL " << trkDetItr->okHCAL << " Flag " << selectTk << std::endl;
1591 #endif
1592  if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
1593  int nRH_eMipDR(0), nNearTRKs(0);
1594  double eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle,
1596  trkDetItr->pointHCAL,
1597  trkDetItr->pointECAL, a_mipR,
1598  trkDetItr->directionECAL, nRH_eMipDR);
1599  double conehmaxNearP = spr::chargeIsolationCone(nTracks,
1600  trkCaloDirections,
1601  a_charIsoR, nNearTRKs,
1602  ((verbosity/100)%10>1));
1603  if (conehmaxNearP < 2.0 && eMipDR<1.0) {
1604  if (pTrack->p() >= 20 && pTrack->p() < 30) {
1605  ++nGood[0];
1606  } else if (pTrack->p() >= 30 && pTrack->p() < 40) {
1607  ++nGood[1];
1608  } else if (pTrack->p() >= 40 && pTrack->p() < 60) {
1609  ++nGood[2];
1610  } else if (pTrack->p() >= 60 && pTrack->p() < 100) {
1611  ++nGood[3];
1612  }
1613  }
1614  }
1615  }
1616  }
1617 
1618  for (unsigned int ii=0; ii<nGood.size(); ++ii)
1619  t_nGoodTk->push_back(nGood[ii]);
1620 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
const unsigned int nTracks(const reco::Vertex &sv)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle
Definition: IsoTrig.h:162
std::string theTrackQuality
Definition: IsoTrig.h:135
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
math::XYZPoint leadPV
Definition: IsoTrig.h:166
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:622
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int verbosity
Definition: IsoTrig.h:129
edm::ESHandle< CaloGeometry > pG
Definition: IsoTrig.h:160
double a_mipR
Definition: IsoTrig.h:136
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
double a_charIsoR
Definition: IsoTrig.h:136
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
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:74
ii
Definition: cuy.py:588
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
spr::trackSelectionParameters selectionParameters
Definition: IsoTrig.h:134
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.h:154
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1696
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle
Definition: IsoTrig.h:163
std::vector< int > * t_nGoodTk
Definition: IsoTrig.h:176
edm::ESHandle< MagneticField > bFieldH
Definition: IsoTrig.h:159
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
void IsoTrig::pushChgIsolnTreeVecs ( math::XYZTLorentzVector Pixcand,
math::XYZTLorentzVector Trkcand,
std::vector< double > &  PixMaxP,
double &  TrkMaxP,
bool &  selTk 
)
private

Definition at line 484 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().

486  {
487  t_PixcandP ->push_back(Pixcand.r());
488  t_PixcandPt ->push_back(Pixcand.pt());
489  t_PixcandEta ->push_back(Pixcand.eta());
490  t_PixcandPhi ->push_back(Pixcand.phi());
491  t_PixcandMaxP ->push_back(PixMaxP);
492  t_PixTrkcandP ->push_back(Trkcand.r());
493  t_PixTrkcandPt ->push_back(Trkcand.pt());
494  t_PixTrkcandEta ->push_back(Trkcand.eta());
495  t_PixTrkcandPhi ->push_back(Trkcand.phi());
496  t_PixTrkcandMaxP ->push_back(TrkMaxP);
497  t_PixTrkcandselTk ->push_back(selTk);
498 
499 }
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.h:194
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.h:191
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.h:196
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.h:195
std::vector< double > * t_PixcandP
Definition: IsoTrig.h:186
std::vector< double > * t_PixcandPt
Definition: IsoTrig.h:187
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.h:192
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.h:190
std::vector< double > * t_PixcandEta
Definition: IsoTrig.h:188
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.h:189
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.h:193
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 501 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 studyMipCut().

505  {
506  t_NFcandP ->push_back(NFcand.r());
507  t_NFcandPt ->push_back(NFcand.pt());
508  t_NFcandEta ->push_back(NFcand.eta());
509  t_NFcandPhi ->push_back(NFcand.phi());
510  t_NFcandEmip ->push_back(EmipNFcand);
511  t_NFTrkcandP ->push_back(Trkcand.r());
512  t_NFTrkcandPt ->push_back(Trkcand.pt());
513  t_NFTrkcandEta ->push_back(Trkcand.eta());
514  t_NFTrkcandPhi ->push_back(Trkcand.phi());
515  t_NFTrkcandEmip ->push_back(EmipTrkcand);
516  t_NFTrkMinDR ->push_back(mindR);
517  t_NFTrkMinDP1 ->push_back(mindP1);
518  t_NFTrkselTkFlag ->push_back(Flags[0]);
519  t_NFTrkqltyFlag ->push_back(Flags[1]);
520  t_NFTrkMissFlag ->push_back(Flags[2]);
521  t_NFTrkPVFlag ->push_back(Flags[3]);
522  t_NFTrkPropFlag ->push_back(Flags[4]);
523  t_NFTrkChgIsoFlag->push_back(Flags[5]);
524  t_NFTrkNeuIsoFlag->push_back(Flags[6]);
525  t_NFTrkMipFlag ->push_back(Flags[7]);
526  t_ECone ->push_back(hCone);
527 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.h:213
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.h:208
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.h:212
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.h:205
std::vector< double > * t_NFcandP
Definition: IsoTrig.h:198
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.h:211
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.h:210
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.h:217
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.h:209
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.h:203
std::vector< double > * t_ECone
Definition: IsoTrig.h:218
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.h:215
std::vector< double > * t_NFcandEta
Definition: IsoTrig.h:200
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.h:202
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.h:214
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.h:206
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.h:204
std::vector< double > * t_NFcandPt
Definition: IsoTrig.h:199
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.h:207
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.h:216
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.h:201
void IsoTrig::studyIsolation ( edm::Handle< reco::TrackCollection > &  trkCollection,
std::vector< reco::TrackCollection::const_iterator > &  goodTks 
)
private

Definition at line 1303 of file IsoTrig.cc.

References a_charIsoR, a_coneR, a_mipR, a_neutR1, a_neutR2, barrelRecHitsHandle, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH, spr::chargeIsolationCone(), gather_cfg::cout, cutCharge, cutMip, cutNeutral, deltaR(), doL2L3, dR(), dr_L1, reco::e1, reco::e2, spr::eCone_ecal(), spr::eCone_hcal(), endcapRecHitsHandle, fillCuts(), fillEnergy(), fillHist(), spr::find(), spr::goodTrack(), hbhe, hit::id, HcalDetId::ieta(), edm::HandleBase::isValid(), gen::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().

1304  {
1305 
1306  if (trkCollection.isValid()) {
1307  // get handles to calogeometry and calotopology
1308  const CaloGeometry* geo = pG.product();
1309  const MagneticField *bField = bFieldH.product();
1310  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1311  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDirections, ((verbosity/100)%10>2));
1312 
1313  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1314 #ifdef DebugLog
1315  if ((verbosity/1000)%10 > 1) {
1316  std::cout << "n of barrelRecHitsHandle " << barrelRecHitsHandle->size() << std::endl;
1318  std::cout << "hit : detid(ieta,iphi) " << (EBDetId)(hit->id()) << " time " << hit->time() << " energy " << hit->energy() << std::endl;
1319  }
1320  std::cout << "n of endcapRecHitsHandle " << endcapRecHitsHandle->size() << std::endl;
1322  std::cout << "hit : detid(ieta,iphi) " << (EEDetId)(hit->id()) << " time " << hit->time() << " energy " << hit->energy() << std::endl;
1323  }
1324  std::cout << "n of hbhe " << hbhe->size() << std::endl;
1325  for (HBHERecHitCollection::const_iterator hit = hbhe->begin(); hit != hbhe->end(); ++hit) {
1326  std::cout << "hit : detid(ieta,iphi) " << hit->id() << " time " << hit->time() << " energy " << hit->energy() << std::endl;
1327  }
1328  }
1329 #endif
1330  unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1331  int ieta=999;
1332  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1333  bool l3Track = (std::find(goodTks.begin(),goodTks.end(),trkDetItr->trkItr) != goodTks.end());
1334  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1335  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(),
1336  pTrack->pz(), pTrack->p());
1337  bool selectTk = spr::goodTrack(pTrack,leadPV,selectionParameters,((verbosity/100)%10>1));
1338  double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1339  if (trkDetItr->okHCAL) {
1340  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
1341  ieta = detId.ieta();
1342  }
1343  for (unsigned k=0; k<vec[0].size(); ++k) {
1344  double deltaR = dR(v4, vec[0][k]);
1345  if (deltaR<mindR) mindR = deltaR;
1346  }
1347 #ifdef DebugLog
1348  if ((verbosity/100)%10 > 1) std::cout << "Track ECAL " << trkDetItr->okECAL << " HCAL " << trkDetItr->okHCAL << " Flag " << selectTk << std::endl;
1349 #endif
1350  if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1351  ngoodTk++;
1352  int nRH_eMipDR=0, nNearTRKs=0;
1354  trkDetItr->pointHCAL, trkDetItr->pointECAL,
1355  a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1357  trkDetItr->pointHCAL, trkDetItr->pointECAL,
1358  a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1360  trkDetItr->pointHCAL, trkDetItr->pointECAL,
1361  a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1362  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR, nNearTRKs, ((verbosity/100)%10>1));
1363  e_inCone = e2 - e1;
1364  double distFromHotCell=-99.0;
1365  int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1366  GlobalPoint gposHotCell(0.,0.,0.);
1367  std::vector<DetId> coneRecHitDetIds;
1368  hCone = spr::eCone_hcal(geo, hbhe, trkDetItr->pointHCAL,
1369  trkDetItr->pointECAL,
1370  a_coneR, trkDetItr->directionHCAL,
1371  nRecHitsCone, coneRecHitDetIds,
1372  distFromHotCell, ietaHotCell, iphiHotCell,
1373  gposHotCell, -1);
1374  if (eMipDR<1.0) nselTk++;
1375  }
1376  if (l3Track) {
1377  fillHist(10,v4);
1378  if (selectTk) {
1379  fillHist(11,v4);
1380  fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>dr_L1));
1381  if (conehmaxNearP < cutCharge) {
1382  fillHist(12,v4);
1383  if (eMipDR < cutMip) {
1384  fillHist(13,v4);
1385  fillEnergy(1, ieta, hCone, eMipDR, v4);
1386  fillEnergy(0, ieta, hCone, eMipDR, v4);
1387  if (e_inCone < cutNeutral) {
1388  fillHist(14, v4);
1389  fillEnergy(4, ieta, hCone, eMipDR, v4);
1390  fillEnergy(3, ieta, hCone, eMipDR, v4);
1391  }
1392  }
1393  }
1394  }
1395  } else if (doL2L3) {
1396  fillHist(15,v4);
1397  if (selectTk) {
1398  fillHist(16,v4);
1399  fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>dr_L1));
1400  if (conehmaxNearP < cutCharge) {
1401  fillHist(17,v4);
1402  if (eMipDR < cutMip) {
1403  fillHist(18,v4);
1404  fillEnergy(2, ieta, hCone, eMipDR, v4);
1405  fillEnergy(0, ieta, hCone, eMipDR, v4);
1406  if (e_inCone < cutNeutral) {
1407  fillHist(19, v4);
1408  fillEnergy(5, ieta, hCone, eMipDR, v4);
1409  fillEnergy(3, ieta, hCone, eMipDR, v4);
1410  }
1411  }
1412  }
1413  }
1414  }
1415  }
1416  // std::cout << "Number of tracks selected offline " << nselTk << std::endl;
1417  }
1418 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
const unsigned int nTracks(const reco::Vertex &sv)
double a_coneR
Definition: IsoTrig.h:136
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
double dr_L1
Definition: IsoTrig.h:136
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle
Definition: IsoTrig.h:162
std::string theTrackQuality
Definition: IsoTrig.h:135
math::XYZPoint leadPV
Definition: IsoTrig.h:166
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
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:622
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int verbosity
Definition: IsoTrig.h:129
edm::ESHandle< CaloGeometry > pG
Definition: IsoTrig.h:160
void fillHist(int, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1622
edm::Handle< HBHERecHitCollection > hbhe
Definition: IsoTrig.h:161
double a_mipR
Definition: IsoTrig.h:136
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
double cutNeutral
Definition: IsoTrig.h:137
void fillEnergy(int, int, double, double, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1666
double a_charIsoR
Definition: IsoTrig.h:136
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
double cutCharge
Definition: IsoTrig.h:137
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 doL2L3
Definition: IsoTrig.h:127
bool isValid() const
Definition: HandleBase.h:74
double a_neutR2
Definition: IsoTrig.h:137
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
int k[5][pyjets_maxn]
unsigned int id
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
Float e1
Definition: deltaR.h:20
spr::trackSelectionParameters selectionParameters
Definition: IsoTrig.h:134
Float e2
Definition: deltaR.h:21
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1696
double a_neutR1
Definition: IsoTrig.h:137
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle
Definition: IsoTrig.h:163
edm::ESHandle< MagneticField > bFieldH
Definition: IsoTrig.h:159
T const * product() const
Definition: ESHandle.h:86
double cutMip
Definition: IsoTrig.h:137
void fillCuts(int, double, double, double, math::XYZTLorentzVector &, int, bool)
Definition: IsoTrig.cc:1648
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
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, bool useRaw=false, bool debug=false)
void IsoTrig::studyMipCut ( edm::Handle< reco::TrackCollection > &  trkCollection,
edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &  L2cands 
)
private

Definition at line 1056 of file IsoTrig.cc.

References a_charIsoR, a_coneR, a_mipR, a_neutR1, a_neutR2, funct::abs(), barrelRecHitsHandle, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH, spr::chargeIsolationCone(), clearMipCutTreeVectors(), gather_cfg::cout, cutCharge, cutMip, cutNeutral, dR(), runTauDisplay::dr, reco::e1, reco::e2, spr::eCone_ecal(), spr::eCone_hcal(), endcapRecHitsHandle, 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, edm::ESHandle< T >::product(), spr::propagateCALO(), pushMipCutTreeVecs(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameters, theTrackQuality, and verbosity.

Referenced by analyze().

1057  {
1058 
1060 #ifdef DebugLog
1061  if (verbosity%10>0) std::cout << "inside studymipcut" << std::endl;
1062 #endif
1063  if (!trkCollection.isValid()) {
1064  edm::LogWarning("IsoTrack") << "trkCollection.isValid is false";
1065  } else {
1066  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1067  const MagneticField *bField = bFieldH.product();
1068  const CaloGeometry* geo = pG.product();
1069  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1070  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDirections1, ((verbosity/100)%10>2));
1071 #ifdef DebugLog
1072  if (verbosity%10>0) std::cout << "Number of L2cands:" << L2cands->size()
1073  << " to be matched to something out of "
1074  << trkCaloDirections1.size() << " reco tracks" << std::endl;
1075 #endif
1076  for (unsigned int i=0; i<L2cands->size(); i++) {
1079  double enIn = candref->energyIn();
1080  h_EnIn->Fill(candref->energyIn());
1081  h_EnOut->Fill(candref->energyOut());
1082  math::XYZTLorentzVector v1(candref->track()->px(),candref->track()->py(),
1083  candref->track()->pz(),candref->track()->p());
1084 #ifdef DebugLog
1085  if (verbosity%10>1)
1086  std::cout << "HLT Level Candidate eta/phi/pt/enIn:"
1087  << candref->track()->eta() << "/" << candref->track()->phi()
1088  << "/" << candref->track()->pt() << "/" << candref->energyIn()
1089  << std::endl;
1090 #endif
1091  math::XYZTLorentzVector mindRvec;
1092  double mindR=999.9, mindP1=999.9, eMipDR=0.0;
1093  std::vector<bool> selFlags;
1094  unsigned int nTracks=0;
1095  double conehmaxNearP = 0, hCone=0;
1096  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
1097  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1098  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(),
1099  pTrack->pz(), pTrack->p());
1100  double dr = dR(v1,v2);
1101  double dp1 = std::abs(1./v1.r() - 1./v2.r());
1102  // std::cout <<"This recotrack(eta/phi/pt) " << pTrack->eta() << "/"
1103  // << pTrack->phi() << "/" << pTrack->pt() << " has dr/dp= "
1104  // << dr << "/" << dp << "/" << dp1 << std::endl;
1105  if (dr<mindR) {
1106  mindR = dr;
1107  mindP1= dp1;
1108  mindRvec=v2;
1109  int nRH_eMipDR=0, nNearTRKs=0;
1111  trkDetItr->pointHCAL, trkDetItr->pointECAL,
1112  a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
1113  bool selectTk = spr::goodTrack(pTrack,leadPV,selectionParameters,((verbosity/100)%10>1));
1115  oneCutParameters.maxDxyPV = 10;
1116  oneCutParameters.maxDzPV = 100;
1117  oneCutParameters.maxInMiss = 2;
1118  oneCutParameters.maxOutMiss= 2;
1119  bool qltyFlag = spr::goodTrack(pTrack,leadPV,oneCutParameters,((verbosity/100)%10>1));
1120  oneCutParameters = selectionParameters;
1121  oneCutParameters.maxDxyPV = 10;
1122  oneCutParameters.maxDzPV = 100;
1123  bool qltyMissFlag = spr::goodTrack(pTrack,leadPV,oneCutParameters,((verbosity/100)%10>1));
1124  oneCutParameters = selectionParameters;
1125  oneCutParameters.maxInMiss = 2;
1126  oneCutParameters.maxOutMiss= 2;
1127  bool qltyPVFlag = spr::goodTrack(pTrack,leadPV,oneCutParameters,((verbosity/100)%10>1));
1128  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections1, a_charIsoR, nNearTRKs, ((verbosity/100)%10>1));
1130  trkDetItr->pointHCAL, trkDetItr->pointECAL,
1131  a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
1133  trkDetItr->pointHCAL, trkDetItr->pointECAL,
1134  a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
1135  double e_inCone = e2 - e1;
1136  bool chgIsolFlag = (conehmaxNearP < cutCharge);
1137  bool mipFlag = (eMipDR < cutMip);
1138  bool neuIsolFlag = (e_inCone < cutNeutral);
1139  bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1140  selFlags.clear();
1141  selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1142  selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1143  selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1144  selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1145  double distFromHotCell=-99.0;
1146  int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1147  GlobalPoint gposHotCell(0.,0.,0.);
1148  std::vector<DetId> coneRecHitDetIds;
1149  hCone = spr::eCone_hcal(geo, hbhe, trkDetItr->pointHCAL,
1150  trkDetItr->pointECAL,
1151  a_coneR, trkDetItr->directionHCAL,
1152  nRecHitsCone, coneRecHitDetIds,
1153  distFromHotCell, ietaHotCell, iphiHotCell,
1154  gposHotCell, -1);
1155  }
1156  }
1157  pushMipCutTreeVecs(v1, mindRvec, enIn, eMipDR, mindR, mindP1, selFlags, hCone);
1158  fillDifferences(6, v1, mindRvec, (verbosity%10 >0));
1159  if (mindR>=0.05) {
1160  fillDifferences(8, v1, mindRvec, (verbosity%10 >0));
1161  h_MipEnNoMatch->Fill(candref->energyIn(), eMipDR);
1162  } else {
1163  fillDifferences(7, v1, mindRvec, (verbosity%10 >0));
1164  h_MipEnMatch->Fill(candref->energyIn(), eMipDR);
1165  }
1166  }
1167  }
1168  MipCutTree->Fill();
1169 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
const unsigned int nTracks(const reco::Vertex &sv)
double a_coneR
Definition: IsoTrig.h:136
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
TH1D * h_EnIn
Definition: IsoTrig.h:220
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle
Definition: IsoTrig.h:162
std::string theTrackQuality
Definition: IsoTrig.h:135
math::XYZPoint leadPV
Definition: IsoTrig.h:166
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:622
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:501
TH1D * h_EnOut
Definition: IsoTrig.h:220
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int verbosity
Definition: IsoTrig.h:129
edm::ESHandle< CaloGeometry > pG
Definition: IsoTrig.h:160
edm::Handle< HBHERecHitCollection > hbhe
Definition: IsoTrig.h:161
double a_mipR
Definition: IsoTrig.h:136
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
double cutNeutral
Definition: IsoTrig.h:137
double a_charIsoR
Definition: IsoTrig.h:136
double cutCharge
Definition: IsoTrig.h:137
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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)
TTree * MipCutTree
Definition: IsoTrig.h:172
bool isValid() const
Definition: HandleBase.h:74
double a_neutR2
Definition: IsoTrig.h:137
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
TH2D * h_MipEnMatch
Definition: IsoTrig.h:221
Float e1
Definition: deltaR.h:20
spr::trackSelectionParameters selectionParameters
Definition: IsoTrig.h:134
Float e2
Definition: deltaR.h:21
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1696
double a_neutR1
Definition: IsoTrig.h:137
void clearMipCutTreeVectors()
Definition: IsoTrig.cc:460
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
Definition: IsoTrig.cc:1629
TH2D * h_MipEnNoMatch
Definition: IsoTrig.h:221
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle
Definition: IsoTrig.h:163
edm::ESHandle< MagneticField > bFieldH
Definition: IsoTrig.h:159
T const * product() const
Definition: ESHandle.h:86
double cutMip
Definition: IsoTrig.h:137
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
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, bool useRaw=false, bool debug=false)
void IsoTrig::studyTiming ( const edm::Event theEvent)
private

Definition at line 945 of file IsoTrig.cc.

References gather_cfg::cout, deltaR(), particleFlowDisplacedVertexCandidate_cfi::dxy, allConversions_cfi::dz, stringResolutionProvider_cfi::eta, edm::Event::getByToken(), trigger::TriggerRefsCollections::getObjects(), AlCaHLTBitMon_ParallelJobs::p, phi, pixelTrackRefsHB, pixelTrackRefsHE, edm::Handle< T >::product(), EnergyCorrector::pt, FastTimerService::queryModuleTimeByLabel(), dttmaxenums::R, TrackInfoProducer_cfi::rechits, SeedingLayerSetsHits::size(), edmNew::DetSetVector< T >::size(), edm::Event::streamID(), 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().

945  {
946  t_timeL2Prod->clear(); t_nPixCand->clear(); t_nPixSeed->clear();
947 
948 #ifdef DebugLog
949  edm::Handle<SeedingLayerSetsHits> hblayers, helayers;
950  theEvent.getByToken(tok_SeedingLayerhb, hblayers);
951  theEvent.getByToken(tok_SeedingLayerhe, helayers);
952  const SeedingLayerSetsHits* layershb = hblayers.product();
953  const SeedingLayerSetsHits* layershe = helayers.product();
954  std::cout << "size of Seeding TripletLayers hb/he " << layershb->size() << "/" << layershe->size() << std::endl;
956  theEvent.getByToken(tok_SiPixelRecHits, rchts);
957  const SiPixelRecHitCollection* rechits = rchts.product();
958  std::cout << "size of SiPixelRechits " << rechits->size() << std::endl;;
959 #endif
960  double tHB=0.0, tHE=0.0;
961  int nCandHB=pixelTrackRefsHB.size(), nCandHE=pixelTrackRefsHE.size();
962  int nSeedHB=0, nSeedHE=0;
963 
964  if(nCandHE>0) {
965  edm::Handle<reco::VertexCollection> pVertHB, pVertHE;
966  theEvent.getByToken(tok_verthb_,pVertHB);
967  theEvent.getByToken(tok_verthe_,pVertHE);
969  theEvent.getByToken(tok_l1cand_, l1trigobj);
970 
971  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
972  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
973  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
974 
975  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
976  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
977  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
978 
979  double ptTriggered = -10;
980  double etaTriggered = -100;
981  double phiTriggered = -100;
982  for (unsigned int p=0; p<l1tauobjref.size(); p++) {
983  if (l1tauobjref[p]->pt()>ptTriggered) {
984  ptTriggered = l1tauobjref[p]->pt();
985  phiTriggered = l1tauobjref[p]->phi();
986  etaTriggered = l1tauobjref[p]->eta();
987  }
988  }
989  for (unsigned int p=0; p<l1jetobjref.size(); p++) {
990  if (l1jetobjref[p]->pt()>ptTriggered) {
991  ptTriggered = l1jetobjref[p]->pt();
992  phiTriggered = l1jetobjref[p]->phi();
993  etaTriggered = l1jetobjref[p]->eta();
994  }
995  }
996  for (unsigned int p=0; p<l1forjetobjref.size(); p++) {
997  if (l1forjetobjref[p]->pt()>ptTriggered) {
998  ptTriggered=l1forjetobjref[p]->pt();
999  phiTriggered=l1forjetobjref[p]->phi();
1000  etaTriggered=l1forjetobjref[p]->eta();
1001  }
1002  }
1003  for(unsigned iS=0; iS<pixelTrackRefsHE.size(); iS++) {
1004  reco::VertexCollection::const_iterator vitSel;
1005  double minDZ = 100;
1006  bool vtxMatch;
1007  for (reco::VertexCollection::const_iterator vit=pVertHE->begin(); vit!=pVertHE->end(); vit++) {
1008  if (fabs(pixelTrackRefsHE[iS]->dz(vit->position()))<minDZ) {
1009  minDZ = fabs(pixelTrackRefsHE[iS]->dz(vit->position()));
1010  vitSel = vit;
1011  }
1012  }
1013  //cut on dYX:
1014  if (minDZ!=100&&fabs(pixelTrackRefsHE[iS]->dxy(vitSel->position()))<vtxCutSeed_) vtxMatch=true;
1015  if (minDZ==100) vtxMatch=true;
1016 
1017  //select tracks not matched to triggered L1 jet
1018  double R=deltaR(etaTriggered, phiTriggered, pixelTrackRefsHE[iS]->eta(), pixelTrackRefsHE[iS]->phi());
1019  if (R>tauUnbiasCone_ && vtxMatch) nSeedHE++;
1020  }
1021  for(unsigned iS=0; iS<pixelTrackRefsHB.size(); iS++) {
1022  reco::VertexCollection::const_iterator vitSel;
1023  double minDZ = 100;
1024  bool vtxMatch;
1025  for (reco::VertexCollection::const_iterator vit=pVertHB->begin(); vit!=pVertHB->end(); vit++) {
1026  if (fabs(pixelTrackRefsHB[iS]->dz(vit->position()))<minDZ) {
1027  minDZ = fabs(pixelTrackRefsHB[iS]->dz(vit->position()));
1028  vitSel = vit;
1029  }
1030  }
1031  //cut on dYX:
1032  if (minDZ!=100&&fabs(pixelTrackRefsHB[iS]->dxy(vitSel->position()))<101.0) vtxMatch=true;
1033  if (minDZ==100) vtxMatch=true;
1034 
1035  //select tracks not matched to triggered L1 jet
1036  double R=deltaR(etaTriggered, phiTriggered, pixelTrackRefsHB[iS]->eta(), pixelTrackRefsHB[iS]->phi());
1037  if (R>1.2 && vtxMatch) nSeedHB++;
1038  }
1039 
1041  tHE = ft->queryModuleTimeByLabel(theEvent.streamID(),"hltIsolPixelTrackProdHE") ;
1042  tHB = ft->queryModuleTimeByLabel(theEvent.streamID(),"hltIsolPixelTrackProdHB");
1043 #ifdef DebugLog
1044  if (verbosity%10>0) std::cout << "(HB/HE) time: " << tHB <<"/" << tHE
1045  << " nCand: " << nCandHB << "/" << nCandHE
1046  << "nSeed: " << nSeedHB << "/" << nSeedHE
1047  << std::endl;
1048 #endif
1049  }
1050  t_timeL2Prod->push_back(tHB); t_timeL2Prod->push_back(tHE);
1051  t_nPixSeed->push_back(nSeedHB); t_nPixSeed->push_back(nSeedHE);
1052  t_nPixCand->push_back(nCandHB); t_nPixCand->push_back(nCandHE);
1053 
1054  TimingTree->Fill();
1055 }
double tauUnbiasCone_
Definition: IsoTrig.h:133
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< reco::TrackRef > pixelTrackRefsHE
Definition: IsoTrig.h:158
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits
Definition: IsoTrig.h:152
std::vector< reco::TrackRef > pixelTrackRefsHB
Definition: IsoTrig.h:158
std::vector< int > * t_nPixSeed
Definition: IsoTrig.h:175
int verbosity
Definition: IsoTrig.h:129
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.h:173
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< int > * t_nPixCand
Definition: IsoTrig.h:174
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
Definition: IsoTrig.h:150
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.h:154
size_type size() const
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerhb
Definition: IsoTrig.h:151
double vtxCutSeed_
Definition: IsoTrig.h:132
StreamID streamID() const
Definition: Event.h:81
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerhe
Definition: IsoTrig.h:151
TTree * TimingTree
Definition: IsoTrig.h:172
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
Definition: IsoTrig.h:150
double queryModuleTimeByLabel(edm::StreamID, std::string const &module) const
unsigned short size() const
Get the number of SeedingLayerSets.
void IsoTrig::studyTrigger ( edm::Handle< reco::TrackCollection > &  trkCollection,
std::vector< reco::TrackCollection::const_iterator > &  goodTks 
)
private

Definition at line 1171 of file IsoTrig.cc.

References funct::abs(), gather_cfg::cout, deltaR(), dEta(), reco::dp, dPhi(), dR(), runTauDisplay::dr, HcalObjRepresent::Fill(), fillDifferences(), fillHist(), h_dEtaL1, h_dPhiL1, h_dRL1, mps_fire::i, edm::HandleBase::isValid(), gen::k, mathSSE::sqrt(), vec, and verbosity.

Referenced by analyze().

1172  {
1173 
1174 #ifdef DebugLog
1175  if (verbosity%10 > 0) std::cout << "Inside StudyTrigger" << std::endl;
1176 #endif
1177  for (int j=0; j<3; j++) {
1179  for (unsigned int k=0; k<vec[j].size(); k++) {
1180 #ifdef DebugLog
1181  if (verbosity%10 > 0) std::cout << "vec[" << j << "][" << k << "] pt " << vec[j][k].pt() << " eta " << vec[j][k].eta() << " phi " << vec[j][k].phi() << std::endl;
1182 #endif
1183  fillHist(j, vec[j][k]);
1184  }
1185  }
1186 
1187  double deta, dphi, dr;
1189  for (int lvl=1; lvl<3; lvl++) {
1190  for (unsigned int i=0; i<vec[lvl].size(); i++) {
1191  deta = dEta(vec[0][0],vec[lvl][i]);
1192  dphi = dPhi(vec[0][0],vec[lvl][i]);
1193  dr = dR(vec[0][0],vec[lvl][i]);
1194 #ifdef DebugLog
1195  if (verbosity%10 > 1) std::cout << "lvl " <<lvl << " i " << i << " deta " << deta << " dphi " << dphi << " dR " << dr << std::endl;
1196 #endif
1197  h_dEtaL1[lvl-1] -> Fill(deta);
1198  h_dPhiL1[lvl-1] -> Fill(dphi);
1199  h_dRL1[lvl-1] -> Fill(std::sqrt(dr));
1200  }
1201  }
1202 
1203  math::XYZTLorentzVector mindRvec;
1204  double mindR;
1205  for (unsigned int k=0; k<vec[2].size(); ++k) {
1207  mindR=999.9;
1208 #ifdef DebugLog
1209  if (verbosity%10 > 1) std::cout << "L3obj: pt " << vec[2][k].pt() << " eta " << vec[2][k].eta() << " phi " << vec[2][k].phi() << std::endl;
1210 #endif
1211  for (unsigned int j=0; j<vec[1].size(); j++) {
1212  dr = dR(vec[2][k],vec[1][j]);
1213  if (dr<mindR) {
1214  mindR=dr;
1215  mindRvec=vec[1][j];
1216  }
1217  }
1218  fillDifferences(0, vec[2][k], mindRvec, (verbosity%10 >0));
1219  if (mindR < 0.03) {
1220  fillDifferences(1, vec[2][k], mindRvec, (verbosity%10 >0));
1221  fillHist(6, mindRvec);
1222  fillHist(8, vec[2][k]);
1223  } else {
1224  fillDifferences(2, vec[2][k], mindRvec, (verbosity%10 >0));
1225  fillHist(7, mindRvec);
1226  fillHist(9, vec[2][k]);
1227  }
1228 
1230  mindR=999.9;
1231 #ifdef DebugLog
1232  if (verbosity%10 > 0)
1233  std::cout << "Now Matching L3 track with reco: L3 Track (eta, phi) "
1234  << vec[2][k].eta() << ":" << vec[2][k].phi() << " L2 Track "
1235  << mindRvec.eta() << ":" << mindRvec.phi() << " dR "
1236  << mindR << std::endl;
1237 #endif
1238  reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1239  if (trkCollection.isValid()) {
1240  double mindP(9999.9);
1241  reco::TrackCollection::const_iterator trkItr;
1242  for (trkItr=trkCollection->begin();
1243  trkItr!=trkCollection->end(); trkItr++) {
1244  math::XYZTLorentzVector v4(trkItr->px(), trkItr->py(),
1245  trkItr->pz(), trkItr->p());
1246  double deltaR = dR(v4, vec[2][k]);
1247  double dp = std::abs(v4.r()/vec[2][k].r()-1.0);
1248  if (deltaR<mindR) {
1249  mindR = deltaR;
1250  mindP = dp;
1251  mindRvec = v4;
1252  goodTk = trkItr;
1253  }
1254 #ifdef DebugLog
1255  if ((verbosity/10)%10>1 && deltaR<1.0) {
1256  std::cout << "reco track: pt " << v4.pt() << " eta " << v4.eta()
1257  << " phi " << v4.phi() << " DR " << deltaR
1258  << std::endl;
1259  }
1260 #endif
1261  }
1262 #ifdef DebugLog
1263  if (verbosity%10 > 0)
1264  std::cout << "Now Matching at Reco level in step 1 DR: " << mindR
1265  << ":" << mindP << " eta:phi " << mindRvec.eta() << ":"
1266  << mindRvec.phi() << std::endl;
1267 #endif
1268  if (mindR < 0.03 && mindP > 0.1) {
1269  for (trkItr=trkCollection->begin();
1270  trkItr!=trkCollection->end(); trkItr++) {
1271  math::XYZTLorentzVector v4(trkItr->px(), trkItr->py(),
1272  trkItr->pz(), trkItr->p());
1273  double deltaR = dR(v4, vec[2][k]);
1274  double dp = std::abs(v4.r()/vec[2][k].r()-1.0);
1275  if (dp<mindP && deltaR<0.03) {
1276  mindR = deltaR;
1277  mindP = dp;
1278  mindRvec = v4;
1279  goodTk = trkItr;
1280  }
1281  }
1282 #ifdef DebugLog
1283  if (verbosity%10 > 0)
1284  std::cout << "Now Matching at Reco level in step 2 DR: " << mindR
1285  << ":" << mindP << " eta:phi " << mindRvec.eta() << ":"
1286  << mindRvec.phi() << std::endl;
1287 #endif
1288  }
1289  fillDifferences(3, vec[2][k], mindRvec, (verbosity%10 >0));
1290  fillHist(3, mindRvec);
1291  if(mindR < 0.03) {
1292  fillDifferences(4, vec[2][k], mindRvec, (verbosity%10 >0));
1293  fillHist(4, mindRvec);
1294  } else {
1295  fillDifferences(5, vec[2][k], mindRvec, (verbosity%10 >0));
1296  fillHist(5, mindRvec);
1297  }
1298  if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1299  }
1300  }
1301 }
TH1D * h_dEtaL1[2]
Definition: IsoTrig.h:226
std::vector< math::XYZTLorentzVector > vec[3]
Definition: IsoTrig.h:233
TH1D * h_dPhiL1[2]
Definition: IsoTrig.h:226
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int verbosity
Definition: IsoTrig.h:129
void fillHist(int, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1622
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:74
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1684
int k[5][pyjets_maxn]
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
auto dp
Definition: deltaR.h:22
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1680
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1696
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
Definition: IsoTrig.cc:1629
TH1D * h_dRL1[2]
Definition: IsoTrig.h:226
void IsoTrig::StudyTrkEbyP ( edm::Handle< reco::TrackCollection > &  trkCollection)
private

Definition at line 831 of file IsoTrig.cc.

References a_charIsoR, a_coneR, a_mipR, a_neutR1, a_neutR2, barrelRecHitsHandle, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH, spr::chargeIsolationCone(), gather_cfg::cout, cutCharge, cutMip, cutNeutral, reco::e1, reco::e2, 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().

831  {
832 
833  t_TrkselTkFlag->clear();
834  t_TrkqltyFlag->clear();
835  t_TrkMissFlag->clear();
836  t_TrkPVFlag->clear();
837  t_TrkNuIsolFlag->clear();
838  t_TrkhCone->clear();
839  t_TrkP->clear();
840 
841  if (!trkCollection.isValid()) {
842 #ifdef DebugLog
843  std::cout << "trkCollection.isValid is false" << std::endl;
844 #endif
845  } else {
846  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
847  const MagneticField *bField = bFieldH.product();
848  const CaloGeometry* geo = pG.product();
849  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
850  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDirections1, ((verbosity/100)%10>2));
851  unsigned int nTracks=0;
852  int nRH_eMipDR=0, nNearTRKs=0;
853  std::vector<bool> selFlags;
854  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
855  double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
856  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
857 #ifdef DebugLog
858  if (verbosity%10>0) std::cout << "track no. " << nTracks << " p(): " << pTrack->p() << std::endl;
859 #endif
860  if (pTrack->p() > 20) {
861  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(),
862  pTrack->pz(), pTrack->p());
864  trkDetItr->pointHCAL, trkDetItr->pointECAL,
865  a_mipR, trkDetItr->directionECAL, nRH_eMipDR);
866  bool selectTk = spr::goodTrack(pTrack,leadPV,selectionParameters,((verbosity/100)%10>1));
868  oneCutParameters.maxDxyPV = 10;
869  oneCutParameters.maxDzPV = 100;
870  oneCutParameters.maxInMiss = 2;
871  oneCutParameters.maxOutMiss= 2;
872  bool qltyFlag = spr::goodTrack(pTrack,leadPV,oneCutParameters,((verbosity/100)%10>1));
873  oneCutParameters = selectionParameters;
874  oneCutParameters.maxDxyPV = 10;
875  oneCutParameters.maxDzPV = 100;
876  bool qltyMissFlag = spr::goodTrack(pTrack,leadPV,oneCutParameters,((verbosity/100)%10>1));
877  oneCutParameters = selectionParameters;
878  oneCutParameters.maxInMiss = 2;
879  oneCutParameters.maxOutMiss= 2;
880  bool qltyPVFlag = spr::goodTrack(pTrack,leadPV,oneCutParameters,((verbosity/100)%10>1));
881 #ifdef DebugLog
882  /*
883  std::cout << "sel " << selectTk << std::endl;
884  std::cout << "ntracks " << nTracks;
885  std::cout << " a_charIsoR " << a_charIsoR;
886  std::cout << " nNearTRKs " << nNearTRKs << std::endl;
887  */
888 #endif
889  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections1, a_charIsoR, nNearTRKs, ((verbosity/100)%10>1));
890 #ifdef DebugLog
891  /*
892  std::cout << "coneh " << conehmaxNearP << std::endl;
893  std::cout << "ok " << trkDetItr->okECAL << " " << trkDetItr->okHCAL << std::endl;
894  */
895 #endif
897  trkDetItr->pointHCAL, trkDetItr->pointECAL,
898  a_neutR1, trkDetItr->directionECAL, nRH_eMipDR);
900  trkDetItr->pointHCAL, trkDetItr->pointECAL,
901  a_neutR2, trkDetItr->directionECAL, nRH_eMipDR);
902  double e_inCone = e2 - e1;
903  bool chgIsolFlag = (conehmaxNearP < cutCharge);
904  bool mipFlag = (eMipDR < cutMip);
905  bool neuIsolFlag = (e_inCone < cutNeutral);
906  bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
907  selFlags.clear();
908  selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
909  selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
910 #ifdef DebugLog
911  if (verbosity%10>0) std::cout << "emip: " << eMipDR << "<" << cutMip << "(" << mipFlag << ")"
912  << " ; ok: " << trkDetItr->okECAL << "/" << trkDetItr->okHCAL
913  << " ; chgiso: " << conehmaxNearP << "<" << cutCharge << "(" << chgIsolFlag << ")" << std::endl;
914 #endif
915 
916  if(chgIsolFlag && mipFlag && trkpropFlag) {
917  double distFromHotCell=-99.0;
918  int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
919  GlobalPoint gposHotCell(0.,0.,0.);
920  std::vector<DetId> coneRecHitDetIds;
921  hCone = spr::eCone_hcal(geo, hbhe, trkDetItr->pointHCAL,
922  trkDetItr->pointECAL,
923  a_coneR, trkDetItr->directionHCAL,
924  nRecHitsCone, coneRecHitDetIds,
925  distFromHotCell, ietaHotCell, iphiHotCell,
926  gposHotCell, -1);
927  // push vectors into the Tree
928  t_TrkselTkFlag ->push_back(selFlags[0]);
929  t_TrkqltyFlag ->push_back(selFlags[1]);
930  t_TrkMissFlag ->push_back(selFlags[2]);
931  t_TrkPVFlag ->push_back(selFlags[3]);
932  t_TrkNuIsolFlag->push_back(neuIsolFlag);
933  t_TrkhCone ->push_back(hCone);
934  t_TrkP ->push_back(pTrack->p());
935  }
936  }
937  }
938 #ifdef DebugLog
939  if (verbosity%10>0) std::cout << "Filling " << t_TrkP->size() << " tracks in TrkRestree out of " << nTracks << std::endl;
940 #endif
941  }
942  TrkResTree->Fill();
943 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
const unsigned int nTracks(const reco::Vertex &sv)
double a_coneR
Definition: IsoTrig.h:136
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle
Definition: IsoTrig.h:162
std::string theTrackQuality
Definition: IsoTrig.h:135
math::XYZPoint leadPV
Definition: IsoTrig.h:166
std::vector< double > * t_TrkhCone
Definition: IsoTrig.h:178
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:622
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int verbosity
Definition: IsoTrig.h:129
edm::ESHandle< CaloGeometry > pG
Definition: IsoTrig.h:160
edm::Handle< HBHERecHitCollection > hbhe
Definition: IsoTrig.h:161
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.h:184
double a_mipR
Definition: IsoTrig.h:136
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.h:183
double cutNeutral
Definition: IsoTrig.h:137
double a_charIsoR
Definition: IsoTrig.h:136
std::vector< double > * t_TrkP
Definition: IsoTrig.h:179
double cutCharge
Definition: IsoTrig.h:137
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:74
double a_neutR2
Definition: IsoTrig.h:137
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
Float e1
Definition: deltaR.h:20
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.h:182
spr::trackSelectionParameters selectionParameters
Definition: IsoTrig.h:134
Float e2
Definition: deltaR.h:21
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.h:181
double a_neutR1
Definition: IsoTrig.h:137
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle
Definition: IsoTrig.h:163
TTree * TrkResTree
Definition: IsoTrig.h:172
edm::ESHandle< MagneticField > bFieldH
Definition: IsoTrig.h:159
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.h:180
T const * product() const
Definition: ESHandle.h:86
double cutMip
Definition: IsoTrig.h:137
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
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, bool useRaw=false, bool debug=false)

Member Data Documentation

double IsoTrig::a_charIsoR
private
double IsoTrig::a_coneR
private

Definition at line 136 of file IsoTrig.h.

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

double IsoTrig::a_mipR
private

Definition at line 136 of file IsoTrig.h.

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

double IsoTrig::a_neutIsoR
private

Definition at line 136 of file IsoTrig.h.

Referenced by IsoTrig().

double IsoTrig::a_neutR1
private

Definition at line 137 of file IsoTrig.h.

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

double IsoTrig::a_neutR2
private

Definition at line 137 of file IsoTrig.h.

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

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

Definition at line 162 of file IsoTrig.h.

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

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

Definition at line 164 of file IsoTrig.h.

Referenced by analyze().

edm::ESHandle<MagneticField> IsoTrig::bFieldH
private
double IsoTrig::bfVal
private

Definition at line 130 of file IsoTrig.h.

Referenced by analyze(), and GetEtaPhiAtEcal().

bool IsoTrig::changed
private

Definition at line 170 of file IsoTrig.h.

Referenced by analyze(), and beginRun().

TTree * IsoTrig::ChgIsolnTree
private

Definition at line 172 of file IsoTrig.h.

Referenced by beginJob(), and chgIsolation().

double IsoTrig::cutCharge
private

Definition at line 137 of file IsoTrig.h.

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

double IsoTrig::cutMip
private

Definition at line 137 of file IsoTrig.h.

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

double IsoTrig::cutNeutral
private

Definition at line 137 of file IsoTrig.h.

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

bool IsoTrig::doChgIsolTree
private

Definition at line 128 of file IsoTrig.h.

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

bool IsoTrig::doL2L3
private

Definition at line 127 of file IsoTrig.h.

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

bool IsoTrig::doMipCutTree
private

Definition at line 127 of file IsoTrig.h.

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

bool IsoTrig::doStudyIsol
private

Definition at line 128 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

bool IsoTrig::doTiming
private

Definition at line 127 of file IsoTrig.h.

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

bool IsoTrig::doTrkResTree
private

Definition at line 128 of file IsoTrig.h.

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

double IsoTrig::dr_L1
private

Definition at line 136 of file IsoTrig.h.

Referenced by IsoTrig(), and studyIsolation().

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

Definition at line 163 of file IsoTrig.h.

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

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

Definition at line 171 of file IsoTrig.h.

Referenced by beginJob(), and endJob().

TH1I * IsoTrig::g_Accepts
private

Definition at line 232 of file IsoTrig.h.

Referenced by endJob().

TH1I* IsoTrig::g_Pre
private

Definition at line 232 of file IsoTrig.h.

Referenced by endJob().

TH1I * IsoTrig::g_PreHLT
private

Definition at line 232 of file IsoTrig.h.

Referenced by endJob().

TH1I * IsoTrig::g_PreL1
private

Definition at line 232 of file IsoTrig.h.

Referenced by endJob().

TH1D* IsoTrig::h_dEta[9]
private

Definition at line 227 of file IsoTrig.h.

Referenced by beginJob(), and fillDifferences().

TH1D* IsoTrig::h_dEtaL1[2]
private

Definition at line 226 of file IsoTrig.h.

Referenced by beginJob(), and studyTrigger().

TH1D* IsoTrig::h_dinvPt[9]
private

Definition at line 228 of file IsoTrig.h.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dP[9]
private

Definition at line 227 of file IsoTrig.h.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dPhi[9]
private

Definition at line 227 of file IsoTrig.h.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dPhiL1[2]
private

Definition at line 226 of file IsoTrig.h.

Referenced by beginJob(), and studyTrigger().

TH1D * IsoTrig::h_dPt[9]
private

Definition at line 227 of file IsoTrig.h.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dRL1[2]
private

Definition at line 226 of file IsoTrig.h.

Referenced by beginJob(), and studyTrigger().

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

Definition at line 231 of file IsoTrig.h.

Referenced by beginJob(), and fillEnergy().

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

Definition at line 231 of file IsoTrig.h.

Referenced by beginJob(), and fillEnergy().

TH1D* IsoTrig::h_eMaxNearP[2]
private

Definition at line 229 of file IsoTrig.h.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_eMip[2]
private

Definition at line 228 of file IsoTrig.h.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_eNeutIso[2]
private

Definition at line 229 of file IsoTrig.h.

Referenced by beginJob(), and fillCuts().

TH1D* IsoTrig::h_EnIn
private

Definition at line 220 of file IsoTrig.h.

Referenced by beginJob(), and studyMipCut().

TH1D * IsoTrig::h_EnOut
private

Definition at line 220 of file IsoTrig.h.

Referenced by beginJob(), and studyMipCut().

TH1D * IsoTrig::h_eta[20]
private

Definition at line 225 of file IsoTrig.h.

Referenced by beginJob(), and fillHist().

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

Definition at line 230 of file IsoTrig.h.

Referenced by beginJob(), and fillCuts().

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

Definition at line 230 of file IsoTrig.h.

Referenced by beginJob(), and fillCuts().

TH1I * IsoTrig::h_Filters
private

Definition at line 223 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_HLT
private

Definition at line 222 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_L1ObjEnergy
private

Definition at line 224 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_mindR[9]
private

Definition at line 228 of file IsoTrig.h.

Referenced by beginJob(), and fillDifferences().

TH2D* IsoTrig::h_MipEnMatch
private

Definition at line 221 of file IsoTrig.h.

Referenced by beginJob(), and studyMipCut().

TH2D * IsoTrig::h_MipEnNoMatch
private

Definition at line 221 of file IsoTrig.h.

Referenced by beginJob(), and studyMipCut().

TH1I* IsoTrig::h_nHLT
private

Definition at line 222 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_nL3Objs
private

Definition at line 223 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1D* IsoTrig::h_p[20]
private

Definition at line 225 of file IsoTrig.h.

Referenced by beginJob(), and fillHist().

TH1D * IsoTrig::h_phi[20]
private

Definition at line 225 of file IsoTrig.h.

Referenced by beginJob(), and fillHist().

TH1I* IsoTrig::h_Pre
private

Definition at line 223 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_PreHLT
private

Definition at line 222 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_PreHLTwt
private

Definition at line 224 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_PreL1
private

Definition at line 222 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1D* IsoTrig::h_PreL1wt
private

Definition at line 224 of file IsoTrig.h.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_pt[20]
private

Definition at line 225 of file IsoTrig.h.

Referenced by beginJob(), and fillHist().

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

Definition at line 161 of file IsoTrig.h.

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

HLTPrescaleProvider IsoTrig::hltPrescaleProvider_
private

Definition at line 123 of file IsoTrig.h.

Referenced by analyze(), and beginRun().

edm::InputTag IsoTrig::L1candTag_
private

Definition at line 125 of file IsoTrig.h.

Referenced by IsoTrig().

edm::InputTag IsoTrig::L2candTag_
private

Definition at line 125 of file IsoTrig.h.

Referenced by IsoTrig().

math::XYZPoint IsoTrig::leadPV
private
int IsoTrig::maxRunNo
private

Definition at line 138 of file IsoTrig.h.

Referenced by endJob(), and IsoTrig().

double IsoTrig::minPTrackValue_
private

Definition at line 132 of file IsoTrig.h.

Referenced by chgIsolation(), and IsoTrig().

int IsoTrig::minRunNo
private

Definition at line 138 of file IsoTrig.h.

Referenced by endJob(), and IsoTrig().

TTree* IsoTrig::MipCutTree
private

Definition at line 172 of file IsoTrig.h.

Referenced by beginJob(), and studyMipCut().

edm::ESHandle<CaloGeometry> IsoTrig::pG
private
edm::InputTag IsoTrig::PixcandTag_
private

Definition at line 125 of file IsoTrig.h.

Referenced by IsoTrig().

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

Definition at line 131 of file IsoTrig.h.

Referenced by chgIsolation(), and IsoTrig().

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

Definition at line 158 of file IsoTrig.h.

Referenced by analyze(), and studyTiming().

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

Definition at line 158 of file IsoTrig.h.

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

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

Definition at line 126 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

double IsoTrig::pLimits[6]
private

Definition at line 139 of file IsoTrig.h.

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

double IsoTrig::prelimCone_
private

Definition at line 133 of file IsoTrig.h.

Referenced by chgIsolation(), and IsoTrig().

std::string IsoTrig::processName
private
double IsoTrig::rEB_
private

Definition at line 130 of file IsoTrig.h.

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

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

Definition at line 165 of file IsoTrig.h.

Referenced by analyze(), and chgIsolation().

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

Definition at line 218 of file IsoTrig.h.

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

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

Definition at line 202 of file IsoTrig.h.

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

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

Definition at line 200 of file IsoTrig.h.

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

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

Definition at line 198 of file IsoTrig.h.

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

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

Definition at line 201 of file IsoTrig.h.

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

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

Definition at line 199 of file IsoTrig.h.

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

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

Definition at line 207 of file IsoTrig.h.

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

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

Definition at line 205 of file IsoTrig.h.

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

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

Definition at line 203 of file IsoTrig.h.

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

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

Definition at line 206 of file IsoTrig.h.

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

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

Definition at line 204 of file IsoTrig.h.

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

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

Definition at line 215 of file IsoTrig.h.

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

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

Definition at line 209 of file IsoTrig.h.

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

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

Definition at line 208 of file IsoTrig.h.

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

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

Definition at line 217 of file IsoTrig.h.

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

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

Definition at line 212 of file IsoTrig.h.

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

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

Definition at line 216 of file IsoTrig.h.

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

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

Definition at line 214 of file IsoTrig.h.

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

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

Definition at line 213 of file IsoTrig.h.

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

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

Definition at line 211 of file IsoTrig.h.

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

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

Definition at line 210 of file IsoTrig.h.

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

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

Definition at line 176 of file IsoTrig.h.

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

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

Definition at line 174 of file IsoTrig.h.

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

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

Definition at line 175 of file IsoTrig.h.

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

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

Definition at line 188 of file IsoTrig.h.

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

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

Definition at line 190 of file IsoTrig.h.

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

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

Definition at line 186 of file IsoTrig.h.

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

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

Definition at line 189 of file IsoTrig.h.

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

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

Definition at line 187 of file IsoTrig.h.

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

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

Definition at line 193 of file IsoTrig.h.

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

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

Definition at line 195 of file IsoTrig.h.

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

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

Definition at line 191 of file IsoTrig.h.

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

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

Definition at line 194 of file IsoTrig.h.

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

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

Definition at line 192 of file IsoTrig.h.

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

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

Definition at line 196 of file IsoTrig.h.

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

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

Definition at line 173 of file IsoTrig.h.

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

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

Definition at line 178 of file IsoTrig.h.

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

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

Definition at line 182 of file IsoTrig.h.

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

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

Definition at line 184 of file IsoTrig.h.

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

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

Definition at line 179 of file IsoTrig.h.

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

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

Definition at line 183 of file IsoTrig.h.

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

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

Definition at line 181 of file IsoTrig.h.

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

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

Definition at line 180 of file IsoTrig.h.

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

double IsoTrig::tauUnbiasCone_
private

Definition at line 133 of file IsoTrig.h.

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

std::string IsoTrig::theTrackQuality
private
TTree * IsoTrig::TimingTree
private

Definition at line 172 of file IsoTrig.h.

Referenced by beginJob(), and studyTiming().

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

Definition at line 146 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 147 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 148 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 144 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 149 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

Definition at line 143 of file IsoTrig.h.

Referenced by IsoTrig().

Definition at line 154 of file IsoTrig.h.

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

Definition at line 155 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 140 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

Definition at line 153 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 156 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 145 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 151 of file IsoTrig.h.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 151 of file IsoTrig.h.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 152 of file IsoTrig.h.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 141 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 142 of file IsoTrig.h.

Referenced by analyze(), and IsoTrig().

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

Definition at line 150 of file IsoTrig.h.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 150 of file IsoTrig.h.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 168 of file IsoTrig.h.

Referenced by analyze(), and endJob().

std::vector<std::string> IsoTrig::trigNames
private

Definition at line 124 of file IsoTrig.h.

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

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

Definition at line 169 of file IsoTrig.h.

Referenced by analyze(), and endJob().

TTree * IsoTrig::TrkResTree
private

Definition at line 172 of file IsoTrig.h.

Referenced by beginJob(), and StudyTrkEbyP().

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

Definition at line 233 of file IsoTrig.h.

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

int IsoTrig::verbosity
private
double IsoTrig::vtxCutIsol_
private

Definition at line 132 of file IsoTrig.h.

Referenced by chgIsolation(), and IsoTrig().

double IsoTrig::vtxCutSeed_
private

Definition at line 132 of file IsoTrig.h.

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

double IsoTrig::zEE_
private

Definition at line 130 of file IsoTrig.h.

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