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 Attributes
EcalSimple2007H4TBAnalyzer Class Reference

#include <EcalSimple2007H4TBAnalyzer.h>

Inheritance diagram for EcalSimple2007H4TBAnalyzer:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 EcalSimple2007H4TBAnalyzer (const edm::ParameterSet &)
 
virtual void endJob ()
 
 ~EcalSimple2007H4TBAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

std::string digiCollection_
 
std::string digiProducer_
 
std::string eventHeaderCollection_
 
std::string eventHeaderProducer_
 
TH2F * h_ampltdc
 
TH1F * h_bprofx
 
TH1F * h_bprofy
 
TH1F * h_e1e25
 
TH2F * h_e1e25_mapx
 
TH2F * h_e1e25_mapy
 
TH1F * h_e1e9
 
TH2F * h_e1e9_mapx
 
TH2F * h_e1e9_mapy
 
TH1F * h_e1x1
 
TH1F * h_e1x1_center
 
TH1F * h_e3x3
 
TH1F * h_e3x3_center
 
TH1F * h_e5x5
 
TH1F * h_e5x5_center
 
TH1F * h_e9e25
 
TH2F * h_e9e25_mapx
 
TH2F * h_e9e25_mapy
 
TH2F * h_mapx [25]
 
TH2F * h_mapy [25]
 
TH1F * h_qualx
 
TH1F * h_qualy
 
TH1F * h_S6
 
TH2F * h_Shape_
 
TH1F * h_slopex
 
TH1F * h_slopey
 
TH1F * h_tableIsMoving
 
std::string hitCollection_
 
std::string hitProducer_
 
std::string hodoRecInfoCollection_
 
std::string hodoRecInfoProducer_
 
std::string rootfile_
 
std::string tdcRecInfoCollection_
 
std::string tdcRecInfoProducer_
 
const CaloGeometrytheTBGeometry_
 
EEDetId xtalInBeam_
 
EBDetId xtalInBeamTmp
 
EEDetId Xtals5x5 [25]
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

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

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

Definition at line 45 of file EcalSimple2007H4TBAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 51 of file EcalSimple2007H4TBAnalyzer.cc.

References gather_cfg::cout, digiCollection_, digiProducer_, eventHeaderCollection_, eventHeaderProducer_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hitCollection_, hitProducer_, hodoRecInfoCollection_, hodoRecInfoProducer_, rootfile_, tdcRecInfoCollection_, and tdcRecInfoProducer_.

51  : xtalInBeam_(0)
52 //========================================================================
53 {
54  //now do what ever initialization is needed
55  rootfile_ = iConfig.getUntrackedParameter<std::string>("rootfile","ecalSimpleTBanalysis.root");
56  digiCollection_ = iConfig.getParameter<std::string>("digiCollection");
57  digiProducer_ = iConfig.getParameter<std::string>("digiProducer");
58  hitCollection_ = iConfig.getParameter<std::string>("hitCollection");
59  hitProducer_ = iConfig.getParameter<std::string>("hitProducer");
60  hodoRecInfoCollection_ = iConfig.getParameter<std::string>("hodoRecInfoCollection");
61  hodoRecInfoProducer_ = iConfig.getParameter<std::string>("hodoRecInfoProducer");
62  tdcRecInfoCollection_ = iConfig.getParameter<std::string>("tdcRecInfoCollection");
63  tdcRecInfoProducer_ = iConfig.getParameter<std::string>("tdcRecInfoProducer");
64  eventHeaderCollection_ = iConfig.getParameter<std::string>("eventHeaderCollection");
65  eventHeaderProducer_ = iConfig.getParameter<std::string>("eventHeaderProducer");
66 
67 
68  std::cout << "EcalSimple2007H4TBAnalyzer: fetching hitCollection: " << hitCollection_.c_str()
69  << " produced by " << hitProducer_.c_str() << std::endl;
70 
71 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
tuple cout
Definition: gather_cfg.py:41
EcalSimple2007H4TBAnalyzer::~EcalSimple2007H4TBAnalyzer ( )

Definition at line 75 of file EcalSimple2007H4TBAnalyzer.cc.

77 {
78  // do anything here that needs to be done at desctruction time
79  // (e.g. close files, deallocate resources etc.)
80  // Amplitude vs TDC offset
81 // if (h_ampltdc)
82 // delete h_ampltdc;
83 
84 // // Reconstructed energies
85 // delete h_e1x1;
86 // delete h_e3x3;
87 // delete h_e5x5;
88 
89 // delete h_bprofx;
90 // delete h_bprofy;
91 
92 // delete h_qualx;
93 // delete h_qualy;
94 
95 // delete h_slopex;
96 // delete h_slopey;
97 
98 // delete h_mapx;
99 // delete h_mapy;
100 
101 }

Member Function Documentation

void EcalSimple2007H4TBAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 233 of file EcalSimple2007H4TBAnalyzer.cc.

References EcalMGPASample::adc(), gather_cfg::cout, digiCollection_, digiProducer_, jptDQMConfig_cff::eMax, eventHeaderProducer_, EcalMGPASample::gainId(), edm::Event::getByLabel(), CaloGeometry::getGeometry(), TruncatedPyramid::getPosition(), h_ampltdc, h_bprofx, h_bprofy, h_e1e25, h_e1e25_mapx, h_e1e25_mapy, h_e1e9, h_e1e9_mapx, h_e1e9_mapy, h_e1x1, h_e1x1_center, h_e3x3, h_e3x3_center, h_e5x5, h_e5x5_center, h_e9e25, h_e9e25_mapx, h_e9e25_mapy, h_mapx, h_mapy, h_qualx, h_qualy, h_S6, h_Shape_, h_slopex, h_slopey, h_tableIsMoving, hitCollection_, hitProducer_, hodoRecInfoCollection_, hodoRecInfoProducer_, i, EBDetId::ic(), DetId::null(), EcalDataFrame::sample(), EcalDataFrame::size(), EBDetId::SMCRYSTALMODE, tdcRecInfoCollection_, tdcRecInfoProducer_, theTBGeometry_, ExpressReco_HICollisions_FallBack::x, xtalInBeam_, xtalInBeamTmp, Xtals5x5, ExpressReco_HICollisions_FallBack::y, and EBDetId::zside().

233  {
234 //========================================================================
235 
236  using namespace edm;
237  using namespace cms;
238 
239 
240 
242  const EEDigiCollection* digis=0;
243  //std::cout << "EcalSimple2007H4TBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
244  iEvent.getByLabel( digiProducer_, digiCollection_,pdigis);
245  if ( pdigis.isValid() ) {
246  digis = pdigis.product(); // get a ptr to the product
247  //iEvent.getByLabel( hitProducer_, phits);
248  } else {
249  edm::LogError("EcalSimple2007H4TBAnalyzerError") << "Error! can't get the product " << digiCollection_;
250  }
251 
252  // fetch the digis and compute signal amplitude
254  const EEUncalibratedRecHitCollection* hits=0;
255  //std::cout << "EcalSimple2007H4TBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
256  iEvent.getByLabel( hitProducer_, hitCollection_,phits);
257  if (phits.isValid()) {
258  hits = phits.product(); // get a ptr to the product
259  //iEvent.getByLabel( hitProducer_, phits);
260  } else {
261  edm::LogError("EcalSimple2007H4TBAnalyzerError") << "Error! can't get the product " << hitCollection_;
262  }
263 
265  const EcalTBHodoscopeRecInfo* recHodo=0;
266  //std::cout << "EcalSimple2007H4TBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
268  if ( pHodo.isValid() ) {
269  recHodo = pHodo.product(); // get a ptr to the product
270  } else {
271  edm::LogError("EcalSimple2007H4TBAnalyzerError") << "Error! can't get the product " << hodoRecInfoCollection_;
272  }
273 
275  const EcalTBTDCRecInfo* recTDC=0;
276  //std::cout << "EcalSimple2007H4TBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
278  if ( pTDC.isValid() ) {
279  recTDC = pTDC.product(); // get a ptr to the product
280  } else {
281  edm::LogError("EcalSimple2007H4TBAnalyzerError") << "Error! can't get the product " << tdcRecInfoCollection_;
282  }
283 
284  Handle<EcalTBEventHeader> pEventHeader;
285  const EcalTBEventHeader* evtHeader=0;
286  //std::cout << "EcalSimple2007H4TBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
287  iEvent.getByLabel( eventHeaderProducer_ , pEventHeader );
288  if ( pEventHeader.isValid() ) {
289  evtHeader = pEventHeader.product(); // get a ptr to the product
290  } else {
291  edm::LogError("EcalSimple2007H4TBAnalyzerError") << "Error! can't get the product " << eventHeaderProducer_;
292  }
293 
294 
295  if (!hits)
296  {
297  // std::cout << "1" << std::endl;
298  return;
299  }
300 
301  if (!recTDC)
302  {
303  // std::cout << "2" << std::endl;
304  return;
305  }
306 
307  if (!recHodo)
308  {
309  // std::cout << "3" << std::endl;
310  return;
311  }
312 
313  if (!evtHeader)
314  {
315  // std::cout << "4" << std::endl;
316  return;
317  }
318 
319  if (hits->size() == 0)
320  {
321  // std::cout << "5" << std::endl;
322  return;
323  }
324 
325  //Accessing various event information
326  if (evtHeader->tableIsMoving())
327  h_tableIsMoving->Fill(evtHeader->eventNumber());
328 
329 // std::cout << "event " << evtHeader->eventNumber()
330 // << "\trun number " << evtHeader->runNumber()
331 // << "\tburst number " << evtHeader->burstNumber()
332 // << "\tbeginLV1A " << evtHeader->begBurstLV1A()
333 // << "\tendLV1A " << evtHeader->endBurstLV1A()
334 // << "\ttime " << evtHeader->date()
335 // << "\thas errors " << int(evtHeader->syncError())
336 // << std::endl;
337 
338 // std::cout << "scaler";
339 // for (int iscaler=0;iscaler < 36;iscaler++)
340 // std::cout << "\t#" << iscaler << " " << evtHeader->scaler(iscaler);
341 // std::cout<<std::endl;
342 
343  //S6 beam scintillator
344  h_S6->Fill(evtHeader->S6ADC());
345 
346  if (xtalInBeamTmp.null())
347  {
348  xtalInBeamTmp = EBDetId(1,evtHeader->crystalInBeam(),EBDetId::SMCRYSTALMODE);
349  xtalInBeam_ = EEDetId( 35 - ((xtalInBeamTmp.ic()-1)%20) ,int(int(xtalInBeamTmp.ic())/int(20))+51, -1);
350  std::cout<< "Xtal In Beam is " << xtalInBeam_.ic() << xtalInBeam_ << std::endl;
351  for (unsigned int icry=0;icry<25;icry++)
352  {
353  unsigned int row = icry / 5;
354  unsigned int column= icry %5;
355  int ix=xtalInBeam_.ix()+row-2;
356  int iy=xtalInBeam_.iy()+column-2;
357  EEDetId tempId(ix, iy, xtalInBeam_.zside());
358  //Selecting matrix of xtals used in 2007H4TB
359  if (tempId.ix()<16 || tempId.ix()>35 || tempId.iy()<51 || tempId.iy()>75)
360  Xtals5x5[icry]=EEDetId(0);
361  else
362  {
363  Xtals5x5[icry]=tempId;
365  if (!cell)
366  continue;
367  const TruncatedPyramid* tp ( dynamic_cast<const TruncatedPyramid*>(cell) ) ;
368  std::cout << "** Xtal in the matrix **** row " << row << ", column " << column << ", xtal " << Xtals5x5[icry] << " Position " << tp->getPosition(0.) << std::endl;
369  }
370  }
371  }
372  else
373  if (xtalInBeamTmp != EBDetId(1,evtHeader->crystalInBeam(),EBDetId::SMCRYSTALMODE)) //run analysis only on first xtal in beam
374  return;
375 
376  //Avoid moving table events
377  if (evtHeader->tableIsMoving())
378  {
379  std::cout << "Table is moving" << std::endl;
380  return;
381  }
382 
383 
384 
385  // Searching for max amplitude xtal alternative to use xtalInBeam_
386  EEDetId maxHitId(0);
387  float maxHit= -999999.;
388  for(EEUncalibratedRecHitCollection::const_iterator ithit = hits->begin(); ithit != hits->end(); ++ithit)
389  {
390  if (ithit->amplitude()>=maxHit)
391  {
392  maxHit=ithit->amplitude();
393  maxHitId=ithit->id();
394  }
395 
396  }
397  if (maxHitId==EEDetId(0))
398  {
399  std::cout << "No maxHit found" << std::endl;
400  return;
401  }
402 
403 
404  //Filling the digis shape for the xtalInBeam
405  bool gain_switch = false;
406  double samples_save[10]; for(int i=0; i < 10; ++i) samples_save[i]=0.0;
407  double gain_save[10]; for(int i=0; i < 10; ++i) gain_save[i]=0.0;
408 
409  int sMax = -1;
410  double eMax = 0.;
411  for ( EEDigiCollection::const_iterator digiItr= digis->begin();digiItr != digis->end();
412  ++digiItr )
413  {
414  if ( EEDetId((*digiItr).id()) != xtalInBeam_ )
415  continue;
416 
417  EEDataFrame myDigi = (*digiItr);
418  for (int sample = 0; sample < myDigi.size(); ++sample)
419  {
420  double analogSample = myDigi.sample(sample).adc();
421  double gainSample = myDigi.sample(sample).gainId();
422  samples_save[sample] = analogSample;
423  gain_save[sample] = gainSample;
424  // std::cout << analogSample << " ";
425  if ( eMax < analogSample )
426  {
427  eMax = analogSample;
428  sMax = sample;
429  }
430  if(gainSample != 1) gain_switch = true;
431  }
432  // std::cout << std::endl;
433  }
434 
435  for(int i =0; i < 10; ++i)
436  h_Shape_->Fill(double(i)+recTDC->offset(),samples_save[i]);
437 
438 
439 
440  // Taking amplitudes in 5x5
441  double amplitude[25];
442  double amplitude3x3=0;
443  double amplitude5x5=0;
444  for (unsigned int icry=0;icry<25;icry++)
445  {
446  if (!Xtals5x5[icry].null())
447  {
448  amplitude[icry]=(hits->find(Xtals5x5[icry]))->amplitude();
449  amplitude5x5 += amplitude[icry];
450  // Is in 3x3?
451  if ( icry == 6 || icry == 7 || icry == 8 ||
452  icry == 11 || icry == 12 || icry ==13 ||
453  icry == 16 || icry == 17 || icry ==18 )
454  {
455  amplitude3x3+=amplitude[icry];
456  }
457  }
458  }
459 
460  //Filling amplitudes
461  h_e1x1->Fill(amplitude[12]);
462  h_e3x3->Fill(amplitude3x3);
463  h_e5x5->Fill(amplitude5x5);
464 
465  h_e1e9->Fill(amplitude[12]/amplitude3x3);
466  h_e1e25->Fill(amplitude[12]/amplitude5x5);
467  h_e9e25->Fill(amplitude3x3/amplitude5x5);
468 
469  //Checking stability of amplitude vs TDC
470  if (recTDC)
471  h_ampltdc->Fill(recTDC->offset(),amplitude[12]);
472 
473  //Various amplitudes as a function of hodoscope coordinates
474  if (recHodo)
475  {
476  float x=recHodo->posX();
477  float y=recHodo->posY();
478  float xslope=recHodo->slopeX();
479  float yslope=recHodo->slopeY();
480  float xqual=recHodo->qualX();
481  float yqual=recHodo->qualY();
482 
483  //Filling beam profiles
484  h_bprofx->Fill(x);
485  h_bprofy->Fill(y);
486  h_qualx->Fill(xqual);
487  h_qualy->Fill(yqual);
488  h_slopex->Fill(xslope);
489  h_slopey->Fill(yslope);
490 
491  //Fill central events
492 
493 
494  if ( fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5)
495  {
496  h_e1x1_center->Fill(amplitude[12]);
497  h_e3x3_center->Fill(amplitude3x3);
498  h_e5x5_center->Fill(amplitude5x5);
499  }
500 
501  for (unsigned int icry=0;icry<25;icry++)
502  {
503  h_mapx[icry]->Fill(x,amplitude[icry]);
504  h_mapy[icry]->Fill(y,amplitude[icry]);
505  }
506 
507  h_e1e9_mapx->Fill(x,amplitude[12]/amplitude3x3);
508  h_e1e9_mapy->Fill(y,amplitude[12]/amplitude3x3);
509 
510  h_e1e25_mapx->Fill(x,amplitude[12]/amplitude5x5);
511  h_e1e25_mapy->Fill(y,amplitude[12]/amplitude5x5);
512 
513  h_e9e25_mapx->Fill(x,amplitude3x3/amplitude5x5);
514  h_e9e25_mapy->Fill(y,amplitude3x3/amplitude5x5);
515  }
516 
517 }
int i
Definition: DBlmapReader.cc:9
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:28
int gainId() const
get the gainId (2 bits)
int size() const
Definition: EcalDataFrame.h:25
int iEvent
Definition: GenABIO.cc:243
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:94
bool null() const
is this a null id ?
Definition: DetId.h:47
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:76
tuple cout
Definition: gather_cfg.py:41
static const int SMCRYSTALMODE
Definition: EBDetId.h:146
int adc() const
get the ADC sample (12 bits)
int zside() const
get the z-side of the crystal (1/-1)
Definition: EBDetId.h:40
void EcalSimple2007H4TBAnalyzer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file EcalSimple2007H4TBAnalyzer.cc.

References ExpressReco_HICollisions_FallBack::e, edm::EventSetup::get(), h_ampltdc, h_bprofx, h_bprofy, h_e1e25, h_e1e25_mapx, h_e1e25_mapy, h_e1e9, h_e1e9_mapx, h_e1e9_mapy, h_e1x1, h_e1x1_center, h_e3x3, h_e3x3_center, h_e5x5, h_e5x5_center, h_e9e25, h_e9e25_mapx, h_e9e25_mapy, h_mapx, h_mapy, h_qualx, h_qualy, h_S6, h_Shape_, h_slopex, h_slopey, h_tableIsMoving, and theTBGeometry_.

105  {
106 //========================================================================
107 
109  iSetup.get<CaloGeometryRecord>().get(pG);
110 
111 
112  theTBGeometry_ = &(*pG);
113 // const std::vector<DetId>& validIds=theTBGeometry_->getValidDetIds(DetId::Ecal,EcalEndcap);
114 // std::cout << "Found " << validIds.size() << " channels in the geometry" << std::endl;
115 // for (unsigned int i=0;i<validIds.size();++i)
116 // std::cout << EEDetId(validIds[i]) << std::endl;
117 
118 // Amplitude vs TDC offset
119  h_ampltdc = new TH2F("h_ampltdc","Max Amplitude vs TDC offset", 100,0.,1.,1000, 0., 4000.);
120 
121  // Reconstructed energies
122  h_tableIsMoving = new TH1F("h_tableIsMoving","TableIsMoving", 100000, 0., 100000.);
123 
124  h_e1x1 = new TH1F("h_e1x1","E1x1 energy", 1000, 0., 4000.);
125  h_e3x3 = new TH1F("h_e3x3","E3x3 energy", 1000, 0., 4000.);
126  h_e5x5 = new TH1F("h_e5x5","E5x5 energy", 1000, 0., 4000.);
127 
128  h_e1x1_center = new TH1F("h_e1x1_center","E1x1 energy", 1000, 0., 4000.);
129  h_e3x3_center = new TH1F("h_e3x3_center","E3x3 energy", 1000, 0., 4000.);
130  h_e5x5_center = new TH1F("h_e5x5_center","E5x5 energy", 1000, 0., 4000.);
131 
132  h_e1e9 = new TH1F("h_e1e9","E1/E9 ratio", 600, 0., 1.2);
133  h_e1e25 = new TH1F("h_e1e25","E1/E25 ratio", 600, 0., 1.2);
134  h_e9e25 = new TH1F("h_e9e25","E9/E25 ratio", 600, 0., 1.2);
135 
136  h_S6 = new TH1F("h_S6","Amplitude S6", 1000, 0., 4000.);
137 
138  h_bprofx = new TH1F("h_bprofx","Beam Profile X",100,-20.,20.);
139  h_bprofy = new TH1F("h_bprofy","Beam Profile Y",100,-20.,20.);
140 
141  h_qualx = new TH1F("h_qualx","Beam Quality X",5000,0.,5.);
142  h_qualy = new TH1F("h_qualy","Beam Quality X",5000,0.,5.);
143 
144  h_slopex = new TH1F("h_slopex","Beam Slope X",500, -5e-4 , 5e-4 );
145  h_slopey = new TH1F("h_slopey","Beam Slope Y",500, -5e-4 , 5e-4 );
146 
147  char hname[50];
148  char htitle[50];
149  for (unsigned int icry=0;icry<25;icry++)
150  {
151  sprintf(hname,"h_mapx_%d",icry);
152  sprintf(htitle,"Max Amplitude vs X %d",icry);
153  h_mapx[icry] = new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
154  sprintf(hname,"h_mapy_%d",icry);
155  sprintf(htitle,"Max Amplitude vs Y %d",icry);
156  h_mapy[icry] = new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
157  }
158 
159  h_e1e9_mapx = new TH2F("h_e1e9_mapx","E1/E9 vs X",80,-20,20,600,0.,1.2);
160  h_e1e9_mapy = new TH2F("h_e1e9_mapy","E1/E9 vs Y",80,-20,20,600,0.,1.2);
161 
162  h_e1e25_mapx = new TH2F("h_e1e25_mapx","E1/E25 vs X",80,-20,20,600,0.,1.2);
163  h_e1e25_mapy = new TH2F("h_e1e25_mapy","E1/E25 vs Y",80,-20,20,600,0.,1.2);
164 
165  h_e9e25_mapx = new TH2F("h_e9e25_mapx","E9/E25 vs X",80,-20,20,600,0.,1.2);
166  h_e9e25_mapy = new TH2F("h_e9e25_mapy","E9/E25 vs Y",80,-20,20,600,0.,1.2);
167 
168  h_Shape_ = new TH2F("h_Shape_","Xtal in Beam Shape",250,0,10,350,0,3500);
169 
170 }
void EcalSimple2007H4TBAnalyzer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 174 of file EcalSimple2007H4TBAnalyzer.cc.

References f, h_ampltdc, h_bprofx, h_bprofy, h_e1e25, h_e1e25_mapx, h_e1e25_mapy, h_e1e9, h_e1e9_mapx, h_e1e9_mapy, h_e1x1, h_e1x1_center, h_e3x3, h_e3x3_center, h_e5x5, h_e5x5_center, h_e9e25, h_e9e25_mapx, h_e9e25_mapy, h_mapx, h_mapy, h_qualx, h_qualy, h_S6, h_Shape_, h_slopex, h_slopey, h_tableIsMoving, and rootfile_.

174  {
175 //========================================================================
176 
177  TFile f(rootfile_.c_str(),"RECREATE");
178 
179  // Amplitude vs TDC offset
180  h_ampltdc->Write();
181 
182  // Reconstructed energies
183  h_e1x1->Write();
184  h_e3x3->Write();
185  h_e5x5->Write();
186 
187  h_e1x1_center->Write();
188  h_e3x3_center->Write();
189  h_e5x5_center->Write();
190 
191  h_e1e9->Write();
192  h_e1e25->Write();
193  h_e9e25->Write();
194 
195  h_S6->Write();
196  h_bprofx->Write();
197  h_bprofy->Write();
198 
199  h_qualx->Write();
200  h_qualy->Write();
201 
202  h_slopex->Write();
203  h_slopey->Write();
204 
205  h_Shape_->Write();
206 
207  for (unsigned int icry=0;icry<25;icry++)
208  {
209  h_mapx[icry]->Write();
210  h_mapy[icry]->Write();
211  }
212 
213  h_e1e9_mapx->Write();
214  h_e1e9_mapy->Write();
215 
216  h_e1e25_mapx->Write();
217  h_e1e25_mapy->Write();
218 
219  h_e9e25_mapx->Write();
220  h_e9e25_mapy->Write();
221 
222  h_tableIsMoving->Write();
223 
224  f.Close();
225 }
double f[11][100]

Member Data Documentation

std::string EcalSimple2007H4TBAnalyzer::digiCollection_
private

Definition at line 56 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::digiProducer_
private

Definition at line 57 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::eventHeaderCollection_
private

Definition at line 64 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::eventHeaderProducer_
private

Definition at line 65 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

TH2F* EcalSimple2007H4TBAnalyzer::h_ampltdc
private

Definition at line 68 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_bprofx
private

Definition at line 87 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_bprofy
private

Definition at line 88 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1e25
private

Definition at line 83 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e25_mapx
private

Definition at line 102 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e25_mapy
private

Definition at line 103 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1e9
private

Definition at line 82 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e9_mapx
private

Definition at line 99 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e9_mapy
private

Definition at line 100 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1x1
private

Definition at line 74 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1x1_center
private

Definition at line 78 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e3x3
private

Definition at line 75 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e3x3_center
private

Definition at line 79 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e5x5
private

Definition at line 76 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e5x5_center
private

Definition at line 80 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e9e25
private

Definition at line 84 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e9e25_mapx
private

Definition at line 105 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e9e25_mapy
private

Definition at line 106 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_mapx[25]
private

Definition at line 96 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_mapy[25]
private

Definition at line 97 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_qualx
private

Definition at line 90 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_qualy
private

Definition at line 91 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_S6
private

Definition at line 86 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_Shape_
private

Definition at line 70 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_slopex
private

Definition at line 93 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_slopey
private

Definition at line 94 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_tableIsMoving
private

Definition at line 73 of file EcalSimple2007H4TBAnalyzer.h.

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

std::string EcalSimple2007H4TBAnalyzer::hitCollection_
private

Definition at line 58 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::hitProducer_
private

Definition at line 59 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::hodoRecInfoCollection_
private

Definition at line 60 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::hodoRecInfoProducer_
private

Definition at line 61 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::rootfile_
private

Definition at line 55 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by EcalSimple2007H4TBAnalyzer(), and endJob().

std::string EcalSimple2007H4TBAnalyzer::tdcRecInfoCollection_
private

Definition at line 62 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::tdcRecInfoProducer_
private

Definition at line 63 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

const CaloGeometry* EcalSimple2007H4TBAnalyzer::theTBGeometry_
private

Definition at line 112 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and beginRun().

EEDetId EcalSimple2007H4TBAnalyzer::xtalInBeam_
private

Definition at line 108 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze().

EBDetId EcalSimple2007H4TBAnalyzer::xtalInBeamTmp
private

Definition at line 109 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze().

EEDetId EcalSimple2007H4TBAnalyzer::Xtals5x5[25]
private

Definition at line 110 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze().