CMS 3D CMS Logo

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

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

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

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void chgIsolation (double &etaTriggered, double &phiTriggered, edm::Handle< reco::TrackCollection > &trkCollection, const edm::Event &theEvent)
 
void clearChgIsolnTreeVectors ()
 
void clearMipCutTreeVectors ()
 
double dEta (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dinvPt (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dP (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dPhi (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dPt (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
double dR (math::XYZTLorentzVector &, math::XYZTLorentzVector &)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
std::pair< double, double > etaPhiTrigger ()
 
void fillCuts (int, double, double, double, math::XYZTLorentzVector &, int, bool)
 
void fillDifferences (int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
 
void fillEnergy (int, int, double, double, math::XYZTLorentzVector &)
 
void fillHist (int, math::XYZTLorentzVector &)
 
double getDistInCM (double eta1, double phi1, double eta2, double phi2)
 
std::pair< double, double > GetEtaPhiAtEcal (double etaIP, double phiIP, double pT, int charge, double vtxZ)
 
void getGoodTracks (const edm::Event &, edm::Handle< reco::TrackCollection > &)
 
void pushChgIsolnTreeVecs (math::XYZTLorentzVector &Pixcand, math::XYZTLorentzVector &Trkcand, std::vector< double > &PixMaxP, double &TrkMaxP, bool &selTk)
 
void pushMipCutTreeVecs (math::XYZTLorentzVector &NFcand, math::XYZTLorentzVector &Trkcand, double &EmipNFcand, double &EmipTrkcand, double &mindR, double &mindP1, std::vector< bool > &Flags, double hCone)
 
void studyIsolation (edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
 
void studyMipCut (edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
 
void studyTiming (const edm::Event &theEvent)
 
void studyTrigger (edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
 
void StudyTrkEbyP (edm::Handle< reco::TrackCollection > &trkCollection)
 

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 96 of file IsoTrig.cc.

Constructor & Destructor Documentation

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

Definition at line 267 of file IsoTrig.cc.

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

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

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

399  {
400  // do anything here that needs to be done at desctruction time
401  // (e.g. close files, deallocate resources etc.)
402  if (t_timeL2Prod) delete t_timeL2Prod;
403  if (t_nPixCand) delete t_nPixCand;
404  if (t_nPixSeed) delete t_nPixSeed;
405  if (t_nGoodTk) delete t_nGoodTk;
406  if (t_TrkhCone) delete t_TrkhCone;
407  if (t_TrkP) delete t_TrkP;
408  if (t_TrkselTkFlag) delete t_TrkselTkFlag;
409  if (t_TrkqltyFlag) delete t_TrkqltyFlag;
410  if (t_TrkMissFlag) delete t_TrkMissFlag;
411  if (t_TrkPVFlag) delete t_TrkPVFlag;
412  if (t_TrkNuIsolFlag) delete t_TrkNuIsolFlag;
413  if (t_PixcandP) delete t_PixcandP;
414  if (t_PixcandPt) delete t_PixcandPt;
415  if (t_PixcandEta) delete t_PixcandEta;
416  if (t_PixcandPhi) delete t_PixcandPhi;
417  if (t_PixcandMaxP) delete t_PixcandMaxP;
418  if (t_PixTrkcandP) delete t_PixTrkcandP;
419  if (t_PixTrkcandPt) delete t_PixTrkcandPt;
420  if (t_PixTrkcandEta) delete t_PixTrkcandEta;
421  if (t_PixTrkcandPhi) delete t_PixTrkcandPhi;
424  if (t_NFcandP) delete t_NFcandP;
425  if (t_NFcandPt) delete t_NFcandPt;
426  if (t_NFcandEta) delete t_NFcandEta;
427  if (t_NFcandPhi) delete t_NFcandPhi;
428  if (t_NFcandEmip) delete t_NFcandEmip;
429  if (t_NFTrkcandP) delete t_NFTrkcandP;
430  if (t_NFTrkcandPt) delete t_NFTrkcandPt;
431  if (t_NFTrkcandEta) delete t_NFTrkcandEta;
432  if (t_NFTrkcandPhi) delete t_NFTrkcandPhi;
433  if (t_NFTrkcandEmip) delete t_NFTrkcandEmip;
434  if (t_NFTrkMinDR) delete t_NFTrkMinDR;
435  if (t_NFTrkMinDP1) delete t_NFTrkMinDP1;
437  if (t_NFTrkqltyFlag) delete t_NFTrkqltyFlag;
438  if (t_NFTrkMissFlag) delete t_NFTrkMissFlag;
439  if (t_NFTrkPVFlag) delete t_NFTrkPVFlag;
440  if (t_NFTrkPropFlag) delete t_NFTrkPropFlag;
443  if (t_NFTrkMipFlag) delete t_NFTrkMipFlag;
444  if (t_ECone) delete t_ECone;
445 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:243
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:224
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:221
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:238
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:242
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:226
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:235
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:228
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:205
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:208
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:241
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:225
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:240
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:216
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:239
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:233
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:214
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:213
std::vector< double > * t_ECone
Definition: IsoTrig.cc:248
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:209
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:230
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:203
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:217
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:232
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:236
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:212
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:204
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:234
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:222
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:229
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:211
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:220
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:237
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:218
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:219
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:223
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:206
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:210
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:231

Member Function Documentation

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

Definition at line 495 of file IsoTrig.cc.

References barrelRecHitsHandle_, beamSpotH_, ecalTB2006H4_GenSimDigiReco_cfg::bField, g4SimHits_cfi::BField, bFieldH_, bfVal_, edm::EventBase::bunchCrossing(), changed_, chgIsolation(), hitfit::clear(), doChgIsolTree_, doL2L3_, doMipCutTree_, doStudyIsol_, doTiming_, doTrkResTree_, endcapRecHitsHandle_, trigger::TriggerObject::energy(), trigger::TriggerObject::eta(), fastmath::etaphi(), etaPhiTrigger(), edm::EventID::event(), 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, label, edm::InputTag::label(), leadPV_, edm::EventBase::luminosityBlock(), lumiProducer_cfi::lumiProducer, LumiDetails::lumiValue(), PV3DBase< T, PVType, FrameType >::mag(), trigger::TriggerObject::mass(), HLTConfigProvider::moduleLabels(), electrons_cff::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.

495  {
496 
497  if (verbosity_%10 > 0)
498  edm::LogVerbatim("IsoTrack") << "Event starts====================================";
499 
500  int RunNo = iEvent.id().run();
501 
503 
504  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH_);
505  iSetup.get<CaloGeometryRecord>().get(pG_);
506  const MagneticField *bField = bFieldH_.product();
507  GlobalVector BField=bField->inTesla(GlobalPoint(0,0,0));
508  bfVal_ = BField.mag();
509 
510  trigger::TriggerEvent triggerEvent;
511  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
512  iEvent.getByToken(tok_trigEvt_, triggerEventHandle);
513  if (!triggerEventHandle.isValid()) {
514  edm::LogWarning("IsoTrack") << "Error! Can't get the product hltTriggerSummaryAOD";
515 
516  } else {
517  triggerEvent = *(triggerEventHandle.product());
518  }
519  const trigger::TriggerObjectCollection& TOC(triggerEvent.getObjects());
522  iEvent.getByToken(tok_trigRes_, triggerResults);
523 
525  iEvent.getByToken(tok_genTrack_, trkCollection);
526 
529 
530  iEvent.getByToken(tok_hbhe_, hbhe_);
531 
532  iEvent.getByToken(tok_recVtx_, recVtxs_);
533  iEvent.getByToken(tok_bs_, beamSpotH_);
534  if (!recVtxs_->empty() && !((*recVtxs_)[0].isFake())) {
535  leadPV_ = math::XYZPoint( (*recVtxs_)[0].x(),(*recVtxs_)[0].y(), (*recVtxs_)[0].z() );
536  } else if (beamSpotH_.isValid()) {
538  }
539 
540  if ((verbosity_/100)%10>0) {
541  edm::LogVerbatim("IsoTrack") << "Primary Vertex " << leadPV_;
542  if (beamSpotH_.isValid())
543  edm::LogVerbatim("IsoTrack") << "Beam Spot " << beamSpotH_->position();
544  }
545  pixelTrackRefsHE_.clear(); pixelTrackRefsHB_.clear();
546  for (unsigned int iPix=0; iPix<pixelTracksSources_.size(); iPix++) {
548  iEvent.getByToken(tok_pixtks_[iPix],iPixCol);
549  if(iPixCol.isValid()){
550  for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
551  if(iPix==0)
552  pixelTrackRefsHB_.push_back(reco::TrackRef(iPixCol,pit-iPixCol->begin()));
553  pixelTrackRefsHE_.push_back(reco::TrackRef(iPixCol,pit-iPixCol->begin()));
554  }
555  }
556  }
557  if (doTiming_) getGoodTracks(iEvent, trkCollection);
558 
559  for (unsigned int ifilter=0; ifilter<triggerEvent.sizeFilters();
560  ++ifilter) {
561  std::string FilterNames[7] = {"hltL1sL1SingleJet68", "hltIsolPixelTrackL2FilterHE", "ecalIsolPixelTrackFilterHE", "hltIsolPixelTrackL3FilterHE",
562  "hltIsolPixelTrackL2FilterHB", "ecalIsolPixelTrackFilterHB", "hltIsolPixelTrackL3FilterHB"};
563  std::string label = triggerEvent.filterTag(ifilter).label();
564  for(int i=0; i<7; i++) {
565  if(label==FilterNames[i]) h_Filters->Fill(i);
566  }
567  }
568  edm::InputTag lumiProducer("LumiProducer", "", "RECO");
570  iEvent.getLuminosityBlock().getByToken(tok_lumi_, Lumid);
571  float mybxlumi=-1;
572  if (Lumid.isValid())
573  mybxlumi=Lumid->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37;
574  if (verbosity_%10 > 0)
575  edm::LogVerbatim("IsoTrack") << "RunNo " << RunNo << " EvtNo "
576  << iEvent.id().event() << " Lumi "
577  << iEvent.luminosityBlock() << " Bunch "
578  << iEvent.bunchCrossing() << " mybxlumi "
579  << mybxlumi;
580  if (!triggerResults.isValid()) {
581  edm::LogWarning("IsoTrack") << "Error! Can't get the product triggerResults";
582  // boost::shared_ptr<cms::Exception> const & error = triggerResults.whyFailed();
583  // edm::LogWarning(error->category()) << error->what();
584  } else {
585  std::vector<std::string> modules;
586  h_nHLT->Fill(triggerResults->size());
587  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
588 
589  const std::vector<std::string> & triggerNames_ = triggerNames.triggerNames();
590  if (verbosity_%10 > 1)
591  edm::LogVerbatim("IsoTrack") << "number of HLTs " << triggerNames_.size();
592  int hlt(-1), preL1(-1), preHLT(-1), prescale(-1);
593  for (unsigned int i=0; i<triggerResults->size(); i++) {
594  unsigned int triggerindx = hltConfig.triggerIndex(triggerNames_[i]);
595  const std::vector<std::string>& moduleLabels(hltConfig.moduleLabels(triggerindx));
596 
597  for (unsigned int in=0; in<trigNames_.size(); ++in) {
598  // if (triggerNames_[i].find(trigNames_[in].c_str())!=std::string::npos || triggerNames_[i]==" ") {
599  if (triggerNames_[i].find(trigNames_[in])!=std::string::npos) {
600  if (verbosity_%10 > 0)
601  edm::LogVerbatim("IsoTrack") << "trigger that i want "
602  << triggerNames_[i] << " accept "
603  << triggerResults->accept(i);
604  hlt = triggerResults->accept(i);
605  h_HLT -> Fill(hlt);
606  // if (hlt>0 || triggerNames_[i]==" ") {
607  if (hlt>0) {
609  iEvent.getByToken(tok_pixtk_,Pixcands);
611  iEvent.getByToken(tok_l1cand_, L1cands);
612 
613  const std::pair<int,int> prescales(hltPrescaleProvider_.prescaleValues(iEvent,iSetup,triggerNames_[i]));
614  preL1 = prescales.first;
615  preHLT = prescales.second;
616  prescale = preL1*preHLT;
617  if (verbosity_%10 > 0)
618  edm::LogVerbatim("IsoTrack") << triggerNames_[i] << " accept "
619  << hlt << " preL1 " << preL1
620  << " preHLT " << preHLT;
621  for (int iv=0; iv<3; ++iv) vec_[iv].clear();
622  if (trigList_.find(RunNo) != trigList_.end() ) {
623  trigList_[RunNo] += 1;
624  } else {
625  trigList_.insert(std::pair<unsigned int, unsigned int>(RunNo,1));
626  trigPreList_.insert(std::pair<unsigned int, std::pair<int, int>>(RunNo,prescales));
627  }
628  //loop over all trigger filters in event (i.e. filters passed)
629  for (unsigned int ifilter=0; ifilter<triggerEvent.sizeFilters();
630  ++ifilter) {
631  std::vector<int> Keys;
632  std::string label = triggerEvent.filterTag(ifilter).label();
633  //loop over keys to objects passing this filter
634  for (unsigned int imodule=0; imodule<moduleLabels.size();
635  imodule++) {
636  if (label.find(moduleLabels[imodule]) != std::string::npos) {
637  if (verbosity_%10 > 0)
638  edm::LogVerbatim("IsoTrack") << "FILTERNAME " << label;
639  for (unsigned int ifiltrKey=0; ifiltrKey<triggerEvent.filterKeys(ifilter).size(); ++ifiltrKey) {
640  Keys.push_back(triggerEvent.filterKeys(ifilter)[ifiltrKey]);
641  const trigger::TriggerObject& TO(TOC[Keys[ifiltrKey]]);
642  math::XYZTLorentzVector v4(TO.px(), TO.py(), TO.pz(), TO.energy());
643  if (label.find("L2Filter") != std::string::npos) {
644  vec_[1].push_back(v4);
645  } else if (label.find("L3Filter") != std::string::npos) {
646  vec_[2].push_back(v4);
647  } else {
648  vec_[0].push_back(v4);
649  h_L1ObjEnergy->Fill(TO.energy());
650  }
651  if (verbosity_%10 > 0)
652  edm::LogVerbatim("IsoTrack") << "key " << ifiltrKey
653  << " : pt " << TO.pt()
654  << " eta " << TO.eta()
655  << " phi " << TO.phi()
656  << " mass " << TO.mass()
657  << " Id " << TO.id();
658  }
659  }
660  }
661  }
662  std::vector<reco::TrackCollection::const_iterator> goodTks;
663  if (doL2L3_) {
664  h_nL3Objs -> Fill(vec_[2].size());
665  studyTrigger(trkCollection, goodTks);
666  } else {
667  if (trkCollection.isValid()) {
668  reco::TrackCollection::const_iterator trkItr;
669  for (trkItr=trkCollection->begin();
670  trkItr!=trkCollection->end(); trkItr++)
671  goodTks.push_back(trkItr);
672  }
673  }
674  // Now study isolation etc
675  if (doStudyIsol_) studyIsolation(trkCollection, goodTks);
676  if (doTrkResTree_) StudyTrkEbyP(trkCollection);
677 
678  std::pair<double,double> etaphi = etaPhiTrigger();
680  iEvent.getByToken(tok_l2cand_,L2cands);
681  if (!L2cands.isValid()) {
682  if (verbosity_%10 > 0)
683  edm::LogVerbatim("IsoTrack") << " trigCand is not valid ";
684  } else {
685  if(doMipCutTree_) studyMipCut(trkCollection, L2cands);
686  }
687  if (!pixelTracksSources_.empty())
688  if(doChgIsolTree_ && !pixelTrackRefsHE_.empty()) chgIsolation(etaphi.first, etaphi.second, trkCollection, iEvent);
689  }
690  break;
691  }
692  }
693  }
694  h_PreL1 -> Fill(preL1);
695  h_PreHLT -> Fill(preHLT);
696  h_Pre -> Fill(prescale);
697  h_PreL1wt -> Fill(preL1, mybxlumi);
698  h_PreHLTwt -> Fill(preHLT, mybxlumi);
699 
700  // check if trigger names in (new) config
701  // edm::LogVerbatim("IsoTrack") << "changed " << changed_;
702  if (changed_) {
703  changed_ = false;
704  if ((verbosity_/10)%10 > 1) {
705  edm::LogVerbatim("IsoTrack") << "New trigger menu found !!!";
706  const unsigned int n(hltConfig.size());
707  for (unsigned itrig=0; itrig<triggerNames_.size(); itrig++) {
708  unsigned int triggerindx = hltConfig.triggerIndex(triggerNames_[itrig]);
709  if (triggerindx >= n)
710  edm::LogVerbatim("IsoTrack") << triggerNames_[itrig] << " "
711  << triggerindx << " does not exist in"
712  << " the current menu";
713  else
714  edm::LogVerbatim("IsoTrack") << triggerNames_[itrig] << " "
715  << triggerindx << " exists";
716  }
717  }
718  }
719  }
720  if (doTiming_) studyTiming(iEvent);
721 }
RunNumber_t run() const
Definition: EventID.h:39
unsigned int size() const
number of trigger paths in trigger table
size
Write out results.
bool changed_
Definition: IsoTrig.cc:199
EventNumber_t event() const
Definition: EventID.h:41
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_l2cand_
Definition: IsoTrig.cc:184
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:192
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:1720
const bool doChgIsolTree_
Definition: IsoTrig.cc:155
edm::EDGetTokenT< LumiDetails > tok_lumi_
Definition: IsoTrig.cc:168
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:190
std::vector< reco::TrackRef > pixelTrackRefsHB_
Definition: IsoTrig.cc:187
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:188
void studyIsolation(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
Definition: IsoTrig.cc:1585
const int verbosity_
Definition: IsoTrig.cc:156
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: IsoTrig.cc:175
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
std::map< unsigned int, const std::pair< int, int > > trigPreList_
Definition: IsoTrig.cc:198
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
int bunchCrossing() const
Definition: EventBase.h:64
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:191
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_pixtk_
Definition: IsoTrig.cc:182
edm::Handle< reco::BeamSpot > beamSpotH_
Definition: IsoTrig.cc:193
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:263
TH1I * h_HLT
Definition: IsoTrig.cc:252
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
std::pair< double, double > etaPhiTrigger()
Definition: IsoTrig.cc:2032
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
Definition: IsoTrig.cc:169
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
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:189
TH1D * h_L1ObjEnergy
Definition: IsoTrig.cc:254
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const std::vector< edm::InputTag > pixelTracksSources_
Definition: IsoTrig.cc:153
void studyMipCut(edm::Handle< reco::TrackCollection > &trkCollection, edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &L2cands)
Definition: IsoTrig.cc:1333
char const * label
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.cc:150
const bool doMipCutTree_
Definition: IsoTrig.cc:154
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
Definition: IsoTrig.cc:170
T mag() const
Definition: PV3DBase.h:67
void studyTrigger(edm::Handle< reco::TrackCollection > &, std::vector< reco::TrackCollection::const_iterator > &)
Definition: IsoTrig.cc:1461
TH1I * h_nHLT
Definition: IsoTrig.cc:252
std::map< unsigned int, unsigned int > trigList_
Definition: IsoTrig.cc:197
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
Definition: IsoTrig.cc:174
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.cc:172
TH1I * h_Pre
Definition: IsoTrig.cc:253
TH1I * h_PreHLT
Definition: IsoTrig.cc:252
std::vector< edm::EDGetTokenT< reco::TrackCollection > > tok_pixtks_
Definition: IsoTrig.cc:185
std::pair< T, T > etaphi(T x, T y, T z)
Definition: FastMath.h:128
TH1I * h_Filters
Definition: IsoTrig.cc:253
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:97
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: IsoTrig.cc:176
static std::string const triggerResults
Definition: EdmProvDump.cc:45
bool isValid() const
Definition: HandleBase.h:74
TH1D * h_PreL1wt
Definition: IsoTrig.cc:254
void studyTiming(const edm::Event &theEvent)
Definition: IsoTrig.cc:1222
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
const bool doTrkResTree_
Definition: IsoTrig.cc:155
std::vector< reco::TrackRef > pixelTrackRefsHE_
Definition: IsoTrig.cc:187
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
TH1I * h_PreL1
Definition: IsoTrig.cc:252
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.cc:173
void StudyTrkEbyP(edm::Handle< reco::TrackCollection > &trkCollection)
Definition: IsoTrig.cc:1102
T const * product() const
Definition: Handle.h:74
const bool doStudyIsol_
Definition: IsoTrig.cc:155
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< size_type > Keys
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
edm::Handle< reco::VertexCollection > recVtxs_
Definition: IsoTrig.cc:194
HLTConfigProvider const & hltConfigProvider() const
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:183
edm::EventID id() const
Definition: EventBase.h:59
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: IsoTrig.cc:177
T get() const
Definition: EventSetup.h:71
const Point & position() const
position
Definition: BeamSpot.h:62
const bool doTiming_
Definition: IsoTrig.cc:154
math::XYZPoint leadPV_
Definition: IsoTrig.cc:195
TH1I * h_nL3Objs
Definition: IsoTrig.cc:253
void getGoodTracks(const edm::Event &, edm::Handle< reco::TrackCollection > &)
Definition: IsoTrig.cc:1845
T const * product() const
Definition: ESHandle.h:86
const std::vector< std::string > trigNames_
Definition: IsoTrig.cc:151
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:256
double bfVal_
Definition: IsoTrig.cc:162
TH1D * h_PreHLTwt
Definition: IsoTrig.cc:254
const bool doL2L3_
Definition: IsoTrig.cc:154
void IsoTrig::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 809 of file IsoTrig.cc.

References ChgIsolnTree_, egammaForCoreTracking_cff::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, jets_cff::levels, TFileService::make(), MipCutTree_, pLimits_, AlCaHLTBitMon_QueryRunRegistry::string, t_ECone, t_NFcandEmip, t_NFcandEta, t_NFcandP, t_NFcandPhi, t_NFcandPt, t_NFTrkcandEmip, t_NFTrkcandEta, t_NFTrkcandP, t_NFTrkcandPhi, t_NFTrkcandPt, t_NFTrkChgIsoFlag, t_NFTrkMinDP1, t_NFTrkMinDR, t_NFTrkMipFlag, t_NFTrkMissFlag, t_NFTrkNeuIsoFlag, t_NFTrkPropFlag, t_NFTrkPVFlag, t_NFTrkqltyFlag, t_NFTrkselTkFlag, t_nGoodTk, t_nPixCand, t_nPixSeed, t_PixcandEta, t_PixcandMaxP, t_PixcandP, t_PixcandPhi, t_PixcandPt, t_PixTrkcandEta, t_PixTrkcandMaxP, t_PixTrkcandP, t_PixTrkcandPhi, t_PixTrkcandPt, t_PixTrkcandselTk, t_timeL2Prod, t_TrkhCone, t_TrkMissFlag, t_TrkNuIsolFlag, t_TrkP, t_TrkPVFlag, t_TrkqltyFlag, t_TrkselTkFlag, TimingTree_, and TrkResTree_.

809  {
810  char hname[100], htit[100];
811  std::string levels[20] = {"L1", "L2", "L3",
812  "Reco", "RecoMatch", "RecoNoMatch",
813  "L2Match", "L2NoMatch", "L3Match", "L3NoMatch",
814  "HLTTrk", "HLTGoodTrk", "HLTIsoTrk", "HLTMip",
815  "HLTSelect", "nonHLTTrk", "nonHLTGoodTrk",
816  "nonHLTIsoTrk", "nonHLTMip", "nonHLTSelect"};
817  if (doTiming_) {
818  TimingTree_ = fs_->make<TTree>("TimingTree", "TimingTree");
819  t_timeL2Prod = new std::vector<double>();
820  t_nPixCand = new std::vector<int>();
821  t_nPixSeed = new std::vector<int>();
822  t_nGoodTk = new std::vector<int>();
823 
824  TimingTree_->Branch("t_timeL2Prod", "std::vector<double>", &t_timeL2Prod);
825  TimingTree_->Branch("t_nPixCand", "std::vector<int>", &t_nPixCand);
826  TimingTree_->Branch("t_nPixSeed", "std::vector<int>", &t_nPixSeed);
827  TimingTree_->Branch("t_nGoodTk", "std::vector<int>", &t_nGoodTk);
828  }
829  if (doTrkResTree_) {
830  TrkResTree_ = fs_->make<TTree>("TrkRestree", "TrkResTree");
831  t_TrkhCone = new std::vector<double>();
832  t_TrkP = new std::vector<double>();
833  t_TrkselTkFlag = new std::vector<bool>();
834  t_TrkqltyFlag = new std::vector<bool>();
835  t_TrkMissFlag = new std::vector<bool>();
836  t_TrkPVFlag = new std::vector<bool>();
837  t_TrkNuIsolFlag= new std::vector<bool>();
838 
839  TrkResTree_->Branch("t_TrkhCone", "std::vector<double>", &t_TrkhCone);
840  TrkResTree_->Branch("t_TrkP", "std::vector<double>", &t_TrkP);
841  TrkResTree_->Branch("t_TrkselTkFlag", "std::vector<bool>", &t_TrkselTkFlag);
842  TrkResTree_->Branch("t_TrkqltyFlag", "std::vector<bool>", &t_TrkqltyFlag);
843  TrkResTree_->Branch("t_TrkMissFlag", "std::vector<bool>", &t_TrkMissFlag);
844  TrkResTree_->Branch("t_TrkPVFlag", "std::vector<bool>", &t_TrkPVFlag);
845  TrkResTree_->Branch("t_TrkNuIsolFlag","std::vector<bool>", &t_TrkNuIsolFlag);
846  }
847  if (doChgIsolTree_) {
848  ChgIsolnTree_ = fs_->make<TTree>("ChgIsolnTree", "ChgIsolnTree");
849  t_PixcandP = new std::vector<double>();
850  t_PixcandPt = new std::vector<double>();
851  t_PixcandEta = new std::vector<double>();
852  t_PixcandPhi = new std::vector<double>();
853  t_PixcandMaxP = new std::vector<std::vector<double> >();
854  t_PixTrkcandP = new std::vector<double>();
855  t_PixTrkcandPt = new std::vector<double>();
856  t_PixTrkcandEta = new std::vector<double>();
857  t_PixTrkcandPhi = new std::vector<double>();
858  t_PixTrkcandMaxP = new std::vector<double>();
859  t_PixTrkcandselTk = new std::vector<bool>();
860 
861  ChgIsolnTree_->Branch("t_PixcandP", "std::vector<double>", &t_PixcandP);
862  ChgIsolnTree_->Branch("t_PixcandPt", "std::vector<double>", &t_PixcandPt);
863  ChgIsolnTree_->Branch("t_PixcandEta", "std::vector<double>", &t_PixcandEta);
864  ChgIsolnTree_->Branch("t_PixcandPhi", "std::vector<double>", &t_PixcandPhi);
865  ChgIsolnTree_->Branch("t_PixcandMaxP", "std::vector<std::vector<double> >", &t_PixcandMaxP);
866  ChgIsolnTree_->Branch("t_PixTrkcandP", "std::vector<double>", &t_PixTrkcandP);
867  ChgIsolnTree_->Branch("t_PixTrkcandPt", "std::vector<double>", &t_PixTrkcandPt );
868  ChgIsolnTree_->Branch("t_PixTrkcandEta", "std::vector<double>", &t_PixTrkcandEta );
869  ChgIsolnTree_->Branch("t_PixTrkcandPhi", "std::vector<double>", &t_PixTrkcandPhi );
870  ChgIsolnTree_->Branch("t_PixTrkcandMaxP", "std::vector<double>", &t_PixTrkcandMaxP);
871  ChgIsolnTree_->Branch("t_PixTrkcandselTk","std::vector<bool>", &t_PixTrkcandselTk);
872  }
873  if (doMipCutTree_) {
874  MipCutTree_ = fs_->make<TTree>("MipCutTree", "MipCutTree");
875  t_NFcandP = new std::vector<double>();
876  t_NFcandPt = new std::vector<double>();
877  t_NFcandEta = new std::vector<double>();
878  t_NFcandPhi = new std::vector<double>();
879  t_NFcandEmip = new std::vector<double>();
880  t_NFTrkcandP = new std::vector<double>();
881  t_NFTrkcandPt = new std::vector<double>();
882  t_NFTrkcandEta = new std::vector<double>();
883  t_NFTrkcandPhi = new std::vector<double>();
884  t_NFTrkcandEmip = new std::vector<double>();
885  t_NFTrkMinDR = new std::vector<double>();
886  t_NFTrkMinDP1 = new std::vector<double>();
887  t_NFTrkselTkFlag = new std::vector<bool>();
888  t_NFTrkqltyFlag = new std::vector<bool>();
889  t_NFTrkMissFlag = new std::vector<bool>();
890  t_NFTrkPVFlag = new std::vector<bool>();
891  t_NFTrkPropFlag = new std::vector<bool>();
892  t_NFTrkChgIsoFlag= new std::vector<bool>();
893  t_NFTrkNeuIsoFlag= new std::vector<bool>();
894  t_NFTrkMipFlag = new std::vector<bool>();
895  t_ECone = new std::vector<double>();
896 
897  MipCutTree_->Branch("t_NFcandP", "std::vector<double>", &t_NFcandP);
898  MipCutTree_->Branch("t_NFcandPt", "std::vector<double>", &t_NFcandPt);
899  MipCutTree_->Branch("t_NFcandEta", "std::vector<double>", &t_NFcandEta);
900  MipCutTree_->Branch("t_NFcandPhi", "std::vector<double>", &t_NFcandPhi);
901  MipCutTree_->Branch("t_NFcandEmip", "std::vector<double>", &t_NFcandEmip);
902  MipCutTree_->Branch("t_NFTrkcandP", "std::vector<double>", &t_NFTrkcandP);
903  MipCutTree_->Branch("t_NFTrkcandPt", "std::vector<double>", &t_NFTrkcandPt );
904  MipCutTree_->Branch("t_NFTrkcandEta", "std::vector<double>", &t_NFTrkcandEta );
905  MipCutTree_->Branch("t_NFTrkcandPhi", "std::vector<double>", &t_NFTrkcandPhi );
906  MipCutTree_->Branch("t_NFTrkcandEmip", "std::vector<double>", &t_NFTrkcandEmip);
907  MipCutTree_->Branch("t_NFTrkMinDR", "std::vector<double>", &t_NFTrkMinDR);
908  MipCutTree_->Branch("t_NFTrkMinDP1", "std::vector<double>", &t_NFTrkMinDP1);
909  MipCutTree_->Branch("t_NFTrkselTkFlag", "std::vector<bool>", &t_NFTrkselTkFlag);
910  MipCutTree_->Branch("t_NFTrkqltyFlag", "std::vector<bool>", &t_NFTrkqltyFlag);
911  MipCutTree_->Branch("t_NFTrkMissFlag", "std::vector<bool>", &t_NFTrkMissFlag);
912  MipCutTree_->Branch("t_NFTrkPVFlag", "std::vector<bool>", &t_NFTrkPVFlag);
913  MipCutTree_->Branch("t_NFTrkPropFlag", "std::vector<bool>", &t_NFTrkPropFlag);
914  MipCutTree_->Branch("t_NFTrkChgIsoFlag","std::vector<bool>", &t_NFTrkChgIsoFlag);
915  MipCutTree_->Branch("t_NFTrkNeuIsoFlag","std::vector<bool>", &t_NFTrkNeuIsoFlag);
916  MipCutTree_->Branch("t_NFTrkMipFlag", "std::vector<bool>", &t_NFTrkMipFlag);
917  MipCutTree_->Branch("t_ECone", "std::vector<double>", &t_ECone);
918  }
919  h_Filters = fs_->make<TH1I>("h_Filters", "Filter Accepts", 10, 0, 10);
920  std::string FilterNames[7] = {"hltL1sL1SingleJet68", "hltIsolPixelTrackL2FilterHE", "ecalIsolPixelTrackFilterHE", "hltIsolPixelTrackL3FilterHE",
921  "hltIsolPixelTrackL2FilterHB", "ecalIsolPixelTrackFilterHB", "hltIsolPixelTrackL3FilterHB"};
922  for(int i=0; i<7; i++) {
923  h_Filters->GetXaxis()->SetBinLabel(i+1, FilterNames[i].c_str());
924  }
925 
926  h_nHLT = fs_->make<TH1I>("h_nHLT" , "Size of trigger Names", 1000, 1, 1000);
927  h_HLT = fs_->make<TH1I>("h_HLT" , "HLT accept", 3, -1, 2);
928  h_PreL1 = fs_->make<TH1I>("h_PreL1", "L1 Prescale", 500, 0, 500);
929  h_PreHLT = fs_->make<TH1I>("h_PreHLT", "HLT Prescale", 50, 0, 50);
930  h_Pre = fs_->make<TH1I>("h_Pre", "Prescale", 3000, 0, 3000);
931 
932  h_PreL1wt = fs_->make<TH1D>("h_PreL1wt", "Weighted L1 Prescale", 500, 0, 500);
933  h_PreHLTwt = fs_->make<TH1D>("h_PreHLTwt", "Weighted HLT Prescale", 500, 0, 100);
934  h_L1ObjEnergy = fs_->make<TH1D>("h_L1ObjEnergy", "Energy of L1Object", 500, 0.0, 500.0);
935 
936  h_EnIn = fs_->make<TH1D>("h_EnInEcal", "EnergyIn Ecal", 200, 0.0, 20.0);
937  h_EnOut = fs_->make<TH1D>("h_EnOutEcal", "EnergyOut Ecal", 200, 0.0, 20.0);
938  h_MipEnMatch = fs_->make<TH2D>("h_MipEnMatch", "MipEn: HLT level vs Reco Level (Matched)", 200, 0.0, 20.0, 200, 0.0, 20.0);
939  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);
940 
941  if (doL2L3_) {
942  h_nL3Objs = fs_->make<TH1I>("h_nL3Objs", "Number of L3 objects", 10, 0, 10);
943 
944  std::string pairs[9] = {"L2L3", "L2L3Match", "L2L3NoMatch", "L3Reco", "L3RecoMatch", "L3RecoNoMatch", "NewFilterReco", "NewFilterRecoMatch", "NewFilterRecoNoMatch"};
945  for (int ipair=0; ipair<9; ipair++) {
946  sprintf(hname, "h_dEta%s", pairs[ipair].c_str());
947  sprintf(htit, "#Delta#eta for %s", pairs[ipair].c_str());
948  h_dEta[ipair] = fs_->make<TH1D>(hname, htit, 200, -10.0, 10.0);
949  h_dEta[ipair]->GetXaxis()->SetTitle("d#eta");
950 
951  sprintf(hname, "h_dPhi%s", pairs[ipair].c_str());
952  sprintf(htit, "#Delta#phi for %s", pairs[ipair].c_str());
953  h_dPhi[ipair] = fs_->make<TH1D>(hname, htit, 140, -7.0, 7.0);
954  h_dPhi[ipair]->GetXaxis()->SetTitle("d#phi");
955 
956  sprintf(hname, "h_dPt%s", pairs[ipair].c_str());
957  sprintf(htit, "#Delta dp_{T} for %s objects", pairs[ipair].c_str());
958  h_dPt[ipair] = fs_->make<TH1D>(hname, htit, 400, -200.0, 200.0);
959  h_dPt[ipair]->GetXaxis()->SetTitle("dp_{T} (GeV)");
960 
961  sprintf(hname, "h_dP%s", pairs[ipair].c_str());
962  sprintf(htit, "#Delta p for %s objects", pairs[ipair].c_str());
963  h_dP[ipair] = fs_->make<TH1D>(hname, htit, 400, -200.0, 200.0);
964  h_dP[ipair]->GetXaxis()->SetTitle("dP (GeV)");
965 
966  sprintf(hname, "h_dinvPt%s", pairs[ipair].c_str());
967  sprintf(htit, "#Delta (1/p_{T}) for %s objects", pairs[ipair].c_str());
968  h_dinvPt[ipair] = fs_->make<TH1D>(hname, htit, 500, -0.4, 0.1);
969  h_dinvPt[ipair]->GetXaxis()->SetTitle("d(1/p_{T})");
970  sprintf(hname, "h_mindR%s", pairs[ipair].c_str());
971  sprintf(htit, "min(#Delta R) for %s objects", pairs[ipair].c_str());
972  h_mindR[ipair] = fs_->make<TH1D>(hname, htit, 500, 0.0, 1.0);
973  h_mindR[ipair]->GetXaxis()->SetTitle("dR");
974  }
975 
976  for (int lvl=0; lvl<2; lvl++) {
977  sprintf(hname, "h_dEtaL1%s", levels[lvl+1].c_str());
978  sprintf(htit, "#Delta#eta for L1 and %s objects", levels[lvl+1].c_str());
979  h_dEtaL1[lvl] = fs_->make<TH1D>(hname, htit, 400, -10.0, 10.0);
980 
981  sprintf(hname, "h_dPhiL1%s", levels[lvl+1].c_str());
982  sprintf(htit, "#Delta#phi for L1 and %s objects", levels[lvl+1].c_str());
983  h_dPhiL1[lvl] = fs_->make<TH1D>(hname, htit, 280, -7.0, 7.0);
984 
985  sprintf(hname, "h_dRL1%s", levels[lvl+1].c_str());
986  sprintf(htit, "#Delta R for L1 and %s objects", levels[lvl+1].c_str());
987  h_dRL1[lvl] = fs_->make<TH1D>(hname, htit, 100, 0.0, 10.0);
988  }
989  }
990 
991  int levmin = (doL2L3_ ? 0 : 10);
992  for (int ilevel=levmin; ilevel<20; ilevel++) {
993  sprintf(hname, "h_p%s", levels[ilevel].c_str());
994  sprintf(htit, "p for %s objects", levels[ilevel].c_str());
995  h_p[ilevel] = fs_->make<TH1D>(hname, htit, 100, 0.0, 500.0);
996  h_p[ilevel]->GetXaxis()->SetTitle("p (GeV)");
997 
998  sprintf(hname, "h_pt%s", levels[ilevel].c_str());
999  sprintf(htit, "p_{T} for %s objects", levels[ilevel].c_str());
1000  h_pt[ilevel] = fs_->make<TH1D>(hname, htit, 100, 0.0, 500.0);
1001  h_pt[ilevel]->GetXaxis()->SetTitle("p_{T} (GeV)");
1002 
1003  sprintf(hname, "h_eta%s", levels[ilevel].c_str());
1004  sprintf(htit, "#eta for %s objects", levels[ilevel].c_str());
1005  h_eta[ilevel] = fs_->make<TH1D>(hname, htit, 100, -5.0, 5.0);
1006  h_eta[ilevel]->GetXaxis()->SetTitle("#eta");
1007 
1008  sprintf(hname, "h_phi%s", levels[ilevel].c_str());
1009  sprintf(htit, "#phi for %s objects", levels[ilevel].c_str());
1010  h_phi[ilevel] = fs_->make<TH1D>(hname, htit, 70, -3.5, 3.50);
1011  h_phi[ilevel]->GetXaxis()->SetTitle("#phi");
1012  }
1013 
1014  std::string cuts[2] = {"HLTMatched", "HLTNotMatched"};
1015  std::string cuts2[2] = {"All", "Away from L1"};
1016  for (int icut=0; icut<2; icut++) {
1017  sprintf(hname, "h_eMip%s", cuts[icut].c_str());
1018  sprintf(htit, "eMip for %s tracks", cuts[icut].c_str());
1019  h_eMip[icut] =fs_->make<TH1D>(hname, htit, 200, 0.0, 10.0);
1020  h_eMip[icut]->GetXaxis()->SetTitle("E_{Mip} (GeV)");
1021 
1022  sprintf(hname, "h_eMaxNearP%s", cuts[icut].c_str());
1023  sprintf(htit, "eMaxNearP for %s tracks", cuts[icut].c_str());
1024  h_eMaxNearP[icut]=fs_->make<TH1D>(hname, htit, 240, -2.0, 10.0);
1025  h_eMaxNearP[icut]->GetXaxis()->SetTitle("E_{MaxNearP} (GeV)");
1026 
1027  sprintf(hname, "h_eNeutIso%s", cuts[icut].c_str());
1028  sprintf(htit, "eNeutIso for %s ", cuts[icut].c_str());
1029  h_eNeutIso[icut] =fs_->make<TH1D>(hname, htit, 200, 0.0, 10.0);
1030  h_eNeutIso[icut]->GetXaxis()->SetTitle("E_{NeutIso} (GeV)");
1031 
1032  for (int kcut=0; kcut<2; ++kcut) {
1033  for (int lim=0; lim<5; ++lim) {
1034  sprintf(hname, "h_etaCalibTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1035  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());
1036  h_etaCalibTracks[lim][icut][kcut]=fs_->make<TH1D>(hname, htit, 60, -30.0, 30.0);
1037  h_etaCalibTracks[lim][icut][kcut]->GetXaxis()->SetTitle("i#eta");
1038 
1039  sprintf(hname, "h_etaMipTracks%sCut%dLim%d", cuts[icut].c_str(), kcut, lim);
1040  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());
1041  h_etaMipTracks[lim][icut][kcut]=fs_->make<TH1D>(hname, htit, 60, -30.0, 30.0);
1042  h_etaMipTracks[lim][icut][kcut]->GetXaxis()->SetTitle("i#eta");
1043  }
1044  }
1045  }
1046 
1047  std::string ecut1[3] = {"all","HLTMatched","HLTNotMatched"};
1048  std::string ecut2[2] = {"without","with"};
1049  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,
1050  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
1051  for (int icut=0; icut<6; icut++) {
1052  // int i1 = (icut>3 ? 1 : 0);
1053  int i1 = (icut>2 ? 1 : 0);
1054  int i2 = icut - i1*3;
1055  for (int kcut=0; kcut<48; kcut++) {
1056  for (int lim=0; lim<5; ++lim) {
1057  sprintf(hname, "h_eta%dEnHcal%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1058  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());
1059  h_eHcal[lim][icut][kcut]=fs_->make<TH1D>(hname, htit, 750, 0.0, 150.0);
1060  h_eHcal[lim][icut][kcut]->GetXaxis()->SetTitle("Energy (GeV)");
1061  sprintf(hname, "h_eta%dEnCalo%s%s%d", etac[kcut], ecut1[i2].c_str(), ecut2[i1].c_str(), lim);
1062  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());
1063  h_eCalo[lim][icut][kcut]=fs_->make<TH1D>(hname, htit, 750, 0.0, 150.0);
1064  h_eCalo[lim][icut][kcut]->GetXaxis()->SetTitle("Energy (GeV)");
1065  }
1066  }
1067  }
1068 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:243
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:224
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:221
edm::Service< TFileService > fs_
Definition: IsoTrig.cc:201
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:238
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:242
const bool doChgIsolTree_
Definition: IsoTrig.cc:155
TH1D * h_phi[20]
Definition: IsoTrig.cc:255
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:226
TH1D * h_EnIn
Definition: IsoTrig.cc:250
TH1D * h_dEta[9]
Definition: IsoTrig.cc:257
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:235
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:228
TH1D * h_dEtaL1[2]
Definition: IsoTrig.cc:256
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:205
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:208
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:241
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:225
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:240
TH1I * h_HLT
Definition: IsoTrig.cc:252
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:216
TH1D * h_dP[9]
Definition: IsoTrig.cc:257
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:239
TH1D * h_EnOut
Definition: IsoTrig.cc:250
TH1D * h_dPhiL1[2]
Definition: IsoTrig.cc:256
TH1D * h_L1ObjEnergy
Definition: IsoTrig.cc:254
const bool doMipCutTree_
Definition: IsoTrig.cc:154
TH1D * h_dPhi[9]
Definition: IsoTrig.cc:257
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:233
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:214
TH1I * h_nHLT
Definition: IsoTrig.cc:252
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:213
std::vector< double > * t_ECone
Definition: IsoTrig.cc:248
TH1I * h_Pre
Definition: IsoTrig.cc:253
TH1I * h_PreHLT
Definition: IsoTrig.cc:252
TH1D * h_dinvPt[9]
Definition: IsoTrig.cc:258
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:209
TH1D * h_eta[20]
Definition: IsoTrig.cc:255
TH1I * h_Filters
Definition: IsoTrig.cc:253
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:230
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:203
TH1D * h_eHcal[5][6][48]
Definition: IsoTrig.cc:261
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:217
TH1D * h_PreL1wt
Definition: IsoTrig.cc:254
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:232
TH1D * h_eMaxNearP[2]
Definition: IsoTrig.cc:259
const bool doTrkResTree_
Definition: IsoTrig.cc:155
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:236
TH2D * h_MipEnMatch
Definition: IsoTrig.cc:251
TH1D * h_p[20]
Definition: IsoTrig.cc:255
TH1D * h_eNeutIso[2]
Definition: IsoTrig.cc:259
TH1I * h_PreL1
Definition: IsoTrig.cc:252
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:212
TTree * ChgIsolnTree_
Definition: IsoTrig.cc:202
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:204
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:234
TH1D * h_eCalo[5][6][48]
Definition: IsoTrig.cc:261
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:222
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:229
TH1D * h_pt[20]
Definition: IsoTrig.cc:255
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:211
TH1D * h_etaMipTracks[5][2][2]
Definition: IsoTrig.cc:260
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:220
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:237
TTree * MipCutTree_
Definition: IsoTrig.cc:202
TH1D * h_mindR[9]
Definition: IsoTrig.cc:258
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:218
TTree * TrkResTree_
Definition: IsoTrig.cc:202
TH1D * h_dPt[9]
Definition: IsoTrig.cc:257
TH2D * h_MipEnNoMatch
Definition: IsoTrig.cc:251
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:219
const bool doTiming_
Definition: IsoTrig.cc:154
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:223
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:206
TH1I * h_nL3Objs
Definition: IsoTrig.cc:253
TH1D * h_dRL1[2]
Definition: IsoTrig.cc:256
double pLimits_[6]
Definition: IsoTrig.cc:200
TH1D * h_etaCalibTracks[5][2][2]
Definition: IsoTrig.cc:260
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:210
TH1D * h_PreHLTwt
Definition: IsoTrig.cc:254
TTree * TimingTree_
Definition: IsoTrig.cc:202
const bool doL2L3_
Definition: IsoTrig.cc:154
TH1D * h_eMip[2]
Definition: IsoTrig.cc:258
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:231
void IsoTrig::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 1097 of file IsoTrig.cc.

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

1097  {
1098  edm::LogWarning ("IsoTrack") << "Run " << iRun.run() << " hltconfig.init "
1100 }
bool changed_
Definition: IsoTrig.cc:199
HLTPrescaleProvider hltPrescaleProvider_
Definition: IsoTrig.cc:150
const std::string processName_
Definition: IsoTrig.cc:161
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 1720 of file IsoTrig.cc.

References a_charIsoR_, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH_, ALCARECOTkAlJpsiMuMu_cff::charge, spr::chargeIsolationCone(), ChgIsolnTree_, clearChgIsolnTreeVectors(), boostedElectronIsolation_cff::deltaR, dR(), runTauDisplay::dr, PVValHelper::dxy, PVValHelper::dz, PVValHelper::eta, getDistInCM(), GetEtaPhiAtEcal(), spr::goodTrack(), mps_fire::i, gen::k, checklumidiff::l, leadPV_, RecoMuonValidator_cfi::maxP, minPTrackValue_, nTracks(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), pG_, phi, pixelIsolationConeSizeAtEC_, pixelTrackRefsHE_, position, prelimCone_, edm::ESHandle< T >::product(), spr::propagateCALO(), 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(), and endRun().

1722  {
1724  if (verbosity_%10>0)
1725  edm::LogVerbatim("IsoTrack") << "Inside chgIsolation() with eta/phi Triggered: "
1726  << etaTriggered << "/" << phiTriggered;
1727  std::vector<double> maxP;
1728 
1729  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1730  const MagneticField *bField = bFieldH_.product();
1731  const CaloGeometry* geo = pG_.product();
1732  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1733  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_,
1734  trkCaloDirections1, ((verbosity_/100)%10>2));
1735  if (verbosity_%10>0)
1736  edm::LogVerbatim("IsoTrack") << "Propagated TrkCollection";
1737  for (unsigned int k=0; k<pixelIsolationConeSizeAtEC_.size(); ++k)
1738  maxP.push_back(0);
1739  unsigned i = pixelTrackRefsHE_.size();
1740  std::vector<std::pair<unsigned int, std::pair<double, double>>> VecSeedsatEC;
1741  //loop to select isolated tracks
1742  for (unsigned iS=0; iS<pixelTrackRefsHE_.size(); iS++) {
1743  if (pixelTrackRefsHE_[iS]->p() > minPTrackValue_) {
1744  bool vtxMatch = false;
1745  //associate to vertex (in Z)
1746  unsigned int ivSel = recVtxs_->size();
1747  double minDZ = 100;
1748  for (unsigned int iv = 0; iv < recVtxs_->size(); ++iv) {
1749  if (fabs(pixelTrackRefsHE_[iS]->dz((*recVtxs_)[iv].position()))<minDZ) {
1750  minDZ = fabs(pixelTrackRefsHE_[iS]->dz((*recVtxs_)[iv].position()));
1751  ivSel = iv;
1752  }
1753  }
1754  //cut on dYX:
1755  if (ivSel == recVtxs_->size()) {
1756  vtxMatch = true;
1757  } else if (fabs(pixelTrackRefsHE_[iS]->dxy((*recVtxs_)[ivSel].position()))<vtxCutSeed_){
1758  vtxMatch = true;
1759  }
1760  //select tracks not matched to triggered L1 jet
1761  double R = deltaR(etaTriggered, phiTriggered,pixelTrackRefsHE_[iS]->eta(),
1762  pixelTrackRefsHE_[iS]->phi());
1763  if (R > tauUnbiasCone_ && vtxMatch) {
1764  //propagate seed track to ECAL surface:
1765  std::pair<double,double> seedCooAtEC;
1766  // in case vertex is found:
1767  if (minDZ!=100)
1768  seedCooAtEC = GetEtaPhiAtEcal(pixelTrackRefsHE_[iS]->eta(),
1769  pixelTrackRefsHE_[iS]->phi(),
1770  pixelTrackRefsHE_[iS]->pt(),
1771  pixelTrackRefsHE_[iS]->charge(),
1772  (*recVtxs_)[ivSel].z());
1773  //in case vertex is not found:
1774  else
1775  seedCooAtEC = GetEtaPhiAtEcal(pixelTrackRefsHE_[iS]->eta(),
1776  pixelTrackRefsHE_[iS]->phi(),
1777  pixelTrackRefsHE_[iS]->pt(),
1778  pixelTrackRefsHE_[iS]->charge(), 0);
1779  VecSeedsatEC.push_back(std::make_pair(iS, seedCooAtEC));
1780  }
1781  }
1782  }
1783  for (unsigned int l=0; l<VecSeedsatEC.size(); l++) {
1784  unsigned int iSeed = VecSeedsatEC[l].first;
1785  math::XYZTLorentzVector v1(pixelTrackRefsHE_[iSeed]->px(),pixelTrackRefsHE_[iSeed]->py(),
1786  pixelTrackRefsHE_[iSeed]->pz(),pixelTrackRefsHE_[iSeed]->p());
1787 
1788  for (unsigned int j=0; j<VecSeedsatEC.size(); j++) {
1789  unsigned int iSurr = VecSeedsatEC[j].first;
1790  if (iSeed != iSurr) {
1791  //define preliminary cone around seed track impact point from which tracks will be extrapolated:
1792  // edm::Ref<reco::IsolatedPixelTrackCandidateCollection> cand2ref =
1793  // edm::Ref<reco::IsolatedPixelTrackCandidateCollection>(L2cands, iSurr);
1794  if (deltaR(pixelTrackRefsHE_[iSeed]->eta(),
1795  pixelTrackRefsHE_[iSeed]->phi(),
1796  pixelTrackRefsHE_[iSurr]->eta(),
1797  pixelTrackRefsHE_[iSurr]->phi()) < prelimCone_) {
1798  unsigned int ivSel = recVtxs_->size();
1799  double minDZ2=100;
1800  for (unsigned int iv = 0; iv < recVtxs_->size(); ++iv) {
1801  if (fabs(pixelTrackRefsHE_[iSurr]->dz((*recVtxs_)[iv].position()))<minDZ2) {
1802  minDZ2 = fabs(pixelTrackRefsHE_[iSurr]->dz((*recVtxs_)[iv].position()));
1803  ivSel = iv;
1804  }
1805  }
1806  //cut ot dXY:
1807  if (minDZ2==100 || fabs(pixelTrackRefsHE_[iSurr]->dxy((*recVtxs_)[ivSel].position()))<vtxCutIsol_) {
1808  //calculate distance at ECAL surface and update isolation:
1809  double dist = getDistInCM(VecSeedsatEC[i].second.first, VecSeedsatEC[i].second.second, VecSeedsatEC[j].second.first, VecSeedsatEC[j].second.second);
1810  for (unsigned int k=0; k<pixelIsolationConeSizeAtEC_.size(); ++k) {
1811  if (dist<pixelIsolationConeSizeAtEC_[k]) {
1812  if (pixelTrackRefsHE_[iSurr]->p() > maxP[k])
1813  maxP[k] = pixelTrackRefsHE_[iSurr]->p();
1814  }
1815  }
1816  }
1817  }
1818  }
1819  }
1820 
1821  double conehmaxNearP = -1; bool selectTk=false;
1822  double mindR=999.9; int nTracks=0;
1823  math::XYZTLorentzVector mindRvec;
1824  for (trkDetItr = trkCaloDirections1.begin(); trkDetItr != trkCaloDirections1.end(); trkDetItr++, nTracks++){
1825  int nNearTRKs=0;
1826  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1827  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(),
1828  pTrack->pz(), pTrack->p());
1829  double dr = dR(v1,v2);
1830  if (dr<mindR) {
1831  selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_,
1832  ((verbosity_/100)%10>1));
1833  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections1,
1834  a_charIsoR_, nNearTRKs,
1835  ((verbosity_/100)%10>1));
1836  mindR = dr;
1837  mindRvec = v2;
1838  }
1839  }
1840  pushChgIsolnTreeVecs(v1, mindRvec, maxP, conehmaxNearP, selectTk);
1841  }
1842  ChgIsolnTree_->Fill();
1843 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
std::string theTrackQuality_
Definition: IsoTrig.cc:160
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
const double a_charIsoR_
Definition: IsoTrig.cc:164
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:188
const int verbosity_
Definition: IsoTrig.cc:156
std::pair< double, double > GetEtaPhiAtEcal(double etaIP, double phiIP, double pT, int charge, double vtxZ)
Definition: IsoTrig.cc:2048
const double minPTrackValue_
Definition: IsoTrig.cc:158
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:660
const double tauUnbiasCone_
Definition: IsoTrig.cc:159
U second(std::pair< T, U > const &p)
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:189
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const double prelimCone_
Definition: IsoTrig.cc:159
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:163
void clearChgIsolnTreeVectors()
Definition: IsoTrig.cc:723
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
std::vector< reco::TrackRef > pixelTrackRefsHE_
Definition: IsoTrig.cc:187
int k[5][pyjets_maxn]
double getDistInCM(double eta1, double phi1, double eta2, double phi2)
Definition: IsoTrig.cc:2107
TTree * ChgIsolnTree_
Definition: IsoTrig.cc:202
edm::Handle< reco::VertexCollection > recVtxs_
Definition: IsoTrig.cc:194
const double vtxCutIsol_
Definition: IsoTrig.cc:158
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2014
static int position[264][3]
Definition: ReadPGInfo.cc:509
math::XYZPoint leadPV_
Definition: IsoTrig.cc:195
const std::vector< double > pixelIsolationConeSizeAtEC_
Definition: IsoTrig.cc:157
T const * product() const
Definition: ESHandle.h:86
const double vtxCutSeed_
Definition: IsoTrig.cc:158
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:666
void pushChgIsolnTreeVecs(math::XYZTLorentzVector &Pixcand, math::XYZTLorentzVector &Trkcand, std::vector< double > &PixMaxP, double &TrkMaxP, bool &selTk)
Definition: IsoTrig.cc:763
void IsoTrig::clearChgIsolnTreeVectors ( )
private

Definition at line 723 of file IsoTrig.cc.

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

Referenced by chgIsolation(), and endRun().

723  {
724  t_PixcandP ->clear();
725  t_PixcandPt ->clear();
726  t_PixcandEta ->clear();
727  t_PixcandPhi ->clear();
728  for(unsigned int i=0; i< t_PixcandMaxP->size(); i++)
729  t_PixcandMaxP[i].clear();
730  t_PixcandMaxP ->clear();
731  t_PixTrkcandP ->clear();
732  t_PixTrkcandPt ->clear();
733  t_PixTrkcandEta ->clear();
734  t_PixTrkcandPhi ->clear();
735  t_PixTrkcandMaxP ->clear();
736  t_PixTrkcandselTk ->clear();
737 }
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:224
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:221
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:226
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:225
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:216
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.cc:217
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:222
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:220
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:218
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:219
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:223
void IsoTrig::clearMipCutTreeVectors ( )
private

Definition at line 739 of file IsoTrig.cc.

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

Referenced by endRun(), and studyMipCut().

739  {
740  t_NFcandP ->clear();
741  t_NFcandPt ->clear();
742  t_NFcandEta ->clear();
743  t_NFcandPhi ->clear();
744  t_NFcandEmip ->clear();
745  t_NFTrkcandP ->clear();
746  t_NFTrkcandPt ->clear();
747  t_NFTrkcandEta ->clear();
748  t_NFTrkcandPhi ->clear();
749  t_NFTrkcandEmip ->clear();
750  t_NFTrkMinDR ->clear();
751  t_NFTrkMinDP1 ->clear();
752  t_NFTrkselTkFlag ->clear();
753  t_NFTrkqltyFlag ->clear();
754  t_NFTrkMissFlag ->clear();
755  t_NFTrkPVFlag ->clear();
756  t_NFTrkPropFlag ->clear();
757  t_NFTrkChgIsoFlag->clear();
758  t_NFTrkNeuIsoFlag->clear();
759  t_NFTrkMipFlag ->clear();
760  t_ECone ->clear();
761 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:243
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:238
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:242
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:235
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:228
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:241
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:240
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:239
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:233
std::vector< double > * t_ECone
Definition: IsoTrig.cc:248
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:230
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:232
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:236
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:234
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:229
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:237
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:231
double IsoTrig::dEta ( math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2 
)
private

Definition at line 1998 of file IsoTrig.cc.

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

1998  {
1999  return (vec1.eta()-vec2.eta());
2000 }
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 2028 of file IsoTrig.cc.

Referenced by endRun(), and fillDifferences().

2028  {
2029  return ((1/vec1.pt())-(1/vec2.pt()));
2030 }
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 2024 of file IsoTrig.cc.

References funct::abs().

Referenced by endRun(), and fillDifferences().

2024  {
2025  return (std::abs(vec1.r()-vec2.r()));
2026 }
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 2002 of file IsoTrig.cc.

References M_PI.

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

2002  {
2003 
2004  double phi1 = vec1.phi();
2005  if (phi1 < 0) phi1 += 2.0*M_PI;
2006  double phi2 = vec2.phi();
2007  if (phi2 < 0) phi2 += 2.0*M_PI;
2008  double dphi = phi1-phi2;
2009  if (dphi > M_PI) dphi -= 2.*M_PI;
2010  else if (dphi < -M_PI) dphi += 2.*M_PI;
2011  return dphi;
2012 }
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 2020 of file IsoTrig.cc.

Referenced by endRun(), and fillDifferences().

2020  {
2021  return (vec1.pt()-vec2.pt());
2022 }
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 2014 of file IsoTrig.cc.

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

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

2014  {
2015  double deta = dEta(vec1,vec2);
2016  double dphi = dPhi(vec1,vec2);
2017  return std::sqrt(deta*deta + dphi*dphi);
2018 }
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:2002
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1998
std::vector< vec1 > vec2
Definition: HCALResponse.h:16
void IsoTrig::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1071 of file IsoTrig.cc.

References 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().

1071  {
1072  unsigned int preL1, preHLT;
1073  std::map<unsigned int, unsigned int>::iterator itr;
1074  std::map<unsigned int, const std::pair<int, int>>::iterator itrPre;
1075  edm::LogWarning ("IsoTrack") << trigNames_.size() << "Triggers were run. RunNo vs HLT accepts for";
1076  for (unsigned int i=0; i<trigNames_.size(); ++i)
1077  edm::LogWarning("IsoTrack") << "[" << i << "]: " << trigNames_[i];
1078  unsigned int n = maxRunNo_ - minRunNo_ +1;
1079  g_Pre = fs_->make<TH1I>("h_PrevsRN", "PreScale Vs Run Number", n, minRunNo_, maxRunNo_);
1080  g_PreL1 = fs_->make<TH1I>("h_PreL1vsRN", "L1 PreScale Vs Run Number", n, minRunNo_, maxRunNo_);
1081  g_PreHLT = fs_->make<TH1I>("h_PreHLTvsRN", "HLT PreScale Vs Run Number", n, minRunNo_, maxRunNo_);
1082  g_Accepts = fs_->make<TH1I>("h_HLTAcceptsvsRN", "HLT Accepts Vs Run Number", n, minRunNo_, maxRunNo_);
1083 
1084  for (itr=trigList_.begin(), itrPre=trigPreList_.begin(); itr!=trigList_.end(); itr++, itrPre++) {
1085  preL1 = (itrPre->second).first;
1086  preHLT = (itrPre->second).second;
1087  edm::LogVerbatim("IsoTrack") << itr->first << " " << itr->second << " "
1088  << itrPre->first << " " << preL1 << " "
1089  << preHLT;
1090  g_Accepts->Fill(itr->first, itr->second);
1091  g_PreL1->Fill(itr->first, preL1);
1092  g_PreHLT->Fill(itr->first, preHLT);
1093  g_Pre->Fill(itr->first, preL1*preHLT);
1094  }
1095 }
edm::Service< TFileService > fs_
Definition: IsoTrig.cc:201
const int maxRunNo_
Definition: IsoTrig.cc:167
TH1I * g_PreHLT
Definition: IsoTrig.cc:262
std::map< unsigned int, const std::pair< int, int > > trigPreList_
Definition: IsoTrig.cc:198
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
U second(std::pair< T, U > const &p)
std::map< unsigned int, unsigned int > trigList_
Definition: IsoTrig.cc:197
TH1I * g_Pre
Definition: IsoTrig.cc:262
const int minRunNo_
Definition: IsoTrig.cc:167
TH1I * g_PreL1
Definition: IsoTrig.cc:262
const std::vector< std::string > trigNames_
Definition: IsoTrig.cc:151
TH1I * g_Accepts
Definition: IsoTrig.cc:262
void IsoTrig::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate
std::pair< double, double > IsoTrig::etaPhiTrigger ( )
private

Definition at line 2032 of file IsoTrig.cc.

References PVValHelper::eta, gen::k, phi, EnergyCorrector::pt, and vec_.

Referenced by analyze(), and endRun().

2032  {
2033  double eta(0), phi(0), ptmax(0);
2034  for (unsigned int k=0; k<vec_[0].size(); ++k) {
2035  if (k == 0) {
2036  eta = vec_[0][k].eta();
2037  phi = vec_[0][k].phi();
2038  ptmax = vec_[0][k].pt();
2039  } else if (vec_[0][k].pt() > ptmax) {
2040  eta = vec_[0][k].eta();
2041  phi = vec_[0][k].phi();
2042  ptmax = vec_[0][k].pt();
2043  }
2044  }
2045  return std::pair<double,double>(eta,phi);
2046 }
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:263
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 1966 of file IsoTrig.cc.

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

Referenced by endRun(), and studyIsolation().

1966  {
1967  h_eMip[indx] ->Fill(eMipDR);
1968  h_eMaxNearP[indx]->Fill(conehmaxNearP);
1969  h_eNeutIso[indx] ->Fill(e_inCone);
1970  if ((conehmaxNearP < cutCharge_) && (eMipDR < cutMip_)) {
1971  for (int lim=0; lim<5; ++lim) {
1972  if ((vec.r()>pLimits_[lim]) && (vec.r()<=pLimits_[lim+1])) {
1973  h_etaMipTracks[lim][indx][0]->Fill((double)(ieta));
1974  if (cut) h_etaMipTracks[lim][indx][1]->Fill((double)(ieta));
1975  if (e_inCone < cutNeutral_) {
1976  h_etaCalibTracks[lim][indx][0]->Fill((double)(ieta));
1977  if (cut) h_etaCalibTracks[lim][indx][1]->Fill((double)(ieta));
1978  }
1979  }
1980  }
1981  }
1982 }
TH1D * h_eMaxNearP[2]
Definition: IsoTrig.cc:259
TH1D * h_eNeutIso[2]
Definition: IsoTrig.cc:259
const double cutCharge_
Definition: IsoTrig.cc:166
TH1D * h_etaMipTracks[5][2][2]
Definition: IsoTrig.cc:260
const double cutMip_
Definition: IsoTrig.cc:165
const double cutNeutral_
Definition: IsoTrig.cc:166
double pLimits_[6]
Definition: IsoTrig.cc:200
TH1D * h_etaCalibTracks[5][2][2]
Definition: IsoTrig.cc:260
TH1D * h_eMip[2]
Definition: IsoTrig.cc:258
void IsoTrig::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 447 of file IsoTrig.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

447  {
448  std::vector<std::string> triggers = {"HLT_IsoTrackHB"};
449  std::vector<edm::InputTag> tags = {edm::InputTag("hltHITPixelTracksHB"),
450  edm::InputTag("hltHITPixelTracksHE")};
451  std::vector<double> cones = {35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 63.9, 70.0};
453  desc.addUntracked<std::vector<std::string> >("Triggers", triggers);
454  desc.addUntracked<edm::InputTag>("pixCandTag", edm::InputTag(" "));
455  desc.addUntracked<edm::InputTag>("l1CandTag", edm::InputTag("hltL1sV0SingleJet60"));
456  desc.addUntracked<edm::InputTag>("l2CandTag", edm::InputTag("isolEcalPixelTrackProd"));
457  desc.addUntracked<bool>("doL2L3", false);
458  desc.addUntracked<bool>("doTimingTree", false);
459  desc.addUntracked<bool>("doMipCutTree", false);
460  desc.addUntracked<bool>("doTrkResTree", true);
461  desc.addUntracked<bool>("doChgIsolTree", false);
462  desc.addUntracked<bool>("doStudyIsol", false);
463  desc.addUntracked<int>("verbosity", 0);
464  desc.addUntracked<std::string>("processName", "HLT");
465  desc.addUntracked<std::string>("trackQuality", "highPurity");
466  desc.addUntracked<double>("minTrackPt", 10.0);
467  desc.addUntracked<double>("maxDxyPV", 0.02);
468  desc.addUntracked<double>("maxDzPV", 0.02);
469  desc.addUntracked<double>("maxChi2", 5.0);
470  desc.addUntracked<double>("maxDpOverP", 0.1);
471  desc.addUntracked<int>("minOuterHit", 4);
472  desc.addUntracked<int>("minLayerCrossed", 8);
473  desc.addUntracked<int>("maxInMiss", 0);
474  desc.addUntracked<int>("maxOutMiss", 0);
475  desc.addUntracked<double>("isolationL1", 1.0);
476  desc.addUntracked<double>("coneRadius", 34.98);
477  desc.addUntracked<double>("coneRadiusMIP", 14.0);
478  desc.addUntracked<double>("coneRadiusNeut1", 21.0);
479  desc.addUntracked<double>("coneRadiusNeut2", 29.0);
480  desc.addUntracked<double>("cutMIP", 1.0);
481  desc.addUntracked<double>("chargeIsolation", 2.0);
482  desc.addUntracked<double>("neutralIsolation", 2.0);
483  desc.addUntracked<int>("minRun", 190456);
484  desc.addUntracked<int>("maxRun", 203002);
485  desc.addUntracked<std::vector<edm::InputTag> >("pixelTracksSources", tags);
486  desc.addUntracked<std::vector<double> >("pixelIsolationConeSizeAtEC", cones);
487  desc.addUntracked<double>("minPTrackValue", 0.0);
488  desc.addUntracked<double>("vertexCutSeed", 101.0);
489  desc.addUntracked<double>("vertexCutIsol", 101.0);
490  desc.addUntracked<double>("tauUnbiasCone", 1.2);
491  desc.addUntracked<double>("prelimCone", 1.0);
492  descriptions.add("isoTrigHB",desc);
493 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void IsoTrig::fillDifferences ( int  indx,
math::XYZTLorentzVector vec1,
math::XYZTLorentzVector vec2,
bool  debug 
)
private

Definition at line 1946 of file IsoTrig.cc.

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

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

1947  {
1948  double dr = dR(vec1,vec2);
1949  double deta = dEta(vec1, vec2);
1950  double dphi = dPhi(vec1, vec2);
1951  double dpt = dPt(vec1, vec2);
1952  double dp = dP(vec1, vec2);
1953  double dinvpt = dinvPt(vec1, vec2);
1954  h_dEta[indx] ->Fill(deta);
1955  h_dPhi[indx] ->Fill(dphi);
1956  h_dPt[indx] ->Fill(dpt);
1957  h_dP[indx] ->Fill(dp);
1958  h_dinvPt[indx]->Fill(dinvpt);
1959  h_mindR[indx] ->Fill(dr);
1960  if (debug)
1961  edm::LogVerbatim("IsoTrack") << "mindR for index " << indx << " is " << dr
1962  << " deta " << deta << " dphi " << dphi
1963  << " dpt " << dpt << " dinvpt " << dinvpt;
1964 }
TH1D * h_dEta[9]
Definition: IsoTrig.cc:257
double dP(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2024
TH1D * h_dP[9]
Definition: IsoTrig.cc:257
double dinvPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2028
TH1D * h_dPhi[9]
Definition: IsoTrig.cc:257
std::vector< double > vec1
Definition: HCALResponse.h:15
TH1D * h_dinvPt[9]
Definition: IsoTrig.cc:258
double dPhi(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2002
#define debug
Definition: HDRShower.cc:19
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1998
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2014
TH1D * h_mindR[9]
Definition: IsoTrig.cc:258
TH1D * h_dPt[9]
Definition: IsoTrig.cc:257
double dPt(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2020
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 1984 of file IsoTrig.cc.

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

Referenced by endRun(), and studyIsolation().

1984  {
1985  int kk(-1);
1986  if (ieta > 0 && ieta < 25) kk = 23 + ieta;
1987  else if (ieta > -25 && ieta < 0) kk = -(ieta + 1);
1988  if (kk >= 0 && eMipDR > 0.01 && hCone > 1.0) {
1989  for (int lim=0; lim<5; ++lim) {
1990  if ((vec.r()>pLimits_[lim]) && (vec.r()<=pLimits_[lim+1])) {
1991  h_eHcal[lim][indx][kk] ->Fill(hCone);
1992  h_eCalo[lim][indx][kk] ->Fill(hCone+eMipDR);
1993  }
1994  }
1995  }
1996 }
TH1D * h_eHcal[5][6][48]
Definition: IsoTrig.cc:261
TH1D * h_eCalo[5][6][48]
Definition: IsoTrig.cc:261
double pLimits_[6]
Definition: IsoTrig.cc:200
void IsoTrig::fillHist ( int  indx,
math::XYZTLorentzVector vec 
)
private

Definition at line 1939 of file IsoTrig.cc.

References h_eta, h_p, h_phi, and h_pt.

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

1939  {
1940  h_p[indx]->Fill(vec.r());
1941  h_pt[indx]->Fill(vec.pt());
1942  h_eta[indx]->Fill(vec.eta());
1943  h_phi[indx]->Fill(vec.phi());
1944 }
TH1D * h_phi[20]
Definition: IsoTrig.cc:255
TH1D * h_eta[20]
Definition: IsoTrig.cc:255
TH1D * h_p[20]
Definition: IsoTrig.cc:255
TH1D * h_pt[20]
Definition: IsoTrig.cc:255
double IsoTrig::getDistInCM ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 2107 of file IsoTrig.cc.

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

Referenced by chgIsolation(), and endRun().

2107  {
2108  double Rec;
2109  double theta1=2*atan(exp(-eta1));
2110  double theta2=2*atan(exp(-eta2));
2111  if (fabs(eta1)<1.479) Rec=rEB_; //radius of ECAL barrel
2112  else if (fabs(eta1)>1.479&&fabs(eta1)<7.0) Rec=tan(theta1)*zEE_; //distance from IP to ECAL endcap
2113  else return 1000;
2114 
2115  //|vect| times tg of acos(scalar product)
2116  double angle=acos((sin(theta1)*sin(theta2)*(sin(phi1)*sin(phi2)+cos(phi1)*cos(phi2))+cos(theta1)*cos(theta2)));
2117  if (angle<0.5*M_PI) return fabs((Rec/sin(theta1))*tan(angle));
2118  else return 1000;
2119 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double rEB_
Definition: IsoTrig.cc:162
double zEE_
Definition: IsoTrig.cc:162
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 2048 of file IsoTrig.cc.

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

Referenced by chgIsolation(), and endRun().

2050  {
2051 
2052  double deltaPhi=0;
2053  double etaEC = 100;
2054  double phiEC = 100;
2055 
2056  double Rcurv = 9999999;
2057  if (bfVal_!=0) Rcurv=pT*33.3*100/(bfVal_*10); //r(m)=pT(GeV)*33.3/B(kG)
2058 
2059  double ecDist = zEE_;
2060  double ecRad = rEB_; //radius of ECAL barrel (cm)
2061  double theta = 2*atan(exp(-etaIP));
2062  double zNew = 0;
2063  if (theta>0.5*M_PI) theta=M_PI-theta;
2064  if (fabs(etaIP)<1.479) {
2065  if ((0.5*ecRad/Rcurv)>1) {
2066  etaEC = 10000;
2067  deltaPhi = 0;
2068  } else {
2069  deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
2070  double alpha1 = 2*asin(0.5*ecRad/Rcurv);
2071  double z = ecRad/tan(theta);
2072  if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ; //new z-coordinate of track
2073  else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ; //new z-coordinate of track
2074  double zAbs=fabs(zNew);
2075  if (zAbs<ecDist) {
2076  etaEC = -log(tan(0.5*atan(ecRad/zAbs)));
2077  deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
2078  }
2079  if (zAbs>ecDist) {
2080  zAbs = (fabs(etaIP)/etaIP)*ecDist;
2081  double Zflight = fabs(zAbs-vtxZ);
2082  double alpha = (Zflight*ecRad)/(z*Rcurv);
2083  double Rec = 2*Rcurv*sin(alpha/2);
2084  deltaPhi =-charge*alpha/2;
2085  etaEC =-log(tan(0.5*atan(Rec/ecDist)));
2086  }
2087  }
2088  } else {
2089  zNew = (fabs(etaIP)/etaIP)*ecDist;
2090  double Zflight = fabs(zNew-vtxZ);
2091  double Rvirt = fabs(Zflight*tan(theta));
2092  double Rec = 2*Rcurv*sin(Rvirt/(2*Rcurv));
2093  deltaPhi =-(charge)*(Rvirt/(2*Rcurv));
2094  etaEC =-log(tan(0.5*atan(Rec/ecDist)));
2095  }
2096 
2097  if (zNew<0) etaEC=-etaEC;
2098  phiEC = phiIP+deltaPhi;
2099 
2100  if (phiEC<-M_PI) phiEC += 2*M_PI;
2101  if (phiEC>M_PI) phiEC -= 2*M_PI;
2102 
2103  std::pair<double,double> retVal(etaEC,phiEC);
2104  return retVal;
2105 }
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.cc:162
double zEE_
Definition: IsoTrig.cc:162
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define M_PI
double bfVal_
Definition: IsoTrig.cc:162
void IsoTrig::getGoodTracks ( const edm::Event iEvent,
edm::Handle< reco::TrackCollection > &  trkCollection 
)
private

Definition at line 1845 of file IsoTrig.cc.

References a_charIsoR_, a_mipR_, barrelRecHitsHandle_, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH_, spr::chargeIsolationCone(), funct::cos(), dR(), spr::eCone_ecal(), endcapRecHitsHandle_, edm::Event::getByToken(), trigger::TriggerRefsCollections::getObjects(), spr::goodTrack(), cuy::ii, edm::HandleBase::isValid(), leadPV_, nTracks(), AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), pG_, edm::ESHandle< T >::product(), spr::propagateCALO(), 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(), and endRun().

1846  {
1847 
1848  t_nGoodTk->clear();
1849  std::vector<int> nGood(4,0);
1850  if (trkCollection.isValid()) {
1851  // get handles to calogeometry and calotopology
1852  const CaloGeometry* geo = pG_.product();
1853  const MagneticField *bField = bFieldH_.product();
1854  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1855  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_,
1856  trkCaloDirections, ((verbosity_/100)%10>2));
1857 
1858  // get the trigger jet
1860  iEvent.getByToken(tok_l1cand_, l1trigobj);
1861 
1862  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1863  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
1864  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1865  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
1866  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1867  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
1868 
1869  double ptTriggered(-10), etaTriggered(-100), phiTriggered(-100);
1870  for (unsigned int p=0; p<l1tauobjref.size(); p++) {
1871  if (l1tauobjref[p]->pt()>ptTriggered) {
1872  ptTriggered = l1tauobjref[p]->pt();
1873  phiTriggered = l1tauobjref[p]->phi();
1874  etaTriggered = l1tauobjref[p]->eta();
1875  }
1876  }
1877  for (unsigned int p=0; p<l1jetobjref.size(); p++) {
1878  if (l1jetobjref[p]->pt()>ptTriggered) {
1879  ptTriggered = l1jetobjref[p]->pt();
1880  phiTriggered = l1jetobjref[p]->phi();
1881  etaTriggered = l1jetobjref[p]->eta();
1882  }
1883  }
1884  for (unsigned int p=0; p<l1forjetobjref.size(); p++) {
1885  if (l1forjetobjref[p]->pt()>ptTriggered) {
1886  ptTriggered=l1forjetobjref[p]->pt();
1887  phiTriggered=l1forjetobjref[p]->phi();
1888  etaTriggered=l1forjetobjref[p]->eta();
1889  }
1890  }
1891  double pTriggered = ptTriggered*cosh(etaTriggered);
1892  math::XYZTLorentzVector pTrigger(ptTriggered*cos(phiTriggered),
1893  ptTriggered*sin(phiTriggered),
1894  pTriggered*tanh(etaTriggered), pTriggered);
1895 
1896  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1897  unsigned int nTracks(0);
1898  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++) {
1899  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1900  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(),
1901  pTrack->pz(), pTrack->p());
1902  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_,
1903  ((verbosity_/100)%10>1));
1904  double mindR = dR(v4, pTrigger);
1905  if ((verbosity_/100)%10 > 1)
1906  edm::LogVerbatim("IsoTrack") << "Track ECAL " << trkDetItr->okECAL
1907  << " HCAL " << trkDetItr->okHCAL
1908  << " Flag " << selectTk;
1909  if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL && mindR > 1.0) {
1910  int nRH_eMipDR(0), nNearTRKs(0);
1911  double eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1913  trkDetItr->pointHCAL,
1914  trkDetItr->pointECAL, a_mipR_,
1915  trkDetItr->directionECAL, nRH_eMipDR);
1916  double conehmaxNearP = spr::chargeIsolationCone(nTracks,
1917  trkCaloDirections,
1918  a_charIsoR_, nNearTRKs,
1919  ((verbosity_/100)%10>1));
1920  if (conehmaxNearP < 2.0 && eMipDR<1.0) {
1921  if (pTrack->p() >= 20 && pTrack->p() < 30) {
1922  ++nGood[0];
1923  } else if (pTrack->p() >= 30 && pTrack->p() < 40) {
1924  ++nGood[1];
1925  } else if (pTrack->p() >= 40 && pTrack->p() < 60) {
1926  ++nGood[2];
1927  } else if (pTrack->p() >= 60 && pTrack->p() < 100) {
1928  ++nGood[3];
1929  }
1930  }
1931  }
1932  }
1933  }
1934 
1935  for (unsigned int ii=0; ii<nGood.size(); ++ii)
1936  t_nGoodTk->push_back(nGood[ii]);
1937 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
std::string theTrackQuality_
Definition: IsoTrig.cc:160
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:192
const double a_charIsoR_
Definition: IsoTrig.cc:164
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:188
const int verbosity_
Definition: IsoTrig.cc:156
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:191
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:660
const double a_mipR_
Definition: IsoTrig.cc:165
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:189
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:163
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:590
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:183
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2014
std::vector< int > * t_nGoodTk
Definition: IsoTrig.cc:206
math::XYZPoint leadPV_
Definition: IsoTrig.cc:195
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:666
void IsoTrig::pushChgIsolnTreeVecs ( math::XYZTLorentzVector Pixcand,
math::XYZTLorentzVector Trkcand,
std::vector< double > &  PixMaxP,
double &  TrkMaxP,
bool &  selTk 
)
private

Definition at line 763 of file IsoTrig.cc.

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

Referenced by chgIsolation(), and endRun().

766  {
767  t_PixcandP ->push_back(Pixcand.r());
768  t_PixcandPt ->push_back(Pixcand.pt());
769  t_PixcandEta ->push_back(Pixcand.eta());
770  t_PixcandPhi ->push_back(Pixcand.phi());
771  t_PixcandMaxP ->push_back(PixMaxP);
772  t_PixTrkcandP ->push_back(Trkcand.r());
773  t_PixTrkcandPt ->push_back(Trkcand.pt());
774  t_PixTrkcandEta ->push_back(Trkcand.eta());
775  t_PixTrkcandPhi ->push_back(Trkcand.phi());
776  t_PixTrkcandMaxP ->push_back(TrkMaxP);
777  t_PixTrkcandselTk ->push_back(selTk);
778 
779 }
std::vector< double > * t_PixTrkcandPhi
Definition: IsoTrig.cc:224
std::vector< double > * t_PixTrkcandP
Definition: IsoTrig.cc:221
std::vector< bool > * t_PixTrkcandselTk
Definition: IsoTrig.cc:226
std::vector< double > * t_PixTrkcandMaxP
Definition: IsoTrig.cc:225
std::vector< double > * t_PixcandP
Definition: IsoTrig.cc:216
std::vector< double > * t_PixcandPt
Definition: IsoTrig.cc:217
std::vector< double > * t_PixTrkcandPt
Definition: IsoTrig.cc:222
std::vector< std::vector< double > > * t_PixcandMaxP
Definition: IsoTrig.cc:220
std::vector< double > * t_PixcandEta
Definition: IsoTrig.cc:218
std::vector< double > * t_PixcandPhi
Definition: IsoTrig.cc:219
std::vector< double > * t_PixTrkcandEta
Definition: IsoTrig.cc:223
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 781 of file IsoTrig.cc.

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

Referenced by endRun(), and studyMipCut().

785  {
786  t_NFcandP ->push_back(NFcand.r());
787  t_NFcandPt ->push_back(NFcand.pt());
788  t_NFcandEta ->push_back(NFcand.eta());
789  t_NFcandPhi ->push_back(NFcand.phi());
790  t_NFcandEmip ->push_back(EmipNFcand);
791  t_NFTrkcandP ->push_back(Trkcand.r());
792  t_NFTrkcandPt ->push_back(Trkcand.pt());
793  t_NFTrkcandEta ->push_back(Trkcand.eta());
794  t_NFTrkcandPhi ->push_back(Trkcand.phi());
795  t_NFTrkcandEmip ->push_back(EmipTrkcand);
796  t_NFTrkMinDR ->push_back(mindR);
797  t_NFTrkMinDP1 ->push_back(mindP1);
798  t_NFTrkselTkFlag ->push_back(Flags[0]);
799  t_NFTrkqltyFlag ->push_back(Flags[1]);
800  t_NFTrkMissFlag ->push_back(Flags[2]);
801  t_NFTrkPVFlag ->push_back(Flags[3]);
802  t_NFTrkPropFlag ->push_back(Flags[4]);
803  t_NFTrkChgIsoFlag->push_back(Flags[5]);
804  t_NFTrkNeuIsoFlag->push_back(Flags[6]);
805  t_NFTrkMipFlag ->push_back(Flags[7]);
806  t_ECone ->push_back(hCone);
807 }
std::vector< bool > * t_NFTrkPVFlag
Definition: IsoTrig.cc:243
std::vector< double > * t_NFTrkMinDR
Definition: IsoTrig.cc:238
std::vector< bool > * t_NFTrkMissFlag
Definition: IsoTrig.cc:242
std::vector< double > * t_NFTrkcandEta
Definition: IsoTrig.cc:235
std::vector< double > * t_NFcandP
Definition: IsoTrig.cc:228
std::vector< bool > * t_NFTrkqltyFlag
Definition: IsoTrig.cc:241
std::vector< bool > * t_NFTrkselTkFlag
Definition: IsoTrig.cc:240
std::vector< bool > * t_NFTrkMipFlag
Definition: IsoTrig.cc:247
std::vector< double > * t_NFTrkMinDP1
Definition: IsoTrig.cc:239
std::vector< double > * t_NFTrkcandP
Definition: IsoTrig.cc:233
std::vector< double > * t_ECone
Definition: IsoTrig.cc:248
std::vector< bool > * t_NFTrkChgIsoFlag
Definition: IsoTrig.cc:245
std::vector< double > * t_NFcandEta
Definition: IsoTrig.cc:230
std::vector< double > * t_NFcandEmip
Definition: IsoTrig.cc:232
std::vector< bool > * t_NFTrkPropFlag
Definition: IsoTrig.cc:244
std::vector< double > * t_NFTrkcandPhi
Definition: IsoTrig.cc:236
std::vector< double > * t_NFTrkcandPt
Definition: IsoTrig.cc:234
std::vector< double > * t_NFcandPt
Definition: IsoTrig.cc:229
std::vector< double > * t_NFTrkcandEmip
Definition: IsoTrig.cc:237
std::vector< bool > * t_NFTrkNeuIsoFlag
Definition: IsoTrig.cc:246
std::vector< double > * t_NFcandPhi
Definition: IsoTrig.cc:231
void IsoTrig::studyIsolation ( edm::Handle< reco::TrackCollection > &  trkCollection,
std::vector< reco::TrackCollection::const_iterator > &  goodTks 
)
private

Definition at line 1585 of file IsoTrig.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutR1_, a_neutR2_, barrelRecHitsHandle_, ecalTB2006H4_GenSimDigiReco_cfg::bField, bFieldH_, spr::chargeIsolationCone(), cutCharge_, cutMip_, cutNeutral_, boostedElectronIsolation_cff::deltaR, doL2L3_, dR(), dr_L1_, 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(), and endRun().

1586  {
1587 
1588  if (trkCollection.isValid()) {
1589  // get handles to calogeometry and calotopology
1590  const CaloGeometry* geo = pG_.product();
1591  const MagneticField *bField = bFieldH_.product();
1592  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
1593  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_,
1594  trkCaloDirections, ((verbosity_/100)%10>2));
1595 
1596  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1597  if ((verbosity_/1000)%10 > 1) {
1598  edm::LogVerbatim("IsoTrack") << "n of barrelRecHitsHandle "
1599  << barrelRecHitsHandle_->size();
1601  edm::LogVerbatim("IsoTrack") << "hit : detid(ieta,iphi) "
1602  << (EBDetId)(hit->id()) << " time "
1603  << hit->time() << " energy "
1604  << hit->energy();
1605  }
1606  edm::LogVerbatim("IsoTrack") << "n of endcapRecHitsHandle "
1607  << endcapRecHitsHandle_->size();
1609  edm::LogVerbatim("IsoTrack") << "hit : detid(ieta,iphi) "
1610  << (EEDetId)(hit->id()) << " time "
1611  << hit->time() << " energy "
1612  << hit->energy();
1613  }
1614  edm::LogVerbatim("IsoTrack") << "n of hbhe " << hbhe_->size();
1616  hit != hbhe_->end(); ++hit) {
1617  edm::LogVerbatim("IsoTrack") << "hit : detid(ieta,iphi) " << hit->id()
1618  << " time " << hit->time() << " energy "
1619  << hit->energy();
1620  }
1621  }
1622  unsigned int nTracks=0, ngoodTk=0, nselTk=0;
1623  int ieta=999;
1624  for (trkDetItr = trkCaloDirections.begin(); trkDetItr != trkCaloDirections.end(); trkDetItr++,nTracks++){
1625  bool l3Track = (std::find(goodTks.begin(), goodTks.end(),
1626  trkDetItr->trkItr) != goodTks.end());
1627  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1628  math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(),
1629  pTrack->pz(), pTrack->p());
1630  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_,
1631  ((verbosity_/100)%10>1));
1632  double eMipDR=9999., e_inCone=0, conehmaxNearP=0, mindR=999.9, hCone=0;
1633  if (trkDetItr->okHCAL) {
1634  HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
1635  ieta = detId.ieta();
1636  }
1637  for (unsigned k=0; k<vec_[0].size(); ++k) {
1638  double deltaR = dR(v4, vec_[0][k]);
1639  if (deltaR<mindR) mindR = deltaR;
1640  }
1641  if ((verbosity_/100)%10 > 1)
1642  edm::LogVerbatim("IsoTrack") << "Track ECAL " << trkDetItr->okECAL
1643  << " HCAL " << trkDetItr->okHCAL
1644  << " Flag " << selectTk;
1645  if (selectTk && trkDetItr->okECAL && trkDetItr->okHCAL) {
1646  ngoodTk++;
1647  int nRH_eMipDR=0, nNearTRKs=0;
1648  double e1 = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1649  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1650  trkDetItr->pointECAL, a_neutR1_,
1651  trkDetItr->directionECAL, nRH_eMipDR);
1652  double e2 = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1653  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1654  trkDetItr->pointECAL, a_neutR2_,
1655  trkDetItr->directionECAL, nRH_eMipDR);
1656  eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1657  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1658  trkDetItr->pointECAL, a_mipR_,
1659  trkDetItr->directionECAL, nRH_eMipDR);
1660  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections,
1661  a_charIsoR_, nNearTRKs,
1662  ((verbosity_/100)%10>1));
1663  e_inCone = e2 - e1;
1664  double distFromHotCell=-99.0;
1665  int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1666  GlobalPoint gposHotCell(0.,0.,0.);
1667  std::vector<DetId> coneRecHitDetIds;
1668  hCone = spr::eCone_hcal(geo, hbhe_, trkDetItr->pointHCAL,
1669  trkDetItr->pointECAL,
1670  a_coneR_, trkDetItr->directionHCAL,
1671  nRecHitsCone, coneRecHitDetIds,
1672  distFromHotCell, ietaHotCell, iphiHotCell,
1673  gposHotCell, -1);
1674  if (eMipDR<1.0) nselTk++;
1675  }
1676  if (l3Track) {
1677  fillHist(10,v4);
1678  if (selectTk) {
1679  fillHist(11,v4);
1680  fillCuts(0, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>dr_L1_));
1681  if (conehmaxNearP < cutCharge_) {
1682  fillHist(12,v4);
1683  if (eMipDR < cutMip_) {
1684  fillHist(13,v4);
1685  fillEnergy(1, ieta, hCone, eMipDR, v4);
1686  fillEnergy(0, ieta, hCone, eMipDR, v4);
1687  if (e_inCone < cutNeutral_) {
1688  fillHist(14, v4);
1689  fillEnergy(4, ieta, hCone, eMipDR, v4);
1690  fillEnergy(3, ieta, hCone, eMipDR, v4);
1691  }
1692  }
1693  }
1694  }
1695  } else if (doL2L3_) {
1696  fillHist(15,v4);
1697  if (selectTk) {
1698  fillHist(16,v4);
1699  fillCuts(1, eMipDR, conehmaxNearP, e_inCone, v4, ieta, (mindR>dr_L1_));
1700  if (conehmaxNearP < cutCharge_) {
1701  fillHist(17,v4);
1702  if (eMipDR < cutMip_) {
1703  fillHist(18,v4);
1704  fillEnergy(2, ieta, hCone, eMipDR, v4);
1705  fillEnergy(0, ieta, hCone, eMipDR, v4);
1706  if (e_inCone < cutNeutral_) {
1707  fillHist(19, v4);
1708  fillEnergy(5, ieta, hCone, eMipDR, v4);
1709  fillEnergy(3, ieta, hCone, eMipDR, v4);
1710  }
1711  }
1712  }
1713  }
1714  }
1715  }
1716 // edm::LogVerbatim("IsoTrack") << "Number of tracks selected offline " << nselTk;
1717  }
1718 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
const double a_coneR_
Definition: IsoTrig.cc:164
std::string theTrackQuality_
Definition: IsoTrig.cc:160
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:192
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:190
const double a_charIsoR_
Definition: IsoTrig.cc:164
const double a_neutR2_
Definition: IsoTrig.cc:165
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:188
const int verbosity_
Definition: IsoTrig.cc:156
std::vector< EcalRecHit >::const_iterator const_iterator
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:191
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:263
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:660
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
const double a_mipR_
Definition: IsoTrig.cc:165
const double dr_L1_
Definition: IsoTrig.cc:164
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:189
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void fillHist(int, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1939
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const double a_neutR1_
Definition: IsoTrig.cc:165
void fillEnergy(int, int, double, double, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1984
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:163
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 pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
int k[5][pyjets_maxn]
unsigned int id
const double cutCharge_
Definition: IsoTrig.cc:166
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2014
math::XYZPoint leadPV_
Definition: IsoTrig.cc:195
const double cutMip_
Definition: IsoTrig.cc:165
const double cutNeutral_
Definition: IsoTrig.cc:166
T const * product() const
Definition: ESHandle.h:86
void fillCuts(int, double, double, double, math::XYZTLorentzVector &, int, bool)
Definition: IsoTrig.cc:1966
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:666
const bool doL2L3_
Definition: IsoTrig.cc:154
void IsoTrig::studyMipCut ( edm::Handle< reco::TrackCollection > &  trkCollection,
edm::Handle< reco::IsolatedPixelTrackCandidateCollection > &  L2cands 
)
private

Definition at line 1333 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(), cutCharge_, cutMip_, cutNeutral_, dR(), runTauDisplay::dr, spr::eCone_ecal(), spr::eCone_hcal(), endcapRecHitsHandle_, reco::TrackBase::eta(), fillDifferences(), spr::goodTrack(), h_EnIn, h_EnOut, h_MipEnMatch, h_MipEnNoMatch, hbhe_, mps_fire::i, edm::HandleBase::isValid(), leadPV_, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, MipCutTree_, nTracks(), reco::TrackBase::p(), pG_, reco::TrackBase::phi(), edm::ESHandle< T >::product(), spr::propagateCALO(), reco::TrackBase::pt(), pushMipCutTreeVecs(), reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameters_, theTrackQuality_, and verbosity_.

Referenced by analyze(), and endRun().

1334  {
1335 
1337  if (verbosity_%10>0) edm::LogVerbatim("IsoTrack") << "inside studymipcut";
1338  if (!trkCollection.isValid()) {
1339  edm::LogWarning("IsoTrack") << "trkCollection.isValid is false";
1340  } else {
1341  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1342  const MagneticField *bField = bFieldH_.product();
1343  const CaloGeometry* geo = pG_.product();
1344  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1345  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections1, ((verbosity_/100)%10>2));
1346  if (verbosity_%10>0)
1347  edm::LogVerbatim("IsoTrack") << "Number of L2cands:" << L2cands->size()
1348  << " to be matched to something out of "
1349  << trkCaloDirections1.size()<<" reco tracks";
1350  for (unsigned int i=0; i<L2cands->size(); i++) {
1353  double enIn = candref->energyIn();
1354  h_EnIn->Fill(candref->energyIn());
1355  h_EnOut->Fill(candref->energyOut());
1356  math::XYZTLorentzVector v1(candref->track()->px(),candref->track()->py(),
1357  candref->track()->pz(),candref->track()->p());
1358  if (verbosity_%10>1)
1359  edm::LogVerbatim("IsoTrack") << "HLT Level Candidate eta/phi/pt/enIn:"
1360  << candref->track()->eta() << "/"
1361  << candref->track()->phi() << "/"
1362  << candref->track()->pt() << "/"
1363  << candref->energyIn();
1364  math::XYZTLorentzVector mindRvec;
1365  double mindR=999.9, mindP1=999.9, eMipDR=0.0;
1366  std::vector<bool> selFlags;
1367  unsigned int nTracks=0;
1368  double conehmaxNearP = 0, hCone=0;
1369  for (trkDetItr = trkCaloDirections1.begin();
1370  trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++){
1371  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1372  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(),
1373  pTrack->pz(), pTrack->p());
1374  double dr = dR(v1,v2);
1375  double dp1 = std::abs(1./v1.r() - 1./v2.r());
1376  if (verbosity_%1000>0)
1377  edm::LogVerbatim("IsoTrack") << "This recotrack(eta/phi/pt) "
1378  << pTrack->eta() << "/" << pTrack->phi()
1379  << "/" << pTrack->pt() << " has dr/dp= "
1380  << dr << "/" << dp1;
1381  if (dr<mindR) {
1382  mindR = dr;
1383  mindP1= dp1;
1384  mindRvec=v2;
1385  int nRH_eMipDR=0, nNearTRKs=0;
1386  eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1387  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1388  trkDetItr->pointECAL, a_mipR_,
1389  trkDetItr->directionECAL, nRH_eMipDR);
1390  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_,
1391  ((verbosity_/100)%10>1));
1393  oneCutParameters.maxDxyPV = 10;
1394  oneCutParameters.maxDzPV = 100;
1395  oneCutParameters.maxInMiss = 2;
1396  oneCutParameters.maxOutMiss= 2;
1397  bool qltyFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters,
1398  ((verbosity_/100)%10>1));
1399  oneCutParameters = selectionParameters_;
1400  oneCutParameters.maxDxyPV = 10;
1401  oneCutParameters.maxDzPV = 100;
1402  bool qltyMissFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters,
1403  ((verbosity_/100)%10>1));
1404  oneCutParameters = selectionParameters_;
1405  oneCutParameters.maxInMiss = 2;
1406  oneCutParameters.maxOutMiss= 2;
1407  bool qltyPVFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters,
1408  ((verbosity_/100)%10>1));
1409  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections1,
1410  a_charIsoR_, nNearTRKs,
1411  ((verbosity_/100)%10>1));
1412  double e1 = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1414  trkDetItr->pointHCAL,
1415  trkDetItr->pointECAL,
1416  a_neutR1_, trkDetItr->directionECAL,
1417  nRH_eMipDR);
1418  double e2 = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1420  trkDetItr->pointHCAL,
1421  trkDetItr->pointECAL,
1422  a_neutR2_, trkDetItr->directionECAL,
1423  nRH_eMipDR);
1424  double e_inCone = e2 - e1;
1425  bool chgIsolFlag = (conehmaxNearP < cutCharge_);
1426  bool mipFlag = (eMipDR < cutMip_);
1427  bool neuIsolFlag = (e_inCone < cutNeutral_);
1428  bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1429  selFlags.clear();
1430  selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1431  selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1432  selFlags.push_back(trkpropFlag); selFlags.push_back(chgIsolFlag);
1433  selFlags.push_back(neuIsolFlag); selFlags.push_back(mipFlag);
1434  double distFromHotCell=-99.0;
1435  int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1436  GlobalPoint gposHotCell(0.,0.,0.);
1437  std::vector<DetId> coneRecHitDetIds;
1438  hCone = spr::eCone_hcal(geo, hbhe_, trkDetItr->pointHCAL,
1439  trkDetItr->pointECAL,
1440  a_coneR_, trkDetItr->directionHCAL,
1441  nRecHitsCone, coneRecHitDetIds,
1442  distFromHotCell, ietaHotCell, iphiHotCell,
1443  gposHotCell, -1);
1444  }
1445  }
1446  pushMipCutTreeVecs(v1, mindRvec, enIn, eMipDR, mindR, mindP1, selFlags,
1447  hCone);
1448  fillDifferences(6, v1, mindRvec, (verbosity_%10 >0));
1449  if (mindR>=0.05) {
1450  fillDifferences(8, v1, mindRvec, (verbosity_%10 >0));
1451  h_MipEnNoMatch->Fill(candref->energyIn(), eMipDR);
1452  } else {
1453  fillDifferences(7, v1, mindRvec, (verbosity_%10 >0));
1454  h_MipEnMatch->Fill(candref->energyIn(), eMipDR);
1455  }
1456  }
1457  }
1458  MipCutTree_->Fill();
1459 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
const double a_coneR_
Definition: IsoTrig.cc:164
std::string theTrackQuality_
Definition: IsoTrig.cc:160
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:192
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:190
TH1D * h_EnIn
Definition: IsoTrig.cc:250
const double a_charIsoR_
Definition: IsoTrig.cc:164
const double a_neutR2_
Definition: IsoTrig.cc:165
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:188
const int verbosity_
Definition: IsoTrig.cc:156
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:191
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:678
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:660
const double a_mipR_
Definition: IsoTrig.cc:165
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:781
TH1D * h_EnOut
Definition: IsoTrig.cc:250
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:189
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:684
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
const double a_neutR1_
Definition: IsoTrig.cc:165
double pt() const
track transverse momentum
Definition: TrackBase.h:654
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:163
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 pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
TH2D * h_MipEnMatch
Definition: IsoTrig.cc:251
const double cutCharge_
Definition: IsoTrig.cc:166
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2014
TTree * MipCutTree_
Definition: IsoTrig.cc:202
void clearMipCutTreeVectors()
Definition: IsoTrig.cc:739
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
Definition: IsoTrig.cc:1946
TH2D * h_MipEnNoMatch
Definition: IsoTrig.cc:251
math::XYZPoint leadPV_
Definition: IsoTrig.cc:195
const double cutMip_
Definition: IsoTrig.cc:165
const double cutNeutral_
Definition: IsoTrig.cc:166
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:666
void IsoTrig::studyTiming ( const edm::Event theEvent)
private

Definition at line 1222 of file IsoTrig.cc.

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

Referenced by analyze(), and endRun().

1222  {
1223  t_timeL2Prod->clear(); t_nPixCand->clear(); t_nPixSeed->clear();
1224 
1225  if (verbosity_%10>0) {
1226  edm::Handle<SeedingLayerSetsHits> hblayers, helayers;
1227  theEvent.getByToken(tok_SeedingLayerHB_, hblayers);
1228  theEvent.getByToken(tok_SeedingLayerHE_, helayers);
1229  const SeedingLayerSetsHits* layershb = hblayers.product();
1230  const SeedingLayerSetsHits* layershe = helayers.product();
1231  edm::LogVerbatim("IsoTrack") << "size of Seeding TripletLayers hb/he "
1232  << layershb->size() << "/" << layershe->size();
1234  theEvent.getByToken(tok_SiPixelRecHits_, rchts);
1235  const SiPixelRecHitCollection* rechits = rchts.product();
1236  edm::LogVerbatim("IsoTrack") << "size of SiPixelRechits " <<rechits->size();
1237  }
1238  int nCandHB=pixelTrackRefsHB_.size(), nCandHE=pixelTrackRefsHE_.size();
1239  int nSeedHB=0, nSeedHE=0;
1240 
1241  if (nCandHE>0) {
1242  edm::Handle<reco::VertexCollection> pVertHB, pVertHE;
1243  theEvent.getByToken(tok_verthb_,pVertHB);
1244  theEvent.getByToken(tok_verthe_,pVertHE);
1246  theEvent.getByToken(tok_l1cand_, l1trigobj);
1247 
1248  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
1249  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
1250  std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
1251 
1252  l1trigobj->getObjects(trigger::TriggerL1TauJet, l1tauobjref);
1253  l1trigobj->getObjects(trigger::TriggerL1CenJet, l1jetobjref);
1254  l1trigobj->getObjects(trigger::TriggerL1ForJet, l1forjetobjref);
1255 
1256  double ptTriggered = -10;
1257  double etaTriggered = -100;
1258  double phiTriggered = -100;
1259  for (unsigned int p=0; p<l1tauobjref.size(); p++) {
1260  if (l1tauobjref[p]->pt()>ptTriggered) {
1261  ptTriggered = l1tauobjref[p]->pt();
1262  phiTriggered = l1tauobjref[p]->phi();
1263  etaTriggered = l1tauobjref[p]->eta();
1264  }
1265  }
1266  for (unsigned int p=0; p<l1jetobjref.size(); p++) {
1267  if (l1jetobjref[p]->pt()>ptTriggered) {
1268  ptTriggered = l1jetobjref[p]->pt();
1269  phiTriggered = l1jetobjref[p]->phi();
1270  etaTriggered = l1jetobjref[p]->eta();
1271  }
1272  }
1273  for (unsigned int p=0; p<l1forjetobjref.size(); p++) {
1274  if (l1forjetobjref[p]->pt()>ptTriggered) {
1275  ptTriggered=l1forjetobjref[p]->pt();
1276  phiTriggered=l1forjetobjref[p]->phi();
1277  etaTriggered=l1forjetobjref[p]->eta();
1278  }
1279  }
1280  for(unsigned iS=0; iS<pixelTrackRefsHE_.size(); iS++) {
1281  reco::VertexCollection::const_iterator vitSel;
1282  double minDZ = 100;
1283  bool vtxMatch;
1284  for (reco::VertexCollection::const_iterator vit=pVertHE->begin();
1285  vit!=pVertHE->end(); vit++) {
1286  if (fabs(pixelTrackRefsHE_[iS]->dz(vit->position()))<minDZ) {
1287  minDZ = fabs(pixelTrackRefsHE_[iS]->dz(vit->position()));
1288  vitSel = vit;
1289  }
1290  }
1291  //cut on dYX:
1292  if ((fabs(pixelTrackRefsHE_[iS]->dxy(vitSel->position())) < vtxCutSeed_)||
1293  (minDZ==100)) vtxMatch=true;
1294 
1295  //select tracks not matched to triggered L1 jet
1296  double R = deltaR(etaTriggered, phiTriggered,
1297  pixelTrackRefsHE_[iS]->eta(),
1298  pixelTrackRefsHE_[iS]->phi());
1299  if (R>tauUnbiasCone_ && vtxMatch) nSeedHE++;
1300  }
1301  for (unsigned iS=0; iS<pixelTrackRefsHB_.size(); iS++) {
1302  reco::VertexCollection::const_iterator vitSel;
1303  double minDZ = 100;
1304  bool vtxMatch(false);
1305  for (reco::VertexCollection::const_iterator vit=pVertHB->begin();
1306  vit!=pVertHB->end(); vit++) {
1307  if (fabs(pixelTrackRefsHB_[iS]->dz(vit->position()))<minDZ) {
1308  minDZ = fabs(pixelTrackRefsHB_[iS]->dz(vit->position()));
1309  vitSel = vit;
1310  }
1311  }
1312  //cut on dYX:
1313  if ((fabs(pixelTrackRefsHB_[iS]->dxy(vitSel->position()))<101.0) ||
1314  (minDZ==100)) vtxMatch=true;
1315 
1316  //select tracks not matched to triggered L1 jet
1317  double R = deltaR(etaTriggered, phiTriggered,
1318  pixelTrackRefsHB_[iS]->eta(),
1319  pixelTrackRefsHB_[iS]->phi());
1320  if (R>1.2 && vtxMatch) nSeedHB++;
1321  }
1322 
1323  if (verbosity_ % 10 > 0) {
1324  edm::LogVerbatim("IsoTrack") << "(HB/HE) nCand: " << nCandHB << "/" << nCandHE
1325  << "nSeed: " << nSeedHB << "/" << nSeedHE;
1326  }
1327  }
1328  t_nPixSeed->push_back(nSeedHB); t_nPixSeed->push_back(nSeedHE);
1329  t_nPixCand->push_back(nCandHB); t_nPixCand->push_back(nCandHE);
1330 
1331  TimingTree_->Fill();
1332 }
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< reco::TrackRef > pixelTrackRefsHB_
Definition: IsoTrig.cc:187
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
const int verbosity_
Definition: IsoTrig.cc:156
std::vector< int > * t_nPixSeed
Definition: IsoTrig.cc:205
const double tauUnbiasCone_
Definition: IsoTrig.cc:159
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHB_
Definition: IsoTrig.cc:179
edm::EDGetTokenT< SeedingLayerSetsHits > tok_SeedingLayerHE_
Definition: IsoTrig.cc:180
std::vector< double > * t_timeL2Prod
Definition: IsoTrig.cc:203
std::vector< reco::TrackRef > pixelTrackRefsHE_
Definition: IsoTrig.cc:187
std::vector< int > * t_nPixCand
Definition: IsoTrig.cc:204
T const * product() const
Definition: Handle.h:74
edm::EDGetTokenT< reco::VertexCollection > tok_verthb_
Definition: IsoTrig.cc:178
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_l1cand_
Definition: IsoTrig.cc:183
size_type size() const
edm::EDGetTokenT< SiPixelRecHitCollection > tok_SiPixelRecHits_
Definition: IsoTrig.cc:181
edm::EDGetTokenT< reco::VertexCollection > tok_verthe_
Definition: IsoTrig.cc:178
unsigned short size() const
Get the number of SeedingLayerSets.
const double vtxCutSeed_
Definition: IsoTrig.cc:158
TTree * TimingTree_
Definition: IsoTrig.cc:202
void IsoTrig::studyTrigger ( edm::Handle< reco::TrackCollection > &  trkCollection,
std::vector< reco::TrackCollection::const_iterator > &  goodTks 
)
private

Definition at line 1461 of file IsoTrig.cc.

References funct::abs(), boostedElectronIsolation_cff::deltaR, dEta(), 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(), and endRun().

1462  {
1463 
1464  if (verbosity_%10 > 0) edm::LogVerbatim("IsoTrack") << "Inside StudyTrigger";
1466  for (int j=0; j<3; j++) {
1467  for (unsigned int k=0; k<vec_[j].size(); k++) {
1468  if (verbosity_%10 > 0)
1469  edm::LogVerbatim("IsoTrack") << "vec[" << j << "][" << k << "] pt "
1470  << vec_[j][k].pt() << " eta "
1471  << vec_[j][k].eta() << " phi "
1472  << vec_[j][k].phi();
1473  fillHist(j, vec_[j][k]);
1474  }
1475  }
1476 
1477  double deta, dphi, dr;
1479  for (int lvl=1; lvl<3; lvl++) {
1480  for (unsigned int i=0; i<vec_[lvl].size(); i++) {
1481  deta = dEta(vec_[0][0],vec_[lvl][i]);
1482  dphi = dPhi(vec_[0][0],vec_[lvl][i]);
1483  dr = dR(vec_[0][0],vec_[lvl][i]);
1484  if (verbosity_%10 > 1)
1485  edm::LogVerbatim("IsoTrack") << "lvl " <<lvl << " i " << i << " deta "
1486  << deta << " dphi " << dphi << " dR " <<dr;
1487  h_dEtaL1[lvl-1] -> Fill(deta);
1488  h_dPhiL1[lvl-1] -> Fill(dphi);
1489  h_dRL1[lvl-1] -> Fill(std::sqrt(dr));
1490  }
1491  }
1492 
1493  math::XYZTLorentzVector mindRvec;
1494  double mindR;
1495  for (unsigned int k=0; k<vec_[2].size(); ++k) {
1497  mindR=999.9;
1498  if (verbosity_%10 > 1)
1499  edm::LogVerbatim("IsoTrack") << "L3obj: pt " << vec_[2][k].pt() << " eta "
1500  << vec_[2][k].eta() << " phi "
1501  << vec_[2][k].phi();
1502  for (unsigned int j=0; j<vec_[1].size(); j++) {
1503  dr = dR(vec_[2][k],vec_[1][j]);
1504  if (dr<mindR) {
1505  mindR=dr;
1506  mindRvec=vec_[1][j];
1507  }
1508  }
1509  fillDifferences(0, vec_[2][k], mindRvec, (verbosity_%10 >0));
1510  if (mindR < 0.03) {
1511  fillDifferences(1, vec_[2][k], mindRvec, (verbosity_%10 >0));
1512  fillHist(6, mindRvec);
1513  fillHist(8, vec_[2][k]);
1514  } else {
1515  fillDifferences(2, vec_[2][k], mindRvec, (verbosity_%10 >0));
1516  fillHist(7, mindRvec);
1517  fillHist(9, vec_[2][k]);
1518  }
1519 
1521  mindR=999.9;
1522  if (verbosity_%10 > 0)
1523  edm::LogVerbatim("IsoTrack") << "Now Matching L3 track with reco: L3 Track (eta, phi) "
1524  << vec_[2][k].eta() << ":" << vec_[2][k].phi()
1525  << " L2 Track " << mindRvec.eta() << ":"
1526  << mindRvec.phi() << " dR " << mindR;
1527  reco::TrackCollection::const_iterator goodTk = trkCollection->end();
1528  if (trkCollection.isValid()) {
1529  double mindP(9999.9);
1530  reco::TrackCollection::const_iterator trkItr;
1531  for (trkItr=trkCollection->begin();
1532  trkItr!=trkCollection->end(); trkItr++) {
1533  math::XYZTLorentzVector v4(trkItr->px(), trkItr->py(),
1534  trkItr->pz(), trkItr->p());
1535  double deltaR = dR(v4, vec_[2][k]);
1536  double dp = std::abs(v4.r()/vec_[2][k].r()-1.0);
1537  if (deltaR<mindR) {
1538  mindR = deltaR;
1539  mindP = dp;
1540  mindRvec = v4;
1541  goodTk = trkItr;
1542  }
1543  if ((verbosity_/10)%10>1 && deltaR<1.0)
1544  edm::LogVerbatim("IsoTrack") << "reco track: pt " << v4.pt()
1545  << " eta " << v4.eta() << " phi "
1546  << v4.phi() << " DR " << deltaR;
1547  }
1548  if (verbosity_%10 > 0)
1549  edm::LogVerbatim("IsoTrack") << "Now Matching at Reco level in step 1 DR: "
1550  << mindR << ":" << mindP << " eta:phi "
1551  << mindRvec.eta() << ":" << mindRvec.phi();
1552  if (mindR < 0.03 && mindP > 0.1) {
1553  for (trkItr=trkCollection->begin();
1554  trkItr!=trkCollection->end(); trkItr++) {
1555  math::XYZTLorentzVector v4(trkItr->px(), trkItr->py(),
1556  trkItr->pz(), trkItr->p());
1557  double deltaR = dR(v4, vec_[2][k]);
1558  double dp = std::abs(v4.r()/vec_[2][k].r()-1.0);
1559  if (dp<mindP && deltaR<0.03) {
1560  mindR = deltaR;
1561  mindP = dp;
1562  mindRvec = v4;
1563  goodTk = trkItr;
1564  }
1565  }
1566  if (verbosity_%10 > 0)
1567  edm::LogVerbatim("IsoTrack") << "Now Matching at Reco level in step 2 DR: "
1568  << mindR << ":" << mindP << " eta:phi "
1569  << mindRvec.eta() << ":"<<mindRvec.phi();
1570  }
1571  fillDifferences(3, vec_[2][k], mindRvec, (verbosity_%10 >0));
1572  fillHist(3, mindRvec);
1573  if(mindR < 0.03) {
1574  fillDifferences(4, vec_[2][k], mindRvec, (verbosity_%10 >0));
1575  fillHist(4, mindRvec);
1576  } else {
1577  fillDifferences(5, vec_[2][k], mindRvec, (verbosity_%10 >0));
1578  fillHist(5, mindRvec);
1579  }
1580  if (goodTk != trkCollection->end()) goodTks.push_back(goodTk);
1581  }
1582  }
1583 }
const int verbosity_
Definition: IsoTrig.cc:156
TH1D * h_dEtaL1[2]
Definition: IsoTrig.cc:256
std::vector< math::XYZTLorentzVector > vec_[3]
Definition: IsoTrig.cc:263
TH1D * h_dPhiL1[2]
Definition: IsoTrig.cc:256
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void fillHist(int, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1939
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:2002
int k[5][pyjets_maxn]
double dEta(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:1998
double dR(math::XYZTLorentzVector &, math::XYZTLorentzVector &)
Definition: IsoTrig.cc:2014
void fillDifferences(int, math::XYZTLorentzVector &, math::XYZTLorentzVector &, bool)
Definition: IsoTrig.cc:1946
TH1D * h_dRL1[2]
Definition: IsoTrig.cc:256
void IsoTrig::StudyTrkEbyP ( edm::Handle< reco::TrackCollection > &  trkCollection)
private

Definition at line 1102 of file IsoTrig.cc.

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

Referenced by analyze(), and endRun().

1102  {
1103 
1104  t_TrkselTkFlag->clear();
1105  t_TrkqltyFlag->clear();
1106  t_TrkMissFlag->clear();
1107  t_TrkPVFlag->clear();
1108  t_TrkNuIsolFlag->clear();
1109  t_TrkhCone->clear();
1110  t_TrkP->clear();
1111 
1112  if (!trkCollection.isValid()) {
1113  edm::LogVerbatim("IsoTrack") << "trkCollection.isValid is false";
1114  } else {
1115  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
1116  const MagneticField *bField = bFieldH_.product();
1117  const CaloGeometry* geo = pG_.product();
1118  std::vector<spr::propagatedTrackDirection> trkCaloDirections1;
1119  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_,
1120  trkCaloDirections1, ((verbosity_/100)%10>2));
1121  unsigned int nTracks=0;
1122  int nRH_eMipDR=0, nNearTRKs=0;
1123  std::vector<bool> selFlags;
1124  for (trkDetItr = trkCaloDirections1.begin();
1125  trkDetItr != trkCaloDirections1.end(); trkDetItr++,nTracks++) {
1126  double conehmaxNearP = 0, hCone=0, eMipDR=0.0;
1127  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
1128  if (verbosity_%10>0)
1129  edm::LogVerbatim("IsoTrack") << "track no. " << nTracks << " p(): "
1130  << pTrack->p();
1131  if (pTrack->p() > 20) {
1132  math::XYZTLorentzVector v2(pTrack->px(), pTrack->py(),
1133  pTrack->pz(), pTrack->p());
1134  eMipDR = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1135  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1136  trkDetItr->pointECAL, a_mipR_,
1137  trkDetItr->directionECAL, nRH_eMipDR);
1138  bool selectTk = spr::goodTrack(pTrack, leadPV_, selectionParameters_,
1139  ((verbosity_/100)%10>1));
1141  oneCutParameters.maxDxyPV = 10;
1142  oneCutParameters.maxDzPV = 100;
1143  oneCutParameters.maxInMiss = 2;
1144  oneCutParameters.maxOutMiss= 2;
1145  bool qltyFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters,
1146  ((verbosity_/100)%10>1));
1147  oneCutParameters = selectionParameters_;
1148  oneCutParameters.maxDxyPV = 10;
1149  oneCutParameters.maxDzPV = 100;
1150  bool qltyMissFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters,
1151  ((verbosity_/100)%10>1));
1152  oneCutParameters = selectionParameters_;
1153  oneCutParameters.maxInMiss = 2;
1154  oneCutParameters.maxOutMiss= 2;
1155  bool qltyPVFlag = spr::goodTrack(pTrack, leadPV_, oneCutParameters,
1156  ((verbosity_/100)%10>1));
1157  if ((verbosity_/1000)%10>1)
1158  edm::LogVerbatim("IsoTrack") << "sel " << selectTk
1159  << "ntracks " << nTracks
1160  << " a_charIsoR " << a_charIsoR_
1161  << " nNearTRKs " << nNearTRKs;
1162  conehmaxNearP = spr::chargeIsolationCone(nTracks, trkCaloDirections1,
1163  a_charIsoR_, nNearTRKs,
1164  ((verbosity_/100)%10>1));
1165  if ((verbosity_/1000)%10>1)
1166  edm::LogVerbatim("IsoTrack") << "coneh " << conehmaxNearP
1167  << "ok " << trkDetItr->okECAL << " "
1168  << trkDetItr->okHCAL;
1169  double e1 = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1170  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1171  trkDetItr->pointECAL, a_neutR1_,
1172  trkDetItr->directionECAL, nRH_eMipDR);
1173  double e2 = spr::eCone_ecal(geo, barrelRecHitsHandle_,
1174  endcapRecHitsHandle_, trkDetItr->pointHCAL,
1175  trkDetItr->pointECAL, a_neutR2_,
1176  trkDetItr->directionECAL, nRH_eMipDR);
1177  double e_inCone = e2 - e1;
1178  bool chgIsolFlag = (conehmaxNearP < cutCharge_);
1179  bool mipFlag = (eMipDR < cutMip_);
1180  bool neuIsolFlag = (e_inCone < cutNeutral_);
1181  bool trkpropFlag = ((trkDetItr->okECAL) && (trkDetItr->okHCAL));
1182  selFlags.clear();
1183  selFlags.push_back(selectTk); selFlags.push_back(qltyFlag);
1184  selFlags.push_back(qltyMissFlag); selFlags.push_back(qltyPVFlag);
1185  if (verbosity_%10>0)
1186  edm::LogVerbatim("IsoTrack") << "emip: " << eMipDR << "<" << cutMip_
1187  << "(" << mipFlag << ")" << " ; ok: "
1188  << trkDetItr->okECAL << "/"
1189  << trkDetItr->okHCAL << " ; chgiso: "
1190  << conehmaxNearP << "<" << cutCharge_
1191  << "(" << chgIsolFlag << ")";
1192 
1193  if (chgIsolFlag && mipFlag && trkpropFlag) {
1194  double distFromHotCell=-99.0;
1195  int nRecHitsCone=-99, ietaHotCell=-99, iphiHotCell=-99;
1196  GlobalPoint gposHotCell(0.,0.,0.);
1197  std::vector<DetId> coneRecHitDetIds;
1198  hCone = spr::eCone_hcal(geo, hbhe_, trkDetItr->pointHCAL,
1199  trkDetItr->pointECAL,
1200  a_coneR_, trkDetItr->directionHCAL,
1201  nRecHitsCone, coneRecHitDetIds,
1202  distFromHotCell, ietaHotCell, iphiHotCell,
1203  gposHotCell, -1);
1204  // push vectors into the Tree
1205  t_TrkselTkFlag ->push_back(selFlags[0]);
1206  t_TrkqltyFlag ->push_back(selFlags[1]);
1207  t_TrkMissFlag ->push_back(selFlags[2]);
1208  t_TrkPVFlag ->push_back(selFlags[3]);
1209  t_TrkNuIsolFlag->push_back(neuIsolFlag);
1210  t_TrkhCone ->push_back(hCone);
1211  t_TrkP ->push_back(pTrack->p());
1212  }
1213  }
1214  }
1215  if (verbosity_%10>0)
1216  edm::LogVerbatim("IsoTrack") << "Filling " << t_TrkP->size()
1217  << " tracks in TrkRestree out of " <<nTracks;
1218  }
1219  TrkResTree_->Fill();
1220 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:648
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
const double a_coneR_
Definition: IsoTrig.cc:164
std::string theTrackQuality_
Definition: IsoTrig.cc:160
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
const unsigned int nTracks(const reco::Vertex &sv)
edm::Handle< EcalRecHitCollection > endcapRecHitsHandle_
Definition: IsoTrig.cc:192
edm::Handle< HBHERecHitCollection > hbhe_
Definition: IsoTrig.cc:190
const double a_charIsoR_
Definition: IsoTrig.cc:164
const double a_neutR2_
Definition: IsoTrig.cc:165
edm::ESHandle< MagneticField > bFieldH_
Definition: IsoTrig.cc:188
const int verbosity_
Definition: IsoTrig.cc:156
edm::Handle< EcalRecHitCollection > barrelRecHitsHandle_
Definition: IsoTrig.cc:191
std::vector< double > * t_TrkhCone
Definition: IsoTrig.cc:208
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:660
const double a_mipR_
Definition: IsoTrig.cc:165
edm::ESHandle< CaloGeometry > pG_
Definition: IsoTrig.cc:189
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< bool > * t_TrkNuIsolFlag
Definition: IsoTrig.cc:214
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
std::vector< bool > * t_TrkPVFlag
Definition: IsoTrig.cc:213
const double a_neutR1_
Definition: IsoTrig.cc:165
std::vector< double > * t_TrkP
Definition: IsoTrig.cc:209
spr::trackSelectionParameters selectionParameters_
Definition: IsoTrig.cc:163
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 pz() const
z coordinate of momentum vector
Definition: TrackBase.h:672
const double cutCharge_
Definition: IsoTrig.cc:166
std::vector< bool > * t_TrkMissFlag
Definition: IsoTrig.cc:212
std::vector< bool > * t_TrkqltyFlag
Definition: IsoTrig.cc:211
TTree * TrkResTree_
Definition: IsoTrig.cc:202
math::XYZPoint leadPV_
Definition: IsoTrig.cc:195
const double cutMip_
Definition: IsoTrig.cc:165
const double cutNeutral_
Definition: IsoTrig.cc:166
std::vector< bool > * t_TrkselTkFlag
Definition: IsoTrig.cc:210
T const * product() const
Definition: ESHandle.h:86
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:666

Member Data Documentation

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

Definition at line 164 of file IsoTrig.cc.

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

const double IsoTrig::a_mipR_
private

Definition at line 165 of file IsoTrig.cc.

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

const double IsoTrig::a_neutIsoR_
private

Definition at line 164 of file IsoTrig.cc.

Referenced by IsoTrig().

const double IsoTrig::a_neutR1_
private

Definition at line 165 of file IsoTrig.cc.

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

const double IsoTrig::a_neutR2_
private

Definition at line 165 of file IsoTrig.cc.

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

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

Definition at line 191 of file IsoTrig.cc.

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

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

Definition at line 193 of file IsoTrig.cc.

Referenced by analyze().

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

Definition at line 162 of file IsoTrig.cc.

Referenced by analyze(), and GetEtaPhiAtEcal().

bool IsoTrig::changed_
private

Definition at line 199 of file IsoTrig.cc.

Referenced by analyze(), and beginRun().

TTree * IsoTrig::ChgIsolnTree_
private

Definition at line 202 of file IsoTrig.cc.

Referenced by beginJob(), and chgIsolation().

const double IsoTrig::cutCharge_
private

Definition at line 166 of file IsoTrig.cc.

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

const double IsoTrig::cutMip_
private

Definition at line 165 of file IsoTrig.cc.

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

const double IsoTrig::cutNeutral_
private

Definition at line 166 of file IsoTrig.cc.

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

const bool IsoTrig::doChgIsolTree_
private

Definition at line 155 of file IsoTrig.cc.

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

const bool IsoTrig::doL2L3_
private

Definition at line 154 of file IsoTrig.cc.

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

const bool IsoTrig::doMipCutTree_
private

Definition at line 154 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

const bool IsoTrig::doStudyIsol_
private

Definition at line 155 of file IsoTrig.cc.

Referenced by analyze().

const bool IsoTrig::doTiming_
private

Definition at line 154 of file IsoTrig.cc.

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

const bool IsoTrig::doTrkResTree_
private

Definition at line 155 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

const double IsoTrig::dr_L1_
private

Definition at line 164 of file IsoTrig.cc.

Referenced by studyIsolation().

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

Definition at line 192 of file IsoTrig.cc.

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

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

Definition at line 201 of file IsoTrig.cc.

Referenced by beginJob(), and endJob().

TH1I * IsoTrig::g_Accepts
private

Definition at line 262 of file IsoTrig.cc.

Referenced by endJob().

TH1I* IsoTrig::g_Pre
private

Definition at line 262 of file IsoTrig.cc.

Referenced by endJob().

TH1I * IsoTrig::g_PreHLT
private

Definition at line 262 of file IsoTrig.cc.

Referenced by endJob().

TH1I * IsoTrig::g_PreL1
private

Definition at line 262 of file IsoTrig.cc.

Referenced by endJob().

TH1D* IsoTrig::h_dEta[9]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D* IsoTrig::h_dEtaL1[2]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and studyTrigger().

TH1D* IsoTrig::h_dinvPt[9]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dP[9]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dPhi[9]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dPhiL1[2]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and studyTrigger().

TH1D * IsoTrig::h_dPt[9]
private

Definition at line 257 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH1D * IsoTrig::h_dRL1[2]
private

Definition at line 256 of file IsoTrig.cc.

Referenced by beginJob(), and studyTrigger().

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

Definition at line 261 of file IsoTrig.cc.

Referenced by beginJob(), and fillEnergy().

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

Definition at line 261 of file IsoTrig.cc.

Referenced by beginJob(), and fillEnergy().

TH1D* IsoTrig::h_eMaxNearP[2]
private

Definition at line 259 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_eMip[2]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D * IsoTrig::h_eNeutIso[2]
private

Definition at line 259 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1D* IsoTrig::h_EnIn
private

Definition at line 250 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH1D * IsoTrig::h_EnOut
private

Definition at line 250 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH1D * IsoTrig::h_eta[20]
private

Definition at line 255 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

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

Definition at line 260 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

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

Definition at line 260 of file IsoTrig.cc.

Referenced by beginJob(), and fillCuts().

TH1I * IsoTrig::h_Filters
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_HLT
private

Definition at line 252 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_L1ObjEnergy
private

Definition at line 254 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_mindR[9]
private

Definition at line 258 of file IsoTrig.cc.

Referenced by beginJob(), and fillDifferences().

TH2D* IsoTrig::h_MipEnMatch
private

Definition at line 251 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH2D * IsoTrig::h_MipEnNoMatch
private

Definition at line 251 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

TH1I* IsoTrig::h_nHLT
private

Definition at line 252 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_nL3Objs
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D* IsoTrig::h_p[20]
private

Definition at line 255 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

TH1D * IsoTrig::h_phi[20]
private

Definition at line 255 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

TH1I* IsoTrig::h_Pre
private

Definition at line 253 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_PreHLT
private

Definition at line 252 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_PreHLTwt
private

Definition at line 254 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1I * IsoTrig::h_PreL1
private

Definition at line 252 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D* IsoTrig::h_PreL1wt
private

Definition at line 254 of file IsoTrig.cc.

Referenced by analyze(), and beginJob().

TH1D * IsoTrig::h_pt[20]
private

Definition at line 255 of file IsoTrig.cc.

Referenced by beginJob(), and fillHist().

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

Definition at line 190 of file IsoTrig.cc.

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

HLTPrescaleProvider IsoTrig::hltPrescaleProvider_
private

Definition at line 150 of file IsoTrig.cc.

Referenced by analyze(), and beginRun().

const edm::InputTag IsoTrig::l1CandTag_
private

Definition at line 152 of file IsoTrig.cc.

Referenced by IsoTrig().

const edm::InputTag IsoTrig::l2CandTag_
private

Definition at line 152 of file IsoTrig.cc.

Referenced by IsoTrig().

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

Definition at line 167 of file IsoTrig.cc.

Referenced by endJob().

const double IsoTrig::minPTrackValue_
private

Definition at line 158 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

const int IsoTrig::minRunNo_
private

Definition at line 167 of file IsoTrig.cc.

Referenced by endJob().

TTree* IsoTrig::MipCutTree_
private

Definition at line 202 of file IsoTrig.cc.

Referenced by beginJob(), and studyMipCut().

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

Definition at line 152 of file IsoTrig.cc.

Referenced by IsoTrig().

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

Definition at line 157 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

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

Definition at line 187 of file IsoTrig.cc.

Referenced by analyze(), and studyTiming().

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

Definition at line 187 of file IsoTrig.cc.

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

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

Definition at line 153 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

double IsoTrig::pLimits_[6]
private

Definition at line 200 of file IsoTrig.cc.

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

const double IsoTrig::prelimCone_
private

Definition at line 159 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

const std::string IsoTrig::processName_
private

Definition at line 161 of file IsoTrig.cc.

Referenced by beginRun(), and IsoTrig().

double IsoTrig::rEB_
private

Definition at line 162 of file IsoTrig.cc.

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

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

Definition at line 194 of file IsoTrig.cc.

Referenced by analyze(), and chgIsolation().

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

Definition at line 248 of file IsoTrig.cc.

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

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

Definition at line 232 of file IsoTrig.cc.

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

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

Definition at line 230 of file IsoTrig.cc.

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

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

Definition at line 228 of file IsoTrig.cc.

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

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

Definition at line 231 of file IsoTrig.cc.

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

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

Definition at line 229 of file IsoTrig.cc.

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

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

Definition at line 237 of file IsoTrig.cc.

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

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

Definition at line 235 of file IsoTrig.cc.

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

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

Definition at line 233 of file IsoTrig.cc.

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

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

Definition at line 236 of file IsoTrig.cc.

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

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

Definition at line 234 of file IsoTrig.cc.

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

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

Definition at line 245 of file IsoTrig.cc.

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

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

Definition at line 239 of file IsoTrig.cc.

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

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

Definition at line 238 of file IsoTrig.cc.

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

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

Definition at line 247 of file IsoTrig.cc.

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

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

Definition at line 242 of file IsoTrig.cc.

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

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

Definition at line 246 of file IsoTrig.cc.

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

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

Definition at line 244 of file IsoTrig.cc.

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

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

Definition at line 243 of file IsoTrig.cc.

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

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

Definition at line 241 of file IsoTrig.cc.

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

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

Definition at line 240 of file IsoTrig.cc.

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

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

Definition at line 206 of file IsoTrig.cc.

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

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

Definition at line 204 of file IsoTrig.cc.

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

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

Definition at line 205 of file IsoTrig.cc.

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

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

Definition at line 218 of file IsoTrig.cc.

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

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

Definition at line 220 of file IsoTrig.cc.

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

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

Definition at line 216 of file IsoTrig.cc.

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

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

Definition at line 219 of file IsoTrig.cc.

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

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

Definition at line 217 of file IsoTrig.cc.

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

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

Definition at line 223 of file IsoTrig.cc.

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

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

Definition at line 225 of file IsoTrig.cc.

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

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

Definition at line 221 of file IsoTrig.cc.

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

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

Definition at line 224 of file IsoTrig.cc.

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

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

Definition at line 222 of file IsoTrig.cc.

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

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

Definition at line 226 of file IsoTrig.cc.

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

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

Definition at line 203 of file IsoTrig.cc.

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

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

Definition at line 208 of file IsoTrig.cc.

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

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

Definition at line 212 of file IsoTrig.cc.

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

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

Definition at line 214 of file IsoTrig.cc.

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

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

Definition at line 209 of file IsoTrig.cc.

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

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

Definition at line 213 of file IsoTrig.cc.

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

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

Definition at line 211 of file IsoTrig.cc.

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

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

Definition at line 210 of file IsoTrig.cc.

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

const double IsoTrig::tauUnbiasCone_
private

Definition at line 159 of file IsoTrig.cc.

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

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

Definition at line 202 of file IsoTrig.cc.

Referenced by beginJob(), and studyTiming().

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

Definition at line 174 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 175 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 176 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 172 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 177 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

Definition at line 171 of file IsoTrig.cc.

Referenced by IsoTrig().

Definition at line 183 of file IsoTrig.cc.

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

Definition at line 184 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 168 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

Definition at line 182 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 185 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 173 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 179 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 180 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 181 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 169 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 170 of file IsoTrig.cc.

Referenced by analyze(), and IsoTrig().

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

Definition at line 178 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 178 of file IsoTrig.cc.

Referenced by IsoTrig(), and studyTiming().

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

Definition at line 197 of file IsoTrig.cc.

Referenced by analyze(), and endJob().

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

Definition at line 151 of file IsoTrig.cc.

Referenced by analyze(), and endJob().

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

Definition at line 198 of file IsoTrig.cc.

Referenced by analyze(), and endJob().

TTree * IsoTrig::TrkResTree_
private

Definition at line 202 of file IsoTrig.cc.

Referenced by beginJob(), and StudyTrkEbyP().

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

Definition at line 263 of file IsoTrig.cc.

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

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

Definition at line 158 of file IsoTrig.cc.

Referenced by chgIsolation(), and IsoTrig().

const double IsoTrig::vtxCutSeed_
private

Definition at line 158 of file IsoTrig.cc.

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

double IsoTrig::zEE_
private

Definition at line 162 of file IsoTrig.cc.

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