CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
StudyHLT Class Reference

#include <StudyHLT.h>

Inheritance diagram for StudyHLT:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 StudyHLT (const edm::ParameterSet &)
 
 ~StudyHLT ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
void fillEnergy (int, int, double, double, double, double, double)
 
void fillIsolation (int, double, double, double)
 
void fillTrack (int, double, double, double, double)
 
std::string truncate_str (const std::string &)
 

Private Attributes

bool changed
 
int etaBin [nEtaBin+1]
 
bool firstEvent
 
edm::Service< TFileServicefs
 
TH1D * h_ediff [2]
 
TH1D * h_ene1 [2]
 
TH1D * h_ene2 [2]
 
TH1D * h_energy [nPVBin+4][nPBin][nEtaBin][6]
 
TH1D * h_eta [nPVBin+8]
 
TH1I * h_goodPV
 
TH1I * h_goodRun
 
TH1I * h_HLTAccept
 
std::vector< TH1I * > h_HLTAccepts
 
TH1I * h_HLTCorr
 
TH1D * h_maxNearP [2]
 
TH1I * h_nHLT
 
TH2I * h_nHLTvsRN
 
TH1I * h_ntrk [2]
 
TH1I * h_numberPV
 
TH1D * h_p [nPVBin+8]
 
TH1D * h_phi [nPVBin+8]
 
TH1D * h_pt [nPVBin+8]
 
HLTConfigProvider hltConfig_
 
std::vector< std::string > HLTNames
 
bool isItAOD
 
double maxTrackEta
 
double minTrackP
 
int nRun
 
double pBin [nPBin+1]
 
int pvBin [nPVBin+1]
 
spr::trackSelectionParameters selectionParameters
 
std::string theTrackQuality
 
edm::InputTag theTriggerResultsLabel
 
double tMaxE_
 
double tMaxH_
 
double tMinE_
 
double tMinH_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EB_
 
edm::EDGetTokenT
< EcalRecHitCollection
tok_EE_
 
edm::EDGetTokenT
< reco::TrackCollection
tok_genTrack_
 
edm::EDGetTokenT
< HBHERecHitCollection
tok_hbhe_
 
edm::EDGetTokenT< LumiDetailstok_lumi
 
edm::EDGetTokenT
< reco::VertexCollection
tok_recVtx_
 
edm::EDGetTokenT
< trigger::TriggerEvent
tok_trigEvt
 
edm::EDGetTokenT
< edm::TriggerResults
tok_trigRes
 
edm::InputTag triggerEvent_
 
std::vector< std::string > trigNames
 
int verbosity
 

Static Private Attributes

static const int nEtaBin =4
 
static const int nPBin =10
 
static const int nPVBin =4
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 38 of file StudyHLT.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file StudyHLT.cc.

References etaBin, edm::ParameterSet::getUntrackedParameter(), i, HLT_FULL_cff::InputTag, isItAOD, relval_2017::k, spr::trackSelectionParameters::maxChi2, spr::trackSelectionParameters::maxDpOverP, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, maxTrackEta, spr::trackSelectionParameters::minLayerCrossed, spr::trackSelectionParameters::minOuterHit, spr::trackSelectionParameters::minPt, spr::trackSelectionParameters::minQuality, minTrackP, nEtaBin, nPBin, nPVBin, pBin, pvBin, reco::TrackBase::qualityByName(), selectionParameters, AlCaHLTBitMon_QueryRunRegistry::string, theTrackQuality, theTriggerResultsLabel, tMaxE_, tMaxH_, tMinE_, tMinH_, tok_EB_, tok_EE_, tok_genTrack_, tok_hbhe_, tok_lumi, tok_recVtx_, tok_trigEvt, tok_trigRes, triggerEvent_, trigNames, and verbosity.

34  : nRun(0) {
35  verbosity = iConfig.getUntrackedParameter<int>("Verbosity",0);
36  trigNames = iConfig.getUntrackedParameter<std::vector<std::string> >("Triggers");
37  theTrackQuality = iConfig.getUntrackedParameter<std::string>("TrackQuality","highPurity");
39  selectionParameters.minPt = iConfig.getUntrackedParameter<double>("MinTrackPt", 10.0);
40  selectionParameters.minQuality = trackQuality_;
41  selectionParameters.maxDxyPV = iConfig.getUntrackedParameter<double>("MaxDxyPV", 0.2);
42  selectionParameters.maxDzPV = iConfig.getUntrackedParameter<double>("MaxDzPV", 5.0);
43  selectionParameters.maxChi2 = iConfig.getUntrackedParameter<double>("MaxChi2", 5.0);
44  selectionParameters.maxDpOverP = iConfig.getUntrackedParameter<double>("MaxDpOverP", 0.1);
45  selectionParameters.minOuterHit = iConfig.getUntrackedParameter<int>("MinOuterHit", 4);
46  selectionParameters.minLayerCrossed = iConfig.getUntrackedParameter<int>("MinLayerCrossed", 8);
47  selectionParameters.maxInMiss = iConfig.getUntrackedParameter<int>("MaxInMiss", 0);
48  selectionParameters.maxOutMiss = iConfig.getUntrackedParameter<int>("MaxOutMiss", 0);
49  minTrackP = iConfig.getUntrackedParameter<double>("MinTrackP", 1.0);
50  maxTrackEta = iConfig.getUntrackedParameter<double>("MaxTrackEta", 2.5);
51  tMinE_ = iConfig.getUntrackedParameter<double>("TimeMinCutECAL", -500.);
52  tMaxE_ = iConfig.getUntrackedParameter<double>("TimeMaxCutECAL", 500.);
53  tMinH_ = iConfig.getUntrackedParameter<double>("TimeMinCutHCAL", -500.);
54  tMaxH_ = iConfig.getUntrackedParameter<double>("TimeMaxCutHCAL", 500.);
55  isItAOD = iConfig.getUntrackedParameter<bool>("IsItAOD", false);
56  triggerEvent_ = edm::InputTag("hltTriggerSummaryAOD","","HLT");
57  theTriggerResultsLabel = edm::InputTag("TriggerResults","","HLT");
58 
59  // define tokens for access
60  tok_lumi = consumes<LumiDetails, edm::InLumi>(edm::InputTag("lumiProducer"));
61  tok_trigEvt = consumes<trigger::TriggerEvent>(triggerEvent_);
62  tok_trigRes = consumes<edm::TriggerResults>(theTriggerResultsLabel);
63  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
64  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
65  if (isItAOD) {
66  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEB"));
67  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEE"));
68  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("reducedHcalRecHits", "hbhereco"));
69  } else {
70  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEB"));
71  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEE"));
72  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
73  }
74 
75  edm::LogInfo("IsoTrack") << "Verbosity " << verbosity << " with "
76  << trigNames.size() << " triggers:";
77  for (unsigned int k=0; k<trigNames.size(); ++k)
78  edm::LogInfo("IsoTrack") << " [" << k << "] " << trigNames[k];
79  edm::LogInfo("IsoTrack") << "TrackQuality " << theTrackQuality << " Minpt "
80  << selectionParameters.minPt << " maxDxy "
81  << selectionParameters.maxDxyPV << " maxDz "
82  << selectionParameters.maxDzPV << " maxChi2 "
83  << selectionParameters.maxChi2 << " maxDp/p "
84  << selectionParameters.maxDpOverP << " minOuterHit "
85  << selectionParameters.minOuterHit << " minLayerCrossed "
86  << selectionParameters.minLayerCrossed << " maxInMiss "
87  << selectionParameters.maxInMiss << " maxOutMiss "
88  << selectionParameters.maxOutMiss << " minTrackP "
89  << minTrackP << " maxTrackEta " << maxTrackEta
90  << " tMinE_ " << tMinE_ << " tMaxE " << tMaxE_
91  << " tMinH_ " << tMinH_ << " tMaxH_ " << tMaxH_
92  << " isItAOD " << isItAOD;
93 
94  double pBins[nPBin+1] = {1.0,2.0,3.0,4.0,5.0,6.0,7.0,9.0,11.0,15.0,20.0};
95  int etaBins[nEtaBin+1] = {1, 7, 13, 17, 23};
96  int pvBins[nPVBin+1] = {1, 2, 3, 5, 100};
97  for (int i=0; i<=nPBin; ++i) pBin[i] = pBins[i];
98  for (int i=0; i<=nEtaBin; ++i) etaBin[i] = etaBins[i];
99  for (int i=0; i<=nPVBin; ++i) pvBin[i] = pvBins[i];
100 }
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: StudyHLT.h:77
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::InputTag triggerEvent_
Definition: StudyHLT.h:69
double maxTrackEta
Definition: StudyHLT.h:66
TrackQuality
track quality
Definition: TrackBase.h:151
std::vector< std::string > trigNames
Definition: StudyHLT.h:64
static const int nPVBin
Definition: StudyHLT.h:59
double tMaxH_
Definition: StudyHLT.h:66
double minTrackP
Definition: StudyHLT.h:66
int pvBin[nPVBin+1]
Definition: StudyHLT.h:88
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: StudyHLT.h:74
std::string theTrackQuality
Definition: StudyHLT.h:65
spr::trackSelectionParameters selectionParameters
Definition: StudyHLT.h:63
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: StudyHLT.h:78
edm::InputTag theTriggerResultsLabel
Definition: StudyHLT.h:69
bool isItAOD
Definition: StudyHLT.h:67
double pBin[nPBin+1]
Definition: StudyHLT.h:89
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: StudyHLT.h:75
static const int nEtaBin
Definition: StudyHLT.h:59
int nRun
Definition: StudyHLT.h:88
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: StudyHLT.h:76
edm::EDGetTokenT< LumiDetails > tok_lumi
Definition: StudyHLT.h:70
int verbosity
Definition: StudyHLT.h:62
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
Definition: StudyHLT.h:72
reco::TrackBase::TrackQuality minQuality
int etaBin[nEtaBin+1]
Definition: StudyHLT.h:88
static const int nPBin
Definition: StudyHLT.h:59
double tMinE_
Definition: StudyHLT.h:66
double tMinH_
Definition: StudyHLT.h:66
double tMaxE_
Definition: StudyHLT.h:66
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
Definition: StudyHLT.h:71
StudyHLT::~StudyHLT ( )

Definition at line 102 of file StudyHLT.cc.

102 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 104 of file StudyHLT.cc.

References funct::abs(), ecalTB2006H4_GenSimDigiReco_cfg::bField, edm::EventBase::bunchCrossing(), spr::chargeIsolationEcal(), spr::chargeIsolationHcal(), spr::eECALmatrix(), spr::eHCALmatrix(), edm::EventID::event(), fillEnergy(), fillIsolation(), fillTrack(), firstEvent, edm::EventSetup::get(), edm::LuminosityBlock::getByToken(), edm::Event::getByToken(), edm::Event::getLuminosityBlock(), h_goodPV, h_goodRun, h_HLTAccept, h_HLTAccepts, h_HLTCorr, h_nHLT, h_nHLTvsRN, h_ntrk, h_numberPV, runregparse::hlt, HLTNames, i, edm::EventBase::id(), edm::HandleBase::isValid(), LumiDetails::kOCC1, edm::InputTag::label(), edm::EventBase::luminosityBlock(), maxTrackEta, spr::trackSelectionParameters::minQuality, minTrackP, reco::TrackBase::momentum(), nPVBin, nRun, convertSQLiteXML::ok, reco::TrackBase::p(), p1, edm::Handle< T >::product(), edm::ESHandle< class >::product(), spr::propagateCALO(), reco::TrackBase::pt(), pvBin, reco::TrackBase::quality(), HLT_FULL_cff::quality, edm::EventID::run(), selectionParameters, AlCaHLTBitMon_QueryRunRegistry::string, theTrackQuality, tMaxE_, tMaxH_, tMinE_, tMinH_, tok_EB_, tok_EE_, tok_genTrack_, tok_hbhe_, tok_lumi, tok_recVtx_, tok_trigEvt, tok_trigRes, triggerEvent_, edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), triggerResults, trigNames, truncate_str(), and verbosity.

104  {
105 if (verbosity > 0)
106  edm::LogInfo("IsoTrack") << "Event starts====================================";
107  int RunNo = iEvent.id().run();
108  int EvtNo = iEvent.id().event();
109  int Lumi = iEvent.luminosityBlock();
110  int Bunch = iEvent.bunchCrossing();
111 
113  iEvent.getLuminosityBlock().getByToken(tok_lumi,Lumid);
114 
115  std::string newNames[5]={"HLT","PixelTracks_Multiplicity","HLT_Physics_","HLT_JetE","HLT_ZeroBias"};
116  int newAccept[5];
117  for (int i=0; i<5; ++i) newAccept[i] = 0;
118  float mybxlumi=-1;
119  if (Lumid.isValid())
120  mybxlumi=Lumid->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37;
121 
122  if (verbosity > 0)
123  edm::LogInfo("IsoTrack") << "RunNo " << RunNo << " EvtNo " << EvtNo
124  << " Lumi " << Lumi << " Bunch " << Bunch
125  << " mybxlumi " << mybxlumi;
126 
127  trigger::TriggerEvent triggerEvent;
128  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
129  iEvent.getByToken(tok_trigEvt,triggerEventHandle);
130 
131  bool ok(false);
132  if (trigNames.size() < 1) {
133  ok = true;
134  } else if (!triggerEventHandle.isValid()) {
135  edm::LogWarning("IsoTrack") << "Error! Can't get the product "
136  << triggerEvent_.label();
137  } else {
138  triggerEvent = *(triggerEventHandle.product());
139 
142  iEvent.getByToken(tok_trigRes, triggerResults);
143 
144  if (triggerResults.isValid()) {
145  h_nHLT->Fill(triggerResults->size());
146  h_nHLTvsRN->Fill(RunNo, triggerResults->size());
147 
148  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
149  const std::vector<std::string> & triggerNames_ = triggerNames.triggerNames();
150  for (unsigned int iHLT=0; iHLT<triggerResults->size(); iHLT++) {
151  // unsigned int triggerindx = hltConfig_.triggerIndex(triggerNames_[iHLT]);
152  // const std::vector<std::string>& moduleLabels(hltConfig_.moduleLabels(triggerindx));
153  int ipos=-1;
154  std::string newtriggerName = truncate_str(triggerNames_[iHLT]);
155  for (unsigned int i=0; i<HLTNames.size(); ++i) {
156  if (newtriggerName == HLTNames[i]) {
157  ipos = i+1;
158  break;
159  }
160  }
161  if (ipos < 0) {
162  HLTNames.push_back(newtriggerName);
163  ipos = (int)(HLTNames.size());
164  if (ipos <= h_HLTAccept->GetNbinsX())
165  h_HLTAccept->GetXaxis()->SetBinLabel(ipos,newtriggerName.c_str());
166  }
167  if ((int)(iHLT+1) > h_HLTAccepts[nRun]->GetNbinsX()) {
168  edm::LogInfo("IsoTrack") << "Wrong trigger " << RunNo << " Event "
169  << EvtNo << " Hlt " << iHLT;
170  } else {
171  if (firstEvent) h_HLTAccepts[nRun]->GetXaxis()->SetBinLabel(iHLT+1, newtriggerName.c_str());
172  }
173  int hlt = triggerResults->accept(iHLT);
174  if (hlt) {
175  h_HLTAccepts[nRun]->Fill(iHLT+1);
176  h_HLTAccept->Fill(ipos);
177  }
178  for (unsigned int i=0; i<trigNames.size(); ++i) {
179  if (newtriggerName.find(trigNames[i].c_str())!=std::string::npos) {
180  if (verbosity%10 > 0)
181  edm::LogInfo("IsoTrack") << newtriggerName;
182  if (hlt > 0) ok = true;
183  }
184  }
185  for (int i=0; i<5; ++i) {
186  if (newtriggerName.find(newNames[i].c_str())!=std::string::npos) {
187  if (verbosity%10 > 0)
188  edm::LogInfo("IsoTrack") << "[" << i << "] " << newNames[i]
189  << " : " << newtriggerName;
190  if (hlt > 0) newAccept[i] = 1;
191  }
192  }
193  }
194  int iflg(0), indx(1);
195  for (int i=0; i<5; ++i) {
196  iflg += (indx*newAccept[i]); indx *= 2;
197  }
198  h_HLTCorr->Fill(iflg);
199  }
200  }
201 
202  //Look at the tracks
203  if (ok) {
204  h_goodRun->Fill(RunNo);
205  // get handles to calogeometry and calotopology
207  iSetup.get<CaloGeometryRecord>().get(pG);
208  const CaloGeometry* geo = pG.product();
209 
210  edm::ESHandle<CaloTopology> theCaloTopology;
211  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
212  const CaloTopology *caloTopology = theCaloTopology.product();
213 
215  iSetup.get<HcalRecNumberingRecord>().get(htopo);
216  const HcalTopology* theHBHETopology = htopo.product();
217 
219  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
220  const MagneticField *bField = bFieldH.product();
221 
223  iSetup.get<EcalChannelStatusRcd>().get(ecalChStatus);
224  const EcalChannelStatus* theEcalChStatus = ecalChStatus.product();
225 
227  iEvent.getByToken(tok_recVtx_,recVtxs);
228  int ntrk(0), ngoodPV(0), nPV(-1);
229  for (unsigned int ind=0; ind<recVtxs->size(); ind++) {
230  if (!((*recVtxs)[ind].isFake()) && (*recVtxs)[ind].ndof() > 4) ngoodPV++;
231  }
232  for (int i=0; i<nPVBin; ++i) {
233  if (ngoodPV >= pvBin[i] && ngoodPV < pvBin[i+1]) {
234  nPV = i; break;
235  }
236  }
237  if ((verbosity/10)%10 > 0)
238  edm::LogInfo("IsoTrack") << "Number of vertices: " << recVtxs->size()
239  << " Good " << ngoodPV << " Bin " << nPV;
240  h_numberPV->Fill((int)(recVtxs->size()));
241  h_goodPV->Fill(ngoodPV);
242 
243 
245  iEvent.getByToken(tok_genTrack_, trkCollection);
246  reco::TrackCollection::const_iterator trkItr;
247  for (trkItr=trkCollection->begin(); trkItr != trkCollection->end(); ++trkItr,++ntrk) {
248  const reco::Track* pTrack = &(*trkItr);
249  double pt1 = pTrack->pt();
250  double p1 = pTrack->p();
251  double eta1 = pTrack->momentum().eta();
252  double phi1 = pTrack->momentum().phi();
254  fillTrack(0, pt1,p1,eta1,phi1);
255  if (quality) fillTrack(1, pt1,p1,eta1,phi1);
256  }
257  h_ntrk[0]->Fill(ntrk);
258 
259  std::vector<spr::propagatedTrackID> trkCaloDets;
260  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality, trkCaloDets, ((verbosity/100)%10 > 0));
261  std::vector<spr::propagatedTrackID>::const_iterator trkDetItr;
262  for (trkDetItr = trkCaloDets.begin(),ntrk=0; trkDetItr != trkCaloDets.end(); trkDetItr++,ntrk++) {
263  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
264  double pt1 = pTrack->pt();
265  double p1 = pTrack->p();
266  double eta1 = pTrack->momentum().eta();
267  double phi1 = pTrack->momentum().phi();
268  if ((verbosity/10)%10 > 0)
269  edm::LogInfo("IsoTrack") << "track: p " << p1 << " pt " << pt1
270  << " eta " << eta1 << " phi " << phi1
271  << " okEcal " << trkDetItr->okECAL;
272  fillTrack(2, pt1,p1,eta1,phi1);
273  if (pt1>minTrackP && std::abs(eta1)<maxTrackEta && trkDetItr->okECAL) {
274  fillTrack(3, pt1,p1,eta1,phi1);
275  double maxNearP31x31 = spr::chargeIsolationEcal(ntrk, trkCaloDets, geo, caloTopology, 15, 15, ((verbosity/1000)%10 > 0));
276 
278  iSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
279 
280  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
281  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
282  iEvent.getByToken(tok_EB_,barrelRecHitsHandle);
283  iEvent.getByToken(tok_EE_,endcapRecHitsHandle);
284  // get ECal Tranverse Profile
285  std::pair<double, bool> e7x7P, e11x11P, e15x15P;
286  const DetId isoCell = trkDetItr->detIdECAL;
287  e7x7P = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology,sevlv.product(),3,3, 0.030, 0.150, tMinE_,tMaxE_, ((verbosity/10000)%10 > 0));
288  e11x11P = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology,sevlv.product(),5,5, 0.030, 0.150, tMinE_,tMaxE_, ((verbosity/10000)%10 > 0));
289  e15x15P = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology,sevlv.product(),7,7, 0.030, 0.150, tMinE_,tMaxE_, ((verbosity/10000)%10 > 0));
290 
291  double maxNearHcalP7x7 = spr::chargeIsolationHcal(ntrk, trkCaloDets, theHBHETopology, 3,3, ((verbosity/1000)%10 > 0));
292  int ieta(0);
293  double h3x3(0), h5x5(0), h7x7(0);
294  fillIsolation(0, maxNearP31x31,e11x11P.first,e15x15P.first);
295  if ((verbosity/10)%10 > 0)
296  edm::LogInfo("IsoTrack") << "Accepted Tracks reaching Ecal maxNearP31x31 "
297  << maxNearP31x31 << " e11x11P "
298  << e11x11P.first << " e15x15P "
299  << e15x15P.first << " okHCAL "
300  << trkDetItr->okHCAL;
301 
302  if (trkDetItr->okHCAL) {
304  iEvent.getByToken(tok_hbhe_, hbhe);
305  const DetId ClosestCell(trkDetItr->detIdHCAL);
306  ieta = ((HcalDetId)(ClosestCell)).ietaAbs();
307  h3x3 = spr::eHCALmatrix(theHBHETopology, ClosestCell, hbhe,1,1, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_,tMaxH_, ((verbosity/10000)%10 > 0));
308  h5x5 = spr::eHCALmatrix(theHBHETopology, ClosestCell, hbhe,2,2, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_,tMaxH_, ((verbosity/10000)%10 > 0) );
309  h7x7 = spr::eHCALmatrix(theHBHETopology, ClosestCell, hbhe,3,3, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_,tMaxH_, ((verbosity/10000)%10 > 0) );
310  fillIsolation(1, maxNearHcalP7x7,h5x5,h7x7);
311  if ((verbosity/10)%10 > 0)
312  edm::LogInfo("IsoTrack") << "Tracks Reaching Hcal maxNearHcalP7x7/h5x5/h7x7 "
313  << maxNearHcalP7x7 << "/" << h5x5 << "/" << h7x7;
314  }
315  if (maxNearP31x31 < 0) {
316  fillTrack(4, pt1,p1,eta1,phi1);
317  fillEnergy(0,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
318  if (maxNearHcalP7x7 < 0) {
319  fillTrack(5, pt1,p1,eta1,phi1);
320  fillEnergy(1,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
321  if (e11x11P.second && e15x15P.second && (e15x15P.first-e11x11P.first)<2.0) {
322  fillTrack(6, pt1,p1,eta1,phi1);
323  fillEnergy(2,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
324  if (h7x7-h5x5 < 2.0) {
325  fillTrack(7, pt1,p1,eta1,phi1);
326  fillEnergy(3,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
327  if (nPV >= 0) {
328  fillTrack(nPV+8, pt1,p1,eta1,phi1);
329  fillEnergy(nPV+4,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
330  }
331  }
332  }
333  }
334  }
335  }
336  }
337  h_ntrk[1]->Fill(ntrk);
338  }
339  firstEvent = false;
340 }
RunNumber_t run() const
Definition: EventID.h:39
void fillEnergy(int, int, double, double, double, double, double)
Definition: StudyHLT.cc:488
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
EventNumber_t event() const
Definition: EventID.h:41
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: StudyHLT.h:77
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
TH1I * h_HLTCorr
Definition: StudyHLT.h:80
edm::InputTag triggerEvent_
Definition: StudyHLT.h:69
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
TH1I * h_numberPV
Definition: StudyHLT.h:80
TH1I * h_nHLT
Definition: StudyHLT.h:80
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
TH1I * h_ntrk[2]
Definition: StudyHLT.h:85
double maxTrackEta
Definition: StudyHLT.h:66
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< TH1I * > h_HLTAccepts
Definition: StudyHLT.h:83
std::vector< std::string > trigNames
Definition: StudyHLT.h:64
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, bool useRaw=false, bool debug=false)
int bunchCrossing() const
Definition: EventBase.h:65
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:62
static const int nPVBin
Definition: StudyHLT.h:59
double tMaxH_
Definition: StudyHLT.h:66
TH1I * h_HLTAccept
Definition: StudyHLT.h:80
double minTrackP
Definition: StudyHLT.h:66
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:670
int pvBin[nPVBin+1]
Definition: StudyHLT.h:88
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: StudyHLT.h:74
TH1I * h_goodRun
Definition: StudyHLT.h:81
std::string theTrackQuality
Definition: StudyHLT.h:65
spr::trackSelectionParameters selectionParameters
Definition: StudyHLT.h:63
void fillIsolation(int, double, double, double)
Definition: StudyHLT.cc:481
bool firstEvent
Definition: StudyHLT.h:67
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: StudyHLT.h:78
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: StudyHLT.h:75
void fillTrack(int, double, double, double, double)
Definition: StudyHLT.cc:474
std::string truncate_str(const std::string &)
Definition: StudyHLT.cc:507
int nRun
Definition: StudyHLT.h:88
double pt() const
track transverse momentum
Definition: TrackBase.h:616
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:85
static std::string const triggerResults
Definition: EdmProvDump.cc:41
bool isValid() const
Definition: HandleBase.h:75
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
TH2I * h_nHLTvsRN
Definition: StudyHLT.h:82
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: StudyHLT.h:76
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
TH1I * h_goodPV
Definition: StudyHLT.h:81
edm::EDGetTokenT< LumiDetails > tok_lumi
Definition: StudyHLT.h:70
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:505
std::string const & label() const
Definition: InputTag.h:36
int verbosity
Definition: StudyHLT.h:62
edm::EventID id() const
Definition: EventBase.h:59
double p1[4]
Definition: TauolaWrapper.h:89
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
Definition: StudyHLT.h:72
reco::TrackBase::TrackQuality minQuality
std::vector< std::string > HLTNames
Definition: StudyHLT.h:64
double tMinE_
Definition: StudyHLT.h:66
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
double tMinH_
Definition: StudyHLT.h:66
double tMaxE_
Definition: StudyHLT.h:66
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
Definition: StudyHLT.h:71
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
void StudyHLT::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 342 of file StudyHLT.cc.

References etaBin, fs, h_ediff, h_ene1, h_ene2, h_energy, h_eta, h_goodPV, h_goodRun, h_HLTAccept, h_HLTCorr, h_maxNearP, h_nHLT, h_nHLTvsRN, h_ntrk, h_numberPV, h_p, h_phi, h_pt, i, j, TFileService::make(), nEtaBin, nPBin, nPVBin, pBin, pvBin, and AlCaHLTBitMon_QueryRunRegistry::string.

342  {
343  h_nHLT = fs->make<TH1I>("h_nHLT" , "size of trigger Names", 1000, 0, 1000);
344  h_HLTAccept = fs->make<TH1I>("h_HLTAccept", "HLT Accepts for all runs", 500, 0, 500);
345  for (int i=1; i<=500; ++i) h_HLTAccept->GetXaxis()->SetBinLabel(i," ");
346  h_nHLTvsRN = fs->make<TH2I>("h_nHLTvsRN" , "size of trigger Names vs RunNo", 2168, 190949, 193116, 100, 400, 500);
347  h_HLTCorr = fs->make<TH1I>("h_HLTCorr", "Correlation among different paths", 100, 0, 100);
348  h_numberPV = fs->make<TH1I>("h_numberPV", "Number of Primary Vertex", 100, 0, 100);
349  h_goodPV = fs->make<TH1I>("h_goodPV", "Number of good Primary Vertex", 100, 0, 100);
350  h_goodRun = fs->make<TH1I>("h_goodRun","Number of accepted events for Run", 4000, 190000, 1940000);
351  char hname[50], htit[400];
352  std::string CollectionNames[2] = {"Reco", "Propagated"};
353  for (unsigned int i=0; i<2; i++) {
354  sprintf(hname, "h_nTrk_%s", CollectionNames[i].c_str());
355  sprintf(htit, "Number of %s tracks", CollectionNames[i].c_str());
356  h_ntrk[i] = fs->make<TH1I>(hname, htit, 500, 0, 500);
357  }
358  std::string TrkNames[8] = {"All", "Quality", "NoIso", "okEcal", "EcalCharIso", "HcalCharIso", "EcalNeutIso", "HcalNeutIso"};
359  for (unsigned int i=0; i<8+nPVBin; i++) {
360  if (i < 8) {
361  sprintf(hname, "h_pt_%s", TrkNames[i].c_str());
362  sprintf(htit, "p_{T} of %s tracks", TrkNames[i].c_str());
363  } else {
364  sprintf(hname, "h_pt_%s_%d", TrkNames[7].c_str(), i-8);
365  sprintf(htit, "p_{T} of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
366  }
367  h_pt[i] = fs->make<TH1D>(hname, htit, 400, 0, 200.0);
368  h_pt[i]->Sumw2();
369 
370  if (i < 8) {
371  sprintf(hname, "h_p_%s", TrkNames[i].c_str());
372  sprintf(htit, "Momentum of %s tracks", TrkNames[i].c_str());
373  } else {
374  sprintf(hname, "h_p_%s_%d", TrkNames[7].c_str(), i-8);
375  sprintf(htit, "Momentum of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
376  }
377  h_p[i] = fs->make<TH1D>(hname, htit, 400, 0, 200.0);
378  h_p[i]->Sumw2();
379 
380  if (i < 8) {
381  sprintf(hname, "h_eta_%s", TrkNames[i].c_str());
382  sprintf(htit, "Eta of %s tracks", TrkNames[i].c_str());
383  } else {
384  sprintf(hname, "h_eta_%s_%d", TrkNames[7].c_str(), i-8);
385  sprintf(htit, "Eta of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
386  }
387  h_eta[i] = fs->make<TH1D>(hname, htit, 60, -3.0, 3.0);
388  h_eta[i]->Sumw2();
389 
390  if (i < 8) {
391  sprintf(hname, "h_phi_%s", TrkNames[i].c_str());
392  sprintf(htit, "Phi of %s tracks", TrkNames[i].c_str());
393  } else {
394  sprintf(hname, "h_phi_%s_%d", TrkNames[7].c_str(), i-8);
395  sprintf(htit, "Phi of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
396  }
397  h_phi[i] = fs->make<TH1D>(hname, htit, 100, -3.15, 3.15);
398  h_phi[i]->Sumw2();
399  }
400  std::string IsolationNames[2] = {"Ecal", "Hcal"};
401  for (unsigned int i=0; i<2; i++) {
402  sprintf(hname, "h_maxNearP_%s", IsolationNames[i].c_str());
403  sprintf(htit, "Energy in ChargeIso region for %s", IsolationNames[i].c_str());
404  h_maxNearP[i] = fs->make<TH1D>(hname, htit, 120, -1.5, 10.5);
405  h_maxNearP[i]->Sumw2();
406 
407  sprintf(hname, "h_ene1_%s", IsolationNames[i].c_str());
408  sprintf(htit, "Energy in smaller cone for %s", IsolationNames[i].c_str());
409  h_ene1[i] = fs->make<TH1D>(hname, htit, 400, 0.0, 200.0);
410  h_ene1[i]->Sumw2();
411 
412  sprintf(hname, "h_ene2_%s", IsolationNames[i].c_str());
413  sprintf(htit, "Energy in bigger cone for %s", IsolationNames[i].c_str());
414  h_ene2[i] = fs->make<TH1D>(hname, htit, 400, 0.0, 200.0);
415  h_ene2[i]->Sumw2();
416 
417  sprintf(hname, "h_ediff_%s", IsolationNames[i].c_str());
418  sprintf(htit, "Energy in NeutralIso region for %s", IsolationNames[i].c_str());
419  h_ediff[i] = fs->make<TH1D>(hname, htit, 100, -0.5, 19.5);
420  h_ediff[i]->Sumw2();
421  }
422  std::string energyNames[6]={"E_{7x7}", "H_{3x3}", "(E_{7x7}+H_{3x3})",
423  "E_{11x11}", "H_{5x5}", "{E_{11x11}+H_{5x5})"};
424  for (int i=0; i<4+nPVBin; ++i) {
425  for (int ip=0; ip<nPBin; ++ip) {
426  for (int ie=0; ie<nEtaBin; ++ie) {
427  for (int j=0; j<6; ++j) {
428  sprintf(hname, "h_energy_%d_%d_%d_%d", i, ip, ie, j);
429  if (i < 4) {
430  sprintf(htit,"%s/p (p=%4.1f:%4.1f; i#eta=%d:%d) for tracks with %s",
431  energyNames[j].c_str(),pBin[ip],pBin[ip+1],etaBin[ie],
432  (etaBin[ie+1]-1), TrkNames[i+4].c_str());
433  } else {
434  sprintf(htit,"%s/p (p=%4.1f:%4.1f; i#eta=%d:%d, PV=%d:%d) for tracks with %s",
435  energyNames[j].c_str(),pBin[ip],pBin[ip+1],etaBin[ie],
436  (etaBin[ie+1]-1), pvBin[i-4], pvBin[i-3],
437  TrkNames[7].c_str());
438  }
439  h_energy[i][ip][ie][j] = fs->make<TH1D>(hname, htit, 500, -0.1, 4.9);
440  h_energy[i][ip][ie][j]->Sumw2();
441  }
442  }
443  }
444  }
445 }
int i
Definition: DBlmapReader.cc:9
TH1I * h_HLTCorr
Definition: StudyHLT.h:80
TH1I * h_numberPV
Definition: StudyHLT.h:80
TH1I * h_nHLT
Definition: StudyHLT.h:80
edm::Service< TFileService > fs
Definition: StudyHLT.h:61
TH1I * h_ntrk[2]
Definition: StudyHLT.h:85
TH1D * h_phi[nPVBin+8]
Definition: StudyHLT.h:84
TH1D * h_pt[nPVBin+8]
Definition: StudyHLT.h:84
static const int nPVBin
Definition: StudyHLT.h:59
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH1I * h_HLTAccept
Definition: StudyHLT.h:80
int pvBin[nPVBin+1]
Definition: StudyHLT.h:88
TH1I * h_goodRun
Definition: StudyHLT.h:81
TH1D * h_ene2[2]
Definition: StudyHLT.h:86
double pBin[nPBin+1]
Definition: StudyHLT.h:89
static const int nEtaBin
Definition: StudyHLT.h:59
TH1D * h_ene1[2]
Definition: StudyHLT.h:86
int j
Definition: DBlmapReader.cc:9
TH1D * h_ediff[2]
Definition: StudyHLT.h:86
TH1D * h_maxNearP[2]
Definition: StudyHLT.h:86
TH2I * h_nHLTvsRN
Definition: StudyHLT.h:82
TH1D * h_eta[nPVBin+8]
Definition: StudyHLT.h:84
TH1I * h_goodPV
Definition: StudyHLT.h:81
int etaBin[nEtaBin+1]
Definition: StudyHLT.h:88
static const int nPBin
Definition: StudyHLT.h:59
TH1D * h_p[nPVBin+8]
Definition: StudyHLT.h:84
TH1D * h_energy[nPVBin+4][nPBin][nEtaBin][6]
Definition: StudyHLT.h:87
void StudyHLT::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 470 of file StudyHLT.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 450 of file StudyHLT.cc.

References changed, firstEvent, fs, h_HLTAccepts, hltConfig_, i, HLTConfigProvider::init(), TFileService::make(), nRun, and edm::RunBase::run().

450  {
451  char hname[100], htit[400];
452  edm::LogInfo("IsoTrack") << "Run[" << nRun << "] " << iRun.run() << " hltconfig.init "
453  << hltConfig_.init(iRun,iSetup,"HLT",changed);
454  sprintf(hname, "h_HLTAccepts_%i", iRun.run());
455  sprintf(htit, "HLT Accepts for Run No %i", iRun.run());
456  TH1I *hnew = fs->make<TH1I>(hname, htit, 500, 0, 500);
457  for (int i=1; i<=500; ++i) hnew->GetXaxis()->SetBinLabel(i," ");
458  h_HLTAccepts.push_back(hnew);
459  edm::LogInfo("IsoTrack") << "beginrun " << iRun.run();
460  firstEvent = true;
461 }
int i
Definition: DBlmapReader.cc:9
edm::Service< TFileService > fs
Definition: StudyHLT.h:61
std::vector< TH1I * > h_HLTAccepts
Definition: StudyHLT.h:83
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
bool firstEvent
Definition: StudyHLT.h:67
int nRun
Definition: StudyHLT.h:88
HLTConfigProvider hltConfig_
Definition: StudyHLT.h:60
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
bool changed
Definition: StudyHLT.h:67
void StudyHLT::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 447 of file StudyHLT.cc.

447 {}
void StudyHLT::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 472 of file StudyHLT.cc.

472 {}
void StudyHLT::endRun ( edm::Run const &  iRun,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 464 of file StudyHLT.cc.

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

464  {
465  nRun++;
466  edm::LogInfo("IsoTrack") << "endrun[" << nRun << "] " << iRun.run();
467 }
int nRun
Definition: StudyHLT.h:88
void StudyHLT::fillEnergy ( int  flag,
int  ieta,
double  p,
double  enEcal1,
double  enHcal1,
double  enEcal2,
double  enHcal2 
)
private

Definition at line 488 of file StudyHLT.cc.

References etaBin, h_energy, i, nEtaBin, nPBin, and pBin.

Referenced by analyze().

489  {
490  int ip(-1), ie(-1);
491  for (int i=0; i<nPBin; ++i) {
492  if (p >= pBin[i] && p < pBin[i+1]) { ip = i; break; }
493  }
494  for (int i=0; i<nEtaBin; ++i) {
495  if (ieta >= etaBin[i] && ieta < etaBin[i+1]) { ie = i; break; }
496  }
497  if (ip >= 0 && ie >= 0 && enEcal1 > 0.02 && enHcal1 > 0.1) {
498  h_energy[flag][ip][ie][0]->Fill(enEcal1/p);
499  h_energy[flag][ip][ie][1]->Fill(enHcal1/p);
500  h_energy[flag][ip][ie][2]->Fill((enEcal1+enHcal1)/p);
501  h_energy[flag][ip][ie][3]->Fill(enEcal2/p);
502  h_energy[flag][ip][ie][4]->Fill(enHcal2/p);
503  h_energy[flag][ip][ie][5]->Fill((enEcal2+enHcal2)/p);
504  }
505 }
int i
Definition: DBlmapReader.cc:9
double pBin[nPBin+1]
Definition: StudyHLT.h:89
static const int nEtaBin
Definition: StudyHLT.h:59
int etaBin[nEtaBin+1]
Definition: StudyHLT.h:88
static const int nPBin
Definition: StudyHLT.h:59
TH1D * h_energy[nPVBin+4][nPBin][nEtaBin][6]
Definition: StudyHLT.h:87
void StudyHLT::fillIsolation ( int  i,
double  emaxnearP,
double  eneutIso1,
double  eneutIso2 
)
private

Definition at line 481 of file StudyHLT.cc.

References h_ediff, h_ene1, h_ene2, h_maxNearP, and i.

Referenced by analyze().

481  {
482  h_maxNearP[i]->Fill(emaxnearP);
483  h_ene1[i]->Fill(eneutIso1);
484  h_ene2[i]->Fill(eneutIso2);
485  h_ediff[i]->Fill(eneutIso2-eneutIso1);
486 }
int i
Definition: DBlmapReader.cc:9
TH1D * h_ene2[2]
Definition: StudyHLT.h:86
TH1D * h_ene1[2]
Definition: StudyHLT.h:86
TH1D * h_ediff[2]
Definition: StudyHLT.h:86
TH1D * h_maxNearP[2]
Definition: StudyHLT.h:86
void StudyHLT::fillTrack ( int  i,
double  pt,
double  p,
double  eta,
double  phi 
)
private

Definition at line 474 of file StudyHLT.cc.

References h_eta, h_p, h_phi, h_pt, and i.

Referenced by analyze().

474  {
475  h_pt[i]->Fill(pt);
476  h_p[i]->Fill(p);
477  h_eta[i]->Fill(eta);
478  h_phi[i]->Fill(phi);
479 }
int i
Definition: DBlmapReader.cc:9
TH1D * h_phi[nPVBin+8]
Definition: StudyHLT.h:84
TH1D * h_pt[nPVBin+8]
Definition: StudyHLT.h:84
TH1D * h_eta[nPVBin+8]
Definition: StudyHLT.h:84
TH1D * h_p[nPVBin+8]
Definition: StudyHLT.h:84
std::string StudyHLT::truncate_str ( const std::string &  str)
private

Definition at line 507 of file StudyHLT.cc.

References i, AlCaHLTBitMon_QueryRunRegistry::string, and z.

Referenced by analyze().

507  {
508  std::string truncated_str(str);
509  int length = str.length();
510  for (int i=0; i<length-2; i++){
511  if (str[i]=='_' && str[i+1]=='v' && isdigit(str.at(i+2))) {
512  int z = i+1;
513  truncated_str = str.substr(0,z);
514  }
515  }
516  return(truncated_str);
517 }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

bool StudyHLT::changed
private

Definition at line 67 of file StudyHLT.h.

Referenced by beginRun().

int StudyHLT::etaBin[nEtaBin+1]
private

Definition at line 88 of file StudyHLT.h.

Referenced by beginJob(), fillEnergy(), and StudyHLT().

bool StudyHLT::firstEvent
private

Definition at line 67 of file StudyHLT.h.

Referenced by analyze(), beginRun(), looper.Looper::loop(), and Printer.Printer::process().

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

Definition at line 61 of file StudyHLT.h.

Referenced by beginJob(), and beginRun().

TH1D * StudyHLT::h_ediff[2]
private

Definition at line 86 of file StudyHLT.h.

Referenced by beginJob(), and fillIsolation().

TH1D * StudyHLT::h_ene1[2]
private

Definition at line 86 of file StudyHLT.h.

Referenced by beginJob(), and fillIsolation().

TH1D * StudyHLT::h_ene2[2]
private

Definition at line 86 of file StudyHLT.h.

Referenced by beginJob(), and fillIsolation().

TH1D* StudyHLT::h_energy[nPVBin+4][nPBin][nEtaBin][6]
private

Definition at line 87 of file StudyHLT.h.

Referenced by beginJob(), and fillEnergy().

TH1D * StudyHLT::h_eta[nPVBin+8]
private

Definition at line 84 of file StudyHLT.h.

Referenced by beginJob(), and fillTrack().

TH1I* StudyHLT::h_goodPV
private

Definition at line 81 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH1I * StudyHLT::h_goodRun
private

Definition at line 81 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH1I * StudyHLT::h_HLTAccept
private

Definition at line 80 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

std::vector<TH1I*> StudyHLT::h_HLTAccepts
private

Definition at line 83 of file StudyHLT.h.

Referenced by analyze(), and beginRun().

TH1I * StudyHLT::h_HLTCorr
private

Definition at line 80 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH1D* StudyHLT::h_maxNearP[2]
private

Definition at line 86 of file StudyHLT.h.

Referenced by beginJob(), and fillIsolation().

TH1I* StudyHLT::h_nHLT
private

Definition at line 80 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH2I* StudyHLT::h_nHLTvsRN
private

Definition at line 82 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH1I* StudyHLT::h_ntrk[2]
private

Definition at line 85 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH1I * StudyHLT::h_numberPV
private

Definition at line 80 of file StudyHLT.h.

Referenced by analyze(), and beginJob().

TH1D* StudyHLT::h_p[nPVBin+8]
private

Definition at line 84 of file StudyHLT.h.

Referenced by beginJob(), and fillTrack().

TH1D * StudyHLT::h_phi[nPVBin+8]
private

Definition at line 84 of file StudyHLT.h.

Referenced by beginJob(), and fillTrack().

TH1D * StudyHLT::h_pt[nPVBin+8]
private

Definition at line 84 of file StudyHLT.h.

Referenced by beginJob(), and fillTrack().

HLTConfigProvider StudyHLT::hltConfig_
private

Definition at line 60 of file StudyHLT.h.

Referenced by beginRun().

std::vector<std::string> StudyHLT::HLTNames
private

Definition at line 64 of file StudyHLT.h.

Referenced by analyze().

bool StudyHLT::isItAOD
private

Definition at line 67 of file StudyHLT.h.

Referenced by StudyHLT().

double StudyHLT::maxTrackEta
private

Definition at line 66 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

double StudyHLT::minTrackP
private

Definition at line 66 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

const int StudyHLT::nEtaBin =4
staticprivate

Definition at line 59 of file StudyHLT.h.

Referenced by beginJob(), fillEnergy(), and StudyHLT().

const int StudyHLT::nPBin =10
staticprivate

Definition at line 59 of file StudyHLT.h.

Referenced by beginJob(), fillEnergy(), and StudyHLT().

const int StudyHLT::nPVBin =4
staticprivate

Definition at line 59 of file StudyHLT.h.

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

int StudyHLT::nRun
private

Definition at line 88 of file StudyHLT.h.

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

double StudyHLT::pBin[nPBin+1]
private

Definition at line 89 of file StudyHLT.h.

Referenced by beginJob(), fillEnergy(), and StudyHLT().

int StudyHLT::pvBin[nPVBin+1]
private

Definition at line 88 of file StudyHLT.h.

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

spr::trackSelectionParameters StudyHLT::selectionParameters
private

Definition at line 63 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

std::string StudyHLT::theTrackQuality
private

Definition at line 65 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

edm::InputTag StudyHLT::theTriggerResultsLabel
private

Definition at line 69 of file StudyHLT.h.

Referenced by StudyHLT().

double StudyHLT::tMaxE_
private

Definition at line 66 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tMaxH_
private

Definition at line 66 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tMinE_
private

Definition at line 66 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tMinH_
private

Definition at line 66 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 76 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 77 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 74 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 78 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 70 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 75 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 71 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 72 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

edm::InputTag StudyHLT::triggerEvent_
private

Definition at line 69 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

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

Definition at line 64 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().

int StudyHLT::verbosity
private

Definition at line 62 of file StudyHLT.h.

Referenced by analyze(), and StudyHLT().