CMS 3D CMS Logo

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

#include <EcalMatacqAnalyzer.h>

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

Public Types

enum  VarCol { iBlue, iRed, nColor }
 
enum  VarSide { iSide0, iSide1, nSide }
 
- 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
 
 EcalMatacqAnalyzer (const edm::ParameterSet &iConfig)
 
void endJob () override
 
 ~EcalMatacqAnalyzer () override=default
 
- 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 double _cutwindow
 
const int _debug
 
const int _fedid
 
const unsigned int _highlev
 
const unsigned int _lowlev
 
const unsigned int _nevlasers
 
const unsigned int _noiseCut
 
const unsigned int _nsamplesaftmax
 
const unsigned int _nsamplesshape
 
const unsigned int _parabnaftmax
 
const unsigned int _parabnbefmax
 
const double _presample
 
const unsigned int _presampleshape
 
const unsigned int _slide
 
const unsigned int _thres
 
const unsigned int _timeaftmax
 
const unsigned int _timebefmax
 
double ampl
 
int color
 
std::vector< int > colors
 
int dccID
 
const edm::EDGetTokenT< EcalRawDataCollectiondccToken_
 
const std::string digiCollection_
 
const std::string digiProducer_
 
int event
 
const std::string eventHeaderCollection_
 
const std::string eventHeaderProducer_
 
int fedID
 
double fit
 
double fw20
 
double fw80
 
double fwhm
 
int iEvent
 
bool isThereMatacq
 
int laserEvents
 
int lightside
 
double matacq [2560]
 
int maxsamp
 
TTree * meanTree [nColor]
 
TMTQMTQ [nColor][nSide]
 
TTree * mtqShape
 
int nsamples
 
unsigned int nSides
 
std::string outfile
 
TFile * outFile
 
double peak
 
double ped
 
double pedsig
 
const edm::EDGetTokenT< EcalMatacqDigiCollectionpmatToken_
 
const std::string resdir_
 
int runNum
 
int runType
 
std::string sampfile
 
TFile * sampFile
 
double sigma
 
double sliding
 
int status
 
TTree * tree
 
double trise
 
double tt
 
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< Bconsumes (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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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 16 of file EcalMatacqAnalyzer.h.

Member Enumeration Documentation

◆ VarCol

◆ VarSide

Constructor & Destructor Documentation

◆ EcalMatacqAnalyzer()

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

Definition at line 34 of file EcalMatacqAnalyzer.cc.

36  :
37 
38  iEvent(0),
39 
40  // framework parameters with default values
41 
42  _presample(iConfig.getUntrackedParameter<double>("nPresamples", 6.7)),
43  _nsamplesaftmax(iConfig.getUntrackedParameter<unsigned int>("nSamplesAftMax", 80)),
44  _noiseCut(iConfig.getUntrackedParameter<unsigned int>("noiseCut", 7)),
45  _parabnbefmax(iConfig.getUntrackedParameter<unsigned int>("paraBeforeMax", 8)),
46  _parabnaftmax(iConfig.getUntrackedParameter<unsigned int>("paraAfterMax", 7)),
47  _thres(iConfig.getUntrackedParameter<unsigned int>("threshold", 10)),
48  _lowlev(iConfig.getUntrackedParameter<unsigned int>("lowLevel", 20)),
49  _highlev(iConfig.getUntrackedParameter<unsigned int>("highLevel", 80)),
50  _nevlasers(iConfig.getUntrackedParameter<unsigned int>("nEventLaser", 600)),
51  _timebefmax(iConfig.getUntrackedParameter<unsigned int>("timeBefMax", 100)),
52  _timeaftmax(iConfig.getUntrackedParameter<unsigned int>("timeAftMax", 250)),
53  _cutwindow(iConfig.getUntrackedParameter<double>("cutWindow", 0.1)),
54  _nsamplesshape(iConfig.getUntrackedParameter<unsigned int>("nSamplesShape", 250)),
55  _presampleshape(iConfig.getUntrackedParameter<unsigned int>("nPresamplesShape", 50)),
56  _slide(iConfig.getUntrackedParameter<unsigned int>("nSlide", 100)),
57  _fedid(iConfig.getUntrackedParameter<int>("fedID", -999)),
58  _debug(iConfig.getUntrackedParameter<int>("debug", 0)),
59  resdir_(iConfig.getUntrackedParameter<std::string>("resDir")),
60  digiCollection_(iConfig.getParameter<std::string>("digiCollection")),
61  digiProducer_(iConfig.getParameter<std::string>("digiProducer")),
62  eventHeaderCollection_(iConfig.getParameter<std::string>("eventHeaderCollection")),
63  eventHeaderProducer_(iConfig.getParameter<std::string>("eventHeaderProducer")),
64  pmatToken_(consumes<EcalMatacqDigiCollection>(edm::InputTag(digiProducer_, digiCollection_))),
65  dccToken_(consumes<EcalRawDataCollection>(edm::InputTag(eventHeaderProducer_, eventHeaderCollection_))),
66  nSides(NSIDES),
67  lightside(0),
68  runType(-1),
69  runNum(0),
70  event(0),
71  color(-1),
72  maxsamp(0),
73  nsamples(0),
74  tt(0)
75 
76 //========================================================================
77 {
78  //now do what ever initialization is needed
79 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const unsigned int _timeaftmax
const unsigned int _thres
#define NSIDES
const unsigned int _slide
const unsigned int _lowlev
const std::string digiCollection_
const unsigned int _presampleshape
const std::string resdir_
const std::string eventHeaderCollection_
T getUntrackedParameter(std::string const &, T const &) const
const unsigned int _nevlasers
const unsigned int _timebefmax
const std::string eventHeaderProducer_
const unsigned int _parabnbefmax
const edm::EDGetTokenT< EcalMatacqDigiCollection > pmatToken_
const std::string digiProducer_
const unsigned int _nsamplesaftmax
const unsigned int _nsamplesshape
const unsigned int _noiseCut
const edm::EDGetTokenT< EcalRawDataCollection > dccToken_
const unsigned int _highlev
const unsigned int _parabnaftmax

◆ ~EcalMatacqAnalyzer()

EcalMatacqAnalyzer::~EcalMatacqAnalyzer ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 126 of file EcalMatacqAnalyzer.cc.

References _debug, _fedid, EcalMatacqDigi::adcCount(), edm::SortedCollection< T, SORT >::begin(), color, dccID, dccToken_, digiCollection_, digiProducer_, MillePedeFileConverter_cfg::e, edm::SortedCollection< T, SORT >::end(), eventHeaderCollection_, eventHeaderProducer_, fedID, spr::find(), mps_fire::i, iEvent, caHitNtupletGeneratorKernels::if(), createfilelist::int, isThereMatacq, edm::HandleBase::isValid(), EcalDCCHeaderBlock::LASER_DELAY_SCAN, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_POWER_SCAN, EcalDCCHeaderBlock::LASER_STD, laserEvents, lightside, matacq, SiStripPI::max, maxsamp, nsamples, pmatToken_, edm::Handle< T >::product(), runNum, runType, EcalMatacqDigi::size(), EcalMatacqDigi::tTrig(), and EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength.

126  {
127  //========================================================================
128 
129  ++iEvent;
130 
131  if (_debug == 1)
132  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- Entering Analyze -- event= " << iEvent;
133 
134  // retrieving MATACQ :
135  const edm::Handle<EcalMatacqDigiCollection>& pmatacqDigi = e.getHandle(pmatToken_);
136  const EcalMatacqDigiCollection* matacqDigi = (pmatacqDigi.isValid()) ? pmatacqDigi.product() : nullptr;
137  if (pmatacqDigi.isValid()) {
138  if (_debug == 1)
139  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- Matacq Digis Found -- ";
140  } else {
141  edm::LogError("EcalMatacqAnalyzzer") << "Error! can't get the product EcalMatacqDigi producer:"
142  << digiProducer_.c_str() << " collection:" << digiCollection_.c_str();
143  return;
144  }
145 
146  // retrieving DCC header
147 
148  const edm::Handle<EcalRawDataCollection>& pDCCHeader = e.getHandle(dccToken_);
149  const EcalRawDataCollection* DCCHeader = (pDCCHeader.isValid()) ? pDCCHeader.product() : nullptr;
150  if (!pDCCHeader.isValid()) {
151  edm::LogError("EcalMatacqAnalyzzer") << "Error! can't get the product EcalRawData producer:"
152  << eventHeaderProducer_.c_str()
153  << " collection:" << eventHeaderCollection_.c_str();
154  return;
155  }
156 
157  // ====================================
158  // Decode Basic DCCHeader Information
159  // ====================================
160 
161  if (_debug == 1)
162  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- Before header -- ";
163 
164  for (EcalRawDataCollection::const_iterator headerItr = DCCHeader->begin(); headerItr != DCCHeader->end();
165  ++headerItr) {
166  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
167  color = (int)settings.wavelength;
168  if (color < 0)
169  return;
170 
171  // Get run type and run number
172 
173  int fed = headerItr->fedId();
174 
175  if (fed != _fedid && _fedid != -999)
176  continue;
177 
178  runType = headerItr->getRunType();
179  runNum = headerItr->getRunNumber();
180  event = headerItr->getLV1();
181 
182  if (_debug == 1)
183  edm::LogVerbatim("EcalMatacqAnalyzzer")
184  << "-- debug test -- runtype:" << runType << " event:" << event << " runNum:" << runNum;
185 
186  dccID = headerItr->getDccInTCCCommand();
187  fedID = headerItr->fedId();
188  lightside = headerItr->getRtHalf();
189 
190  //assert (lightside<2 && lightside>=0);
191 
192  if (lightside != 1 && lightside != 0) {
193  edm::LogVerbatim("EcalMatacqAnalyzzer") << "Unexpected lightside: " << lightside << " for event " << iEvent;
194  return;
195  }
196  if (_debug == 1) {
197  edm::LogVerbatim("EcalMatacqAnalyzzer")
198  << "-- debug test -- Inside header before fed cut -- color=" << color << ", dcc=" << dccID
199  << ", fed=" << fedID << ", lightside=" << lightside << ", runType=" << runType;
200  }
201 
202  // take event only if the fed corresponds to the DCC in TCC
203  if (600 + dccID != fedID)
204  continue;
205 
206  if (_debug == 1) {
207  edm::LogVerbatim("EcalMatacqAnalyzzer")
208  << "-- debug test -- Inside header after fed cut -- color=" << color << ", dcc=" << dccID << ", fed=" << fedID
209  << ", lightside=" << lightside << ", runType=" << runType;
210  }
211 
212  // Cut on runType
213 
216  return;
217 
218  std::vector<int>::iterator iter = find(colors.begin(), colors.end(), color);
219  if (iter == colors.end()) {
220  colors.push_back(color);
221  edm::LogVerbatim("EcalMatacqAnalyzzer") << " new color found " << color << " " << colors.size();
222  }
223  }
224 
225  if (_debug == 1)
226  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- Before digis -- Event:" << iEvent;
227 
228  // Count laser events
229  laserEvents++;
230 
231  // ===========================
232  // Decode Matacq Information
233  // ===========================
234 
235  int iCh = 0;
236  double max = 0;
237 
238  for (EcalMatacqDigiCollection::const_iterator it = matacqDigi->begin(); it != matacqDigi->end();
239  ++it) { // Loop on matacq channel
240 
241  //
242  const EcalMatacqDigi& digis = *it;
243 
244  //if(digis.size()==0 || iCh>=N_channels) continue;
245  if (_debug == 1) {
246  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- Inside digis -- digi size=" << digis.size();
247  }
248 
249  if (digis.size() == 0)
250  continue;
251  else
252  isThereMatacq = true;
253 
254  max = 0;
255  maxsamp = 0;
256  nsamples = digis.size();
257  tt = digis.tTrig();
258 
259  for (int i = 0; i < digis.size(); ++i) { // Loop on matacq samples
260  matacq[i] = -digis.adcCount(i);
261  if (matacq[i] > max) {
262  max = matacq[i];
263  maxsamp = i;
264  }
265  }
266  if (_debug == 1) {
267  edm::LogVerbatim("EcalMatacqAnalyzzer")
268  << "-- debug test -- Inside digis -- nsamples=" << nsamples << ", max=" << max;
269  }
270 
271  iCh++;
272  }
273 
274  if (_debug == 1)
275  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- After digis -- Event: " << iEvent;
276  tree->Fill();
277 
278 } // analyze
Log< level::Info, true > LogVerbatim
const std::string digiCollection_
T const * product() const
Definition: Handle.h:70
std::vector< T >::const_iterator const_iterator
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
float adcCount(const int &i) const
const std::string eventHeaderCollection_
Definition: TTTypes.h:54
const_iterator begin() const
float tTrig() const
const_iterator end() const
const std::string eventHeaderProducer_
const edm::EDGetTokenT< EcalMatacqDigiCollection > pmatToken_
const std::string digiProducer_
bool isValid() const
Definition: HandleBase.h:70
Definition: colors.py:1
int size() const
Definition: tree.py:1
const edm::EDGetTokenT< EcalRawDataCollection > dccToken_

◆ beginJob()

void EcalMatacqAnalyzer::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 82 of file EcalMatacqAnalyzer.cc.

References color, isThereMatacq, laserEvents, lightside, matacq, maxsamp, nsamples, outfile, resdir_, sampfile, and sampFile.

82  {
83  //========================================================================
84 
85  // Define temporary file name
86 
87  sampfile = resdir_;
88  sampfile += "/TmpTreeMatacqAnalyzer.root";
89 
90  sampFile = new TFile(sampfile.c_str(), "RECREATE");
91 
92  // declaration of the tree to fill
93 
94  tree = new TTree("MatacqTree", "MatacqTree");
95 
96  //List of branches
97 
98  tree->Branch("event", &event, "event/I");
99  tree->Branch("color", &color, "color/I");
100  tree->Branch("matacq", &matacq, "matacq[2560]/D");
101  tree->Branch("nsamples", &nsamples, "nsamples/I");
102  tree->Branch("maxsamp", &maxsamp, "maxsamp/I");
103  tree->Branch("tt", &tt, "tt/D");
104  tree->Branch("lightside", &lightside, "lightside/I");
105 
106  tree->SetBranchAddress("event", &event);
107  tree->SetBranchAddress("color", &color);
108  tree->SetBranchAddress("matacq", matacq);
109  tree->SetBranchAddress("nsamples", &nsamples);
110  tree->SetBranchAddress("maxsamp", &maxsamp);
111  tree->SetBranchAddress("tt", &tt);
112  tree->SetBranchAddress("lightside", &lightside);
113 
114  // Define output results files' names
115 
116  std::stringstream namefile;
117  namefile << resdir_ << "/MATACQ.root";
118  outfile = namefile.str();
119 
120  // Laser events counter
121  laserEvents = 0;
122  isThereMatacq = false;
123 }
const std::string resdir_
Definition: TTTypes.h:54
Definition: tree.py:1
Definition: event.py:1

◆ endJob()

void EcalMatacqAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 281 of file EcalMatacqAnalyzer.cc.

References _cutwindow, _debug, _highlev, _lowlev, _nevlasers, _noiseCut, _nsamplesaftmax, _nsamplesshape, _parabnaftmax, _parabnbefmax, _presample, _presampleshape, _slide, _thres, _timeaftmax, _timebefmax, a0, testProducerWithPsetDescEmpty_cfi::a2, ampl, cms::cuda::assert(), color, TMatacq::compute_trise(), TMatacq::doFit(), TMatacq::findPeak(), fw20, fw80, fwhm, TMTQ::get(), TMatacq::getAmpl(), TMatacq::getBaseLine(), TMatacq::getFwhm(), TMatacq::getsigBaseLine(), TMatacq::getsigTimpeak(), TMatacq::getSlide(), TMatacq::getTimax(), TMatacq::getTimpeak(), TMatacq::getTrise(), TMatacq::getWidth20(), TMatacq::getWidth80(), mps_fire::i, TMTQ::iAmpl, TMTQ::iFit, TMTQ::iFw20, TMTQ::iFw80, TMTQ::iFwhm, createfilelist::int, TMTQ::iPeak, TMTQ::iPed, TMTQ::iPedsig, TMTQ::iSigma, TMTQ::iSlide, isThereMatacq, TMTQ::iTrise, lightside, matacq, maxsamp, meanTree, MTQ, mtqShape, nColor, TMTQ::nOutVar, nsamples, nSide, nSides, outfile, outFile, peak, ped, pedsig, TMatacq::rawPulseAnalysis(), sampfile, sampFile, sigma, sliding, status, ctpps_dqm_sourceclient-live_cfg::test, trise, tt, ttrig, and heppy_batch::val.

Referenced by o2olib.O2ORunMgr::executeJob().

281  {
282  // Don't do anything if there is no events
283  if (!isThereMatacq) {
284  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
285  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\t+=+ WARNING! NO MATACQ +=+";
286  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
287 
288  // Remove temporary file
289  FILE* test;
290  test = fopen(sampfile.c_str(), "r");
291  if (test) {
292  std::stringstream del2;
293  del2 << "rm " << sampfile;
294  system(del2.str().c_str());
295  }
296  return;
297  }
298 
299  assert(colors.size() <= nColor);
300  unsigned int nCol = colors.size();
301 
302  for (unsigned int iCol = 0; iCol < nCol; iCol++) {
303  for (unsigned int iSide = 0; iSide < nSide; iSide++) {
304  MTQ[iCol][iSide] = new TMTQ();
305  }
306  }
307 
308  outFile = new TFile(outfile.c_str(), "RECREATE");
309 
310  TProfile* shapeMat = new TProfile("shapeLaser", "shapeLaser", _nsamplesshape, -0.5, double(_nsamplesshape) - 0.5);
311  TProfile* shapeMatTmp = new TProfile(
312  "shapeLaserTmp", "shapeLaserTmp", _timeaftmax + _timebefmax, -0.5, double(_timeaftmax + _timebefmax) - 0.5);
313 
314  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
315  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\t+=+ Analyzing MATACQ data +=+";
316 
317  //
318  // create output ntuple
319  //
320 
321  mtqShape = new TTree("MatacqShape", "MatacqShape");
322 
323  // list of branches
324  // keep Patrice's notations
325 
326  mtqShape->Branch("event", &event, "event/I");
327  mtqShape->Branch("color", &color, "color/I");
328  mtqShape->Branch("status", &status, "status/I");
329  mtqShape->Branch("peak", &peak, "peak/D");
330  mtqShape->Branch("sigma", &sigma, "sigma/D");
331  mtqShape->Branch("fit", &fit, "fit/D");
332  mtqShape->Branch("ampl", &ampl, "ampl/D");
333  mtqShape->Branch("trise", &trise, "trise/D");
334  mtqShape->Branch("fwhm", &fwhm, "fwhm/D");
335  mtqShape->Branch("fw20", &fw20, "fw20/D");
336  mtqShape->Branch("fw80", &fw80, "fw80/D");
337  mtqShape->Branch("ped", &ped, "ped/D");
338  mtqShape->Branch("pedsig", &pedsig, "pedsig/D");
339  mtqShape->Branch("ttrig", &ttrig, "ttrig/D");
340  mtqShape->Branch("sliding", &sliding, "sliding/D");
341 
342  mtqShape->SetBranchAddress("event", &event);
343  mtqShape->SetBranchAddress("color", &color);
344  mtqShape->SetBranchAddress("status", &status);
345  mtqShape->SetBranchAddress("peak", &peak);
346  mtqShape->SetBranchAddress("sigma", &sigma);
347  mtqShape->SetBranchAddress("fit", &fit);
348  mtqShape->SetBranchAddress("ampl", &ampl);
349  mtqShape->SetBranchAddress("fwhm", &fwhm);
350  mtqShape->SetBranchAddress("fw20", &fw20);
351  mtqShape->SetBranchAddress("fw80", &fw80);
352  mtqShape->SetBranchAddress("trise", &trise);
353  mtqShape->SetBranchAddress("ped", &ped);
354  mtqShape->SetBranchAddress("pedsig", &pedsig);
355  mtqShape->SetBranchAddress("ttrig", &ttrig);
356  mtqShape->SetBranchAddress("sliding", &sliding);
357 
358  unsigned int endsample;
359  unsigned int presample;
360 
361  // loop over the entries of the tree
362  TChain* fChain = (TChain*)tree;
363  Long64_t nentries = fChain->GetEntriesFast();
364 
365  for (Long64_t jentry = 0; jentry < nentries; jentry++) {
366  // load the event
367  Long64_t ientry = fChain->LoadTree(jentry);
368  if (ientry < 0)
369  break;
370  fChain->GetEntry(jentry);
371 
372  status = 0;
373  peak = -1;
374  sigma = 0;
375  fit = -1;
376  ampl = -1;
377  trise = -1;
378  ttrig = tt;
379  fwhm = 0;
380  fw20 = 0;
381  fw80 = 0;
382  ped = 0;
383  pedsig = 0;
384  sliding = 0;
385 
386  if (_debug == 1)
387  edm::LogVerbatim("EcalMatacqAnalyzzer")
388  << "-- debug test -- inside loop 1 -- jentry:" << jentry << " over nentries=" << nentries;
389 
390  // create the object for Matacq data analysis
391 
392  endsample = maxsamp + _nsamplesaftmax;
393  presample = int(_presample * nsamples / 100.);
394  TMatacq* mtq = new TMatacq(nsamples,
395  presample,
396  endsample,
397  _noiseCut,
400  _thres,
401  _lowlev,
402  _highlev,
403  _nevlasers,
404  _slide);
405 
406  if (_debug == 1)
407  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 2 -- ";
408 
409  // analyse the Matacq data
410  if (mtq->rawPulseAnalysis(nsamples, &matacq[0]) == 0) {
411  status = 1;
412  ped = mtq->getBaseLine();
413  pedsig = mtq->getsigBaseLine();
414 
415  if (_debug == 1)
416  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 3 -- ped:" << ped;
417  if (mtq->findPeak() == 0) {
418  peak = mtq->getTimpeak();
419  sigma = mtq->getsigTimpeak();
420  }
421  if (_debug == 1)
422  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 4 -- peak:" << peak;
423  if (mtq->doFit() == 0) {
424  fit = mtq->getTimax();
425  ampl = mtq->getAmpl();
426  fwhm = mtq->getFwhm();
427  fw20 = mtq->getWidth20();
428  fw80 = mtq->getWidth80();
429  sliding = mtq->getSlide();
430  }
431  if (_debug == 1)
432  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 4 -- ampl:" << ampl;
433  if (mtq->compute_trise() == 0) {
434  trise = mtq->getTrise();
435  }
436  if (_debug == 1)
437  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 5 -- trise:" << trise;
438  }
439 
440  if (_debug == 1)
441  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 6 -- status:" << status;
442 
443  if (status == 1 && mtq->findPeak() == 0) {
444  int firstS = int(peak - double(_timebefmax));
445  int lastS = int(peak + double(_timeaftmax));
446 
447  // Fill histo if there are enough samples
448  if (_debug == 1)
449  edm::LogVerbatim("EcalMatacqAnalyzzer")
450  << "-- debug test -- inside loop 7 -- firstS:" << firstS << ", nsamples:" << nsamples;
451 
452  if (firstS >= 0 && lastS <= nsamples) {
453  for (int i = firstS; i < lastS; i++) {
454  shapeMatTmp->Fill(double(i) - firstS, matacq[i]);
455  }
456 
457  } else { // else extrapolate
458 
459  int firstSBis;
460 
461  if (firstS < 0) { // fill first bins with 0
462 
463  double thisped;
464  thisped = (matacq[0] + matacq[1] + matacq[2] + matacq[4] + matacq[5]) / 5.0;
465 
466  for (int i = firstS; i < 0; i++) {
467  shapeMatTmp->Fill(double(i) - firstS, thisped);
468  }
469  firstSBis = 0;
470 
471  } else {
472  firstSBis = firstS;
473  }
474 
475  if (lastS > nsamples) {
476  for (int i = firstSBis; i < int(nsamples); i++) {
477  shapeMatTmp->Fill(double(i) - firstS, matacq[i]);
478  }
479 
480  //extrapolate with expo tail
481 
482  double expb = 0.998;
483  double matacqval = expb * matacq[nsamples - 1];
484 
485  for (int i = nsamples; i < lastS; i++) {
486  shapeMatTmp->Fill(double(i) - firstS, matacqval);
487  matacqval *= expb;
488  }
489 
490  } else {
491  for (int i = firstSBis; i < lastS; i++) {
492  shapeMatTmp->Fill(double(i) - firstS, matacq[i]);
493  }
494  }
495  }
496  }
497  if (_debug == 1)
498  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 8";
499 
500  // get back color
501 
502  int iCol = nCol;
503  for (unsigned int i = 0; i < nCol; i++) {
504  if (color == colors[i]) {
505  iCol = i;
506  i = nCol;
507  }
508  }
509  if (_debug == 1)
510  edm::LogVerbatim("EcalMatacqAnalyzzer")
511  << "-- debug test -- inside loop 8bis color:" << color << " iCol:" << iCol << " nCol:" << nCol;
512 
513  // fill TMTQ
514 
515  if (status == 1 && mtq->findPeak() == 0 && mtq->doFit() == 0 && mtq->compute_trise() == 0)
516  MTQ[iCol][lightside]->addEntry(peak, sigma, fit, ampl, trise, fwhm, fw20, fw80, ped, pedsig, sliding);
517 
518  // fill the output tree
519 
520  if (_debug == 1)
521  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside loop 9";
522  mtqShape->Fill();
523 
524  // clean up
525  delete mtq;
526  }
527 
528  if (_debug == 1)
529  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- after loop ";
530  sampFile->Close();
531 
532  double Peak[6], Sigma[6], Fit[6], Ampl[6], Trise[6], Fwhm[6], Fw20[6], Fw80[6], Ped[6], Pedsig[6], Sliding[6];
533  int Side;
534 
535  for (unsigned int iColor = 0; iColor < nCol; iColor++) {
536  std::stringstream nametree;
537  nametree << "MatacqCol" << colors[iColor];
538  meanTree[iColor] = new TTree(nametree.str().c_str(), nametree.str().c_str());
539  meanTree[iColor]->Branch("side", &Side, "Side/I");
540  meanTree[iColor]->Branch("peak", &Peak, "Peak[6]/D");
541  meanTree[iColor]->Branch("sigma", &Sigma, "Sigma[6]/D");
542  meanTree[iColor]->Branch("fit", &Fit, "Fit[6]/D");
543  meanTree[iColor]->Branch("ampl", &Ampl, "Ampl[6]/D");
544  meanTree[iColor]->Branch("trise", &Trise, "Trise[6]/D");
545  meanTree[iColor]->Branch("fwhm", &Fwhm, "Fwhm[6]/D");
546  meanTree[iColor]->Branch("fw20", &Fw20, "Fw20[6]/D");
547  meanTree[iColor]->Branch("fw80", &Fw80, "Fw80[6]/D");
548  meanTree[iColor]->Branch("ped", &Ped, "Ped[6]/D");
549  meanTree[iColor]->Branch("pedsig", &Pedsig, "Pedsig[6]/D");
550  meanTree[iColor]->Branch("sliding", &Sliding, "Sliding[6]/D");
551 
552  meanTree[iColor]->SetBranchAddress("side", &Side);
553  meanTree[iColor]->SetBranchAddress("peak", Peak);
554  meanTree[iColor]->SetBranchAddress("sigma", Sigma);
555  meanTree[iColor]->SetBranchAddress("fit", Fit);
556  meanTree[iColor]->SetBranchAddress("ampl", Ampl);
557  meanTree[iColor]->SetBranchAddress("fwhm", Fwhm);
558  meanTree[iColor]->SetBranchAddress("fw20", Fw20);
559  meanTree[iColor]->SetBranchAddress("fw80", Fw80);
560  meanTree[iColor]->SetBranchAddress("trise", Trise);
561  meanTree[iColor]->SetBranchAddress("ped", Ped);
562  meanTree[iColor]->SetBranchAddress("pedsig", Pedsig);
563  meanTree[iColor]->SetBranchAddress("sliding", Sliding);
564  }
565 
566  for (unsigned int iCol = 0; iCol < nCol; iCol++) {
567  for (unsigned int iSide = 0; iSide < nSides; iSide++) {
568  Side = iSide;
569  std::vector<double> val[TMTQ::nOutVar];
570 
571  for (int iVar = 0; iVar < TMTQ::nOutVar; iVar++) {
572  val[iVar] = MTQ[iCol][iSide]->get(iVar);
573 
574  for (unsigned int i = 0; i < val[iVar].size(); i++) {
575  switch (iVar) {
576  case TMTQ::iPeak:
577  Peak[i] = val[iVar].at(i);
578  break;
579  case TMTQ::iSigma:
580  Sigma[i] = val[iVar].at(i);
581  break;
582  case TMTQ::iFit:
583  Fit[i] = val[iVar].at(i);
584  break;
585  case TMTQ::iAmpl:
586  Ampl[i] = val[iVar].at(i);
587  break;
588  case TMTQ::iFwhm:
589  Fwhm[i] = val[iVar].at(i);
590  break;
591  case TMTQ::iFw20:
592  Fw20[i] = val[iVar].at(i);
593  break;
594  case TMTQ::iFw80:
595  Fw80[i] = val[iVar].at(i);
596  break;
597  case TMTQ::iTrise:
598  Trise[i] = val[iVar].at(i);
599  break;
600  case TMTQ::iPed:
601  Ped[i] = val[iVar].at(i);
602  break;
603  case TMTQ::iPedsig:
604  Pedsig[i] = val[iVar].at(i);
605  break;
606  case TMTQ::iSlide:
607  Sliding[i] = val[iVar].at(i);
608  break;
609  }
610  }
611  }
612  meanTree[iCol]->Fill();
613  if (_debug == 1)
614  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- inside final loop ";
615  }
616  }
617 
618  // Calculate maximum with pol 2
619 
620  int im = shapeMatTmp->GetMaximumBin();
621  double q1 = shapeMatTmp->GetBinContent(im - 1);
622  double q2 = shapeMatTmp->GetBinContent(im);
623  double q3 = shapeMatTmp->GetBinContent(im + 1);
624 
625  double a2 = (q3 + q1) / 2.0 - q2;
626  double a1 = q2 - q1 + a2 * (1 - 2 * im);
627  double a0 = q2 - a1 * im - a2 * im * im;
628 
629  double am = a0 - a1 * a1 / (4 * a2);
630 
631  // Compute pedestal
632 
633  double bl = 0;
634  for (unsigned int i = 1; i < _presampleshape + 1; i++) {
635  bl += shapeMatTmp->GetBinContent(i);
636  }
637  bl /= _presampleshape;
638 
639  // Compute and save laser shape
640 
641  if (_debug == 1)
642  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- computing shape ";
643 
644  int firstBin = 0;
645  double height = 0.0;
646 
647  for (unsigned int i = _timebefmax; i > _presampleshape; i--) {
648  height = shapeMatTmp->GetBinContent(i) - bl;
649 
650  if (height < (am - bl) * _cutwindow) {
651  firstBin = i;
652  i = _presampleshape;
653  }
654  }
655 
656  unsigned int lastBin = firstBin + _nsamplesshape;
657 
658  for (unsigned int i = firstBin; i < lastBin; i++) {
659  shapeMat->Fill(i - firstBin, shapeMatTmp->GetBinContent(i) - bl);
660  }
661 
662  mtqShape->Write();
663  for (unsigned int iColor = 0; iColor < nCol; iColor++) {
664  meanTree[iColor]->Write();
665  }
666  if (_debug == 1)
667  edm::LogVerbatim("EcalMatacqAnalyzzer") << "-- debug test -- writing ";
668  shapeMat->Write();
669 
670  // close the output file
671  outFile->Close();
672 
673  // Remove temporary file
674  FILE* test;
675  test = fopen(sampfile.c_str(), "r");
676  if (test) {
677  std::stringstream del2;
678  del2 << "rm " << sampfile;
679  system(del2.str().c_str());
680  }
681 
682  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\t+=+ .................... done +=+";
683  edm::LogVerbatim("EcalMatacqAnalyzzer") << "\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+";
684 }
double getWidth80()
Definition: TMatacq.h:74
Log< level::Info, true > LogVerbatim
Definition: TMTQ.h:8
const unsigned int _timeaftmax
const unsigned int _thres
const unsigned int _slide
const unsigned int _lowlev
const unsigned int _presampleshape
int compute_trise()
Definition: TMatacq.cc:347
double getTimax()
Definition: TMatacq.h:69
TMTQ * MTQ[nColor][nSide]
assert(be >=bs)
double getBaseLine()
Definition: TMatacq.h:62
double getsigBaseLine()
Definition: TMatacq.h:63
double getFwhm()
Definition: TMatacq.h:72
TTree * meanTree[nColor]
double getsigTimpeak()
Definition: TMatacq.h:66
const unsigned int _nevlasers
double getSlide()
Definition: TMatacq.h:75
Definition: Fit.h:32
std::vector< double > get(int)
Definition: TMTQ.cc:69
int doFit()
Definition: TMatacq.cc:213
double getAmpl()
Definition: TMatacq.h:68
int rawPulseAnalysis(Int_t, Double_t *)
Definition: TMatacq.cc:57
const unsigned int _timebefmax
double getWidth20()
Definition: TMatacq.h:73
int findPeak()
Definition: TMatacq.cc:136
const unsigned int _parabnbefmax
static constexpr float a0
double getTrise()
Definition: TMatacq.h:71
const unsigned int _nsamplesaftmax
Definition: colors.py:1
Definition: TMatacq.h:6
const unsigned int _nsamplesshape
Definition: tree.py:1
const unsigned int _noiseCut
const unsigned int _highlev
const unsigned int _parabnaftmax
Definition: event.py:1
double getTimpeak()
Definition: TMatacq.h:65

Member Data Documentation

◆ _cutwindow

const double EcalMatacqAnalyzer::_cutwindow
private

Definition at line 46 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _debug

const int EcalMatacqAnalyzer::_debug
private

◆ _fedid

const int EcalMatacqAnalyzer::_fedid
private

Definition at line 50 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ _highlev

const unsigned int EcalMatacqAnalyzer::_highlev
private

Definition at line 42 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _lowlev

const unsigned int EcalMatacqAnalyzer::_lowlev
private

Definition at line 41 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _nevlasers

const unsigned int EcalMatacqAnalyzer::_nevlasers
private

Definition at line 43 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _noiseCut

const unsigned int EcalMatacqAnalyzer::_noiseCut
private

Definition at line 37 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _nsamplesaftmax

const unsigned int EcalMatacqAnalyzer::_nsamplesaftmax
private

Definition at line 36 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _nsamplesshape

const unsigned int EcalMatacqAnalyzer::_nsamplesshape
private

Definition at line 47 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _parabnaftmax

const unsigned int EcalMatacqAnalyzer::_parabnaftmax
private

Definition at line 39 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _parabnbefmax

const unsigned int EcalMatacqAnalyzer::_parabnbefmax
private

Definition at line 38 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _presample

const double EcalMatacqAnalyzer::_presample
private

Definition at line 35 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _presampleshape

const unsigned int EcalMatacqAnalyzer::_presampleshape
private

Definition at line 48 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _slide

const unsigned int EcalMatacqAnalyzer::_slide
private

Definition at line 49 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _thres

const unsigned int EcalMatacqAnalyzer::_thres
private

Definition at line 40 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _timeaftmax

const unsigned int EcalMatacqAnalyzer::_timeaftmax
private

Definition at line 45 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ _timebefmax

const unsigned int EcalMatacqAnalyzer::_timebefmax
private

Definition at line 44 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ ampl

double EcalMatacqAnalyzer::ampl
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ color

int EcalMatacqAnalyzer::color
private

◆ colors

std::vector<int> EcalMatacqAnalyzer::colors
private

Definition at line 92 of file EcalMatacqAnalyzer.h.

◆ dccID

int EcalMatacqAnalyzer::dccID
private

Definition at line 70 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ dccToken_

const edm::EDGetTokenT<EcalRawDataCollection> EcalMatacqAnalyzer::dccToken_
private

Definition at line 59 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ digiCollection_

const std::string EcalMatacqAnalyzer::digiCollection_
private

Definition at line 54 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ digiProducer_

const std::string EcalMatacqAnalyzer::digiProducer_
private

Definition at line 55 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ event

int EcalMatacqAnalyzer::event
private

◆ eventHeaderCollection_

const std::string EcalMatacqAnalyzer::eventHeaderCollection_
private

Definition at line 56 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ eventHeaderProducer_

const std::string EcalMatacqAnalyzer::eventHeaderProducer_
private

Definition at line 57 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ fedID

int EcalMatacqAnalyzer::fedID
private

Definition at line 71 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ fit

double EcalMatacqAnalyzer::fit
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by trackingPlots.Iteration::modules().

◆ fw20

double EcalMatacqAnalyzer::fw20
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ fw80

double EcalMatacqAnalyzer::fw80
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ fwhm

double EcalMatacqAnalyzer::fwhm
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ iEvent

int EcalMatacqAnalyzer::iEvent
private

Definition at line 29 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ isThereMatacq

bool EcalMatacqAnalyzer::isThereMatacq
private

Definition at line 75 of file EcalMatacqAnalyzer.h.

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

◆ laserEvents

int EcalMatacqAnalyzer::laserEvents
private

Definition at line 74 of file EcalMatacqAnalyzer.h.

Referenced by analyze(), and beginJob().

◆ lightside

int EcalMatacqAnalyzer::lightside
private

Definition at line 67 of file EcalMatacqAnalyzer.h.

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

◆ matacq

double EcalMatacqAnalyzer::matacq[2560]
private

Definition at line 81 of file EcalMatacqAnalyzer.h.

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

◆ maxsamp

int EcalMatacqAnalyzer::maxsamp
private

Definition at line 82 of file EcalMatacqAnalyzer.h.

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

◆ meanTree

TTree* EcalMatacqAnalyzer::meanTree[nColor]
private

Definition at line 90 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ MTQ

TMTQ* EcalMatacqAnalyzer::MTQ[nColor][nSide]
private

Definition at line 89 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ mtqShape

TTree* EcalMatacqAnalyzer::mtqShape
private

Definition at line 97 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ nsamples

int EcalMatacqAnalyzer::nsamples
private

Definition at line 83 of file EcalMatacqAnalyzer.h.

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

◆ nSides

unsigned int EcalMatacqAnalyzer::nSides
private

Definition at line 66 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ outfile

std::string EcalMatacqAnalyzer::outfile
private

Definition at line 61 of file EcalMatacqAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ outFile

TFile* EcalMatacqAnalyzer::outFile
private

◆ peak

double EcalMatacqAnalyzer::peak
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ ped

double EcalMatacqAnalyzer::ped
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ pedsig

double EcalMatacqAnalyzer::pedsig
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ pmatToken_

const edm::EDGetTokenT<EcalMatacqDigiCollection> EcalMatacqAnalyzer::pmatToken_
private

Definition at line 58 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ resdir_

const std::string EcalMatacqAnalyzer::resdir_
private

Definition at line 53 of file EcalMatacqAnalyzer.h.

Referenced by beginJob().

◆ runNum

int EcalMatacqAnalyzer::runNum
private

Definition at line 69 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ runType

int EcalMatacqAnalyzer::runType
private

Definition at line 68 of file EcalMatacqAnalyzer.h.

Referenced by analyze().

◆ sampfile

std::string EcalMatacqAnalyzer::sampfile
private

Definition at line 62 of file EcalMatacqAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ sampFile

TFile* EcalMatacqAnalyzer::sampFile
private

Definition at line 86 of file EcalMatacqAnalyzer.h.

Referenced by beginJob(), and endJob().

◆ sigma

double EcalMatacqAnalyzer::sigma
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ sliding

double EcalMatacqAnalyzer::sliding
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ status

int EcalMatacqAnalyzer::status
private

◆ tree

TTree* EcalMatacqAnalyzer::tree
private

◆ trise

double EcalMatacqAnalyzer::trise
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ tt

double EcalMatacqAnalyzer::tt
private

Definition at line 84 of file EcalMatacqAnalyzer.h.

Referenced by endJob().

◆ ttrig

double EcalMatacqAnalyzer::ttrig
private

Definition at line 96 of file EcalMatacqAnalyzer.h.

Referenced by endJob().