CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
EcalPerEvtLaserAnalyzer Class Reference

#include <EcalPerEvtLaserAnalyzer.h>

Inheritance diagram for EcalPerEvtLaserAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  VarCol { iBlue, iRed, nColor }
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob () override
 
 EcalPerEvtLaserAnalyzer (const edm::ParameterSet &iConfig)
 
void endJob () override
 
 ~EcalPerEvtLaserAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const unsigned int _channel
 
const std::string _ecalPart
 
const int _fedid
 
const unsigned int _firstsample
 
const unsigned int _firstsamplePN
 
const unsigned int _lastsample
 
const unsigned int _lastsamplePN
 
const unsigned int _niter
 
const unsigned int _nsamples
 
const unsigned int _nsamplesPN
 
const unsigned int _presample
 
const unsigned int _presamplePN
 
const unsigned int _timingcuthigh
 
const unsigned int _timingcutlow
 
const unsigned int _tower
 
double adc [10]
 
std::string ADCfile
 
TFile * ADCFile
 
int adcG [10]
 
TTree * ADCtrees
 
double apdAmpl
 
TFile * APDFile
 
double apdTime
 
TTree * APDtrees
 
int channelNumber
 
int colMat
 
int color
 
std::vector< int > colors
 
int dccID
 
const std::string digiCollection_
 
const std::string digiPNCollection_
 
const std::string digiProducer_
 
int doesRefFileExist
 
edm::EDGetTokenT
< EBDigiCollection
ebDigiToken_
 
edm::EDGetTokenT
< EEDigiCollection
eeDigiToken_
 
int eta
 
int event
 
const std::string eventHeaderCollection_
 
const std::string eventHeaderProducer_
 
int evtMat
 
int fedID
 
TTree * header [2]
 
int iEvent
 
int IsFileCreated
 
int IsHeaderFilled [nColor]
 
int IsThereDataADC [nColor]
 
int lightside
 
const edm::ESGetToken
< EcalElectronicsMapping,
EcalMappingRcd
mappingToken_
 
TFile * matacqFile
 
TTree * matacqTree
 
unsigned int nCrys
 
double peak
 
double peakMat
 
int phi
 
double pn [50]
 
double pn0
 
double pn1
 
double pnAmpl
 
const edm::EDGetTokenT
< EcalPnDiodeDigiCollection
pnDiodeDigiToken_
 
const edm::EDGetTokenT
< EcalRawDataCollection
rawDataToken_
 
const std::string refalphabeta_
 
const std::string resdir_
 
std::string resfile
 
int runNum
 
int runType
 
double tt
 
double ttMat
 
double ttrig
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 43 of file EcalPerEvtLaserAnalyzer.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 36 of file EcalPerEvtLaserAnalyzer.cc.

References _ecalPart, digiCollection_, digiProducer_, ebDigiToken_, eeDigiToken_, HLT_FULL_cff::InputTag, nCrys, NCRYSEB, and NCRYSEE.

38  : iEvent(0),
39  eventHeaderCollection_(iConfig.getParameter<std::string>("eventHeaderCollection")),
40  eventHeaderProducer_(iConfig.getParameter<std::string>("eventHeaderProducer")),
41  digiCollection_(iConfig.getParameter<std::string>("digiCollection")),
42  digiProducer_(iConfig.getParameter<std::string>("digiProducer")),
43  digiPNCollection_(iConfig.getParameter<std::string>("digiPNCollection")),
44  rawDataToken_(consumes<EcalRawDataCollection>(edm::InputTag(eventHeaderProducer_, eventHeaderCollection_))),
45  pnDiodeDigiToken_(consumes<EcalPnDiodeDigiCollection>(edm::InputTag(digiProducer_, digiPNCollection_))),
47  // framework parameters with default values
48  _nsamples(iConfig.getUntrackedParameter<unsigned int>("nSamples", 10)),
49  _presample(iConfig.getUntrackedParameter<unsigned int>("nPresamples", 3)),
50  _firstsample(iConfig.getUntrackedParameter<unsigned int>("firstSample", 1)),
51  _lastsample(iConfig.getUntrackedParameter<unsigned int>("lastSample", 2)),
52  _nsamplesPN(iConfig.getUntrackedParameter<unsigned int>("nSamplesPN", 50)),
53  _presamplePN(iConfig.getUntrackedParameter<unsigned int>("nPresamplesPN", 6)),
54  _firstsamplePN(iConfig.getUntrackedParameter<unsigned int>("firstSamplePN", 7)),
55  _lastsamplePN(iConfig.getUntrackedParameter<unsigned int>("lastSamplePN", 8)),
56  _timingcutlow(iConfig.getUntrackedParameter<unsigned int>("timingCutLow", 3)),
57  _timingcuthigh(iConfig.getUntrackedParameter<unsigned int>("timingCutHigh", 7)),
58  _niter(iConfig.getUntrackedParameter<unsigned int>("nIter", 3)),
59  _fedid(iConfig.getUntrackedParameter<unsigned int>("fedID", 0)),
60  _tower(iConfig.getUntrackedParameter<unsigned int>("tower", 1)),
61  _channel(iConfig.getUntrackedParameter<unsigned int>("channel", 1)),
62  _ecalPart(iConfig.getUntrackedParameter<std::string>("ecalPart", "EB")),
63  resdir_(iConfig.getUntrackedParameter<std::string>("resDir")),
64  refalphabeta_(iConfig.getUntrackedParameter<std::string>("refAlphaBeta")),
65  nCrys(NCRYSEB),
66  IsFileCreated(0),
67  runType(-1),
68  runNum(0),
69  dccID(-1),
70  lightside(2),
72  ttMat(-1),
73  peakMat(-1),
74  peak(-1),
75  evtMat(-1),
76  colMat(-1)
77 //========================================================================
78 
79 {
80  if (_ecalPart == "EB") {
81  ebDigiToken_ = consumes<EBDigiCollection>(edm::InputTag(digiProducer_, digiCollection_));
82  } else if (_ecalPart == "EE") {
83  eeDigiToken_ = consumes<EEDigiCollection>(edm::InputTag(digiProducer_, digiCollection_));
84  }
85 
86  // Define geometrical constants
87  //
88  if (_ecalPart == "EB") {
89  nCrys = NCRYSEB;
90  } else {
91  nCrys = NCRYSEE;
92  }
93 }
const std::string eventHeaderCollection_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
#define NCRYSEE
const unsigned int _timingcuthigh
#define NCRYSEB
const unsigned int _timingcutlow
const unsigned int _firstsamplePN
const std::string digiPNCollection_
const std::string eventHeaderProducer_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
const unsigned int _lastsamplePN
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_
EcalPerEvtLaserAnalyzer::~EcalPerEvtLaserAnalyzer ( )
override

Definition at line 96 of file EcalPerEvtLaserAnalyzer.cc.

96  {
97  //========================================================================
98 
99  // do anything here that needs to be done at desctruction time
100  // (e.g. close files, deallocate resources etc.)
101 }

Member Function Documentation

void EcalPerEvtLaserAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 149 of file EcalPerEvtLaserAnalyzer.cc.

References _channel, _ecalPart, _fedid, _firstsamplePN, _lastsamplePN, _nsamples, _nsamplesPN, _presample, _presamplePN, _timingcuthigh, _timingcutlow, _tower, adc, adcG, ADCtrees, cms::cuda::assert(), edm::SortedCollection< T, SORT >::begin(), edm::DataFrameContainer::begin(), EcalElectronicsId::channelId(), channelNumber, colMat, color, colors, MEEEGeom::crystal(), dccID, isotrackApplyRegressor::df, digiCollection_, digiPNCollection_, doesRefFileExist, TPNFit::doFit(), ebDigiToken_, eeDigiToken_, MEEBGeom::electronic_channel(), edm::SortedCollection< T, SORT >::end(), edm::DataFrameContainer::end(), eta, event, eventHeaderCollection_, evtMat, fedID, spr::find(), TPNFit::getAmpl(), edm::Event::getByToken(), edm::EventSetup::getData(), mps_fire::i, iEvent, TPNFit::init(), IsFileCreated, edm::HandleBase::isValid(), isotrackApplyRegressor::k, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, lightside, MEEEGeom::lmmod(), MEEBGeom::lmmod(), MEEBGeom::localCoord(), mappingToken_, matacqFile, matacqTree, Max(), callgraph::module, nCrys, peak, peakMat, phi, MEEBGeom::pn(), MEEEGeom::pn(), pn, pn0, pn1, pnAmpl, pnDiodeDigiToken_, edm::Handle< T >::product(), rawDataToken_, resdir_, resfile, runNum, runType, MEEBGeom::side(), digitizers_cfi::strip, EcalElectronicsId::stripId(), ctpps_dqm_sourceclient-live_cfg::test, ecaldqm::towerID(), EcalElectronicsId::towerId(), ttMat, ttrig, EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength, and EcalElectronicsId::xtalId().

149  {
150  //========================================================================
151 
152  ++iEvent;
153 
154  // retrieving DCC header
156  const EcalRawDataCollection* DCCHeader = nullptr;
157  e.getByToken(rawDataToken_, pDCCHeader);
158  if (!pDCCHeader.isValid()) {
159  edm::LogError("nodata") << "Error! can't get the product retrieving DCC header" << eventHeaderCollection_.c_str();
160  } else {
161  DCCHeader = pDCCHeader.product();
162  }
163 
164  // retrieving crystal data from Event
166  const EBDigiCollection* EBDigi = nullptr;
168  const EEDigiCollection* EEDigi = nullptr;
169  if (_ecalPart == "EB") {
170  e.getByToken(ebDigiToken_, pEBDigi);
171  if (!pEBDigi.isValid()) {
172  edm::LogError("nodata") << "Error! can't get the product retrieving EB crystal data " << digiCollection_.c_str();
173  } else {
174  EBDigi = pEBDigi.product();
175  }
176  } else {
177  e.getByToken(eeDigiToken_, pEEDigi);
178  if (!pEEDigi.isValid()) {
179  edm::LogError("nodata") << "Error! can't get the product retrieving EE crystal data " << digiCollection_.c_str();
180  } else {
181  EEDigi = pEEDigi.product();
182  }
183  }
184 
185  // retrieving crystal PN diodes from Event
187  const EcalPnDiodeDigiCollection* PNDigi = nullptr;
188  e.getByToken(pnDiodeDigiToken_, pPNDigi);
189  if (!pPNDigi.isValid()) {
190  edm::LogError("nodata") << "Error! can't get the product " << digiPNCollection_.c_str();
191  } else {
192  PNDigi = pPNDigi.product();
193  }
194 
195  // retrieving electronics mapping
196  const auto& TheMapping = c.getData(mappingToken_);
197 
198  // ====================================
199  // Decode Basic DCCHeader Information
200  // ====================================
201 
202  for (EcalRawDataCollection::const_iterator headerItr = DCCHeader->begin(); headerItr != DCCHeader->end();
203  ++headerItr) {
204  // Get run type and run number
205 
206  int fed = headerItr->fedId();
207 
208  if (fed != _fedid && _fedid != -999)
209  continue;
210 
211  runType = headerItr->getRunType();
212  runNum = headerItr->getRunNumber();
213  event = headerItr->getLV1();
214  dccID = headerItr->getDccInTCCCommand();
215  fedID = headerItr->fedId();
216 
217  // take event only if the fed corresponds to the DCC in TCC
218  if (600 + dccID != fedID)
219  continue;
220 
221  // Cut on runType
223  return;
224 
225  // Define output results files' names
226 
227  if (IsFileCreated == 0) {
228  stringstream namefile2;
229  namefile2 << resdir_ << "/APDAmpl_Run" << runNum << "_" << _fedid << "_" << _tower << "_" << _channel << ".root";
230  resfile = namefile2.str();
231 
232  // Get Matacq ttrig
233 
234  stringstream namefile;
235  namefile << resdir_ << "/Matacq-Run" << runNum << ".root";
236 
237  doesRefFileExist = 0;
238 
239  FILE* test;
240  test = fopen(namefile.str().c_str(), "r");
241  if (test)
242  doesRefFileExist = 1;
243 
244  if (doesRefFileExist == 1) {
245  matacqFile = new TFile((namefile.str().c_str()));
246  matacqTree = (TTree*)matacqFile->Get("MatacqShape");
247 
248  matacqTree->SetBranchAddress("event", &evtMat);
249  matacqTree->SetBranchAddress("color", &colMat);
250  matacqTree->SetBranchAddress("peak", &peakMat);
251  matacqTree->SetBranchAddress("ttrig", &ttMat);
252  }
253 
254  IsFileCreated = 1;
255  }
256 
257  // Retrieve laser color and event number
258 
259  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
260  int color = settings.wavelength;
261 
262  vector<int>::iterator iter = find(colors.begin(), colors.end(), color);
263  if (iter == colors.end()) {
264  colors.push_back(color);
265  edm::LogVerbatim("EcalPerEvtLaserAnalyzer") << " new color found " << color << " " << colors.size();
266  }
267  }
268 
269  // cut on fedID
270 
271  if (fedID != _fedid && _fedid != -999)
272  return;
273 
274  // ======================
275  // Decode PN Information
276  // ======================
277 
278  TPNFit* pnfit = new TPNFit();
280 
281  double chi2pn = 0;
282  double ypnrange[50];
283  double dsum = 0.;
284  double dsum1 = 0.;
285  double bl = 0.;
286  double bl1 = 0.;
287  double val_max = 0.;
288  unsigned int samplemax = 0;
289  unsigned int k;
290 
291  std::vector<double> allPNAmpl;
292 
293  for (EcalPnDiodeDigiCollection::const_iterator pnItr = PNDigi->begin(); pnItr != PNDigi->end();
294  ++pnItr) { // Loop on PNs
295 
296  for (int samId = 0; samId < (*pnItr).size(); samId++) { // Loop on PN samples
297  pn[samId] = (*pnItr).sample(samId).adc();
298  }
299 
300  for (dsum = 0., k = 0; k < _presamplePN; k++) {
301  dsum += pn[k];
302  }
303  bl = dsum / ((double)_presamplePN);
304 
305  for (val_max = 0., k = 0; k < _nsamplesPN; k++) {
306  ypnrange[k] = pn[k] - bl;
307 
308  if (ypnrange[k] > val_max) {
309  val_max = ypnrange[k];
310  samplemax = k;
311  }
312  }
313 
314  chi2pn = pnfit->doFit(samplemax, &ypnrange[0]);
315 
316  if (chi2pn == 101 || chi2pn == 102 || chi2pn == 103)
317  pnAmpl = 0.;
318  else
319  pnAmpl = pnfit->getAmpl();
320 
321  allPNAmpl.push_back(pnAmpl);
322  }
323 
324  // ===========
325  // Get Matacq
326  // ===========
327 
328  ttrig = -1.;
329  peak = -1.;
330 
331  if (doesRefFileExist == 1) {
332  // FIXME
333  if (color == 0)
334  matacqTree->GetEntry(event - 1);
335  else if (color == 3)
336  matacqTree->GetEntry(matacqTree->GetEntries("color==0") + event - 1);
337  ttrig = ttMat;
338  peak = peakMat;
339  }
340 
341  // ===========================
342  // Decode EBDigis Information
343  // ===========================
344 
345  double yrange[10];
346  int adcGain = 0;
347  int side = 0;
348 
349  if (EBDigi) {
350  for (EBDigiCollection::const_iterator digiItr = EBDigi->begin(); digiItr != EBDigi->end();
351  ++digiItr) { // Loop on crystals
352 
353  EBDetId id_crystal(digiItr->id());
354  EBDataFrame df(*digiItr);
355 
356  int etaG = id_crystal.ieta(); // global
357  int phiG = id_crystal.iphi(); // global
358 
359  int etaL; // local
360  int phiL; // local
361  std::pair<int, int> LocalCoord = MEEBGeom::localCoord(etaG, phiG);
362 
363  etaL = LocalCoord.first;
364  phiL = LocalCoord.second;
365 
366  eta = etaG;
367  phi = phiG;
368 
369  side = MEEBGeom::side(etaG, phiG);
370 
371  EcalElectronicsId elecid_crystal = TheMapping.getElectronicsId(id_crystal);
372 
373  int towerID = elecid_crystal.towerId();
374  // int channelID=elecid_crystal.channelId()-1; // FIXME so far for endcap only
375  int strip = elecid_crystal.stripId();
376  int xtal = elecid_crystal.xtalId();
377  int channelID = 5 * (strip - 1) + xtal - 1; // FIXME
378 
379  int module = MEEBGeom::lmmod(etaG, phiG);
380 
381  std::pair<int, int> pnpair = MEEBGeom::pn(module);
382  unsigned int MyPn0 = pnpair.first;
383  unsigned int MyPn1 = pnpair.second;
384 
385  unsigned int channel = MEEBGeom::electronic_channel(etaL, phiL);
386  assert(channel < nCrys);
387 
388  double adcmax = 0.0;
389 
390  if (towerID != int(_tower) || channelID != int(_channel) || dccID != int(_fedid - 600))
391  continue;
392  else
393  channelNumber = channel;
394 
395  for (unsigned int i = 0; i < (*digiItr).size(); ++i) { // Loop on adc samples
396 
397  EcalMGPASample samp_crystal(df.sample(i));
398  adc[i] = samp_crystal.adc();
399  adcG[i] = samp_crystal.gainId();
400 
401  if (i == 0)
402  adcGain = adcG[i];
403  if (i > 0)
404  adcGain = TMath::Max(adcG[i], adcGain);
405 
406  if (adc[i] > adcmax) {
407  adcmax = adc[i];
408  }
409  }
410 
411  for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
412  dsum += adc[k];
413  if (k < _presample - 1)
414  dsum1 += adc[k];
415  }
416 
417  bl = dsum / ((double)_presample);
418  bl1 = dsum1 / ((double)_presample - 1);
419 
420  for (val_max = 0., k = 0; k < _nsamples; k++) {
421  yrange[k] = adc[k] - bl;
422  if (yrange[k] > val_max) {
423  val_max = yrange[k];
424  samplemax = k;
425  }
426  }
427 
428  if (samplemax == 4 || samplemax == 5) {
429  val_max = val_max + bl - bl1;
430  for (k = 0; k < _nsamples; k++) {
431  yrange[k] = yrange[k] + bl - bl1;
432  }
433  }
434 
435  for (unsigned int k = 0; k < _nsamples; k++) {
436  adc[k] = yrange[k];
437  }
438 
439  pn0 = allPNAmpl[MyPn0];
440  pn1 = allPNAmpl[MyPn1];
441 
442  if (samplemax >= _timingcutlow && samplemax <= _timingcuthigh && lightside == side)
443  ADCtrees->Fill();
444  }
445 
446  } else {
447  for (EEDigiCollection::const_iterator digiItr = EEDigi->begin(); digiItr != EEDigi->end();
448  ++digiItr) { // Loop on crystals
449 
450  EEDetId id_crystal(digiItr->id());
451  EEDataFrame df(*digiItr);
452 
453  phi = id_crystal.ix() - 1;
454  eta = id_crystal.iy() - 1;
455  side = 0; // FIXME
456 
457  // Recover the TT id and the electronic crystal numbering from EcalElectronicsMapping
458 
459  EcalElectronicsId elecid_crystal = TheMapping.getElectronicsId(id_crystal);
460 
461  int towerID = elecid_crystal.towerId();
462  int channelID = elecid_crystal.channelId() - 1;
463 
464  int module = MEEEGeom::lmmod(phi, eta);
465 
466  std::pair<int, int> pnpair = MEEEGeom::pn(module, _fedid);
467  unsigned int MyPn0 = pnpair.first;
468  unsigned int MyPn1 = pnpair.second;
469 
470  unsigned int channel = MEEEGeom::crystal(phi, eta);
471  assert(channel < nCrys);
472 
473  double adcmax = 0.0;
474 
475  if (towerID != int(_tower) || channelID != int(_channel) || dccID != int(_fedid - 600))
476  continue;
477  else
478  channelNumber = channel;
479 
480  for (unsigned int i = 0; i < (*digiItr).size(); ++i) { // Loop on adc samples
481 
482  EcalMGPASample samp_crystal(df.sample(i));
483  adc[i] = samp_crystal.adc();
484  adcG[i] = samp_crystal.gainId();
485 
486  if (i == 0)
487  adcGain = adcG[i];
488  if (i > 0)
489  adcGain = TMath::Max(adcG[i], adcGain);
490 
491  if (adc[i] > adcmax) {
492  adcmax = adc[i];
493  }
494  }
495 
496  for (dsum = 0., dsum1 = 0., k = 0; k < _presample; k++) {
497  dsum += adc[k];
498  if (k < _presample - 1)
499  dsum1 += adc[k];
500  }
501 
502  bl = dsum / ((double)_presample);
503  bl1 = dsum1 / ((double)_presample - 1);
504 
505  for (val_max = 0., k = 0; k < _nsamples; k++) {
506  yrange[k] = adc[k] - bl;
507  if (yrange[k] > val_max) {
508  val_max = yrange[k];
509  samplemax = k;
510  }
511  }
512 
513  if (samplemax == 4 || samplemax == 5) {
514  val_max = val_max + bl - bl1;
515  for (k = 0; k < _nsamples; k++) {
516  yrange[k] = yrange[k] + bl - bl1;
517  }
518  }
519 
520  for (unsigned int k = 0; k < _nsamples; k++) {
521  adc[k] = yrange[k];
522  }
523 
524  pn0 = allPNAmpl[MyPn0];
525  pn1 = allPNAmpl[MyPn1];
526 
527  if (samplemax >= _timingcutlow && samplemax <= _timingcuthigh && lightside == side)
528  ADCtrees->Fill();
529  }
530  }
531 
532 } // analyze
const std::string eventHeaderCollection_
Log< level::Info, true > LogVerbatim
static XYCoord localCoord(int icr)
Definition: MEEBGeom.cc:142
static int lmmod(SuperCrysCoord iX, SuperCrysCoord iY)
Definition: MEEEGeom.cc:112
static int crystal(CrysCoord ix, CrysCoord iy)
Definition: MEEEGeom.cc:372
int xtalId() const
get the channel id
edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
int stripId() const
get the tower id
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< T >::const_iterator const_iterator
const unsigned int _timingcuthigh
void init(int, int, int)
Definition: TPNFit.cc:24
int towerId() const
get the tower id
const_iterator begin() const
The iterator returned can not safely be used across threads.
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
assert(be >=bs)
static std::pair< int, int > pn(int ilmmod)
Definition: MEEBGeom.cc:447
bool getData(T &iHolder) const
Definition: EventSetup.h:128
static std::pair< int, int > pn(int dee, int ilmod)
Definition: MEEEGeom.cc:574
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
Definition: MEEBGeom.cc:326
double getAmpl()
Definition: TPNFit.h:32
const unsigned int _timingcutlow
const unsigned int _firstsamplePN
const std::string digiPNCollection_
bool isValid() const
Definition: HandleBase.h:70
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:90
const_iterator end() const
T Max(T a, T b)
Definition: MathUtil.h:44
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
Definition: MEEBGeom.cc:105
T const * product() const
Definition: Handle.h:70
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator end() const
edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
Definition: TPNFit.h:6
double doFit(int, double *)
Definition: TPNFit.cc:39
EcalLogicID towerID(EcalElectronicsId const &)
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > mappingToken_
const unsigned int _lastsamplePN
int channelId() const
so far for EndCap only :
const_iterator begin() const
tuple module
Definition: callgraph.py:69
int adc() const
get the ADC sample (12 bits)
const edm::EDGetTokenT< EcalPnDiodeDigiCollection > pnDiodeDigiToken_
void EcalPerEvtLaserAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 104 of file EcalPerEvtLaserAnalyzer.cc.

References adc, ADCfile, ADCFile, ADCtrees, color, dccID, eta, event, IsFileCreated, mergeVDriftHistosByStation::name, peak, phi, pn0, pn1, resdir_, and ttrig.

104  {
105  //========================================================================
106 
107  // Define temporary files' names
108 
109  stringstream namefile1;
110  namefile1 << resdir_ << "/ADCSamples.root";
111 
112  ADCfile = namefile1.str();
113 
114  // Create temporary file and trees to save adc samples
115 
116  ADCFile = new TFile(ADCfile.c_str(), "RECREATE");
117 
118  stringstream name;
119  name << "ADCTree";
120 
121  ADCtrees = new TTree(name.str().c_str(), name.str().c_str());
122 
123  ADCtrees->Branch("iphi", &phi, "phi/I");
124  ADCtrees->Branch("ieta", &eta, "eta/I");
125  ADCtrees->Branch("dccID", &dccID, "dccID/I");
126  ADCtrees->Branch("event", &event, "event/I");
127  ADCtrees->Branch("color", &color, "color/I");
128  ADCtrees->Branch("adc", &adc, "adc[10]/D");
129  ADCtrees->Branch("ttrigMatacq", &ttrig, "ttrig/D");
130  ADCtrees->Branch("peakMatacq", &peak, "peak/D");
131  ADCtrees->Branch("pn0", &pn0, "pn0/D");
132  ADCtrees->Branch("pn1", &pn1, "pn1/D");
133 
134  ADCtrees->SetBranchAddress("ieta", &eta);
135  ADCtrees->SetBranchAddress("iphi", &phi);
136  ADCtrees->SetBranchAddress("dccID", &dccID);
137  ADCtrees->SetBranchAddress("event", &event);
138  ADCtrees->SetBranchAddress("color", &color);
139  ADCtrees->SetBranchAddress("adc", adc);
140  ADCtrees->SetBranchAddress("ttrigMatacq", &ttrig);
141  ADCtrees->SetBranchAddress("peakMatacq", &peak);
142  ADCtrees->SetBranchAddress("pn0", &pn0);
143  ADCtrees->SetBranchAddress("pn1", &pn1);
144 
145  IsFileCreated = 0;
146 }
void EcalPerEvtLaserAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 535 of file EcalPerEvtLaserAnalyzer.cc.

References _channel, _fedid, _firstsample, _lastsample, _niter, _nsamples, _tower, adc, ADCfile, ADCFile, ADCtrees, alpha, apdAmpl, APDFile, apdTime, APDtrees, cms::cuda::assert(), HLT_FULL_cff::beta, channelNumber, HLT_FULL_cff::chi2, color, colors, GOODCOLL_filter_cfg::cut, dccID, PulseFitWithFunction::doFit(), event, PulseFitWithFunction::getAmpl(), PulseFitWithFunction::getTime(), header, mps_fire::i, PulseFitWithFunction::init(), IsHeaderFilled, IsThereDataADC, nColor, peak, pn0, pn1, refalphabeta_, resfile, ecaldqm::towerID(), and ttrig.

Referenced by o2olib.O2ORunMgr::executeJob().

535  {
536  //========================================================================
537 
538  assert(colors.size() <= nColor);
539  unsigned int nCol = colors.size();
540 
541  ADCtrees->Write();
542 
543  edm::LogVerbatim("EcalPerEvtLaserAnalyzer")
544  << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
545  edm::LogVerbatim("EcalPerEvtLaserAnalyzer")
546  << "\t+=+ Analyzing laser data: getting per event +=+";
547  edm::LogVerbatim("EcalPerEvtLaserAnalyzer")
548  << "\t+=+ APD Amplitudes and ADC samples +=+";
549  edm::LogVerbatim("EcalPerEvtLaserAnalyzer")
550  << "\t+=+ for fed:" << _fedid << ", tower:" << _tower << ", and channel:" << _channel;
551 
552  // Define temporary tree to save APD amplitudes
553 
554  APDFile = new TFile(resfile.c_str(), "RECREATE");
555 
556  int ieta, iphi, channelID, towerID, flag;
557  double alpha, beta;
558 
559  colors.push_back(color);
560 
561  for (unsigned int i = 0; i < nCol; i++) {
562  stringstream name1;
563  name1 << "headerCol" << colors[i];
564 
565  header[i] = new TTree(name1.str().c_str(), name1.str().c_str());
566 
567  header[i]->Branch("alpha", &alpha, "alpha/D");
568  header[i]->Branch("beta", &beta, "beta/D");
569  header[i]->Branch("iphi", &iphi, "iphi/I");
570  header[i]->Branch("ieta", &ieta, "ieta/I");
571  header[i]->Branch("dccID", &dccID, "dccID/I");
572  header[i]->Branch("towerID", &towerID, "towerID/I");
573  header[i]->Branch("channelID", &channelID, "channelID/I");
574 
575  header[i]->SetBranchAddress("alpha", &alpha);
576  header[i]->SetBranchAddress("beta", &beta);
577  header[i]->SetBranchAddress("iphi", &iphi);
578  header[i]->SetBranchAddress("ieta", &ieta);
579  header[i]->SetBranchAddress("dccID", &dccID);
580  header[i]->SetBranchAddress("towerID", &towerID);
581  header[i]->SetBranchAddress("channelID", &channelID);
582  }
583 
584  stringstream name2;
585  name2 << "APDTree";
586  APDtrees = new TTree(name2.str().c_str(), name2.str().c_str());
587 
588  //List of branches
589 
590  APDtrees->Branch("event", &event, "event/I");
591  APDtrees->Branch("color", &color, "color/I");
592  APDtrees->Branch("adc", &adc, "adc[10]/D");
593  APDtrees->Branch("peakMatacq", &peak, "peak/D");
594  APDtrees->Branch("ttrigMatacq", &ttrig, "ttrig/D");
595  APDtrees->Branch("apdAmpl", &apdAmpl, "apdAmpl/D");
596  APDtrees->Branch("apdTime", &apdTime, "apdTime/D");
597  APDtrees->Branch("flag", &flag, "flag/I");
598  APDtrees->Branch("pn0", &pn0, "pn0/D");
599  APDtrees->Branch("pn1", &pn1, "pn1/D");
600 
601  APDtrees->SetBranchAddress("event", &event);
602  APDtrees->SetBranchAddress("color", &color);
603  APDtrees->SetBranchAddress("adc", adc);
604  APDtrees->SetBranchAddress("peakMatacq", &peak);
605  APDtrees->SetBranchAddress("ttrigMatacq", &ttrig);
606  APDtrees->SetBranchAddress("apdAmpl", &apdAmpl);
607  APDtrees->SetBranchAddress("apdTime", &apdTime);
608  APDtrees->SetBranchAddress("flag", &flag);
609  APDtrees->SetBranchAddress("pn0", &pn0);
610  APDtrees->SetBranchAddress("pn1", &pn1);
611 
612  // Retrieve alpha and beta for APD amplitudes calculation
613 
614  TFile* alphaFile = new TFile(refalphabeta_.c_str());
615  TTree* alphaTree[2];
616 
617  Double_t alphaRun, betaRun;
618  int ietaRun, iphiRun, channelIDRun, towerIDRun, dccIDRun, flagRun;
619 
620  for (unsigned int i = 0; i < nCol; i++) {
621  stringstream name3;
622  name3 << "ABCol" << i;
623  alphaTree[i] = (TTree*)alphaFile->Get(name3.str().c_str());
624  alphaTree[i]->SetBranchStatus("*", false);
625  alphaTree[i]->SetBranchStatus("alpha", true);
626  alphaTree[i]->SetBranchStatus("beta", true);
627  alphaTree[i]->SetBranchStatus("iphi", true);
628  alphaTree[i]->SetBranchStatus("ieta", true);
629  alphaTree[i]->SetBranchStatus("dccID", true);
630  alphaTree[i]->SetBranchStatus("towerID", true);
631  alphaTree[i]->SetBranchStatus("channelID", true);
632  alphaTree[i]->SetBranchStatus("flag", true);
633 
634  alphaTree[i]->SetBranchAddress("alpha", &alphaRun);
635  alphaTree[i]->SetBranchAddress("beta", &betaRun);
636  alphaTree[i]->SetBranchAddress("iphi", &iphiRun);
637  alphaTree[i]->SetBranchAddress("ieta", &ietaRun);
638  alphaTree[i]->SetBranchAddress("dccID", &dccIDRun);
639  alphaTree[i]->SetBranchAddress("towerID", &towerIDRun);
640  alphaTree[i]->SetBranchAddress("channelID", &channelIDRun);
641  alphaTree[i]->SetBranchAddress("flag", &flagRun);
642  }
643 
645 
646  double chi2;
647 
648  for (unsigned int icol = 0; icol < nCol; icol++) {
649  IsThereDataADC[icol] = 1;
650  stringstream cut;
651  cut << "color==" << colors.at(icol);
652  if (ADCtrees->GetEntries(cut.str().c_str()) < 10)
653  IsThereDataADC[icol] = 0;
654  IsHeaderFilled[icol] = 0;
655  }
656 
657  // Define submodule and channel number inside the submodule (as Patrice)
658 
659  Long64_t nbytes = 0, nb = 0;
660  for (Long64_t jentry = 0; jentry < ADCtrees->GetEntriesFast(); jentry++) { // Loop on events
661  nb = ADCtrees->GetEntry(jentry);
662  nbytes += nb;
663 
664  int iCry = channelNumber;
665 
666  // get back color
667 
668  unsigned int iCol = 0;
669  for (unsigned int i = 0; i < nCol; i++) {
670  if (color == colors[i]) {
671  iCol = i;
672  i = colors.size();
673  }
674  }
675 
676  alphaTree[iCol]->GetEntry(iCry);
677 
678  flag = flagRun;
679  iphi = iphiRun;
680  ieta = ietaRun;
681  towerID = towerIDRun;
682  channelID = channelIDRun;
683  alpha = alphaRun;
684  beta = betaRun;
685 
686  if (IsHeaderFilled[iCol] == 0) {
687  header[iCol]->Fill();
688  IsHeaderFilled[iCol] = 1;
689  }
690  // Amplitude calculation
691 
692  apdAmpl = 0;
693  apdTime = 0;
694 
695  pslsfit->init(_nsamples, _firstsample, _lastsample, _niter, alphaRun, betaRun);
696  chi2 = pslsfit->doFit(&adc[0]);
697 
698  if (chi2 < 0. || chi2 == 102 || chi2 == 101) {
699  apdAmpl = 0;
700  apdTime = 0;
701 
702  } else {
703  apdAmpl = pslsfit->getAmpl();
704  apdTime = pslsfit->getTime();
705  }
706 
707  APDtrees->Fill();
708  }
709 
710  alphaFile->Close();
711 
712  ADCFile->Close();
713 
714  APDFile->Write();
715  APDFile->Close();
716 
717  // Remove unwanted files
718 
719  stringstream del;
720  del << "rm " << ADCfile;
721  system(del.str().c_str());
722 
723  edm::LogVerbatim("EcalPerEvtLaserAnalyzer")
724  << "\t+=+ .................................................. done +=+";
725  edm::LogVerbatim("EcalPerEvtLaserAnalyzer")
726  << "\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
727 }
Log< level::Info, true > LogVerbatim
float alpha
Definition: AMPTWrapper.h:105
assert(be >=bs)
virtual void init(int, int, int, int, double, double)
virtual double doFit(double *)
EcalLogicID towerID(EcalElectronicsId const &)

Member Data Documentation

const unsigned int EcalPerEvtLaserAnalyzer::_channel
private

Definition at line 84 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

const std::string EcalPerEvtLaserAnalyzer::_ecalPart
private

Definition at line 85 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

const int EcalPerEvtLaserAnalyzer::_fedid
private

Definition at line 82 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

const unsigned int EcalPerEvtLaserAnalyzer::_firstsample
private

Definition at line 73 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

const unsigned int EcalPerEvtLaserAnalyzer::_firstsamplePN
private

Definition at line 77 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_lastsample
private

Definition at line 74 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

const unsigned int EcalPerEvtLaserAnalyzer::_lastsamplePN
private

Definition at line 78 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_niter
private

Definition at line 81 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

const unsigned int EcalPerEvtLaserAnalyzer::_nsamples
private

Definition at line 71 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

const unsigned int EcalPerEvtLaserAnalyzer::_nsamplesPN
private

Definition at line 75 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_presample
private

Definition at line 72 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_presamplePN
private

Definition at line 76 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_timingcuthigh
private

Definition at line 80 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_timingcutlow
private

Definition at line 79 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const unsigned int EcalPerEvtLaserAnalyzer::_tower
private

Definition at line 83 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

double EcalPerEvtLaserAnalyzer::adc[10]
private

Definition at line 137 of file EcalPerEvtLaserAnalyzer.h.

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

std::string EcalPerEvtLaserAnalyzer::ADCfile
private

Definition at line 92 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob(), and endJob().

TFile* EcalPerEvtLaserAnalyzer::ADCFile
private

Definition at line 118 of file EcalPerEvtLaserAnalyzer.h.

Referenced by beginJob(), and endJob().

int EcalPerEvtLaserAnalyzer::adcG[10]
private

Definition at line 138 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

TTree* EcalPerEvtLaserAnalyzer::ADCtrees
private

Definition at line 119 of file EcalPerEvtLaserAnalyzer.h.

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

double EcalPerEvtLaserAnalyzer::apdAmpl
private

Definition at line 143 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

TFile* EcalPerEvtLaserAnalyzer::APDFile
private

Definition at line 121 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

double EcalPerEvtLaserAnalyzer::apdTime
private

Definition at line 144 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

TTree* EcalPerEvtLaserAnalyzer::APDtrees
private

Definition at line 123 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

int EcalPerEvtLaserAnalyzer::channelNumber
private

Definition at line 110 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

int EcalPerEvtLaserAnalyzer::colMat
private

Definition at line 130 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

int EcalPerEvtLaserAnalyzer::color
private
std::vector<int> EcalPerEvtLaserAnalyzer::colors
private

Definition at line 112 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

int EcalPerEvtLaserAnalyzer::dccID
private

Definition at line 106 of file EcalPerEvtLaserAnalyzer.h.

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

const std::string EcalPerEvtLaserAnalyzer::digiCollection_
private

Definition at line 59 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

const std::string EcalPerEvtLaserAnalyzer::digiPNCollection_
private

Definition at line 61 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const std::string EcalPerEvtLaserAnalyzer::digiProducer_
private

Definition at line 60 of file EcalPerEvtLaserAnalyzer.h.

Referenced by EcalPerEvtLaserAnalyzer().

int EcalPerEvtLaserAnalyzer::doesRefFileExist
private

Definition at line 125 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

edm::EDGetTokenT<EBDigiCollection> EcalPerEvtLaserAnalyzer::ebDigiToken_
private

Definition at line 64 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

edm::EDGetTokenT<EEDigiCollection> EcalPerEvtLaserAnalyzer::eeDigiToken_
private

Definition at line 65 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

int EcalPerEvtLaserAnalyzer::eta
private
int EcalPerEvtLaserAnalyzer::event
private
const std::string EcalPerEvtLaserAnalyzer::eventHeaderCollection_
private

Definition at line 57 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const std::string EcalPerEvtLaserAnalyzer::eventHeaderProducer_
private

Definition at line 58 of file EcalPerEvtLaserAnalyzer.h.

int EcalPerEvtLaserAnalyzer::evtMat
private

Definition at line 130 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

int EcalPerEvtLaserAnalyzer::fedID
private

Definition at line 107 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

TTree* EcalPerEvtLaserAnalyzer::header[2]
private

Definition at line 122 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

int EcalPerEvtLaserAnalyzer::iEvent
private

Definition at line 55 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

int EcalPerEvtLaserAnalyzer::IsFileCreated
private

Definition at line 100 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and beginJob().

int EcalPerEvtLaserAnalyzer::IsHeaderFilled[nColor]
private

Definition at line 127 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

int EcalPerEvtLaserAnalyzer::IsThereDataADC[nColor]
private

Definition at line 126 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

int EcalPerEvtLaserAnalyzer::lightside
private

Definition at line 108 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> EcalPerEvtLaserAnalyzer::mappingToken_
private

Definition at line 67 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

TFile* EcalPerEvtLaserAnalyzer::matacqFile
private

Definition at line 115 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

TTree* EcalPerEvtLaserAnalyzer::matacqTree
private

Definition at line 116 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

unsigned int EcalPerEvtLaserAnalyzer::nCrys
private

Definition at line 98 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and EcalPerEvtLaserAnalyzer().

double EcalPerEvtLaserAnalyzer::peak
private

Definition at line 129 of file EcalPerEvtLaserAnalyzer.h.

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

double EcalPerEvtLaserAnalyzer::peakMat
private

Definition at line 129 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

int EcalPerEvtLaserAnalyzer::phi
private
double EcalPerEvtLaserAnalyzer::pn[50]
private

Definition at line 142 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

double EcalPerEvtLaserAnalyzer::pn0
private

Definition at line 141 of file EcalPerEvtLaserAnalyzer.h.

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

double EcalPerEvtLaserAnalyzer::pn1
private

Definition at line 141 of file EcalPerEvtLaserAnalyzer.h.

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

double EcalPerEvtLaserAnalyzer::pnAmpl
private

Definition at line 145 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const edm::EDGetTokenT<EcalPnDiodeDigiCollection> EcalPerEvtLaserAnalyzer::pnDiodeDigiToken_
private

Definition at line 66 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const edm::EDGetTokenT<EcalRawDataCollection> EcalPerEvtLaserAnalyzer::rawDataToken_
private

Definition at line 63 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

const std::string EcalPerEvtLaserAnalyzer::refalphabeta_
private

Definition at line 88 of file EcalPerEvtLaserAnalyzer.h.

Referenced by endJob().

const std::string EcalPerEvtLaserAnalyzer::resdir_
private

Definition at line 87 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and beginJob().

std::string EcalPerEvtLaserAnalyzer::resfile
private

Definition at line 93 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze(), and endJob().

int EcalPerEvtLaserAnalyzer::runNum
private

Definition at line 105 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

int EcalPerEvtLaserAnalyzer::runType
private

Definition at line 104 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

double EcalPerEvtLaserAnalyzer::tt
private

Definition at line 139 of file EcalPerEvtLaserAnalyzer.h.

double EcalPerEvtLaserAnalyzer::ttMat
private

Definition at line 129 of file EcalPerEvtLaserAnalyzer.h.

Referenced by analyze().

double EcalPerEvtLaserAnalyzer::ttrig
private

Definition at line 140 of file EcalPerEvtLaserAnalyzer.h.

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