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 edm::EDConsumerBase

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
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 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
 
- 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 44 of file EcalSimple2007H4TBAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 50 of file EcalSimple2007H4TBAnalyzer.cc.

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

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

Definition at line 74 of file EcalSimple2007H4TBAnalyzer.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 232 of file EcalSimple2007H4TBAnalyzer.cc.

References EcalMGPASample::adc(), column, gather_cfg::cout, digiCollection_, digiProducer_, eventHeaderProducer_, 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(), compare_using_db::sample, EcalDataFrame::sample(), EcalDataFrame::size(), EBDetId::SMCRYSTALMODE, tdcRecInfoCollection_, tdcRecInfoProducer_, theTBGeometry_, x, xtalInBeam_, xtalInBeamTmp, Xtals5x5, y, and EBDetId::zside().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 104 of file EcalSimple2007H4TBAnalyzer.cc.

References alignCSCRings::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_.

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

Reimplemented from edm::EDAnalyzer.

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

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

Member Data Documentation

std::string EcalSimple2007H4TBAnalyzer::digiCollection_
private

Definition at line 55 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::digiProducer_
private

Definition at line 56 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::eventHeaderCollection_
private

Definition at line 63 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::eventHeaderProducer_
private

Definition at line 64 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

TH2F* EcalSimple2007H4TBAnalyzer::h_ampltdc
private

Definition at line 67 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_bprofx
private

Definition at line 86 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_bprofy
private

Definition at line 87 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1e25
private

Definition at line 82 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e25_mapx
private

Definition at line 101 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e25_mapy
private

Definition at line 102 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1e9
private

Definition at line 81 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e9_mapx
private

Definition at line 98 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e1e9_mapy
private

Definition at line 99 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1x1
private

Definition at line 73 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e1x1_center
private

Definition at line 77 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e3x3
private

Definition at line 74 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e3x3_center
private

Definition at line 78 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e5x5
private

Definition at line 75 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e5x5_center
private

Definition at line 79 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_e9e25
private

Definition at line 83 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e9e25_mapx
private

Definition at line 104 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_e9e25_mapy
private

Definition at line 105 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_mapx[25]
private

Definition at line 95 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_mapy[25]
private

Definition at line 96 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_qualx
private

Definition at line 89 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_qualy
private

Definition at line 90 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_S6
private

Definition at line 85 of file EcalSimple2007H4TBAnalyzer.h.

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

TH2F* EcalSimple2007H4TBAnalyzer::h_Shape_
private

Definition at line 69 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_slopex
private

Definition at line 92 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_slopey
private

Definition at line 93 of file EcalSimple2007H4TBAnalyzer.h.

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

TH1F* EcalSimple2007H4TBAnalyzer::h_tableIsMoving
private

Definition at line 72 of file EcalSimple2007H4TBAnalyzer.h.

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

std::string EcalSimple2007H4TBAnalyzer::hitCollection_
private

Definition at line 57 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::hitProducer_
private

Definition at line 58 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::hodoRecInfoCollection_
private

Definition at line 59 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::hodoRecInfoProducer_
private

Definition at line 60 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::rootfile_
private

Definition at line 54 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by EcalSimple2007H4TBAnalyzer(), and endJob().

std::string EcalSimple2007H4TBAnalyzer::tdcRecInfoCollection_
private

Definition at line 61 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

std::string EcalSimple2007H4TBAnalyzer::tdcRecInfoProducer_
private

Definition at line 62 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and EcalSimple2007H4TBAnalyzer().

const CaloGeometry* EcalSimple2007H4TBAnalyzer::theTBGeometry_
private

Definition at line 111 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze(), and beginRun().

EEDetId EcalSimple2007H4TBAnalyzer::xtalInBeam_
private

Definition at line 107 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze().

EBDetId EcalSimple2007H4TBAnalyzer::xtalInBeamTmp
private

Definition at line 108 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze().

EEDetId EcalSimple2007H4TBAnalyzer::Xtals5x5[25]
private

Definition at line 109 of file EcalSimple2007H4TBAnalyzer.h.

Referenced by analyze().