CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EcalSimpleTBAnalyzer Class Reference

#include <EcalSimpleTBAnalyzer.h>

Inheritance diagram for EcalSimpleTBAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
 EcalSimpleTBAnalyzer (const edm::ParameterSet &)
 
void endJob () override
 
 ~EcalSimpleTBAnalyzer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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
 
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_
 
EBDetId xtalInBeam_
 

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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 42 of file EcalSimpleTBAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 45 of file EcalSimpleTBAnalyzer.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_.

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

Definition at line 69 of file EcalSimpleTBAnalyzer.cc.

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

Member Function Documentation

void EcalSimpleTBAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

std::cout << "** Xtal in the matrix **** row " << row << ", column " << column << ", xtal " << Xtals5x5[icry].ic() << std::endl;

Definition at line 214 of file EcalSimpleTBAnalyzer.cc.

References EcalMGPASample::adc(), CustomPhysics_cfi::amplitude, gather_cfg::cout, EcalTBEventHeader::crystalInBeam(), digiCollection_, digiProducer_, photonPostprocessing_cfi::eMax, edm::SortedCollection< T, SORT >::empty(), edm::DataFrameContainer::end(), EBDetId::ETAPHIMODE, eventHeaderProducer_, EcalTBEventHeader::eventNumber(), edm::SortedCollection< T, SORT >::find(), edm::DataFrameContainer::find(), edm::Event::getByLabel(), 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_Shape_, h_slopex, h_slopey, h_tableIsMoving, hitCollection_, hitProducer_, hfClusterShapes_cfi::hits, hodoRecInfoCollection_, hodoRecInfoProducer_, mps_fire::i, EBDetId::ic(), EBDetId::ieta(), EBDetId::iphi(), EBDetId::ism(), edm::HandleBase::isValid(), DetId::null(), EcalTBTDCRecInfo::offset(), EcalTBHodoscopeRecInfo::posX(), EcalTBHodoscopeRecInfo::posY(), edm::Handle< T >::product(), EcalTBHodoscopeRecInfo::qualX(), EcalTBHodoscopeRecInfo::qualY(), simplePhotonAnalyzer_cfi::sample, EcalDataFrame::sample(), EcalDataFrame::size(), EcalTBHodoscopeRecInfo::slopeX(), EcalTBHodoscopeRecInfo::slopeY(), EBDetId::SMCRYSTALMODE, EcalTBEventHeader::tableIsMoving(), tdcRecInfoCollection_, tdcRecInfoProducer_, x, xtalInBeam_, and y.

214  {
215 //========================================================================
216 
217  using namespace edm;
218  using namespace cms;
219 
220 
221 
223  const EBDigiCollection* digis=nullptr;
224  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
225  iEvent.getByLabel( digiProducer_, digiCollection_,pdigis);
226  if ( pdigis.isValid() ) {
227  digis = pdigis.product(); // get a ptr to the product
228  //iEvent.getByLabel( hitProducer_, phits);
229  } else {
230  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << digiCollection_;
231  }
232 
233  // fetch the digis and compute signal amplitude
235  const EBUncalibratedRecHitCollection* hits=nullptr;
236  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
237  iEvent.getByLabel( hitProducer_, hitCollection_,phits);
238  if (phits.isValid()) {
239  hits = phits.product(); // get a ptr to the product
240  //iEvent.getByLabel( hitProducer_, phits);
241  } else {
242  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << hitCollection_;
243  }
244 
246  const EcalTBHodoscopeRecInfo* recHodo=nullptr;
247  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
249  if ( pHodo.isValid() ) {
250  recHodo = pHodo.product(); // get a ptr to the product
251  } else {
252  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << hodoRecInfoCollection_;
253  }
254 
256  const EcalTBTDCRecInfo* recTDC=nullptr;
257  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
259  if ( pTDC.isValid() ) {
260  recTDC = pTDC.product(); // get a ptr to the product
261  } else {
262  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << tdcRecInfoCollection_;
263  }
264 
265  Handle<EcalTBEventHeader> pEventHeader;
266  const EcalTBEventHeader* evtHeader=nullptr;
267  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
268  iEvent.getByLabel( eventHeaderProducer_ , pEventHeader );
269  if ( pEventHeader.isValid() ) {
270  evtHeader = pEventHeader.product(); // get a ptr to the product
271  } else {
272  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << eventHeaderProducer_;
273  }
274 
275  if (!hits)
276  return;
277 
278  if (!recTDC)
279  return;
280 
281  if (!recHodo)
282  return;
283 
284  if (!evtHeader)
285  return;
286 
287  if (hits->empty())
288  return;
289 
290  if (evtHeader->tableIsMoving())
291  h_tableIsMoving->Fill(evtHeader->eventNumber());
292 
293  // Crystal hit by beam
294  if (xtalInBeam_.null())
295  {
297  std::cout<< "Xtal In Beam is " << xtalInBeam_.ic() << std::endl;
298  }
299  else if (xtalInBeam_ != EBDetId(1,evtHeader->crystalInBeam(),EBDetId::SMCRYSTALMODE))
300  return;
301 
302  if (evtHeader->tableIsMoving())
303  return;
304 
305 
306 // EBDetId maxHitId(0);
307 // float maxHit= -999999.;
308 
309 // for(EBUncalibratedRecHitCollection::const_iterator ithit = hits->begin(); ithit != hits->end(); ++ithit)
310 // {
311 // if (ithit->amplitude()>=maxHit)
312 // {
313 // maxHit=ithit->amplitude();
314 // maxHitId=ithit->id();
315 // }
316 
317 // }
318 
319 // if (maxHitId==EBDetId(0))
320 // return;
321 
322 // EBDetId maxHitId(1,704,EBDetId::SMCRYSTALMODE);
323 
324  //Find EBDetId in a 5x5 Matrix (to be substituted by the Selector code)
325  // Something like
326  // EBFixedWindowSelector<EcalUncalibratedRecHit> Simple5x5Matrix(hits,maxHitId,5,5);
327  // std::vector<EcalUncalibratedRecHit> Energies5x5 = Simple5x5Matrix.getHits();
328 
329 
330  EBDetId Xtals5x5[25];
331  for (unsigned int icry=0;icry<25;icry++)
332  {
333  unsigned int row = icry / 5;
334  unsigned int column= icry %5;
335  int ieta=xtalInBeam_.ieta()+column-2;
336  int iphi=xtalInBeam_.iphi()+row-2;
337  EBDetId tempId(ieta, iphi,EBDetId::ETAPHIMODE);
338  if (tempId.ism()==1)
339  Xtals5x5[icry]=tempId;
340  else
341  Xtals5x5[icry]=EBDetId(0);
343  }
344 
345 
346 
347  double samples_save[10]; for(int i=0; i < 10; ++i) samples_save[i]=0.0;
348 
349  // find the rechit corresponding digi and the max sample
351  double eMax = 0.;
352  if (myDg != digis->end())
353  {
354  EBDataFrame myDigi = (*myDg);
355  for (int sample = 0; sample < myDigi.size(); ++sample)
356  {
357  double analogSample = myDigi.sample(sample).adc();
358  samples_save[sample] = analogSample;
359  // std::cout << analogSample << " ";
360  if ( eMax < analogSample )
361  {
362  eMax = analogSample;
363  }
364  }
365  // std::cout << std::endl;
366  }
367 
368  for(int i =0; i < 10; ++i) {
369  h_Shape_->Fill(double(i)+recTDC->offset(),samples_save[i]);
370  }
371 
372  double amplitude[25];
373 
374  double amplitude3x3=0;
375  double amplitude5x5=0;
376 
377  for (unsigned int icry=0;icry<25;icry++)
378  {
379  if (!Xtals5x5[icry].null())
380  {
381  amplitude[icry]=(hits->find(Xtals5x5[icry]))->amplitude();
382  amplitude5x5 += amplitude[icry];
383  // Is in 3x3?
384  if ( icry == 6 || icry == 7 || icry == 8 ||
385  icry == 11 || icry == 12 || icry ==13 ||
386  icry == 16 || icry == 17 || icry ==18 )
387  {
388  amplitude3x3+=amplitude[icry];
389  }
390  }
391  }
392 
393 
394  h_e1x1->Fill(amplitude[12]);
395  h_e3x3->Fill(amplitude3x3);
396  h_e5x5->Fill(amplitude5x5);
397 
398  h_e1e9->Fill(amplitude[12]/amplitude3x3);
399  h_e1e25->Fill(amplitude[12]/amplitude5x5);
400  h_e9e25->Fill(amplitude3x3/amplitude5x5);
401 
402  if (recTDC)
403  h_ampltdc->Fill(recTDC->offset(),amplitude[12]);
404 
405  if (recHodo)
406  {
407  float x=recHodo->posX();
408  float y=recHodo->posY();
409  float xslope=recHodo->slopeX();
410  float yslope=recHodo->slopeY();
411  float xqual=recHodo->qualX();
412  float yqual=recHodo->qualY();
413 
414  //Filling beam profiles
415  h_bprofx->Fill(x);
416  h_bprofy->Fill(y);
417  h_qualx->Fill(xqual);
418  h_qualy->Fill(yqual);
419  h_slopex->Fill(xslope);
420  h_slopey->Fill(yslope);
421 
422  //Fill central events
423 
424 
425  if ( fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5)
426  {
427  h_e1x1_center->Fill(amplitude[12]);
428  h_e3x3_center->Fill(amplitude3x3);
429  h_e5x5_center->Fill(amplitude5x5);
430 
431  h_e1e9->Fill(amplitude[12]/amplitude3x3);
432  h_e1e25->Fill(amplitude[12]/amplitude5x5);
433  h_e9e25->Fill(amplitude3x3/amplitude5x5);
434  }
435 
436  for (unsigned int icry=0;icry<25;icry++)
437  {
438  h_mapx[icry]->Fill(x,amplitude[icry]);
439  h_mapy[icry]->Fill(y,amplitude[icry]);
440  }
441 
442  h_e1e9_mapx->Fill(x,amplitude[12]/amplitude3x3);
443  h_e1e9_mapy->Fill(y,amplitude[12]/amplitude3x3);
444 
445  h_e1e25_mapx->Fill(x,amplitude[12]/amplitude5x5);
446  h_e1e25_mapy->Fill(y,amplitude[12]/amplitude5x5);
447 
448  h_e9e25_mapx->Fill(x,amplitude3x3/amplitude5x5);
449  h_e9e25_mapy->Fill(y,amplitude3x3/amplitude5x5);
450  }
451 
452 }
std::string hodoRecInfoCollection_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool tableIsMoving() const
Tell if the table is Moving.
constexpr bool null() const
is this a null id ?
Definition: DetId.h:49
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
int crystalInBeam() const
Returns the crystal which is being hit by the beam (in the internal SM numbering scheme) ...
int size() const
Definition: EcalDataFrame.h:26
int iphi() const
get the crystal iphi
Definition: EBDetId.h:53
const_iterator find(id_type i) const
int ieta() const
get the crystal ieta
Definition: EBDetId.h:51
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:535
static const int ETAPHIMODE
Definition: EBDetId.h:166
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:46
Namespace of DDCMS conversion namespace.
T const * product() const
Definition: Handle.h:81
int eventNumber() const
Returns the event number.
const_iterator end() const
iterator find(key_type k)
HLT enums.
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
float offset() const
int adc() const
get the ADC sample (12 bits)
void EcalSimpleTBAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 99 of file EcalSimpleTBAnalyzer.cc.

References MillePedeFileConverter_cfg::e, 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_Shape_, h_slopex, h_slopey, and h_tableIsMoving.

99  {
100 //========================================================================
101 
102  // Amplitude vs TDC offset
103  h_ampltdc = new TH2F("h_ampltdc","Max Amplitude vs TDC offset", 100,0.,1.,1000, 0., 4000.);
104 
105  // Reconstructed energies
106  h_tableIsMoving = new TH1F("h_tableIsMoving","TableIsMoving", 100000, 0., 100000.);
107 
108  h_e1x1 = new TH1F("h_e1x1","E1x1 energy", 1000, 0., 4000.);
109  h_e3x3 = new TH1F("h_e3x3","E3x3 energy", 1000, 0., 4000.);
110  h_e5x5 = new TH1F("h_e5x5","E5x5 energy", 1000, 0., 4000.);
111 
112  h_e1x1_center = new TH1F("h_e1x1_center","E1x1 energy", 1000, 0., 4000.);
113  h_e3x3_center = new TH1F("h_e3x3_center","E3x3 energy", 1000, 0., 4000.);
114  h_e5x5_center = new TH1F("h_e5x5_center","E5x5 energy", 1000, 0., 4000.);
115 
116  h_e1e9 = new TH1F("h_e1e9","E1/E9 ratio", 600, 0., 1.2);
117  h_e1e25 = new TH1F("h_e1e25","E1/E25 ratio", 600, 0., 1.2);
118  h_e9e25 = new TH1F("h_e9e25","E9/E25 ratio", 600, 0., 1.2);
119 
120  h_bprofx = new TH1F("h_bprofx","Beam Profile X",100,-20.,20.);
121  h_bprofy = new TH1F("h_bprofy","Beam Profile Y",100,-20.,20.);
122 
123  h_qualx = new TH1F("h_qualx","Beam Quality X",5000,0.,5.);
124  h_qualy = new TH1F("h_qualy","Beam Quality X",5000,0.,5.);
125 
126  h_slopex = new TH1F("h_slopex","Beam Slope X",500, -5e-4 , 5e-4 );
127  h_slopey = new TH1F("h_slopey","Beam Slope Y",500, -5e-4 , 5e-4 );
128 
129  char hname[50];
130  char htitle[50];
131  for (unsigned int icry=0;icry<25;icry++)
132  {
133  sprintf(hname,"h_mapx_%d",icry);
134  sprintf(htitle,"Max Amplitude vs X %d",icry);
135  h_mapx[icry] = new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
136  sprintf(hname,"h_mapy_%d",icry);
137  sprintf(htitle,"Max Amplitude vs Y %d",icry);
138  h_mapy[icry] = new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
139  }
140 
141  h_e1e9_mapx = new TH2F("h_e1e9_mapx","E1/E9 vs X",80,-20,20,600,0.,1.2);
142  h_e1e9_mapy = new TH2F("h_e1e9_mapy","E1/E9 vs Y",80,-20,20,600,0.,1.2);
143 
144  h_e1e25_mapx = new TH2F("h_e1e25_mapx","E1/E25 vs X",80,-20,20,600,0.,1.2);
145  h_e1e25_mapy = new TH2F("h_e1e25_mapy","E1/E25 vs Y",80,-20,20,600,0.,1.2);
146 
147  h_e9e25_mapx = new TH2F("h_e9e25_mapx","E9/E25 vs X",80,-20,20,600,0.,1.2);
148  h_e9e25_mapy = new TH2F("h_e9e25_mapy","E9/E25 vs Y",80,-20,20,600,0.,1.2);
149 
150  h_Shape_ = new TH2F("h_Shape_","Xtal in Beam Shape",250,0,10,350,0,3500);
151 
152 }
void EcalSimpleTBAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 156 of file EcalSimpleTBAnalyzer.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_Shape_, h_slopex, h_slopey, h_tableIsMoving, and rootfile_.

156  {
157 //========================================================================
158 
159  TFile f(rootfile_.c_str(),"RECREATE");
160 
161  // Amplitude vs TDC offset
162  h_ampltdc->Write();
163 
164  // Reconstructed energies
165  h_e1x1->Write();
166  h_e3x3->Write();
167  h_e5x5->Write();
168 
169  h_e1x1_center->Write();
170  h_e3x3_center->Write();
171  h_e5x5_center->Write();
172 
173  h_e1e9->Write();
174  h_e1e25->Write();
175  h_e9e25->Write();
176 
177  h_bprofx->Write();
178  h_bprofy->Write();
179 
180  h_qualx->Write();
181  h_qualy->Write();
182 
183  h_slopex->Write();
184  h_slopey->Write();
185 
186  h_Shape_->Write();
187 
188  for (unsigned int icry=0;icry<25;icry++)
189  {
190  h_mapx[icry]->Write();
191  h_mapy[icry]->Write();
192  }
193 
194  h_e1e9_mapx->Write();
195  h_e1e9_mapy->Write();
196 
197  h_e1e25_mapx->Write();
198  h_e1e25_mapy->Write();
199 
200  h_e9e25_mapx->Write();
201  h_e9e25_mapy->Write();
202 
203  h_tableIsMoving->Write();
204 
205  f.Close();
206 }
double f[11][100]

Member Data Documentation

std::string EcalSimpleTBAnalyzer::digiCollection_
private

Definition at line 55 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::digiProducer_
private

Definition at line 56 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::eventHeaderCollection_
private

Definition at line 63 of file EcalSimpleTBAnalyzer.h.

Referenced by EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::eventHeaderProducer_
private

Definition at line 64 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

TH2F* EcalSimpleTBAnalyzer::h_ampltdc
private

Definition at line 67 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_bprofx
private

Definition at line 85 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_bprofy
private

Definition at line 86 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e1e25
private

Definition at line 82 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_e1e25_mapx
private

Definition at line 100 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_e1e25_mapy
private

Definition at line 101 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e1e9
private

Definition at line 81 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_e1e9_mapx
private

Definition at line 97 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_e1e9_mapy
private

Definition at line 98 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e1x1
private

Definition at line 73 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e1x1_center
private

Definition at line 77 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e3x3
private

Definition at line 74 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e3x3_center
private

Definition at line 78 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e5x5
private

Definition at line 75 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e5x5_center
private

Definition at line 79 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_e9e25
private

Definition at line 83 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_e9e25_mapx
private

Definition at line 103 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_e9e25_mapy
private

Definition at line 104 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_mapx[25]
private

Definition at line 94 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_mapy[25]
private

Definition at line 95 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_qualx
private

Definition at line 88 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_qualy
private

Definition at line 89 of file EcalSimpleTBAnalyzer.h.

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

TH2F* EcalSimpleTBAnalyzer::h_Shape_
private

Definition at line 69 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_slopex
private

Definition at line 91 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_slopey
private

Definition at line 92 of file EcalSimpleTBAnalyzer.h.

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

TH1F* EcalSimpleTBAnalyzer::h_tableIsMoving
private

Definition at line 72 of file EcalSimpleTBAnalyzer.h.

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

std::string EcalSimpleTBAnalyzer::hitCollection_
private

Definition at line 57 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::hitProducer_
private

Definition at line 58 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::hodoRecInfoCollection_
private

Definition at line 59 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::hodoRecInfoProducer_
private

Definition at line 60 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::rootfile_
private

Definition at line 54 of file EcalSimpleTBAnalyzer.h.

Referenced by EcalSimpleTBAnalyzer(), and endJob().

std::string EcalSimpleTBAnalyzer::tdcRecInfoCollection_
private

Definition at line 61 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

std::string EcalSimpleTBAnalyzer::tdcRecInfoProducer_
private

Definition at line 62 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

EBDetId EcalSimpleTBAnalyzer::xtalInBeam_
private

Definition at line 106 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze().