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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

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

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

Definition at line 38 of file EcalSimpleTBAnalyzer.h.

Constructor & Destructor Documentation

◆ EcalSimpleTBAnalyzer()

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

Definition at line 43 of file EcalSimpleTBAnalyzer.cc.

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

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_.

◆ ~EcalSimpleTBAnalyzer()

EcalSimpleTBAnalyzer::~EcalSimpleTBAnalyzer ( )
override

Definition at line 65 of file EcalSimpleTBAnalyzer.cc.

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

Member Function Documentation

◆ analyze()

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

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

Implements edm::EDAnalyzer.

Definition at line 203 of file EcalSimpleTBAnalyzer.cc.

203  {
204  //========================================================================
205 
206  using namespace edm;
207  using namespace cms;
208 
210  const EBDigiCollection* digis = nullptr;
211  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
212  iEvent.getByLabel(digiProducer_, digiCollection_, pdigis);
213  if (pdigis.isValid()) {
214  digis = pdigis.product(); // get a ptr to the product
215  //iEvent.getByLabel( hitProducer_, phits);
216  } else {
217  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << digiCollection_;
218  }
219 
220  // fetch the digis and compute signal amplitude
222  const EBUncalibratedRecHitCollection* hits = nullptr;
223  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
224  iEvent.getByLabel(hitProducer_, hitCollection_, phits);
225  if (phits.isValid()) {
226  hits = phits.product(); // get a ptr to the product
227  //iEvent.getByLabel( hitProducer_, phits);
228  } else {
229  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << hitCollection_;
230  }
231 
233  const EcalTBHodoscopeRecInfo* recHodo = nullptr;
234  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
236  if (pHodo.isValid()) {
237  recHodo = pHodo.product(); // get a ptr to the product
238  } else {
239  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << hodoRecInfoCollection_;
240  }
241 
243  const EcalTBTDCRecInfo* recTDC = nullptr;
244  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
246  if (pTDC.isValid()) {
247  recTDC = pTDC.product(); // get a ptr to the product
248  } else {
249  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << tdcRecInfoCollection_;
250  }
251 
252  Handle<EcalTBEventHeader> pEventHeader;
253  const EcalTBEventHeader* evtHeader = nullptr;
254  //std::cout << "EcalSimpleTBAnalyzer::analyze getting product with label: " << digiProducer_.c_str()<< " prodname: " << digiCollection_.c_str() << endl;
255  iEvent.getByLabel(eventHeaderProducer_, pEventHeader);
256  if (pEventHeader.isValid()) {
257  evtHeader = pEventHeader.product(); // get a ptr to the product
258  } else {
259  edm::LogError("EcalSimpleTBAnalyzerError") << "Error! can't get the product " << eventHeaderProducer_;
260  }
261 
262  if (!hits)
263  return;
264 
265  if (!recTDC)
266  return;
267 
268  if (!recHodo)
269  return;
270 
271  if (!evtHeader)
272  return;
273 
274  if (hits->empty())
275  return;
276 
277  if (evtHeader->tableIsMoving())
278  h_tableIsMoving->Fill(evtHeader->eventNumber());
279 
280  // Crystal hit by beam
281  if (xtalInBeam_.null()) {
283  std::cout << "Xtal In Beam is " << xtalInBeam_.ic() << std::endl;
284  } else if (xtalInBeam_ != EBDetId(1, evtHeader->crystalInBeam(), EBDetId::SMCRYSTALMODE))
285  return;
286 
287  if (evtHeader->tableIsMoving())
288  return;
289 
290  // EBDetId maxHitId(0);
291  // float maxHit= -999999.;
292 
293  // for(EBUncalibratedRecHitCollection::const_iterator ithit = hits->begin(); ithit != hits->end(); ++ithit)
294  // {
295  // if (ithit->amplitude()>=maxHit)
296  // {
297  // maxHit=ithit->amplitude();
298  // maxHitId=ithit->id();
299  // }
300 
301  // }
302 
303  // if (maxHitId==EBDetId(0))
304  // return;
305 
306  // EBDetId maxHitId(1,704,EBDetId::SMCRYSTALMODE);
307 
308  //Find EBDetId in a 5x5 Matrix (to be substituted by the Selector code)
309  // Something like
310  // EBFixedWindowSelector<EcalUncalibratedRecHit> Simple5x5Matrix(hits,maxHitId,5,5);
311  // std::vector<EcalUncalibratedRecHit> Energies5x5 = Simple5x5Matrix.getHits();
312 
313  EBDetId Xtals5x5[25];
314  for (unsigned int icry = 0; icry < 25; icry++) {
315  unsigned int row = icry / 5;
316  unsigned int column = icry % 5;
317  int ieta = xtalInBeam_.ieta() + column - 2;
318  int iphi = xtalInBeam_.iphi() + row - 2;
320  if (tempId.ism() == 1)
321  Xtals5x5[icry] = tempId;
322  else
323  Xtals5x5[icry] = EBDetId(0);
325  }
326 
327  double samples_save[10];
328  for (int i = 0; i < 10; ++i)
329  samples_save[i] = 0.0;
330 
331  // find the rechit corresponding digi and the max sample
333  double eMax = 0.;
334  if (myDg != digis->end()) {
335  EBDataFrame myDigi = (*myDg);
336  for (int sample = 0; sample < myDigi.size(); ++sample) {
337  double analogSample = myDigi.sample(sample).adc();
338  samples_save[sample] = analogSample;
339  // std::cout << analogSample << " ";
340  if (eMax < analogSample) {
341  eMax = analogSample;
342  }
343  }
344  // std::cout << std::endl;
345  }
346 
347  for (int i = 0; i < 10; ++i) {
348  h_Shape_->Fill(double(i) + recTDC->offset(), samples_save[i]);
349  }
350 
351  double amplitude[25];
352 
353  double amplitude3x3 = 0;
354  double amplitude5x5 = 0;
355 
356  for (unsigned int icry = 0; icry < 25; icry++) {
357  if (!Xtals5x5[icry].null()) {
358  amplitude[icry] = (hits->find(Xtals5x5[icry]))->amplitude();
359  amplitude5x5 += amplitude[icry];
360  // Is in 3x3?
361  if (icry == 6 || icry == 7 || icry == 8 || icry == 11 || icry == 12 || icry == 13 || icry == 16 || icry == 17 ||
362  icry == 18) {
363  amplitude3x3 += amplitude[icry];
364  }
365  }
366  }
367 
368  h_e1x1->Fill(amplitude[12]);
369  h_e3x3->Fill(amplitude3x3);
370  h_e5x5->Fill(amplitude5x5);
371 
372  h_e1e9->Fill(amplitude[12] / amplitude3x3);
373  h_e1e25->Fill(amplitude[12] / amplitude5x5);
374  h_e9e25->Fill(amplitude3x3 / amplitude5x5);
375 
376  if (recTDC)
377  h_ampltdc->Fill(recTDC->offset(), amplitude[12]);
378 
379  if (recHodo) {
380  float x = recHodo->posX();
381  float y = recHodo->posY();
382  float xslope = recHodo->slopeX();
383  float yslope = recHodo->slopeY();
384  float xqual = recHodo->qualX();
385  float yqual = recHodo->qualY();
386 
387  //Filling beam profiles
388  h_bprofx->Fill(x);
389  h_bprofy->Fill(y);
390  h_qualx->Fill(xqual);
391  h_qualy->Fill(yqual);
392  h_slopex->Fill(xslope);
393  h_slopey->Fill(yslope);
394 
395  //Fill central events
396 
397  if (fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5) {
398  h_e1x1_center->Fill(amplitude[12]);
399  h_e3x3_center->Fill(amplitude3x3);
400  h_e5x5_center->Fill(amplitude5x5);
401 
402  h_e1e9->Fill(amplitude[12] / amplitude3x3);
403  h_e1e25->Fill(amplitude[12] / amplitude5x5);
404  h_e9e25->Fill(amplitude3x3 / amplitude5x5);
405  }
406 
407  for (unsigned int icry = 0; icry < 25; icry++) {
408  h_mapx[icry]->Fill(x, amplitude[icry]);
409  h_mapy[icry]->Fill(y, amplitude[icry]);
410  }
411 
412  h_e1e9_mapx->Fill(x, amplitude[12] / amplitude3x3);
413  h_e1e9_mapy->Fill(y, amplitude[12] / amplitude3x3);
414 
415  h_e1e25_mapx->Fill(x, amplitude[12] / amplitude5x5);
416  h_e1e25_mapy->Fill(y, amplitude[12] / amplitude5x5);
417 
418  h_e9e25_mapx->Fill(x, amplitude3x3 / amplitude5x5);
419  h_e9e25_mapy->Fill(y, amplitude3x3 / amplitude5x5);
420  }
421 }

References EcalMGPASample::adc(), CustomPhysics_cfi::amplitude, gather_cfg::cout, EcalTBEventHeader::crystalInBeam(), digiCollection_, digiProducer_, cosmicPhotonAnalyzer_cfi::eMax, edm::DataFrameContainer::end(), EBDetId::ETAPHIMODE, eventHeaderProducer_, EcalTBEventHeader::eventNumber(), edm::DataFrameContainer::find(), 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(), LEDCalibrationChannels::ieta, iEvent, EBDetId::iphi(), LEDCalibrationChannels::iphi, EBDetId::ism(), edm::HandleBase::isValid(), DetId::null(), EcalTBTDCRecInfo::offset(), phits, 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.

◆ beginJob()

void EcalSimpleTBAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 93 of file EcalSimpleTBAnalyzer.cc.

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

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.

◆ endJob()

void EcalSimpleTBAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 147 of file EcalSimpleTBAnalyzer.cc.

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

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_.

Member Data Documentation

◆ digiCollection_

std::string EcalSimpleTBAnalyzer::digiCollection_
private

Definition at line 49 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ digiProducer_

std::string EcalSimpleTBAnalyzer::digiProducer_
private

Definition at line 50 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ eventHeaderCollection_

std::string EcalSimpleTBAnalyzer::eventHeaderCollection_
private

Definition at line 57 of file EcalSimpleTBAnalyzer.h.

Referenced by EcalSimpleTBAnalyzer().

◆ eventHeaderProducer_

std::string EcalSimpleTBAnalyzer::eventHeaderProducer_
private

Definition at line 58 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ h_ampltdc

TH2F* EcalSimpleTBAnalyzer::h_ampltdc
private

Definition at line 61 of file EcalSimpleTBAnalyzer.h.

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

◆ h_bprofx

TH1F* EcalSimpleTBAnalyzer::h_bprofx
private

Definition at line 79 of file EcalSimpleTBAnalyzer.h.

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

◆ h_bprofy

TH1F* EcalSimpleTBAnalyzer::h_bprofy
private

Definition at line 80 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1e25

TH1F* EcalSimpleTBAnalyzer::h_e1e25
private

Definition at line 76 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1e25_mapx

TH2F* EcalSimpleTBAnalyzer::h_e1e25_mapx
private

Definition at line 94 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1e25_mapy

TH2F* EcalSimpleTBAnalyzer::h_e1e25_mapy
private

Definition at line 95 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1e9

TH1F* EcalSimpleTBAnalyzer::h_e1e9
private

Definition at line 75 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1e9_mapx

TH2F* EcalSimpleTBAnalyzer::h_e1e9_mapx
private

Definition at line 91 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1e9_mapy

TH2F* EcalSimpleTBAnalyzer::h_e1e9_mapy
private

Definition at line 92 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1x1

TH1F* EcalSimpleTBAnalyzer::h_e1x1
private

Definition at line 67 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e1x1_center

TH1F* EcalSimpleTBAnalyzer::h_e1x1_center
private

Definition at line 71 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e3x3

TH1F* EcalSimpleTBAnalyzer::h_e3x3
private

Definition at line 68 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e3x3_center

TH1F* EcalSimpleTBAnalyzer::h_e3x3_center
private

Definition at line 72 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e5x5

TH1F* EcalSimpleTBAnalyzer::h_e5x5
private

Definition at line 69 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e5x5_center

TH1F* EcalSimpleTBAnalyzer::h_e5x5_center
private

Definition at line 73 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e9e25

TH1F* EcalSimpleTBAnalyzer::h_e9e25
private

Definition at line 77 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e9e25_mapx

TH2F* EcalSimpleTBAnalyzer::h_e9e25_mapx
private

Definition at line 97 of file EcalSimpleTBAnalyzer.h.

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

◆ h_e9e25_mapy

TH2F* EcalSimpleTBAnalyzer::h_e9e25_mapy
private

Definition at line 98 of file EcalSimpleTBAnalyzer.h.

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

◆ h_mapx

TH2F* EcalSimpleTBAnalyzer::h_mapx[25]
private

Definition at line 88 of file EcalSimpleTBAnalyzer.h.

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

◆ h_mapy

TH2F* EcalSimpleTBAnalyzer::h_mapy[25]
private

Definition at line 89 of file EcalSimpleTBAnalyzer.h.

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

◆ h_qualx

TH1F* EcalSimpleTBAnalyzer::h_qualx
private

Definition at line 82 of file EcalSimpleTBAnalyzer.h.

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

◆ h_qualy

TH1F* EcalSimpleTBAnalyzer::h_qualy
private

Definition at line 83 of file EcalSimpleTBAnalyzer.h.

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

◆ h_Shape_

TH2F* EcalSimpleTBAnalyzer::h_Shape_
private

Definition at line 63 of file EcalSimpleTBAnalyzer.h.

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

◆ h_slopex

TH1F* EcalSimpleTBAnalyzer::h_slopex
private

Definition at line 85 of file EcalSimpleTBAnalyzer.h.

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

◆ h_slopey

TH1F* EcalSimpleTBAnalyzer::h_slopey
private

Definition at line 86 of file EcalSimpleTBAnalyzer.h.

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

◆ h_tableIsMoving

TH1F* EcalSimpleTBAnalyzer::h_tableIsMoving
private

Definition at line 66 of file EcalSimpleTBAnalyzer.h.

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

◆ hitCollection_

std::string EcalSimpleTBAnalyzer::hitCollection_
private

Definition at line 51 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ hitProducer_

std::string EcalSimpleTBAnalyzer::hitProducer_
private

Definition at line 52 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ hodoRecInfoCollection_

std::string EcalSimpleTBAnalyzer::hodoRecInfoCollection_
private

Definition at line 53 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ hodoRecInfoProducer_

std::string EcalSimpleTBAnalyzer::hodoRecInfoProducer_
private

Definition at line 54 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ rootfile_

std::string EcalSimpleTBAnalyzer::rootfile_
private

Definition at line 48 of file EcalSimpleTBAnalyzer.h.

Referenced by EcalSimpleTBAnalyzer(), and endJob().

◆ tdcRecInfoCollection_

std::string EcalSimpleTBAnalyzer::tdcRecInfoCollection_
private

Definition at line 55 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ tdcRecInfoProducer_

std::string EcalSimpleTBAnalyzer::tdcRecInfoProducer_
private

Definition at line 56 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze(), and EcalSimpleTBAnalyzer().

◆ xtalInBeam_

EBDetId EcalSimpleTBAnalyzer::xtalInBeam_
private

Definition at line 100 of file EcalSimpleTBAnalyzer.h.

Referenced by analyze().

EcalDataFrame::sample
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
EcalSimpleTBAnalyzer::xtalInBeam_
EBDetId xtalInBeam_
Definition: EcalSimpleTBAnalyzer.h:100
DDAxes::y
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
mps_fire.i
i
Definition: mps_fire.py:428
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
EcalSimpleTBAnalyzer::h_e5x5
TH1F * h_e5x5
Definition: EcalSimpleTBAnalyzer.h:69
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
EcalSimpleTBAnalyzer::h_e9e25_mapy
TH2F * h_e9e25_mapy
Definition: EcalSimpleTBAnalyzer.h:98
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EcalSimpleTBAnalyzer::h_ampltdc
TH2F * h_ampltdc
Definition: EcalSimpleTBAnalyzer.h:61
EcalSimpleTBAnalyzer::h_e5x5_center
TH1F * h_e5x5_center
Definition: EcalSimpleTBAnalyzer.h:73
EcalSimpleTBAnalyzer::h_e3x3_center
TH1F * h_e3x3_center
Definition: EcalSimpleTBAnalyzer.h:72
EBDetId::ic
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:41
EcalSimpleTBAnalyzer::h_e1x1_center
TH1F * h_e1x1_center
Definition: EcalSimpleTBAnalyzer.h:71
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalSimpleTBAnalyzer::h_slopey
TH1F * h_slopey
Definition: EcalSimpleTBAnalyzer.h:86
EBDataFrame
Definition: EBDataFrame.h:11
EcalSimpleTBAnalyzer::hodoRecInfoProducer_
std::string hodoRecInfoProducer_
Definition: EcalSimpleTBAnalyzer.h:54
phits
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ phits
Definition: BrokenLineFitOnGPU.h:27
EcalSimpleTBAnalyzer::hodoRecInfoCollection_
std::string hodoRecInfoCollection_
Definition: EcalSimpleTBAnalyzer.h:53
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalSimpleTBAnalyzer::eventHeaderProducer_
std::string eventHeaderProducer_
Definition: EcalSimpleTBAnalyzer.h:58
EcalSimpleTBAnalyzer::eventHeaderCollection_
std::string eventHeaderCollection_
Definition: EcalSimpleTBAnalyzer.h:57
EcalTBHodoscopeRecInfo::slopeX
float slopeX() const
Definition: EcalTBHodoscopeRecInfo.h:28
edm::SortedCollection
Definition: SortedCollection.h:49
EcalSimpleTBAnalyzer::h_e1e9_mapx
TH2F * h_e1e9_mapx
Definition: EcalSimpleTBAnalyzer.h:91
DetId::null
constexpr bool null() const
is this a null id ?
Definition: DetId.h:59
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
EcalSimpleTBAnalyzer::h_e1e25
TH1F * h_e1e25
Definition: EcalSimpleTBAnalyzer.h:76
EcalSimpleTBAnalyzer::h_bprofy
TH1F * h_bprofy
Definition: EcalSimpleTBAnalyzer.h:80
EcalSimpleTBAnalyzer::digiProducer_
std::string digiProducer_
Definition: EcalSimpleTBAnalyzer.h:50
edm::Handle< EBDigiCollection >
EcalTBEventHeader
Definition: EcalTBEventHeader.h:14
EcalSimpleTBAnalyzer::tdcRecInfoProducer_
std::string tdcRecInfoProducer_
Definition: EcalSimpleTBAnalyzer.h:56
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalSimpleTBAnalyzer::h_qualy
TH1F * h_qualy
Definition: EcalSimpleTBAnalyzer.h:83
EcalTBHodoscopeRecInfo::slopeY
float slopeY() const
Definition: EcalTBHodoscopeRecInfo.h:29
EcalMGPASample::adc
int adc() const
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:31
EcalSimpleTBAnalyzer::h_tableIsMoving
TH1F * h_tableIsMoving
Definition: EcalSimpleTBAnalyzer.h:66
EcalTBTDCRecInfo::offset
float offset() const
Definition: EcalTBTDCRecInfo.h:19
EcalTBHodoscopeRecInfo
Definition: EcalTBHodoscopeRecInfo.h:12
EcalSimpleTBAnalyzer::digiCollection_
std::string digiCollection_
Definition: EcalSimpleTBAnalyzer.h:49
EcalSimpleTBAnalyzer::h_qualx
TH1F * h_qualx
Definition: EcalSimpleTBAnalyzer.h:82
EcalTBEventHeader::eventNumber
int eventNumber() const
Returns the event number.
Definition: EcalTBEventHeader.h:35
EcalSimpleTBAnalyzer::h_e1x1
TH1F * h_e1x1
Definition: EcalSimpleTBAnalyzer.h:67
EcalSimpleTBAnalyzer::tdcRecInfoCollection_
std::string tdcRecInfoCollection_
Definition: EcalSimpleTBAnalyzer.h:55
EcalSimpleTBAnalyzer::h_mapy
TH2F * h_mapy[25]
Definition: EcalSimpleTBAnalyzer.h:89
EcalSimpleTBAnalyzer::h_e1e9
TH1F * h_e1e9
Definition: EcalSimpleTBAnalyzer.h:75
EcalSimpleTBAnalyzer::hitProducer_
std::string hitProducer_
Definition: EcalSimpleTBAnalyzer.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EBDetId::ETAPHIMODE
static const int ETAPHIMODE
Definition: EBDetId.h:158
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
EBDigiCollection
Definition: EcalDigiCollections.h:56
EcalSimpleTBAnalyzer::h_e1e25_mapx
TH2F * h_e1e25_mapx
Definition: EcalSimpleTBAnalyzer.h:94
EcalSimpleTBAnalyzer::h_slopex
TH1F * h_slopex
Definition: EcalSimpleTBAnalyzer.h:85
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalSimpleTBAnalyzer::hitCollection_
std::string hitCollection_
Definition: EcalSimpleTBAnalyzer.h:51
EcalTBEventHeader::tableIsMoving
bool tableIsMoving() const
Tell if the table is Moving.
Definition: EcalTBEventHeader.h:88
EcalTBHodoscopeRecInfo::posY
float posY() const
Definition: EcalTBHodoscopeRecInfo.h:26
edm::DataFrameContainer::find
const_iterator find(id_type i) const
Definition: DataFrameContainer.h:141
EcalSimpleTBAnalyzer::h_Shape_
TH2F * h_Shape_
Definition: EcalSimpleTBAnalyzer.h:63
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EcalSimpleTBAnalyzer::h_e1e9_mapy
TH2F * h_e1e9_mapy
Definition: EcalSimpleTBAnalyzer.h:92
EcalTBHodoscopeRecInfo::qualY
float qualY() const
Definition: EcalTBHodoscopeRecInfo.h:32
EcalSimpleTBAnalyzer::h_e1e25_mapy
TH2F * h_e1e25_mapy
Definition: EcalSimpleTBAnalyzer.h:95
EcalSimpleTBAnalyzer::h_bprofx
TH1F * h_bprofx
Definition: EcalSimpleTBAnalyzer.h:79
EcalSimpleTBAnalyzer::h_mapx
TH2F * h_mapx[25]
Definition: EcalSimpleTBAnalyzer.h:88
EcalSimpleTBAnalyzer::h_e9e25
TH1F * h_e9e25
Definition: EcalSimpleTBAnalyzer.h:77
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalDataFrame::size
int size() const
Definition: EcalDataFrame.h:26
EcalTBTDCRecInfo
Definition: EcalTBTDCRecInfo.h:12
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
EcalTBEventHeader::crystalInBeam
int crystalInBeam() const
Returns the crystal which is being hit by the beam (in the internal SM numbering scheme)
Definition: EcalTBEventHeader.h:80
EcalSimpleTBAnalyzer::h_e9e25_mapx
TH2F * h_e9e25_mapx
Definition: EcalSimpleTBAnalyzer.h:97
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EcalSimpleTBAnalyzer::rootfile_
std::string rootfile_
Definition: EcalSimpleTBAnalyzer.h:48
EBDetId::SMCRYSTALMODE
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
EcalSimpleTBAnalyzer::h_e3x3
TH1F * h_e3x3
Definition: EcalSimpleTBAnalyzer.h:68
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
EcalTBHodoscopeRecInfo::qualX
float qualX() const
Definition: EcalTBHodoscopeRecInfo.h:31
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalTBHodoscopeRecInfo::posX
float posX() const
Definition: EcalTBHodoscopeRecInfo.h:25