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
ValidationHcalIsoTrackAlCaReco Class Reference

#include <Calibration/HcalCalibAlgos/plugins/ValidationHcalIsoTrackAlCaReco.cc>

Inheritance diagram for ValidationHcalIsoTrackAlCaReco:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ValidationHcalIsoTrackAlCaReco (const edm::ParameterSet &)
 
 ~ValidationHcalIsoTrackAlCaReco ()
 
- 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 (const std::string &iProcessName, std::vector< const char * > &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 endJob ()
 
double getDist (double, double, double, double)
 
double getDistInCM (double eta1, double phi1, double eta2, double phi2)
 
std::pair< int, int > towerIndex (double eta, double phi)
 

Private Attributes

DQMStoredbe_
 
std::string folderName_
 
MonitorElementhDeposEcalInner
 
MonitorElementhDeposEcalOuter
 
double heLow_
 
double heUp_
 
MonitorElementhl3AbsEta
 
MonitorElementhl3eta
 
MonitorElementhl3phi
 
MonitorElementhl3Pt
 
edm::InputTag hltFilterTag_
 
MonitorElementhOccupancyFull
 
MonitorElementhOccupancyHighEn
 
MonitorElementhOffAbsEta
 
MonitorElementhOffEta
 
MonitorElementhOffEtaFP
 
MonitorElementhOffL3TrackMatch
 
MonitorElementhOffL3TrackPtRat
 
MonitorElementhOffP
 
MonitorElementhOffP_0005
 
MonitorElementhOffP_0510
 
MonitorElementhOffP_1015
 
MonitorElementhOffP_1520
 
MonitorElementhOffPhi
 
MonitorElementhOffPhiFP
 
MonitorElementhPurityEta
 
MonitorElementhPurityPhi
 
MonitorElementhSimAbsEta
 
MonitorElementhSimDist
 
MonitorElementhSimEta
 
MonitorElementhSimN
 
MonitorElementhSimNE
 
MonitorElementhSimNM
 
MonitorElementhSimNN
 
MonitorElementhSimP
 
MonitorElementhSimPhi
 
MonitorElementhSimPt
 
MonitorElementhSimPtRatOff
 
MonitorElementhTracksMaxP
 
MonitorElementhTracksSumP
 
int nHLTL3accepts
 
int nTotal
 
std::string outRootFileName_
 
double pThr_
 
edm::InputTag recoTrLabel_
 
bool saveToFile_
 
edm::EDGetTokenT
< reco::IsolatedPixelTrackCandidateCollection
tok_arITr_
 
edm::EDGetTokenT
< trigger::TriggerEvent
tok_hlt_
 
edm::EDGetTokenT
< edm::SimTrackContainer
tok_simTrack_
 

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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 73 of file ValidationHcalIsoTrackAlCaReco.h.

Constructor & Destructor Documentation

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

Definition at line 130 of file ValidationHcalIsoTrackAlCaReco.cc.

References folderName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), heLow_, hltFilterTag_, nHLTL3accepts, nTotal, outRootFileName_, pThr_, recoTrLabel_, saveToFile_, AlCaHLTBitMon_QueryRunRegistry::string, tok_arITr_, tok_hlt_, and tok_simTrack_.

130  {
131 
132  tok_simTrack_ = consumes<edm::SimTrackContainer>(iConfig.getParameter<edm::InputTag>("simTracksTag"));
133 
134  folderName_ = iConfig.getParameter<std::string>("folderName");
135  saveToFile_=iConfig.getParameter<bool>("saveToFile");
136  outRootFileName_=iConfig.getParameter<std::string>("outputRootFileName");
137  tok_hlt_ = consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("hltTriggerEventLabel"));
138  hltFilterTag_=iConfig.getParameter<edm::InputTag>("hltL3FilterLabel");
139  tok_arITr_ = consumes<reco::IsolatedPixelTrackCandidateCollection>(iConfig.getParameter<edm::InputTag>("alcarecoIsoTracksLabel"));
140  recoTrLabel_=iConfig.getParameter<edm::InputTag>("recoTracksLabel");
141  pThr_=iConfig.getUntrackedParameter<double>("pThrL3",0);
142  heLow_=iConfig.getUntrackedParameter<double>("lowerHighEnergyCut",40);
143  heLow_=iConfig.getUntrackedParameter<double>("upperHighEnergyCut",60);
144 
145  nTotal=0;
146  nHLTL3accepts=0;
147 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTrack_
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_arITr_
edm::EDGetTokenT< trigger::TriggerEvent > tok_hlt_
ValidationHcalIsoTrackAlCaReco::~ValidationHcalIsoTrackAlCaReco ( )

Definition at line 149 of file ValidationHcalIsoTrackAlCaReco.cc.

150 {}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 152 of file ValidationHcalIsoTrackAlCaReco.cc.

References gather_cfg::cout, HLT_25ns14e33_v1_cff::distance, alignCSCRings::e, trigger::TriggerObject::eta(), MonitorElement::Fill(), edm::Event::getByToken(), getDist(), getDistInCM(), hDeposEcalInner, hDeposEcalOuter, heLow_, heUp_, hl3AbsEta, hl3eta, hl3phi, hl3Pt, hltFilterTag_, hOccupancyFull, hOccupancyHighEn, hOffAbsEta, hOffEta, hOffEtaFP, hOffL3TrackMatch, hOffL3TrackPtRat, hOffP, hOffP_0005, hOffP_0510, hOffP_1015, hOffP_1520, hOffPhi, hOffPhiFP, hSimAbsEta, hSimDist, hSimEta, hSimN, hSimNE, hSimNM, hSimNN, hSimP, hSimPhi, hSimPt, hSimPtRatOff, hTracksMaxP, hTracksSumP, prof2calltree::l, match(), HLT_25ns14e33_v1_cff::nFilt, nTotal, trigger::TriggerObject::p(), trigger::TriggerObject::phi(), trigger::TriggerObject::pt(), pThr_, dttmaxenums::R, mathSSE::sqrt(), tok_arITr_, tok_hlt_, tok_simTrack_, and towerIndex().

153 {
154  nTotal++;
155 
157  iEvent.getByToken(tok_hlt_,trEv);
158 
160  iEvent.getByToken(tok_arITr_,recoIsoTracks);
161 
162  const trigger::TriggerObjectCollection& TOCol(trEv->getObjects());
163 
164  trigger::Keys KEYS;
165  const trigger::size_type nFilt(trEv->sizeFilters());
166  for (trigger::size_type iFilt=0; iFilt!=nFilt; iFilt++)
167  {
168  if (trEv->filterTag(iFilt)==hltFilterTag_)
169  {
170  KEYS=trEv->filterKeys(iFilt);
171  }
172  }
173 
174  trigger::size_type nReg=KEYS.size();
175 
176  std::vector<double> trigEta;
177  std::vector<double> trigPhi;
178  bool trig=false;
179 
180  //checks with IsoTrack trigger results
181  for (trigger::size_type iReg=0; iReg<nReg; iReg++)
182  {
183  const trigger::TriggerObject& TObj(TOCol[KEYS[iReg]]);
184  if (TObj.p()<pThr_) continue;
185  hl3eta->Fill(TObj.eta(),1);
186  hl3AbsEta->Fill(fabs(TObj.eta()),1);
187  hl3phi->Fill(TObj.phi(),1);
188 
189  if (recoIsoTracks->size()>0)
190  {
191  double minRecoL3dist=1000;
192  reco::IsolatedPixelTrackCandidateCollection::const_iterator mrtr;
193  for (reco::IsolatedPixelTrackCandidateCollection::const_iterator rtrit=recoIsoTracks->begin(); rtrit!=recoIsoTracks->end(); rtrit++)
194  {
195  double R=getDist(rtrit->eta(),rtrit->phi(),TObj.eta(),TObj.phi());
196  if (R<minRecoL3dist)
197  {
198  mrtr=rtrit;
199  minRecoL3dist=R;
200  }
201  }
202  hOffL3TrackMatch->Fill(minRecoL3dist,1);
203  hOffL3TrackPtRat->Fill(TObj.pt()/mrtr->pt(),1);
204  }
205 
206  hl3Pt->Fill(TObj.pt(),1);
207  trig=true;
208  trigEta.push_back(TObj.eta());
209  trigPhi.push_back(TObj.phi());
210  }
211 
212  //general distributions
213  for (reco::IsolatedPixelTrackCandidateCollection::const_iterator itr=recoIsoTracks->begin(); itr!=recoIsoTracks->end(); itr++)
214  {
215  bool match=false;
216  for (unsigned int l=0; l<trigEta.size(); l++)
217  {
218  if (getDist(itr->eta(),itr->phi(),trigEta[l],trigPhi[l])<0.2) match=true;
219  }
220  if (match&&trig)
221  {
222  hOffEtaFP->Fill(itr->eta(),1);
223  hOffPhiFP->Fill(itr->phi(),1);
224  }
225 
226  hOffEta->Fill(itr->eta(),1);
227  hOffPhi->Fill(itr->phi(),1);
228 
229  hOffAbsEta->Fill(fabs(itr->eta()),1);
230 
231  hDeposEcalInner->Fill(itr->energyIn(),1);
232  hDeposEcalOuter->Fill(itr->energyOut(),1);
233 
234  hTracksSumP->Fill(itr->sumPtPxl(),1);
235  hTracksMaxP->Fill(itr->maxPtPxl(),1);
236 
237  if (fabs(itr->eta())<0.5) hOffP_0005->Fill(itr->p(),1);
238  if (fabs(itr->eta())>0.5&&fabs(itr->eta())<1.0) hOffP_0510->Fill(itr->p(),1);
239  if (fabs(itr->eta())>1.0&&fabs(itr->eta())<1.5) hOffP_1015->Fill(itr->p(),1);
240  if (fabs(itr->eta())<1.5&&fabs(itr->eta())<2.0) hOffP_1520->Fill(itr->p(),1);
241 
242  hOffP->Fill(itr->p(),1);
243 
244  std::pair<int,int> TI=towerIndex(itr->eta(),itr->phi());
245  hOccupancyFull->Fill(TI.first,TI.second,1);
246  if (itr->p()>heLow_&&itr->p()<heUp_) hOccupancyHighEn->Fill(TI.first,TI.second,1);
247  }
248 
249 // Sergey +
250 
251  std::cout << std::endl << " End / Start " << std::endl;
252 
254  iEvent.getByToken<edm::SimTrackContainer>(tok_simTrack_, simTracks);
255 
256  for (reco::IsolatedPixelTrackCandidateCollection::const_iterator bll=recoIsoTracks->begin(); bll!=recoIsoTracks->end(); bll++)
257  {
258 
259  std::cout<<"ISO Pt " << bll->pt() << " P " << bll->p() << " Eta "<< bll->eta() << " Phi "<< bll->phi()<< std::endl;
260 
261  double distanceMin = 1.;
262  double SimPtMatched = 1.;
263  double SimPhiMatched = 1.;
264  double SimEtaMatched = 1.;
265  double SimDistMatched = 1.;
266  double SimPMatched = 1.;
267  double neuen = 0.;
268  double neuenm = 0.;
269  int neun = 0;
270 
271  for(edm::SimTrackContainer::const_iterator tracksCI = simTracks->begin();
272  tracksCI != simTracks->end(); tracksCI++){
273 
274  int partIndex = tracksCI->genpartIndex();
275  if (tracksCI->momentum().eta() > (bll->eta()-0.1)
276  && tracksCI->momentum().eta() < (bll->eta()+0.1)
277  && tracksCI->momentum().phi() > (bll->phi()-0.1)
278  && tracksCI->momentum().phi() < (bll->phi()+0.1)
279 // && tracksCI->momentum().e() > (0.5*bll->p())
280 // && tracksCI->momentum().e() < (2.*bll->p())
281  && tracksCI->momentum().e() > 2.
282  && fabs(tracksCI->charge()) == 1 && partIndex >0)
283  {
284 
285  double distance=getDist(tracksCI->momentum().eta(),tracksCI->momentum().phi(),bll->eta(),bll->phi());
286  double distanceCM=getDistInCM(tracksCI->momentum().eta(),tracksCI->momentum().phi(),bll->eta(),bll->phi());
287 
288  if (distanceMin > distance) {
289  distanceMin = distance;
290  SimPtMatched = tracksCI->momentum().pt();
291  SimPhiMatched = tracksCI->momentum().phi();
292  SimEtaMatched = tracksCI->momentum().eta();
293  SimDistMatched = distance;
294  SimPMatched = sqrt(tracksCI->momentum().pt()*tracksCI->momentum().pt() + tracksCI->momentum().pz()*tracksCI->momentum().pz());
295  }
296 
297  std::cout<<" Pt "<<tracksCI->momentum().pt()
298  << " Energy " << tracksCI->momentum().e()
299  << " Eta "<< tracksCI->momentum().eta()
300  << " Phi "<< tracksCI->momentum().phi()
301  << " Ind " << partIndex
302  << " Cha " << tracksCI->charge()
303  << " Dis " << distance
304  << " DCM " << distanceCM
305  << std::endl;
306 
307  }
308 
309 
310  if (
311  tracksCI->momentum().eta() > (bll->eta()-0.5)
312  && tracksCI->momentum().eta() < (bll->eta()+0.5)
313  && tracksCI->momentum().phi() > (bll->phi()-0.5)
314  && tracksCI->momentum().phi() < (bll->phi()+0.5)
315 // && tracksCI->momentum().e() > 2.
316  && tracksCI->charge() == 0 && partIndex >0)
317  {
318 
319  double distance=getDist(tracksCI->momentum().eta(),tracksCI->momentum().phi(),bll->eta(),bll->phi());
320  double distanceCM=getDistInCM(tracksCI->momentum().eta(),tracksCI->momentum().phi(),bll->eta(),bll->phi());
321 
322  std::cout<<"NEU Pt "<<tracksCI->momentum().pt()
323  << " Energy " << tracksCI->momentum().e()
324  << " Eta "<< tracksCI->momentum().eta()
325  << " Phi "<< tracksCI->momentum().phi()
326  << " Ind " << partIndex
327  << " Cha " << tracksCI->charge()
328  << " Dis " << distance
329  << " DCM " << distanceCM
330  << std::endl;
331 
332  if (distanceCM < 40.){
333 
334  neuen = neuen + tracksCI->momentum().e();
335  neun = neun + 1;
336  if (neuenm < tracksCI->momentum().e()) neuenm = tracksCI->momentum().e();
337 
338  }
339 
340  }
341 
342  }
343 
344  hSimNN->Fill(neun,1);
345  hSimNE->Fill(neuen,1);
346  hSimNM->Fill(neuenm,1);
347 
348  if (distanceMin < 0.1) {
349 
350  hSimPt->Fill(SimPtMatched,1);
351  hSimPhi->Fill(SimPhiMatched,1);
352  hSimEta->Fill(SimEtaMatched,1);
353  hSimAbsEta->Fill(fabs(SimEtaMatched),1);
354  hSimDist->Fill(SimDistMatched,1);
355  hSimPtRatOff->Fill(SimPtMatched/bll->pt(),1);
356  hSimP->Fill(SimPMatched,1);
357  hSimN->Fill(1,1);
358 
359  std::cout<<"S Pt "<< SimPtMatched
360  << std::endl;
361  }
362 
363  if (distanceMin > 0.1) {
364  hSimN->Fill(0,1);
365  }
366 
367 
368 
369 
370  }
371 
372 // Sergey -
373 
374 
375 
376 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
double getDistInCM(double eta1, double phi1, double eta2, double phi2)
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTrack_
double getDist(double, double, double, double)
uint16_t size_type
edm::EDGetTokenT< reco::IsolatedPixelTrackCandidateCollection > tok_arITr_
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
T sqrt(T t)
Definition: SSEVec.h:48
std::pair< int, int > towerIndex(double eta, double phi)
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys
edm::EDGetTokenT< trigger::TriggerEvent > tok_hlt_
tuple cout
Definition: gather_cfg.py:121
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::vector< SimTrack > SimTrackContainer
void ValidationHcalIsoTrackAlCaReco::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 378 of file ValidationHcalIsoTrackAlCaReco.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, folderName_, MonitorElement::getTH2F(), hDeposEcalInner, hDeposEcalOuter, hl3AbsEta, hl3eta, hl3phi, hl3Pt, hOccupancyFull, hOccupancyHighEn, hOffAbsEta, hOffEta, hOffEtaFP, hOffL3TrackMatch, hOffL3TrackPtRat, hOffP, hOffP_0005, hOffP_0510, hOffP_1015, hOffP_1520, hOffPhi, hOffPhiFP, hSimAbsEta, hSimDist, hSimEta, hSimN, hSimNE, hSimNM, hSimNN, hSimP, hSimPhi, hSimPt, hSimPtRatOff, hTracksMaxP, hTracksSumP, cppFunctionSkipper::operator, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

379 {
382 
383  hl3Pt=dbe_->book1D("hl3Pt","pT of hlt L3 objects",1000,0,1000);
384  hl3Pt->setAxisTitle("pT(GeV)",1);
385  hl3eta=dbe_->book1D("hl3eta","eta of hlt L3 objects",16,-2,2);
386  hl3eta->setAxisTitle("eta",1);
387  hl3AbsEta=dbe_->book1D("hl3AbsEta","|eta| of hlt L3 objects",8,0,2);
388  hl3AbsEta->setAxisTitle("eta",1);
389  hl3phi=dbe_->book1D("hl3phi","phi of hlt L3 objects",16,-3.2,3.2);
390  hl3phi->setAxisTitle("phi",1);
391 
392  hOffEta=dbe_->book1D("hOffEta","eta of alcareco objects",100,-2,2);
393  hOffEta->setAxisTitle("eta",1);
394  hOffPhi=dbe_->book1D("hOffPhi","phi of alcareco objects",100,-3.2,3.2);
395  hOffPhi->setAxisTitle("phi",1);
396  hOffP=dbe_->book1D("hOffP","p of alcareco objects",1000,0,1000);
397  hOffP->setAxisTitle("E(GeV)",1);
398  hOffP_0005=dbe_->book1D("hOffP_0005","p of alcareco objects, |eta|<0.5",1000,0,1000);
399  hOffP_0005->setAxisTitle("E(GeV)",1);
400  hOffP_0510=dbe_->book1D("hOffP_0510","p of alcareco objects, 0.5<|eta|<1.0",1000,0,1000);
401  hOffP_0510->setAxisTitle("E(GeV)",1);
402  hOffP_1015=dbe_->book1D("hOffP_1015","p of alcareco objects, 1.0<|eta|<1.5",1000,0,1000);
403  hOffP_1015->setAxisTitle("E(GeV)",1);
404  hOffP_1520=dbe_->book1D("hOffP_1520","p of alcareco objects, 1.5<|eta|<2.0",1000,0,1000);
405  hOffP_1520->setAxisTitle("E(GeV)",1);
406  hOffEtaFP=dbe_->book1D("hOffEtaFP","eta of alcareco objects, FP",16,-2,2);
407  hOffEtaFP->setAxisTitle("eta",1);
408  hOffAbsEta=dbe_->book1D("hOffAbsEta","|eta| of alcareco objects",8,0,2);
409  hOffAbsEta->setAxisTitle("|eta|",1);
410  hOffPhiFP=dbe_->book1D("hOffPhiFP","phi of alcareco objects, FP",16,-3.2,3.2);
411  hOffPhiFP->setAxisTitle("phi",1);
412  hTracksSumP=dbe_->book1D("hTracksSumP","summary p of tracks in the isolation cone",100,0,20);
413  hTracksSumP->setAxisTitle("E(GeV)");
414  hTracksMaxP=dbe_->book1D("hTracksMaxP","maximum p among tracks in the isolation cone",100,0,20);
415  hTracksMaxP->setAxisTitle("E(GeV)");
416 
417  hDeposEcalInner=dbe_->book1D("hDeposEcalInner","ecal energy deposition in inner cone around track",1000,0,1000);
418  hDeposEcalInner->setAxisTitle("E(GeV)");
419  hDeposEcalOuter=dbe_->book1D("hDeposEcalOuter","ecal energy deposition in outer cone around track",1000,0,1000);
420  hDeposEcalOuter->setAxisTitle("E(GeV)");
421 
422  hOccupancyFull=dbe_->book2D("hOccupancyFull","number of tracks per tower, full energy range",48,-25,25,73,0,73);
423  hOccupancyFull->setAxisTitle("ieta",1);
424  hOccupancyFull->setAxisTitle("iphi",2);
425  hOccupancyFull->getTH2F()->SetOption("colz");
426  hOccupancyFull->getTH2F()->SetStats(kFALSE);
427  hOccupancyHighEn=dbe_->book2D("hOccupancyHighEn","number of tracks per tower, high energy tracks",48,-25,25,73,0,73);
428  hOccupancyHighEn->setAxisTitle("ieta",1);
429  hOccupancyHighEn->setAxisTitle("iphi",2);
430  hOccupancyHighEn->getTH2F()->SetOption("colz");
431  hOccupancyHighEn->getTH2F()->SetStats(kFALSE);
432 
433  hOffL3TrackMatch=dbe_->book1D("hOffL3TrackMatch","Distance from L3 object to offline track",200,0,0.5);
434  hOffL3TrackMatch->setAxisTitle("R(eta,phi)",1);
435  hOffL3TrackPtRat=dbe_->book1D("hOffL3TrackPtRat","Ratio of pT: L3/offline",100,0,10);
436  hOffL3TrackPtRat->setAxisTitle("ratio L3/offline",1);
437 
438 
439 // Sergey +
440 
441  hSimPt=dbe_->book1D("hSimPt","pT of matched SimTrack",1000,0,1000);
442  hSimPt->setAxisTitle("pT(GeV)",1);
443 
444  hSimPhi=dbe_->book1D("hSimPhi","Phi of matched SimTrack",100,-3.2,3.2);
445  hSimPhi->setAxisTitle("phi",1);
446 
447  hSimEta=dbe_->book1D("hSimEta","Eta of matched SimTrack",100,-2.,2.);
448  hSimEta->setAxisTitle("eta",1);
449 
450  hSimAbsEta=dbe_->book1D("hSimAbsEta","|eta| of matched SimTrack",8,0.,2.);
451  hSimAbsEta->setAxisTitle("|eta|",1);
452 
453  hSimDist=dbe_->book1D("hSimDist","Distance from matched SimTrack to Offline Track",200,0,0.1);
454  hSimDist->setAxisTitle("R(eta,phi)",1);
455 
456  hSimPtRatOff=dbe_->book1D("hSimPtRatOff","pT Sim / pT Offline",100,0,10);
457  hSimPtRatOff->setAxisTitle("pT Sim / pT Offline",1);
458 
459  hSimP=dbe_->book1D("hSimP","p of matched SimTrack",1000,0,1000);
460  hSimP->setAxisTitle("p(GeV)",1);
461 
462  hSimN=dbe_->book1D("hSimN","Number matched",2,0,2);
463  hSimN->setAxisTitle("Offline/SimTRack - Matched or Not",1);
464 
465  hSimNN=dbe_->book1D("hSimNN","Number of the neutral particles in cone on ECAL",100,0,100);
466  hSimNN->setAxisTitle("Number",1);
467 
468  hSimNE=dbe_->book1D("hSimNE","Total energy of the neutral particles in cone on ECAL",100,0,100);
469  hSimNE->setAxisTitle("Energy",1);
470 
471  hSimNM=dbe_->book1D("hSimNM","Maximum energy of the neutral particles in cone on ECAL",100,0,100);
472  hSimNM->setAxisTitle("Energy",1);
473 
474 // Sergey -
475 
476 
477 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1122
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:707
void ValidationHcalIsoTrackAlCaReco::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 479 of file ValidationHcalIsoTrackAlCaReco.cc.

References dbe_, outRootFileName_, DQMStore::save(), and saveToFile_.

479  {
480 
481 if(dbe_)
482  {
484  }
485 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2602
double ValidationHcalIsoTrackAlCaReco::getDist ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 73 of file ValidationHcalIsoTrackAlCaReco.cc.

References funct::pow(), and mathSSE::sqrt().

Referenced by analyze().

74 {
75  double dphi = fabs(phi1 - phi2);
76  if(dphi>acos(-1)) dphi = 2*acos(-1)-dphi;
77  double dr = sqrt(dphi*dphi + pow(eta1-eta2,2));
78  return dr;
79 }
T sqrt(T t)
Definition: SSEVec.h:48
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
double ValidationHcalIsoTrackAlCaReco::getDistInCM ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 83 of file ValidationHcalIsoTrackAlCaReco.cc.

References funct::cos(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, create_public_lumi_plots::exp, funct::sin(), and funct::tan().

Referenced by analyze().

84 {
85  double dR, Rec;
86  double theta1=2*atan(exp(-eta1));
87  double theta2=2*atan(exp(-eta2));
88  if (fabs(eta1)<1.479) Rec=129;
89  else Rec=275;
90  //|vect| times tg of acos(scalar product)
91  dR=fabs((Rec/sin(theta1))*tan(acos(sin(theta1)*sin(theta2)*(sin(phi1)*sin(phi2)+cos(phi1)*cos(phi2))+cos(theta1)*cos(theta2))));
92  return dR;
93 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::pair< int, int > ValidationHcalIsoTrackAlCaReco::towerIndex ( double  eta,
double  phi 
)
private

Definition at line 97 of file ValidationHcalIsoTrackAlCaReco.cc.

References delta, and i.

Referenced by analyze().

98 {
99  int ieta=0;
100  int iphi=0;
101  for (int i=1; i<21; i++)
102  {
103  if (fabs(eta)<(i*0.087)&&fabs(eta)>(i-1)*0.087) ieta=int(fabs(eta)/eta)*i;
104  }
105  if (fabs(eta)>1.740&&fabs(eta)<1.830) ieta=int(fabs(eta)/eta)*21;
106  if (fabs(eta)>1.830&&fabs(eta)<1.930) ieta=int(fabs(eta)/eta)*22;
107  if (fabs(eta)>1.930&&fabs(eta)<2.043) ieta=int(fabs(eta)/eta)*23;
108 
109  double delta=phi+0.174532925;
110  if (delta<0) delta=delta+2*acos(-1);
111  if (fabs(eta)<1.740)
112  {
113  for (int i=0; i<72; i++)
114  {
115  if (delta<(i+1)*0.087266462&&delta>i*0.087266462) iphi=i;
116  }
117  }
118  else
119  {
120  for (int i=0; i<36; i++)
121  {
122  if (delta<2*(i+1)*0.087266462&&delta>2*i*0.087266462) iphi=2*i;
123  }
124  }
125 
126  return std::pair<int,int>(ieta,iphi);
127 }
dbl * delta
Definition: mlp_gen.cc:36
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

DQMStore* ValidationHcalIsoTrackAlCaReco::dbe_
private

Definition at line 81 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by beginJob(), and endJob().

std::string ValidationHcalIsoTrackAlCaReco::folderName_
private

Definition at line 87 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by beginJob(), and ValidationHcalIsoTrackAlCaReco().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hDeposEcalInner
private

Definition at line 118 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hDeposEcalOuter
private

Definition at line 119 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

double ValidationHcalIsoTrackAlCaReco::heLow_
private

Definition at line 98 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().

double ValidationHcalIsoTrackAlCaReco::heUp_
private

Definition at line 99 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hl3AbsEta
private

Definition at line 103 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hl3eta
private

Definition at line 102 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hl3phi
private

Definition at line 104 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hl3Pt
private

Definition at line 101 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

edm::InputTag ValidationHcalIsoTrackAlCaReco::hltFilterTag_
private

Definition at line 90 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOccupancyFull
private

Definition at line 128 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOccupancyHighEn
private

Definition at line 129 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffAbsEta
private

Definition at line 122 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffEta
private

Definition at line 125 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffEtaFP
private

Definition at line 121 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffL3TrackMatch
private

Definition at line 105 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffL3TrackPtRat
private

Definition at line 106 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffP
private

Definition at line 113 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffP_0005
private

Definition at line 108 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffP_0510
private

Definition at line 109 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffP_1015
private

Definition at line 110 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffP_1520
private

Definition at line 111 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffPhi
private

Definition at line 126 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hOffPhiFP
private

Definition at line 123 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hPurityEta
private

Definition at line 131 of file ValidationHcalIsoTrackAlCaReco.h.

MonitorElement* ValidationHcalIsoTrackAlCaReco::hPurityPhi
private

Definition at line 132 of file ValidationHcalIsoTrackAlCaReco.h.

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimAbsEta
private

Definition at line 139 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimDist
private

Definition at line 140 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimEta
private

Definition at line 138 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimN
private

Definition at line 143 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimNE
private

Definition at line 145 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimNM
private

Definition at line 146 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimNN
private

Definition at line 144 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimP
private

Definition at line 142 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimPhi
private

Definition at line 137 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimPt
private

Definition at line 136 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hSimPtRatOff
private

Definition at line 141 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hTracksMaxP
private

Definition at line 116 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

MonitorElement* ValidationHcalIsoTrackAlCaReco::hTracksSumP
private

Definition at line 115 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and beginJob().

int ValidationHcalIsoTrackAlCaReco::nHLTL3accepts
private

Definition at line 151 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by ValidationHcalIsoTrackAlCaReco().

int ValidationHcalIsoTrackAlCaReco::nTotal
private

Definition at line 150 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().

std::string ValidationHcalIsoTrackAlCaReco::outRootFileName_
private

Definition at line 89 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by endJob(), and ValidationHcalIsoTrackAlCaReco().

double ValidationHcalIsoTrackAlCaReco::pThr_
private

Definition at line 97 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().

edm::InputTag ValidationHcalIsoTrackAlCaReco::recoTrLabel_
private

Definition at line 91 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by ValidationHcalIsoTrackAlCaReco().

bool ValidationHcalIsoTrackAlCaReco::saveToFile_
private

Definition at line 88 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by endJob(), and ValidationHcalIsoTrackAlCaReco().

edm::EDGetTokenT<reco::IsolatedPixelTrackCandidateCollection> ValidationHcalIsoTrackAlCaReco::tok_arITr_
private

Definition at line 94 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().

edm::EDGetTokenT<trigger::TriggerEvent> ValidationHcalIsoTrackAlCaReco::tok_hlt_
private

Definition at line 93 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().

edm::EDGetTokenT<edm::SimTrackContainer> ValidationHcalIsoTrackAlCaReco::tok_simTrack_
private

Definition at line 95 of file ValidationHcalIsoTrackAlCaReco.h.

Referenced by analyze(), and ValidationHcalIsoTrackAlCaReco().