CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
StudyHLT Class Reference
Inheritance diagram for StudyHLT:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 StudyHLT (const edm::ParameterSet &)
 
 ~StudyHLT () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () 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
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginJob () override
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void clear ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void fillEnergy (int, int, double, double, double, double, double)
 
void fillIsolation (int, double, double, double)
 
void fillTrack (int, double, double, double, double)
 
int trackPID (const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
 
std::string truncate_str (const std::string &)
 

Private Attributes

bool changed_
 
bool doTree_
 
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+8][nPBin][nEtaBin][6]
 
TH1D * h_eta [nGen+1]
 
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 [nGen+1]
 
TH1D * h_phi [nGen+1]
 
TH1D * h_pt [nGen+1]
 
HLTConfigProvider hltConfig_
 
std::vector< std::string > HLTNames_
 
bool isItAOD_
 
double maxTrackEta_
 
double minTrackP_
 
int nRun
 
double pBin [nPBin+1]
 
std::vector< double > puWeights_
 
int pvBin [nPVBin+1]
 
spr::trackSelectionParameters selectionParameters_
 
std::string theTrackQuality_
 
edm::InputTag theTriggerResultsLabel_
 
double tMaxE_
 
double tMaxH_
 
double tMinE_
 
double tMinH_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EB_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EE_
 
edm::EDGetTokenT< GenEventInfoProducttok_ew_
 
edm::EDGetTokenT< reco::TrackCollectiontok_genTrack_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbhe_
 
edm::EDGetTokenT< LumiDetailstok_lumi
 
edm::EDGetTokenT< reco::GenParticleCollectiontok_parts_
 
edm::EDGetTokenT< reco::VertexCollectiontok_recVtx_
 
edm::EDGetTokenT< trigger::TriggerEventtok_trigEvt
 
edm::EDGetTokenT< edm::TriggerResultstok_trigRes
 
double tr_eventWeight
 
std::vector< double > tr_FE11x11P
 
std::vector< double > tr_FE15x15P
 
std::vector< double > tr_FE7x7P
 
int tr_goodPV
 
int tr_goodRun
 
std::vector< double > tr_H3x3
 
std::vector< double > tr_H5x5
 
std::vector< double > tr_H7x7
 
std::vector< int > tr_iEta
 
std::vector< double > tr_MaxNearHcalP7x7
 
std::vector< double > tr_MaxNearP31X31
 
std::vector< bool > tr_SE11x11P
 
std::vector< bool > tr_SE15x15P
 
std::vector< bool > tr_SE7x7P
 
std::vector< std::string > tr_TrigName
 
std::vector< double > tr_TrkEta
 
std::vector< int > tr_TrkID
 
std::vector< double > tr_TrkP
 
std::vector< double > tr_TrkPhi
 
std::vector< double > tr_TrkPt
 
TTree * tree_
 
edm::InputTag triggerEvent_
 
std::vector< std::string > trigNames_
 
int verbosity_
 

Static Private Attributes

static const int nEtaBin =4
 
static const int nGen =(nPVBin+12)
 
static const int nPBin =10
 
static const int nPVBin =4
 

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 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 64 of file StudyHLT.cc.

Constructor & Destructor Documentation

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

Definition at line 137 of file StudyHLT.cc.

References changed_, doTree_, etaBin, firstEvent_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, isItAOD_, gen::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, puWeights_, pvBin, reco::TrackBase::qualityByName(), selectionParameters_, AlCaHLTBitMon_QueryRunRegistry::string, theTrackQuality_, theTriggerResultsLabel_, tMaxE_, tMaxH_, tMinE_, tMinH_, tok_EB_, tok_EE_, tok_ew_, tok_genTrack_, tok_hbhe_, tok_lumi, tok_parts_, tok_recVtx_, tok_trigEvt, tok_trigRes, photonIsolationHIProducer_cfi::trackQuality, triggerEvent_, trigNames_, and verbosity_.

137  : nRun(0) {
138 
139  usesResource("TFileService");
140 
141  verbosity_ = iConfig.getUntrackedParameter<int>("Verbosity",0);
142  trigNames_ = iConfig.getUntrackedParameter<std::vector<std::string> >("Triggers");
143  theTrackQuality_ = iConfig.getUntrackedParameter<std::string>("TrackQuality","highPurity");
145  selectionParameters_.minPt = iConfig.getUntrackedParameter<double>("MinTrackPt", 10.0);
147  selectionParameters_.maxDxyPV = iConfig.getUntrackedParameter<double>("MaxDxyPV", 0.2);
148  selectionParameters_.maxDzPV = iConfig.getUntrackedParameter<double>("MaxDzPV", 5.0);
149  selectionParameters_.maxChi2 = iConfig.getUntrackedParameter<double>("MaxChi2", 5.0);
150  selectionParameters_.maxDpOverP = iConfig.getUntrackedParameter<double>("MaxDpOverP", 0.1);
151  selectionParameters_.minOuterHit = iConfig.getUntrackedParameter<int>("MinOuterHit", 4);
152  selectionParameters_.minLayerCrossed= iConfig.getUntrackedParameter<int>("MinLayerCrossed", 8);
153  selectionParameters_.maxInMiss = iConfig.getUntrackedParameter<int>("MaxInMiss", 0);
154  selectionParameters_.maxOutMiss = iConfig.getUntrackedParameter<int>("MaxOutMiss", 0);
155  minTrackP_ = iConfig.getUntrackedParameter<double>("MinTrackP", 1.0);
156  maxTrackEta_ = iConfig.getUntrackedParameter<double>("MaxTrackEta", 2.5);
157  tMinE_ = iConfig.getUntrackedParameter<double>("TimeMinCutECAL", -500.);
158  tMaxE_ = iConfig.getUntrackedParameter<double>("TimeMaxCutECAL", 500.);
159  tMinH_ = iConfig.getUntrackedParameter<double>("TimeMinCutHCAL", -500.);
160  tMaxH_ = iConfig.getUntrackedParameter<double>("TimeMaxCutHCAL", 500.);
161  isItAOD_ = iConfig.getUntrackedParameter<bool>("IsItAOD", false);
162  doTree_ = iConfig.getUntrackedParameter<bool>("DoTree", false);
163  puWeights_ = iConfig.getUntrackedParameter<std::vector<double> >("PUWeights");
164  triggerEvent_ = edm::InputTag("hltTriggerSummaryAOD","","HLT");
165  theTriggerResultsLabel_ = edm::InputTag("TriggerResults","","HLT");
166 
167  // define tokens for access
168  tok_lumi = consumes<LumiDetails, edm::InLumi>(edm::InputTag("lumiProducer"));
169  tok_trigEvt = consumes<trigger::TriggerEvent>(triggerEvent_);
170  tok_trigRes = consumes<edm::TriggerResults>(theTriggerResultsLabel_);
171  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
172  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
173  tok_parts_ = consumes<reco::GenParticleCollection>(iConfig.getParameter<edm::InputTag>("ParticleSource"));
174 
175  if (isItAOD_) {
176  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEB"));
177  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("reducedEcalRecHitsEE"));
178  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("reducedHcalRecHits", "hbhereco"));
179  } else {
180  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEB"));
181  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit","EcalRecHitsEE"));
182  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
183  }
184  tok_ew_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
185 
186  edm::LogInfo("IsoTrack") << "Verbosity " << verbosity_ << " with "
187  << trigNames_.size() << " triggers:";
188  for (unsigned int k=0; k<trigNames_.size(); ++k)
189  edm::LogInfo("IsoTrack") << " [" << k << "] " << trigNames_[k];
190  edm::LogInfo("IsoTrack") << "TrackQuality " << theTrackQuality_ << " Minpt "
191  << selectionParameters_.minPt << " maxDxy "
192  << selectionParameters_.maxDxyPV << " maxDz "
193  << selectionParameters_.maxDzPV << " maxChi2 "
194  << selectionParameters_.maxChi2 << " maxDp/p "
195  << selectionParameters_.maxDpOverP << " minOuterHit "
196  << selectionParameters_.minOuterHit << " minLayerCrossed "
197  << selectionParameters_.minLayerCrossed << " maxInMiss "
198  << selectionParameters_.maxInMiss << " maxOutMiss "
199  << selectionParameters_.maxOutMiss << " minTrackP "
200  << minTrackP_ << " maxTrackEta " << maxTrackEta_
201  << " tMinE_ " << tMinE_ << " tMaxE " << tMaxE_
202  << " tMinH_ " << tMinH_ << " tMaxH_ " << tMaxH_
203  << " isItAOD " << isItAOD_ << " doTree " << doTree_;
204 
205  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};
206  int etaBins[nEtaBin+1] = {1, 7, 13, 17, 23};
207  int pvBins[nPVBin+1] = {1, 2, 3, 5, 100};
208  for (int i=0; i<=nPBin; ++i) pBin[i] = pBins[i];
209  for (int i=0; i<=nEtaBin; ++i) etaBin[i] = etaBins[i];
210  for (int i=0; i<=nPVBin; ++i) pvBin[i] = pvBins[i];
211 
212  firstEvent_ = true;
213  changed_ = false;
214 }
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: StudyHLT.cc:110
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag triggerEvent_
Definition: StudyHLT.cc:102
bool firstEvent_
Definition: StudyHLT.cc:100
TrackQuality
track quality
Definition: TrackBase.h:151
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: StudyHLT.cc:112
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
Definition: StudyHLT.cc:106
static const int nPVBin
Definition: StudyHLT.cc:89
double tMaxH_
Definition: StudyHLT.cc:99
int verbosity_
Definition: StudyHLT.cc:93
int pvBin[nPVBin+1]
Definition: StudyHLT.cc:124
std::vector< std::string > trigNames_
Definition: StudyHLT.cc:95
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: StudyHLT.cc:107
bool changed_
Definition: StudyHLT.cc:100
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: StudyHLT.cc:111
double pBin[nPBin+1]
Definition: StudyHLT.cc:125
spr::trackSelectionParameters selectionParameters_
Definition: StudyHLT.cc:94
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: StudyHLT.cc:108
static const int nEtaBin
Definition: StudyHLT.cc:89
std::vector< double > puWeights_
Definition: StudyHLT.cc:97
int nRun
Definition: StudyHLT.cc:124
double minTrackP_
Definition: StudyHLT.cc:98
int k[5][pyjets_maxn]
bool isItAOD_
Definition: StudyHLT.cc:100
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:125
edm::InputTag theTriggerResultsLabel_
Definition: StudyHLT.cc:102
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: StudyHLT.cc:109
edm::EDGetTokenT< LumiDetails > tok_lumi
Definition: StudyHLT.cc:103
bool doTree_
Definition: StudyHLT.cc:100
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
Definition: StudyHLT.cc:105
std::string theTrackQuality_
Definition: StudyHLT.cc:96
reco::TrackBase::TrackQuality minQuality
int etaBin[nEtaBin+1]
Definition: StudyHLT.cc:124
static const int nPBin
Definition: StudyHLT.cc:89
double tMinE_
Definition: StudyHLT.cc:99
double tMinH_
Definition: StudyHLT.cc:99
double tMaxE_
Definition: StudyHLT.cc:99
double maxTrackEta_
Definition: StudyHLT.cc:98
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
Definition: StudyHLT.cc:104
StudyHLT::~StudyHLT ( )
override

Definition at line 216 of file StudyHLT.cc.

216 {}

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

Definition at line 227 of file StudyHLT.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), ecalTB2006H4_GenSimDigiReco_cfg::bField, edm::EventBase::bunchCrossing(), spr::chargeIsolationEcal(), spr::chargeIsolationHcal(), clear(), doTree_, spr::eECALmatrix(), spr::eHCALmatrix(), edm::EventID::event(), fillEnergy(), fillIsolation(), fillTrack(), firstEvent_, particlelevel_cff::genEventInfo, GenHFHadronMatcher_cfi::genParticles, edm::EventSetup::get(), edm::Event::getByToken(), h_goodPV, h_goodRun, h_HLTAccept, h_HLTAccepts, h_HLTCorr, h_nHLT, h_nHLTvsRN, h_ntrk, h_numberPV, photonIsolationHIProducer_cfi::hbhe, HLTNames_, mps_fire::i, edm::EventBase::id(), createfilelist::int, edm::HandleBase::isValid(), edm::InputTag::label(), mix_E10TeV_L13E31_BX432_cfi::Lumi, edm::EventBase::luminosityBlock(), maxTrackEta_, spr::trackSelectionParameters::minQuality, minTrackP_, reco::TrackBase::momentum(), nGen, nPVBin, nRun, convertSQLiteXML::ok, AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::p(), p1, edm::Handle< T >::product(), edm::ESHandle< T >::product(), spr::propagateCALO(), reco::TrackBase::pt(), hiDetachedQuadStep_cff::pt1, puWeights_, pvBin, jets_cff::quality, reco::TrackBase::quality(), edm::EventID::run(), selectionParameters_, edm::HLTGlobalStatus::size(), AlCaHLTBitMon_QueryRunRegistry::string, theTrackQuality_, tMaxE_, tMaxH_, tMinE_, tMinH_, tok_EB_, tok_EE_, tok_ew_, tok_genTrack_, tok_hbhe_, tok_parts_, tok_recVtx_, tok_trigEvt, tok_trigRes, tr_eventWeight, tr_FE11x11P, tr_FE15x15P, tr_FE7x7P, tr_goodPV, tr_goodRun, tr_H3x3, tr_H5x5, tr_H7x7, tr_iEta, tr_MaxNearHcalP7x7, tr_MaxNearP31X31, tr_SE11x11P, tr_SE15x15P, tr_SE7x7P, tr_TrigName, tr_TrkEta, tr_TrkID, tr_TrkP, tr_TrkPhi, tr_TrkPt, trackPID(), tree_, triggerEvent_, edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), triggerResults, trigNames_, truncate_str(), verbosity_, and GenEventInfoProduct::weight().

227  {
228  clear();
229  if (verbosity_ > 0)
230  edm::LogInfo("IsoTrack") << "Event starts====================================";
231  int RunNo = iEvent.id().run();
232  int EvtNo = iEvent.id().event();
233  int Lumi = iEvent.luminosityBlock();
234  int Bunch = iEvent.bunchCrossing();
235 
236  std::string newNames[5]={"HLT","PixelTracks_Multiplicity","HLT_Physics_","HLT_JetE","HLT_ZeroBias"};
237  int newAccept[5];
238  for (int i=0; i<5; ++i) newAccept[i] = 0;
239  float mybxlumi=-1;
240  /*
241  edm::Handle<LumiDetails> Lumid;
242  iEvent.getLuminosityBlock().getByToken(tok_lumi,Lumid);
243  if (Lumid.isValid()) mybxlumi=Lumid->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37;
244  */
245  if (verbosity_ > 0)
246  edm::LogInfo("IsoTrack") << "RunNo " << RunNo << " EvtNo " << EvtNo
247  << " Lumi " << Lumi << " Bunch " << Bunch
248  << " mybxlumi " << mybxlumi;
249 
250  trigger::TriggerEvent triggerEvent;
251  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
252  iEvent.getByToken(tok_trigEvt,triggerEventHandle);
253 
254  bool ok(false);
255  if (!triggerEventHandle.isValid()) {
256  edm::LogWarning("IsoTrack") << "Error! Can't get the product "
257  << triggerEvent_.label();
258  } else {
259  triggerEvent = *(triggerEventHandle.product());
260 
263  iEvent.getByToken(tok_trigRes, triggerResults);
264 
265  if (triggerResults.isValid()) {
266  h_nHLT->Fill(triggerResults->size());
267  h_nHLTvsRN->Fill(RunNo, triggerResults->size());
268 
269  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
270  const std::vector<std::string> & triggerNames_ = triggerNames.triggerNames();
271  for (unsigned int iHLT=0; iHLT<triggerResults->size(); iHLT++) {
272  // unsigned int triggerindx = hltConfig_.triggerIndex(triggerNames_[iHLT]);
273  // const std::vector<std::string>& moduleLabels(hltConfig_.moduleLabels(triggerindx));
274  int ipos=-1;
275  std::string newtriggerName = truncate_str(triggerNames_[iHLT]);
276  for (unsigned int i=0; i<HLTNames_.size(); ++i) {
277  if (newtriggerName == HLTNames_[i]) {
278  ipos = i+1;
279  break;
280  }
281  }
282  if (ipos < 0) {
283  HLTNames_.push_back(newtriggerName);
284  ipos = (int)(HLTNames_.size());
285  if (ipos <= h_HLTAccept->GetNbinsX())
286  h_HLTAccept->GetXaxis()->SetBinLabel(ipos,newtriggerName.c_str());
287  }
288  if ((int)(iHLT+1) > h_HLTAccepts[nRun]->GetNbinsX()) {
289  edm::LogInfo("IsoTrack") << "Wrong trigger " << RunNo << " Event "
290  << EvtNo << " Hlt " << iHLT;
291  } else {
292  if (firstEvent_) h_HLTAccepts[nRun]->GetXaxis()->SetBinLabel(iHLT+1, newtriggerName.c_str());
293  }
294  int hlt = triggerResults->accept(iHLT);
295  if (hlt) {
296  h_HLTAccepts[nRun]->Fill(iHLT+1);
297  h_HLTAccept->Fill(ipos);
298  }
299  if (trigNames_.empty()) {
300  ok = true;
301  } else {
302  for (unsigned int i=0; i<trigNames_.size(); ++i) {
303  if (newtriggerName.find(trigNames_[i])!=std::string::npos) {
304  if (verbosity_%10 > 0)
305  edm::LogInfo("IsoTrack") << newtriggerName;
306  if (hlt > 0) {
307  ok = true;
308  tr_TrigName.push_back(newtriggerName);
309  }
310  }
311  }
312  for (int i=0; i<5; ++i) {
313  if (newtriggerName.find(newNames[i])!=std::string::npos) {
314  if (verbosity_%10 > 0)
315  edm::LogInfo("IsoTrack") << "[" << i << "] " << newNames[i]
316  << " : " << newtriggerName;
317  if (hlt > 0) newAccept[i] = 1;
318  }
319  }
320  }
321  }
322  int iflg(0), indx(1);
323  for (int i=0; i<5; ++i) {
324  iflg += (indx*newAccept[i]); indx *= 2;
325  }
326  h_HLTCorr->Fill(iflg);
327  }
328  }
329 
330  //Look at the tracks
331  if (ok) {
332  h_goodRun->Fill(RunNo);
333  tr_goodRun = RunNo;
334  // get handles to calogeometry and calotopology
336  iSetup.get<CaloGeometryRecord>().get(pG);
337  const CaloGeometry* geo = pG.product();
338 
339  edm::ESHandle<CaloTopology> theCaloTopology;
340  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
341  const CaloTopology *caloTopology = theCaloTopology.product();
342 
344  iSetup.get<HcalRecNumberingRecord>().get(htopo);
345  const HcalTopology* theHBHETopology = htopo.product();
346 
348  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
349  const MagneticField *bField = bFieldH.product();
350 
352  iSetup.get<EcalChannelStatusRcd>().get(ecalChStatus);
353  const EcalChannelStatus* theEcalChStatus = ecalChStatus.product();
354 
356  iEvent.getByToken(tok_recVtx_,recVtxs);
357  int ntrk(0), ngoodPV(0), nPV(-1);
358  int nvtxs = (int)(recVtxs->size());
359  for (int ind=0; ind<nvtxs; ind++) {
360  if (!((*recVtxs)[ind].isFake()) && (*recVtxs)[ind].ndof() > 4) ngoodPV++;
361  }
362  for (int i=0; i<nPVBin; ++i) {
363  if (ngoodPV >= pvBin[i] && ngoodPV < pvBin[i+1]) {
364  nPV = i; break;
365  }
366  }
367 
368  tr_eventWeight = 1.0;
370  iEvent.getByToken(tok_ew_, genEventInfo);
371  if (genEventInfo.isValid()) tr_eventWeight = genEventInfo->weight();
372 
373  if ((verbosity_/10)%10 > 0)
374  edm::LogInfo("IsoTrack") << "Number of vertices: " << nvtxs
375  << " Good " << ngoodPV << " Bin " << nPV
376  << " Event weight " << tr_eventWeight;
377  h_numberPV->Fill(nvtxs,tr_eventWeight);
378  h_goodPV->Fill(ngoodPV,tr_eventWeight);
379  tr_goodPV = ngoodPV;
380 
381  if (!puWeights_.empty()) {
382  int npbin = h_goodPV->FindBin(ngoodPV);
383  if (npbin > 0 && npbin <= (int)(puWeights_.size()))
384  tr_eventWeight *= puWeights_[npbin-1];
385  else
386  tr_eventWeight = 0;
387  }
388 
389  //=== genParticle information
391  iEvent.getByToken(tok_parts_, genParticles);
392  if (genParticles.isValid()) {
393  for (const auto & p : (reco::GenParticleCollection)(*genParticles)) {
394  double pt1 = p.momentum().Rho();
395  double p1 = p.momentum().R();
396  double eta1 = p.momentum().Eta();
397  double phi1 = p.momentum().Phi();
398  fillTrack(nGen, pt1,p1,eta1,phi1);
399  }
400  }
401 
403  iEvent.getByToken(tok_genTrack_, trkCollection);
404  reco::TrackCollection::const_iterator trkItr;
405  for (trkItr=trkCollection->begin(); trkItr != trkCollection->end(); ++trkItr,++ntrk) {
406  const reco::Track* pTrack = &(*trkItr);
407  double pt1 = pTrack->pt();
408  double p1 = pTrack->p();
409  double eta1 = pTrack->momentum().eta();
410  double phi1 = pTrack->momentum().phi();
412  fillTrack(0, pt1,p1,eta1,phi1);
413  if (quality) fillTrack(1, pt1,p1,eta1,phi1);
414  }
415  h_ntrk[0]->Fill(ntrk,tr_eventWeight);
416 
417  std::vector<spr::propagatedTrackID> trkCaloDets;
418  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDets, ((verbosity_/100)%10 > 0));
419  std::vector<spr::propagatedTrackID>::const_iterator trkDetItr;
420  for (trkDetItr = trkCaloDets.begin(),ntrk=0; trkDetItr != trkCaloDets.end(); trkDetItr++,ntrk++) {
421  const reco::Track* pTrack = &(*(trkDetItr->trkItr));
422  double pt1 = pTrack->pt();
423  double p1 = pTrack->p();
424  double eta1 = pTrack->momentum().eta();
425  double phi1 = pTrack->momentum().phi();
426  if ((verbosity_/10)%10 > 0)
427  edm::LogInfo("IsoTrack") << "track: p " << p1 << " pt " << pt1
428  << " eta " << eta1 << " phi " << phi1
429  << " okEcal " << trkDetItr->okECAL;
430  fillTrack(2, pt1,p1,eta1,phi1);
431  if (pt1>minTrackP_ && std::abs(eta1)<maxTrackEta_ && trkDetItr->okECAL) {
432  fillTrack(3, pt1,p1,eta1,phi1);
433  double maxNearP31x31 = spr::chargeIsolationEcal(ntrk, trkCaloDets, geo, caloTopology, 15, 15, ((verbosity_/1000)%10 > 0));
434 
436  iSetup.get<EcalSeverityLevelAlgoRcd>().get(sevlv);
437 
438  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
439  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
440  iEvent.getByToken(tok_EB_,barrelRecHitsHandle);
441  iEvent.getByToken(tok_EE_,endcapRecHitsHandle);
442  // get ECal Tranverse Profile
443  std::pair<double, bool> e7x7P, e11x11P, e15x15P;
444  const DetId isoCell = trkDetItr->detIdECAL;
445  e7x7P = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology,sevlv.product(),3,3, 0.030, 0.150, tMinE_,tMaxE_, ((verbosity_/10000)%10 > 0));
446  e11x11P = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology,sevlv.product(),5,5, 0.030, 0.150, tMinE_,tMaxE_, ((verbosity_/10000)%10 > 0));
447  e15x15P = spr::eECALmatrix(isoCell,barrelRecHitsHandle,endcapRecHitsHandle, *theEcalChStatus, geo, caloTopology,sevlv.product(),7,7, 0.030, 0.150, tMinE_,tMaxE_, ((verbosity_/10000)%10 > 0));
448 
449  double maxNearHcalP7x7 = spr::chargeIsolationHcal(ntrk, trkCaloDets, theHBHETopology, 3,3, ((verbosity_/1000)%10 > 0));
450  int ieta(0);
451  double h3x3(0), h5x5(0), h7x7(0);
452  fillIsolation(0, maxNearP31x31,e11x11P.first,e15x15P.first);
453  if ((verbosity_/10)%10 > 0)
454  edm::LogInfo("IsoTrack") << "Accepted Tracks reaching Ecal maxNearP31x31 "
455  << maxNearP31x31 << " e11x11P "
456  << e11x11P.first << " e15x15P "
457  << e15x15P.first << " okHCAL "
458  << trkDetItr->okHCAL;
459 
460  int trackID = trackPID(pTrack,genParticles);
461  if (trkDetItr->okHCAL) {
463  iEvent.getByToken(tok_hbhe_, hbhe);
464  const DetId ClosestCell(trkDetItr->detIdHCAL);
465  ieta = ((HcalDetId)(ClosestCell)).ietaAbs();
466  h3x3 = spr::eHCALmatrix(theHBHETopology, ClosestCell, hbhe,1,1, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_,tMaxH_, ((verbosity_/10000)%10 > 0));
467  h5x5 = spr::eHCALmatrix(theHBHETopology, ClosestCell, hbhe,2,2, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_,tMaxH_, ((verbosity_/10000)%10 > 0) );
468  h7x7 = spr::eHCALmatrix(theHBHETopology, ClosestCell, hbhe,3,3, false, true, 0.7, 0.8, -100.0, -100.0, tMinH_,tMaxH_, ((verbosity_/10000)%10 > 0) );
469  fillIsolation(1, maxNearHcalP7x7,h5x5,h7x7);
470  if ((verbosity_/10)%10 > 0)
471  edm::LogInfo("IsoTrack") << "Tracks Reaching Hcal maxNearHcalP7x7/h5x5/h7x7 "
472  << maxNearHcalP7x7 << "/" << h5x5 << "/" << h7x7;
473  tr_TrkPt.push_back(pt1);
474  tr_TrkP.push_back(p1);
475  tr_TrkEta.push_back(eta1);
476  tr_TrkPhi.push_back(phi1);
477  tr_TrkID.push_back(trackID);
478  tr_MaxNearP31X31.push_back(maxNearP31x31);
479  tr_MaxNearHcalP7x7.push_back(maxNearHcalP7x7);
480  tr_FE7x7P.push_back(e7x7P.first);
481  tr_FE11x11P.push_back(e11x11P.first);
482  tr_FE15x15P.push_back(e15x15P.first);
483  tr_SE7x7P.push_back(e7x7P.second);
484  tr_SE11x11P.push_back(e11x11P.second);
485  tr_SE15x15P.push_back(e15x15P.second);
486  tr_iEta.push_back(ieta);
487  tr_H3x3.push_back(h3x3);
488  tr_H5x5.push_back(h5x5);
489  tr_H7x7.push_back(h7x7);
490 
491  if (maxNearP31x31 < 0) {
492  fillTrack(4, pt1,p1,eta1,phi1);
493  fillEnergy(0,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
494  if (maxNearHcalP7x7 < 0) {
495  fillTrack(5, pt1,p1,eta1,phi1);
496  fillEnergy(1,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
497  if ((e11x11P.second) && (e15x15P.second) &&
498  (e15x15P.first-e11x11P.first)<2.0) {
499  fillTrack(6, pt1,p1,eta1,phi1);
500  fillEnergy(2,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
501  if (h7x7-h5x5 < 2.0) {
502  fillTrack(7, pt1,p1,eta1,phi1);
503  fillEnergy(3,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
504  if (nPV >= 0) {
505  fillTrack(nPV+8, pt1,p1,eta1,phi1);
506  fillEnergy(nPV+4,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
507  }
508  if (trackID > 0) {
509  fillTrack(nPVBin+trackID+7, pt1,p1,eta1,phi1);
510  fillEnergy(nPVBin+trackID+3,ieta,p1,e7x7P.first,h3x3,e11x11P.first,h5x5);
511  }
512  }
513  }
514  }
515  }
516  }
517  }
518  }
519  h_ntrk[1]->Fill(ntrk,tr_eventWeight);
520  if ((!tr_TrkPt.empty()) && doTree_) tree_->Fill();
521  }
522  firstEvent_ = false;
523 }
void fillEnergy(int, int, double, double, double, double, double)
Definition: StudyHLT.cc:737
double p() const
momentum vector magnitude
Definition: TrackBase.h:615
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
Definition: StudyHLT.cc:110
std::vector< double > tr_TrkPt
Definition: StudyHLT.cc:129
std::vector< double > tr_H3x3
Definition: StudyHLT.cc:131
TH1I * h_HLTCorr
Definition: StudyHLT.cc:114
edm::InputTag triggerEvent_
Definition: StudyHLT.cc:102
bool firstEvent_
Definition: StudyHLT.cc:100
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.cc:114
TH1I * h_nHLT
Definition: StudyHLT.cc:114
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
std::vector< double > tr_MaxNearP31X31
Definition: StudyHLT.cc:130
TH1I * h_ntrk[2]
Definition: StudyHLT.cc:120
std::vector< TH1I * > h_HLTAccepts
Definition: StudyHLT.cc:117
std::vector< std::string > tr_TrigName
Definition: StudyHLT.cc:128
std::vector< bool > tr_SE7x7P
Definition: StudyHLT.cc:133
bool accept() const
Has at least one path accepted the event?
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: StudyHLT.cc:112
edm::EDGetTokenT< reco::GenParticleCollection > tok_parts_
Definition: StudyHLT.cc:106
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)
static const int nPVBin
Definition: StudyHLT.cc:89
double tMaxH_
Definition: StudyHLT.cc:99
TH1I * h_HLTAccept
Definition: StudyHLT.cc:114
static const int nGen
Definition: StudyHLT.cc:90
double weight() const
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:675
std::vector< std::string > HLTNames_
Definition: StudyHLT.cc:95
int verbosity_
Definition: StudyHLT.cc:93
int pvBin[nPVBin+1]
Definition: StudyHLT.cc:124
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
std::vector< std::string > trigNames_
Definition: StudyHLT.cc:95
std::vector< double > tr_TrkEta
Definition: StudyHLT.cc:129
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
Definition: StudyHLT.cc:107
TH1I * h_goodRun
Definition: StudyHLT.cc:115
void fillIsolation(int, double, double, double)
Definition: StudyHLT.cc:730
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: StudyHLT.cc:111
double chargeIsolationEcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, bool debug=false)
int iEvent
Definition: GenABIO.cc:230
std::vector< int > tr_iEta
Definition: StudyHLT.cc:134
spr::trackSelectionParameters selectionParameters_
Definition: StudyHLT.cc:94
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
Definition: StudyHLT.cc:108
void fillTrack(int, double, double, double, double)
Definition: StudyHLT.cc:723
std::vector< double > puWeights_
Definition: StudyHLT.cc:97
std::vector< double > tr_MaxNearHcalP7x7
Definition: StudyHLT.cc:130
std::string truncate_str(const std::string &)
Definition: StudyHLT.cc:756
int nRun
Definition: StudyHLT.cc:124
unsigned int size() const
Get number of paths stored.
double pt() const
track transverse momentum
Definition: TrackBase.h:621
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int tr_goodRun
Definition: StudyHLT.cc:126
std::vector< bool > tr_SE11x11P
Definition: StudyHLT.cc:133
static std::string const triggerResults
Definition: EdmProvDump.cc:41
double minTrackP_
Definition: StudyHLT.cc:98
bool isValid() const
Definition: HandleBase.h:74
int tr_goodPV
Definition: StudyHLT.cc:126
std::vector< double > tr_FE11x11P
Definition: StudyHLT.cc:132
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
void clear()
Definition: StudyHLT.cc:713
TH2I * h_nHLTvsRN
Definition: StudyHLT.cc:116
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Definition: StudyHLT.cc:109
std::vector< int > tr_TrkID
Definition: StudyHLT.cc:134
int trackPID(const reco::Track *, const edm::Handle< reco::GenParticleCollection > &)
Definition: StudyHLT.cc:768
TTree * tree_
Definition: StudyHLT.cc:123
TH1I * h_goodPV
Definition: StudyHLT.cc:115
bool doTree_
Definition: StudyHLT.cc:100
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:510
std::vector< double > tr_H7x7
Definition: StudyHLT.cc:131
std::string const & label() const
Definition: InputTag.h:36
std::vector< double > tr_FE15x15P
Definition: StudyHLT.cc:132
double p1[4]
Definition: TauolaWrapper.h:89
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes
Definition: StudyHLT.cc:105
std::string theTrackQuality_
Definition: StudyHLT.cc:96
double tr_eventWeight
Definition: StudyHLT.cc:127
reco::TrackBase::TrackQuality minQuality
double tMinE_
Definition: StudyHLT.cc:99
std::vector< double > tr_FE7x7P
Definition: StudyHLT.cc:132
std::vector< double > tr_TrkPhi
Definition: StudyHLT.cc:129
double chargeIsolationHcal(unsigned int trkIndex, std::vector< spr::propagatedTrackID > &vdetIds, const HcalTopology *topology, int ieta, int iphi, bool debug=false)
std::vector< double > tr_TrkP
Definition: StudyHLT.cc:129
T const * product() const
Definition: ESHandle.h:86
std::vector< bool > tr_SE15x15P
Definition: StudyHLT.cc:133
std::vector< double > tr_H5x5
Definition: StudyHLT.cc:131
double tMinH_
Definition: StudyHLT.cc:99
double tMaxE_
Definition: StudyHLT.cc:99
double maxTrackEta_
Definition: StudyHLT.cc:98
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt
Definition: StudyHLT.cc:104
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  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 525 of file StudyHLT.cc.

References doTree_, 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, mps_fire::i, TFileService::make(), nEtaBin, nGen, nPBin, nPVBin, pBin, pvBin, AlCaHLTBitMon_QueryRunRegistry::string, tr_eventWeight, tr_FE11x11P, tr_FE15x15P, tr_FE7x7P, tr_goodPV, tr_goodRun, tr_H3x3, tr_H5x5, tr_H7x7, tr_iEta, tr_MaxNearHcalP7x7, tr_MaxNearP31X31, tr_SE11x11P, tr_SE15x15P, tr_SE7x7P, tr_TrigName, tr_TrkEta, tr_TrkID, tr_TrkP, tr_TrkPhi, tr_TrkPt, and tree_.

525  {
526  // Book histograms
527  h_nHLT = fs_->make<TH1I>("h_nHLT" , "size of trigger Names", 1000, 0, 1000);
528  h_HLTAccept = fs_->make<TH1I>("h_HLTAccept", "HLT Accepts for all runs", 500, 0, 500);
529  for (int i=1; i<=500; ++i) h_HLTAccept->GetXaxis()->SetBinLabel(i," ");
530  h_nHLTvsRN = fs_->make<TH2I>("h_nHLTvsRN" , "size of trigger Names vs RunNo", 2168, 190949, 193116, 100, 400, 500);
531  h_HLTCorr = fs_->make<TH1I>("h_HLTCorr", "Correlation among different paths", 100, 0, 100);
532  h_numberPV = fs_->make<TH1I>("h_numberPV", "Number of Primary Vertex", 100, 0, 100);
533  h_goodPV = fs_->make<TH1I>("h_goodPV", "Number of good Primary Vertex", 100, 0, 100);
534  h_goodRun = fs_->make<TH1I>("h_goodRun","Number of accepted events for Run", 4000, 190000, 1940000);
535  char hname[50], htit[200];
536  std::string CollectionNames[2] = {"Reco", "Propagated"};
537  for (unsigned int i=0; i<2; i++) {
538  sprintf(hname, "h_nTrk_%s", CollectionNames[i].c_str());
539  sprintf(htit, "Number of %s tracks", CollectionNames[i].c_str());
540  h_ntrk[i] = fs_->make<TH1I>(hname, htit, 500, 0, 500);
541  }
542  std::string TrkNames[8] = {"All", "Quality", "NoIso", "okEcal", "EcalCharIso", "HcalCharIso", "EcalNeutIso", "HcalNeutIso"};
543  std::string particle[4] = {"Electron", "Pion", "Kaon", "Proton"};
544  for (unsigned int i=0; i<=nGen; i++) {
545  if (i < 8) {
546  sprintf(hname, "h_pt_%s", TrkNames[i].c_str());
547  sprintf(htit, "p_{T} of %s tracks", TrkNames[i].c_str());
548  } else if (i < 8+nPVBin) {
549  sprintf(hname, "h_pt_%s_%d", TrkNames[7].c_str(), i-8);
550  sprintf(htit, "p_{T} of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
551  } else if (i == nGen) {
552  sprintf(hname, "h_pt_%s_1", TrkNames[0].c_str());
553  sprintf(htit, "p_{T} of %s Generator tracks", TrkNames[0].c_str());
554  } else {
555  sprintf(hname, "h_pt_%s_%s", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
556  sprintf(htit, "p_{T} of %s tracks (%s)", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
557  }
558  h_pt[i] = fs_->make<TH1D>(hname, htit, 400, 0, 200.0);
559  h_pt[i]->Sumw2();
560 
561  if (i < 8) {
562  sprintf(hname, "h_p_%s", TrkNames[i].c_str());
563  sprintf(htit, "Momentum of %s tracks", TrkNames[i].c_str());
564  } else if (i < 8+nPVBin) {
565  sprintf(hname, "h_p_%s_%d", TrkNames[7].c_str(), i-8);
566  sprintf(htit, "Momentum of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
567  } else if (i == nGen) {
568  sprintf(hname, "h_p_%s_1", TrkNames[0].c_str());
569  sprintf(htit, "Momentum of %s Generator tracks", TrkNames[0].c_str());
570  } else {
571  sprintf(hname, "h_p_%s_%s", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
572  sprintf(htit, "Momentum of %s tracks (%s)", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
573  }
574  h_p[i] = fs_->make<TH1D>(hname, htit, 400, 0, 200.0);
575  h_p[i]->Sumw2();
576 
577  if (i < 8) {
578  sprintf(hname, "h_eta_%s", TrkNames[i].c_str());
579  sprintf(htit, "Eta of %s tracks", TrkNames[i].c_str());
580  } else if (i < 8+nPVBin) {
581  sprintf(hname, "h_eta_%s_%d", TrkNames[7].c_str(), i-8);
582  sprintf(htit, "Eta of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
583  } else if (i == nGen) {
584  sprintf(hname, "h_eta_%s_1", TrkNames[0].c_str());
585  sprintf(htit, "Eta of %s Generator tracks", TrkNames[0].c_str());
586  } else {
587  sprintf(hname, "h_eta_%s_%s", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
588  sprintf(htit, "Eta of %s tracks (%s)", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
589  }
590  h_eta[i] = fs_->make<TH1D>(hname, htit, 60, -3.0, 3.0);
591  h_eta[i]->Sumw2();
592 
593  if (i < 8) {
594  sprintf(hname, "h_phi_%s", TrkNames[i].c_str());
595  sprintf(htit, "Phi of %s tracks", TrkNames[i].c_str());
596  } else if (i < 8+nPVBin) {
597  sprintf(hname, "h_phi_%s_%d", TrkNames[7].c_str(), i-8);
598  sprintf(htit, "Phi of %s tracks (PV=%d:%d)", TrkNames[7].c_str(), pvBin[i-8], pvBin[i-7]-1);
599  } else if (i == nGen) {
600  sprintf(hname, "h_phi_%s_1", TrkNames[0].c_str());
601  sprintf(htit, "Phi of %s Generator tracks", TrkNames[0].c_str());
602  } else {
603  sprintf(hname, "h_phi_%s_%s", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
604  sprintf(htit, "Phi of %s tracks (%s)", TrkNames[7].c_str(), particle[i-8-nPVBin].c_str());
605  }
606  h_phi[i] = fs_->make<TH1D>(hname, htit, 100, -3.15, 3.15);
607  h_phi[i]->Sumw2();
608  }
609  std::string IsolationNames[2] = {"Ecal", "Hcal"};
610  for (unsigned int i=0; i<2; i++) {
611  sprintf(hname, "h_maxNearP_%s", IsolationNames[i].c_str());
612  sprintf(htit, "Energy in ChargeIso region for %s", IsolationNames[i].c_str());
613  h_maxNearP[i] = fs_->make<TH1D>(hname, htit, 120, -1.5, 10.5);
614  h_maxNearP[i]->Sumw2();
615 
616  sprintf(hname, "h_ene1_%s", IsolationNames[i].c_str());
617  sprintf(htit, "Energy in smaller cone for %s", IsolationNames[i].c_str());
618  h_ene1[i] = fs_->make<TH1D>(hname, htit, 400, 0.0, 200.0);
619  h_ene1[i]->Sumw2();
620 
621  sprintf(hname, "h_ene2_%s", IsolationNames[i].c_str());
622  sprintf(htit, "Energy in bigger cone for %s", IsolationNames[i].c_str());
623  h_ene2[i] = fs_->make<TH1D>(hname, htit, 400, 0.0, 200.0);
624  h_ene2[i]->Sumw2();
625 
626  sprintf(hname, "h_ediff_%s", IsolationNames[i].c_str());
627  sprintf(htit, "Energy in NeutralIso region for %s", IsolationNames[i].c_str());
628  h_ediff[i] = fs_->make<TH1D>(hname, htit, 100, -0.5, 19.5);
629  h_ediff[i]->Sumw2();
630  }
631  std::string energyNames[6]={"E_{7x7}", "H_{3x3}", "(E_{7x7}+H_{3x3})",
632  "E_{11x11}", "H_{5x5}", "{E_{11x11}+H_{5x5})"};
633  for (int i=0; i<4+nPVBin+4; ++i) {
634  for (int ip=0; ip<nPBin; ++ip) {
635  for (int ie=0; ie<nEtaBin; ++ie) {
636  for (int j=0; j<6; ++j) {
637  sprintf(hname, "h_energy_%d_%d_%d_%d", i, ip, ie, j);
638  if (i < 4) {
639  sprintf(htit,"%s/p (p=%4.1f:%4.1f; i#eta=%d:%d) for tracks with %s",
640  energyNames[j].c_str(),pBin[ip],pBin[ip+1],etaBin[ie],
641  (etaBin[ie+1]-1), TrkNames[i+4].c_str());
642  } else if (i < 4+nPVBin) {
643  sprintf(htit,"%s/p (p=%4.1f:%4.1f, i#eta=%d:%d, PV=%d:%d) for tracks with %s",
644  energyNames[j].c_str(),pBin[ip],pBin[ip+1],etaBin[ie],
645  (etaBin[ie+1]-1), pvBin[i-4], pvBin[i-3],
646  TrkNames[7].c_str());
647  } else {
648  sprintf(htit,"%s/p (p=%4.1f:%4.1f, i#eta=%d:%d %s) for tracks with %s",
649  energyNames[j].c_str(),pBin[ip],pBin[ip+1],etaBin[ie],
650  (etaBin[ie+1]-1), particle[i-4-nPVBin].c_str(),
651  TrkNames[7].c_str());
652  }
653  h_energy[i][ip][ie][j] = fs_->make<TH1D>(hname, htit, 500, -0.1, 4.9);
654  h_energy[i][ip][ie][j]->Sumw2();
655  }
656  }
657  }
658  }
659 
660  // Now the tree
661  if (doTree_) {
662  tree_ = fs_->make<TTree>("testTree", "new HLT Tree");
663  tree_->Branch("tr_goodRun", &tr_goodRun, "tr_goodRun/I");
664  tree_->Branch("tr_goodPV", &tr_goodPV, "tr_goodPV/I");
665  tree_->Branch("tr_eventWeight", &tr_eventWeight, "tr_eventWeight/D");
666  tree_->Branch("tr_tr_TrigName", &tr_TrigName);
667  tree_->Branch("tr_TrkPt", &tr_TrkPt);
668  tree_->Branch("tr_TrkP", &tr_TrkP);
669  tree_->Branch("tr_TrkEta", &tr_TrkEta);
670  tree_->Branch("tr_TrkPhi", &tr_TrkPhi);
671  tree_->Branch("tr_TrkID", &tr_TrkID);
672  tree_->Branch("tr_MaxNearP31X31", &tr_MaxNearP31X31);
673  tree_->Branch("tr_MaxNearHcalP7x7", &tr_MaxNearHcalP7x7);
674  tree_->Branch("tr_FE7x7P", &tr_FE7x7P);
675  tree_->Branch("tr_FE11x11P", &tr_FE11x11P);
676  tree_->Branch("tr_FE15x15P", &tr_FE15x15P);
677  tree_->Branch("tr_SE7x7P", &tr_SE7x7P);
678  tree_->Branch("tr_SE11x11P", &tr_SE11x11P);
679  tree_->Branch("tr_SE15x15P", &tr_SE15x15P);
680  tree_->Branch("tr_H3x3", &tr_H3x3);
681  tree_->Branch("tr_H5x5", &tr_H5x5);
682  tree_->Branch("tr_H7x7", &tr_H7x7);
683  tree_->Branch("tr_iEta", &tr_iEta);
684  }
685 }
std::vector< double > tr_TrkPt
Definition: StudyHLT.cc:129
std::vector< double > tr_H3x3
Definition: StudyHLT.cc:131
TH1I * h_HLTCorr
Definition: StudyHLT.cc:114
TH1D * h_pt[nGen+1]
Definition: StudyHLT.cc:118
TH1I * h_numberPV
Definition: StudyHLT.cc:114
TH1I * h_nHLT
Definition: StudyHLT.cc:114
std::vector< double > tr_MaxNearP31X31
Definition: StudyHLT.cc:130
TH1I * h_ntrk[2]
Definition: StudyHLT.cc:120
TH1D * h_energy[nPVBin+8][nPBin][nEtaBin][6]
Definition: StudyHLT.cc:122
std::vector< std::string > tr_TrigName
Definition: StudyHLT.cc:128
std::vector< bool > tr_SE7x7P
Definition: StudyHLT.cc:133
static const int nPVBin
Definition: StudyHLT.cc:89
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TH1I * h_HLTAccept
Definition: StudyHLT.cc:114
static const int nGen
Definition: StudyHLT.cc:90
int pvBin[nPVBin+1]
Definition: StudyHLT.cc:124
std::vector< double > tr_TrkEta
Definition: StudyHLT.cc:129
TH1I * h_goodRun
Definition: StudyHLT.cc:115
TH1D * h_ene2[2]
Definition: StudyHLT.cc:121
double pBin[nPBin+1]
Definition: StudyHLT.cc:125
std::vector< int > tr_iEta
Definition: StudyHLT.cc:134
static const int nEtaBin
Definition: StudyHLT.cc:89
TH1D * h_p[nGen+1]
Definition: StudyHLT.cc:118
std::vector< double > tr_MaxNearHcalP7x7
Definition: StudyHLT.cc:130
TH1D * h_eta[nGen+1]
Definition: StudyHLT.cc:119
TH1D * h_ene1[2]
Definition: StudyHLT.cc:121
int tr_goodRun
Definition: StudyHLT.cc:126
std::vector< bool > tr_SE11x11P
Definition: StudyHLT.cc:133
TH1D * h_ediff[2]
Definition: StudyHLT.cc:121
int tr_goodPV
Definition: StudyHLT.cc:126
std::vector< double > tr_FE11x11P
Definition: StudyHLT.cc:132
edm::Service< TFileService > fs_
Definition: StudyHLT.cc:92
TH1D * h_maxNearP[2]
Definition: StudyHLT.cc:121
TH2I * h_nHLTvsRN
Definition: StudyHLT.cc:116
std::vector< int > tr_TrkID
Definition: StudyHLT.cc:134
TTree * tree_
Definition: StudyHLT.cc:123
TH1I * h_goodPV
Definition: StudyHLT.cc:115
bool doTree_
Definition: StudyHLT.cc:100
std::vector< double > tr_H7x7
Definition: StudyHLT.cc:131
std::vector< double > tr_FE15x15P
Definition: StudyHLT.cc:132
TH1D * h_phi[nGen+1]
Definition: StudyHLT.cc:119
double tr_eventWeight
Definition: StudyHLT.cc:127
int etaBin[nEtaBin+1]
Definition: StudyHLT.cc:124
static const int nPBin
Definition: StudyHLT.cc:89
std::vector< double > tr_FE7x7P
Definition: StudyHLT.cc:132
std::vector< double > tr_TrkPhi
Definition: StudyHLT.cc:129
std::vector< double > tr_TrkP
Definition: StudyHLT.cc:129
std::vector< bool > tr_SE15x15P
Definition: StudyHLT.cc:133
std::vector< double > tr_H5x5
Definition: StudyHLT.cc:131
void StudyHLT::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Definition at line 709 of file StudyHLT.cc.

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

Definition at line 688 of file StudyHLT.cc.

References changed_, firstEvent_, fs_, h_HLTAccepts, hltConfig_, mps_fire::i, HLTConfigProvider::init(), TFileService::make(), nRun, and edm::RunBase::run().

688  {
689  char hname[100], htit[400];
690  edm::LogInfo("IsoTrack") << "Run[" << nRun << "] " << iRun.run() << " hltconfig.init "
691  << hltConfig_.init(iRun,iSetup,"HLT",changed_);
692  sprintf(hname, "h_HLTAccepts_%i", iRun.run());
693  sprintf(htit, "HLT Accepts for Run No %i", iRun.run());
694  TH1I *hnew = fs_->make<TH1I>(hname, htit, 500, 0, 500);
695  for (int i=1; i<=500; ++i) hnew->GetXaxis()->SetBinLabel(i," ");
696  h_HLTAccepts.push_back(hnew);
697  edm::LogInfo("IsoTrack") << "beginrun " << iRun.run();
698  firstEvent_ = true;
699  changed_ = false;
700 }
bool firstEvent_
Definition: StudyHLT.cc:100
std::vector< TH1I * > h_HLTAccepts
Definition: StudyHLT.cc:117
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
bool changed_
Definition: StudyHLT.cc:100
int nRun
Definition: StudyHLT.cc:124
HLTConfigProvider hltConfig_
Definition: StudyHLT.cc:91
edm::Service< TFileService > fs_
Definition: StudyHLT.cc:92
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
void StudyHLT::clear ( void  )
private

Definition at line 713 of file StudyHLT.cc.

References tr_FE11x11P, tr_FE15x15P, tr_FE7x7P, tr_H3x3, tr_H5x5, tr_H7x7, tr_iEta, tr_MaxNearHcalP7x7, tr_MaxNearP31X31, tr_SE11x11P, tr_SE15x15P, tr_SE7x7P, tr_TrigName, tr_TrkEta, tr_TrkID, tr_TrkP, tr_TrkPhi, and tr_TrkPt.

Referenced by analyze(), Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), BeautifulSoup.Tag::setString(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().

713  {
714  tr_TrigName.clear();
715  tr_TrkPt.clear(); tr_TrkP.clear(); tr_TrkEta.clear(); tr_TrkPhi.clear();
716  tr_TrkID.clear(); tr_MaxNearP31X31.clear(); tr_MaxNearHcalP7x7.clear();
717  tr_FE7x7P.clear(); tr_FE11x11P.clear(); tr_FE15x15P.clear();
718  tr_SE7x7P.clear(); tr_SE11x11P.clear(); tr_SE15x15P.clear();
719  tr_H3x3.clear(); tr_H5x5.clear(); tr_H7x7.clear();
720  tr_iEta.clear();
721 }
std::vector< double > tr_TrkPt
Definition: StudyHLT.cc:129
std::vector< double > tr_H3x3
Definition: StudyHLT.cc:131
std::vector< double > tr_MaxNearP31X31
Definition: StudyHLT.cc:130
std::vector< std::string > tr_TrigName
Definition: StudyHLT.cc:128
std::vector< bool > tr_SE7x7P
Definition: StudyHLT.cc:133
std::vector< double > tr_TrkEta
Definition: StudyHLT.cc:129
std::vector< int > tr_iEta
Definition: StudyHLT.cc:134
std::vector< double > tr_MaxNearHcalP7x7
Definition: StudyHLT.cc:130
std::vector< bool > tr_SE11x11P
Definition: StudyHLT.cc:133
std::vector< double > tr_FE11x11P
Definition: StudyHLT.cc:132
std::vector< int > tr_TrkID
Definition: StudyHLT.cc:134
std::vector< double > tr_H7x7
Definition: StudyHLT.cc:131
std::vector< double > tr_FE15x15P
Definition: StudyHLT.cc:132
std::vector< double > tr_FE7x7P
Definition: StudyHLT.cc:132
std::vector< double > tr_TrkPhi
Definition: StudyHLT.cc:129
std::vector< double > tr_TrkP
Definition: StudyHLT.cc:129
std::vector< bool > tr_SE15x15P
Definition: StudyHLT.cc:133
std::vector< double > tr_H5x5
Definition: StudyHLT.cc:131
void StudyHLT::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Definition at line 711 of file StudyHLT.cc.

711 {}
void StudyHLT::endRun ( edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivate

Definition at line 703 of file StudyHLT.cc.

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

703  {
704  nRun++;
705  edm::LogInfo("IsoTrack") << "endrun[" << nRun << "] " << iRun.run();
706 }
int nRun
Definition: StudyHLT.cc:124
void StudyHLT::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 219 of file StudyHLT.cc.

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

219  {
220  //The following says we do not know what parameters are allowed so do no validation
221  // Please change this to state exactly what you do use, even if it is no parameters
223  desc.setUnknown();
224  descriptions.addDefault(desc);
225 }
void addDefault(ParameterSetDescription const &psetDescription)
void StudyHLT::fillEnergy ( int  flag,
int  ieta,
double  p,
double  enEcal1,
double  enHcal1,
double  enEcal2,
double  enHcal2 
)
private

Definition at line 737 of file StudyHLT.cc.

References etaBin, RemoveAddSevLevel::flag, h_energy, mps_fire::i, nEtaBin, nPBin, pBin, and tr_eventWeight.

Referenced by analyze().

738  {
739  int ip(-1), ie(-1);
740  for (int i=0; i<nPBin; ++i) {
741  if (p >= pBin[i] && p < pBin[i+1]) { ip = i; break; }
742  }
743  for (int i=0; i<nEtaBin; ++i) {
744  if (ieta >= etaBin[i] && ieta < etaBin[i+1]) { ie = i; break; }
745  }
746  if (ip >= 0 && ie >= 0 && enEcal1 > 0.02 && enHcal1 > 0.1) {
747  h_energy[flag][ip][ie][0]->Fill(enEcal1/p,tr_eventWeight);
748  h_energy[flag][ip][ie][1]->Fill(enHcal1/p,tr_eventWeight);
749  h_energy[flag][ip][ie][2]->Fill((enEcal1+enHcal1)/p,tr_eventWeight);
750  h_energy[flag][ip][ie][3]->Fill(enEcal2/p,tr_eventWeight);
751  h_energy[flag][ip][ie][4]->Fill(enHcal2/p,tr_eventWeight);
752  h_energy[flag][ip][ie][5]->Fill((enEcal2+enHcal2)/p,tr_eventWeight);
753  }
754 }
TH1D * h_energy[nPVBin+8][nPBin][nEtaBin][6]
Definition: StudyHLT.cc:122
double pBin[nPBin+1]
Definition: StudyHLT.cc:125
static const int nEtaBin
Definition: StudyHLT.cc:89
double tr_eventWeight
Definition: StudyHLT.cc:127
int etaBin[nEtaBin+1]
Definition: StudyHLT.cc:124
static const int nPBin
Definition: StudyHLT.cc:89
void StudyHLT::fillIsolation ( int  i,
double  emaxnearP,
double  eneutIso1,
double  eneutIso2 
)
private

Definition at line 730 of file StudyHLT.cc.

References h_ediff, h_ene1, h_ene2, h_maxNearP, mps_fire::i, and tr_eventWeight.

Referenced by analyze().

730  {
731  h_maxNearP[i]->Fill(emaxnearP,tr_eventWeight);
732  h_ene1[i]->Fill(eneutIso1,tr_eventWeight);
733  h_ene2[i]->Fill(eneutIso2,tr_eventWeight);
734  h_ediff[i]->Fill(eneutIso2-eneutIso1,tr_eventWeight);
735 }
TH1D * h_ene2[2]
Definition: StudyHLT.cc:121
TH1D * h_ene1[2]
Definition: StudyHLT.cc:121
TH1D * h_ediff[2]
Definition: StudyHLT.cc:121
TH1D * h_maxNearP[2]
Definition: StudyHLT.cc:121
double tr_eventWeight
Definition: StudyHLT.cc:127
void StudyHLT::fillTrack ( int  i,
double  pt,
double  p,
double  eta,
double  phi 
)
private

Definition at line 723 of file StudyHLT.cc.

References h_eta, h_p, h_phi, h_pt, mps_fire::i, and tr_eventWeight.

Referenced by analyze().

723  {
724  h_pt[i]->Fill(pt,tr_eventWeight);
725  h_p[i]->Fill(p,tr_eventWeight);
726  h_eta[i]->Fill(eta,tr_eventWeight);
727  h_phi[i]->Fill(phi,tr_eventWeight);
728 }
TH1D * h_pt[nGen+1]
Definition: StudyHLT.cc:118
TH1D * h_p[nGen+1]
Definition: StudyHLT.cc:118
TH1D * h_eta[nGen+1]
Definition: StudyHLT.cc:119
TH1D * h_phi[nGen+1]
Definition: StudyHLT.cc:119
double tr_eventWeight
Definition: StudyHLT.cc:127
int StudyHLT::trackPID ( const reco::Track pTrack,
const edm::Handle< reco::GenParticleCollection > &  genParticles 
)
private

Definition at line 768 of file StudyHLT.cc.

References funct::abs(), DEFINE_FWK_MODULE, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::TrackBase::eta(), triggerObjects_cff::id, training_settings::idx, edm::HandleBase::isValid(), M_PI, AlCaHLTBitMon_ParallelJobs::p, common_cff::pdgId, reco::TrackBase::phi(), and mathSSE::sqrt().

Referenced by analyze().

768  {
769  int id(0);
770  if (genParticles.isValid()) {
771  unsigned int indx;
772  reco::GenParticleCollection::const_iterator p;
773  double mindR(999.9);
774  for (p=genParticles->begin(),indx=0; p!=genParticles->end(); ++p,++indx) {
775  int pdgId = std::abs(p->pdgId());
776  int idx = (pdgId == 11) ? 1 :
777  ((pdgId == 211) ? 2 : ((pdgId == 321) ? 3 : ((pdgId == 2212) ? 4 : 0)));
778  if (idx > 0) {
779  double dEta = pTrack->eta() - p->momentum().Eta();
780  double phi1 = pTrack->phi();
781  double phi2 = p->momentum().Phi();
782  if (phi1 < 0) phi1 += 2.0*M_PI;
783  if (phi2 < 0) phi2 += 2.0*M_PI;
784  double dPhi = phi1-phi2;
785  if (dPhi > M_PI) dPhi -= 2.*M_PI;
786  else if (dPhi < -M_PI) dPhi += 2.*M_PI;
787  double dR = sqrt(dEta*dEta+dPhi*dPhi);
788  if (dR < mindR) {
789  mindR = dR; id = idx;
790  }
791  }
792  }
793  }
794  return id;
795 }
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:645
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:651
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
#define M_PI
std::string StudyHLT::truncate_str ( const std::string &  str)
private

Definition at line 756 of file StudyHLT.cc.

References mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, and z.

Referenced by analyze().

756  {
757  std::string truncated_str(str);
758  int length = str.length();
759  for (int i=0; i<length-2; i++){
760  if (str[i]=='_' && str[i+1]=='v' && isdigit(str.at(i+2))) {
761  int z = i+1;
762  truncated_str = str.substr(0,z);
763  }
764  }
765  return(truncated_str);
766 }

Member Data Documentation

bool StudyHLT::changed_
private

Definition at line 100 of file StudyHLT.cc.

Referenced by beginRun(), and StudyHLT().

bool StudyHLT::doTree_
private

Definition at line 100 of file StudyHLT.cc.

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

int StudyHLT::etaBin[nEtaBin+1]
private

Definition at line 124 of file StudyHLT.cc.

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

bool StudyHLT::firstEvent_
private

Definition at line 100 of file StudyHLT.cc.

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

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

Definition at line 92 of file StudyHLT.cc.

Referenced by beginJob(), and beginRun().

TH1D * StudyHLT::h_ediff[2]
private

Definition at line 121 of file StudyHLT.cc.

Referenced by beginJob(), and fillIsolation().

TH1D * StudyHLT::h_ene1[2]
private

Definition at line 121 of file StudyHLT.cc.

Referenced by beginJob(), and fillIsolation().

TH1D * StudyHLT::h_ene2[2]
private

Definition at line 121 of file StudyHLT.cc.

Referenced by beginJob(), and fillIsolation().

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

Definition at line 122 of file StudyHLT.cc.

Referenced by beginJob(), and fillEnergy().

TH1D* StudyHLT::h_eta[nGen+1]
private

Definition at line 119 of file StudyHLT.cc.

Referenced by beginJob(), and fillTrack().

TH1I* StudyHLT::h_goodPV
private

Definition at line 115 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH1I * StudyHLT::h_goodRun
private

Definition at line 115 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH1I * StudyHLT::h_HLTAccept
private

Definition at line 114 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

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

Definition at line 117 of file StudyHLT.cc.

Referenced by analyze(), and beginRun().

TH1I * StudyHLT::h_HLTCorr
private

Definition at line 114 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH1D* StudyHLT::h_maxNearP[2]
private

Definition at line 121 of file StudyHLT.cc.

Referenced by beginJob(), and fillIsolation().

TH1I* StudyHLT::h_nHLT
private

Definition at line 114 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH2I* StudyHLT::h_nHLTvsRN
private

Definition at line 116 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH1I* StudyHLT::h_ntrk[2]
private

Definition at line 120 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH1I * StudyHLT::h_numberPV
private

Definition at line 114 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

TH1D* StudyHLT::h_p[nGen+1]
private

Definition at line 118 of file StudyHLT.cc.

Referenced by beginJob(), and fillTrack().

TH1D * StudyHLT::h_phi[nGen+1]
private

Definition at line 119 of file StudyHLT.cc.

Referenced by beginJob(), and fillTrack().

TH1D * StudyHLT::h_pt[nGen+1]
private

Definition at line 118 of file StudyHLT.cc.

Referenced by beginJob(), and fillTrack().

HLTConfigProvider StudyHLT::hltConfig_
private

Definition at line 91 of file StudyHLT.cc.

Referenced by beginRun().

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

Definition at line 95 of file StudyHLT.cc.

Referenced by analyze().

bool StudyHLT::isItAOD_
private

Definition at line 100 of file StudyHLT.cc.

Referenced by StudyHLT().

double StudyHLT::maxTrackEta_
private

Definition at line 98 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

double StudyHLT::minTrackP_
private

Definition at line 98 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

const int StudyHLT::nEtaBin =4
staticprivate

Definition at line 89 of file StudyHLT.cc.

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

const int StudyHLT::nGen =(nPVBin+12)
staticprivate

Definition at line 90 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

const int StudyHLT::nPBin =10
staticprivate

Definition at line 89 of file StudyHLT.cc.

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

const int StudyHLT::nPVBin =4
staticprivate

Definition at line 89 of file StudyHLT.cc.

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

int StudyHLT::nRun
private

Definition at line 124 of file StudyHLT.cc.

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

double StudyHLT::pBin[nPBin+1]
private

Definition at line 125 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::puWeights_
private

Definition at line 97 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

int StudyHLT::pvBin[nPVBin+1]
private

Definition at line 124 of file StudyHLT.cc.

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

spr::trackSelectionParameters StudyHLT::selectionParameters_
private

Definition at line 94 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

std::string StudyHLT::theTrackQuality_
private

Definition at line 96 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

edm::InputTag StudyHLT::theTriggerResultsLabel_
private

Definition at line 102 of file StudyHLT.cc.

Referenced by StudyHLT().

double StudyHLT::tMaxE_
private

Definition at line 99 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tMaxH_
private

Definition at line 99 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tMinE_
private

Definition at line 99 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tMinH_
private

Definition at line 99 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 109 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 110 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 112 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 107 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 111 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 103 of file StudyHLT.cc.

Referenced by StudyHLT().

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

Definition at line 106 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 108 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 104 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 105 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

double StudyHLT::tr_eventWeight
private

Definition at line 127 of file StudyHLT.cc.

Referenced by analyze(), beginJob(), fillEnergy(), fillIsolation(), and fillTrack().

std::vector<double> StudyHLT::tr_FE11x11P
private

Definition at line 132 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_FE15x15P
private

Definition at line 132 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_FE7x7P
private

Definition at line 132 of file StudyHLT.cc.

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

int StudyHLT::tr_goodPV
private

Definition at line 126 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

int StudyHLT::tr_goodRun
private

Definition at line 126 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

std::vector<double> StudyHLT::tr_H3x3
private

Definition at line 131 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_H5x5
private

Definition at line 131 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_H7x7
private

Definition at line 131 of file StudyHLT.cc.

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

std::vector<int> StudyHLT::tr_iEta
private

Definition at line 134 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_MaxNearHcalP7x7
private

Definition at line 130 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_MaxNearP31X31
private

Definition at line 130 of file StudyHLT.cc.

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

std::vector<bool> StudyHLT::tr_SE11x11P
private

Definition at line 133 of file StudyHLT.cc.

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

std::vector<bool> StudyHLT::tr_SE15x15P
private

Definition at line 133 of file StudyHLT.cc.

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

std::vector<bool> StudyHLT::tr_SE7x7P
private

Definition at line 133 of file StudyHLT.cc.

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

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

Definition at line 128 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_TrkEta
private

Definition at line 129 of file StudyHLT.cc.

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

std::vector<int> StudyHLT::tr_TrkID
private

Definition at line 134 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_TrkP
private

Definition at line 129 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_TrkPhi
private

Definition at line 129 of file StudyHLT.cc.

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

std::vector<double> StudyHLT::tr_TrkPt
private

Definition at line 129 of file StudyHLT.cc.

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

TTree* StudyHLT::tree_
private

Definition at line 123 of file StudyHLT.cc.

Referenced by analyze(), and beginJob().

edm::InputTag StudyHLT::triggerEvent_
private

Definition at line 102 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

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

Definition at line 95 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().

int StudyHLT::verbosity_
private

Definition at line 93 of file StudyHLT.cc.

Referenced by analyze(), and StudyHLT().