CMS 3D CMS Logo

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

#include <CalibCalorimetry/EcalLaserAnalyzerYousi/src/EcalLaserAnalyzerYousi.cc>

Inheritance diagram for EcalLaserAnalyzerYousi:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EcalLaserAnalyzerYousi (const edm::ParameterSet &)
 
 ~EcalLaserAnalyzerYousi () 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
 
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 Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 

Private Attributes

TH2F * APD
 
TH1F * APD_LM [9]
 
TH2F * APD_RMS
 
TH2F * APDPN
 
TH2F * APDPN_C
 
TH2F * APDPN_J
 
TH2F * APDPN_J_H [2]
 
TH2F * APDPN_J_LM [9]
 
TH1F * APDPN_LM [9]
 
TH2F * APDPN_RMS
 
TH1F * C_APD [1700]
 
TH1F * C_APDPN [1700]
 
TH2F * C_APDPN_J [1700]
 
TH1F * C_J [1700]
 
TH1F * C_PN [1700]
 
TNtuple * C_Tree [1700]
 
TH2F * Count
 
std::string digiProducer_
 
TFile * fAPD
 
TH1F * FitHist
 
TFile * fPN
 
TFile * fROOT
 
std::string hitCollection_
 
std::string hitProducer_
 
std::string outFileName_
 
TH1F * peakAPD [2]
 
TH1F * peakAPDPN [2]
 
TH2F * PN
 
std::string PNdigiCollection_
 
std::string Run_
 
std::string SM_
 

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 52 of file EcalLaserAnalyzerYousi.cc.

Constructor & Destructor Documentation

◆ EcalLaserAnalyzerYousi()

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

Definition at line 119 of file EcalLaserAnalyzerYousi.cc.

119  {
120  //now do what ever initialization is needed
121  //get the PN and AB file names
122  //get the output file names, digi producers, etc
123 
124  hitCollection_ = iConfig.getUntrackedParameter<std::string>("hitCollection");
125  hitProducer_ = iConfig.getUntrackedParameter<std::string>("hitProducer");
126  // PNFileName_ = iConfig.getUntrackedParameter<std::string>("PNFileName");
127  // ABFileName_ = iConfig.getUntrackedParameter<std::string>("ABFileName");
128  outFileName_ = iConfig.getUntrackedParameter<std::string>("outFileName");
129  SM_ = iConfig.getUntrackedParameter<std::string>("SM");
130  Run_ = iConfig.getUntrackedParameter<std::string>("Run");
131  digiProducer_ = iConfig.getUntrackedParameter<std::string>("digiProducer");
132  PNdigiCollection_ = iConfig.getUntrackedParameter<std::string>("PNdigiCollection");
133 }

References digiProducer_, edm::ParameterSet::getUntrackedParameter(), hitCollection_, hitProducer_, outFileName_, PNdigiCollection_, Run_, SM_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~EcalLaserAnalyzerYousi()

EcalLaserAnalyzerYousi::~EcalLaserAnalyzerYousi ( )
override

Definition at line 135 of file EcalLaserAnalyzerYousi.cc.

135  {
136  // do anything here that needs to be done at desctruction time
137  // (e.g. close files, deallocate resources etc.)
138 }

Member Function Documentation

◆ analyze()

void EcalLaserAnalyzerYousi::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 145 of file EcalLaserAnalyzerYousi.cc.

145  {
146  using namespace edm;
147 
148  // if ( fPN->IsOpen() ) { edm::LogInfo("EcalLaserAnalyzerYousi") <<"fPN is open in analyze OKAAAAAAAAYYY \n\n"; }
149 
151  iEvent.getByLabel(digiProducer_, DCCHeaders);
152 
153  EcalDCCHeaderBlock::EcalDCCEventSettings settings = DCCHeaders->begin()->getEventSettings();
154 
155  int wavelength = settings.wavelength;
156 
157  // std::cout<<"wavelength: "<<wavelength<<"\n\n";
158 
159  if (wavelength != 0) {
160  return;
161  } //only process blue laser
162 
164 
165  try {
166  iEvent.getByLabel(hitProducer_, hitCollection_, hits);
167  // iEvent.getByType(hits);
168  } catch (std::exception &ex) {
169  LogError("EcalLaserAnalyzerYousi") << "Cannot get product: EBRecHitCollection from: " << hitCollection_
170  << " - returning.\n\n";
171  // return;
172  }
173 
175 
176  try {
177  // iEvent.getByLabel(hitProducer_, hits);
178  iEvent.getByLabel(digiProducer_, PNdigiCollection_, pndigis);
179  //iEvent.getByType( pndigis );
180  } catch (std::exception &ex) {
181  LogError("EcalLaserAnalyzerYousi") << "Cannot get product: EBdigiCollection from: "
182  << "getbytype"
183  << " - returning.\n\n";
184  // return;
185  }
186 
187  Float_t PN_amp[5];
188 
189  //do some averaging over each pair of PNs
190  for (int j = 0; j < 5; ++j) {
191  PN_amp[j] = 0;
192  for (int z = 0; z < 2; ++z) {
193  FitHist->Reset();
194  TF1 peakFit("peakFit", "[0] +[1]*x +[2]*x^2", 30, 50);
195  TF1 pedFit("pedFit", "[0]", 0, 5);
196 
197  for (int k = 0; k < 50; k++) {
198  FitHist->SetBinContent(k, (*pndigis)[j + z * 5].sample(k).adc());
199  }
200  pedFit.SetParameter(0, 750);
201  FitHist->Fit(&pedFit, "RQI");
202  Float_t ped = pedFit.GetParameter(0);
203 
204  Int_t maxbin = FitHist->GetMaximumBin();
205  peakFit.SetRange(FitHist->GetBinCenter(maxbin) - 4 * FitHist->GetBinWidth(maxbin),
206  FitHist->GetBinCenter(maxbin) + 4 * FitHist->GetBinWidth(maxbin));
207  peakFit.SetParameters(750, 4, -.05);
208  FitHist->Fit(&peakFit, "RQI");
209  Float_t max = peakFit.Eval(-peakFit.GetParameter(1) / (2 * peakFit.GetParameter(2)));
210  if (ped != max) {
211  PN_amp[j] = PN_amp[j] + max - ped;
212  } else {
213  PN_amp[j] = PN_amp[j] + max;
214  }
215 
216  } //end of z loop
217  PN_amp[j] = PN_amp[j] / 2.0;
218  } //end of j loop
219 
220  //do some real PN, APD calculations
221 
222  //FIXME. previously used .info files to get time, what to do now?
223 
224  // TNtuple *Time = new TNtuple("Time", "Time", "Time");
225  // Int_t iTime = Get_Time(Input_File);
226  // Time->Fill(iTime);
227 
228  Float_t fTree[7];
229 
230  // b->GetEntry(EVT);
231  EBDetId ID;
232  Float_t theAPD;
233  Float_t thePN;
234  Float_t Jitter;
235  Float_t Chi2;
236  Int_t CN = hits->size();
237  // cout<<"num CN: "<<CN<<endl;
238  for (int j = 0; j < CN; j++) {
239  ID = (*hits)[j].id();
240  theAPD = (*hits)[j].amplitude();
241  Jitter = (*hits)[j].jitter();
242  Chi2 = (*hits)[j].chi2();
243  thePN = PN_amp[(ID.ic() + 299) / 400];
244 
245  // cout<<"THE APD: "<<theAPD<<endl;
246  // cout<<"THE PN: "<<thePN<<endl;
247 
248  C_APD[ID.ic() - 1]->Fill(theAPD);
249  C_APDPN[ID.ic() - 1]->Fill(theAPD / thePN);
250  C_PN[ID.ic() - 1]->Fill(thePN);
251  C_J[ID.ic() - 1]->Fill(Jitter);
252  C_APDPN_J[ID.ic() - 1]->Fill(Jitter, theAPD / thePN);
253  APDPN_J->Fill(Jitter, theAPD / thePN);
254  APDPN_C->Fill(Chi2, theAPD / thePN);
255  fTree[0] = theAPD;
256  fTree[1] = thePN;
257  fTree[2] = theAPD / thePN;
258  fTree[3] = Jitter;
259  fTree[4] = Chi2;
260  fTree[5] = (*hits)[j].pedestal();
261  fTree[6] = iEvent.id().event();
262  C_Tree[ID.ic() - 1]->Fill(fTree);
263  if (((ID.ic() - 1) % 20 > 9) || ((ID.ic() - 1) < 100)) {
264  peakAPD[0]->Fill(theAPD);
265  peakAPDPN[0]->Fill(theAPD / thePN);
266  APDPN_J_H[0]->Fill(Jitter, theAPD / thePN);
267  } else {
268  peakAPD[1]->Fill(theAPD);
269  peakAPDPN[1]->Fill(theAPD / thePN);
270  APDPN_J_H[1]->Fill(Jitter, theAPD / thePN);
271  }
272  if ((ID.ic() - 1) < 100) {
273  APD_LM[0]->Fill(theAPD);
274  APDPN_LM[0]->Fill(theAPD / thePN);
275  APDPN_J_LM[0]->Fill(Jitter, theAPD / thePN);
276  } else {
277  Int_t index;
278  if (((ID.ic() - 1) % 20) < 10) {
279  index = ((ID.ic() - 101) / 400) * 2 + 1;
280  APD_LM[index]->Fill(theAPD);
281  APDPN_LM[index]->Fill(theAPD / thePN);
282  APDPN_J_LM[index]->Fill(Jitter, theAPD / thePN);
283  } else {
284  index = ((ID.ic() - 101) / 400) * 2 + 2;
285  APD_LM[index]->Fill(theAPD);
286  APDPN_LM[index]->Fill(theAPD / thePN);
287  APDPN_J_LM[index]->Fill(Jitter, theAPD / thePN);
288  }
289  }
290  } //end of CN loop
291 
292  //now that you got the PN and APD's, make the ntuples. done
293 
294  //vec from ROOT version should correspond to hits_itr or something similar. done
295 
296  //check WL from PNdiodedigi, should be ==0, o.w (blue data only). don't process. done
297 
298  //get PN pulse, and do fitting of pulse. i.e. fill hist with PN.apd() or equivalent. done
299 
300  //fit to first 5 for PED, and 30-50 bins for pulse (poly2 for the moment). done
301 }

References gpuClustering::adc, APD_LM, APDPN_C, APDPN_J, APDPN_J_H, APDPN_J_LM, APDPN_LM, edm::SortedCollection< T, SORT >::begin(), C_APD, C_APDPN, C_APDPN_J, C_J, C_PN, C_Tree, RecoSummaryTask_cfi::Chi2, CN, digiProducer_, cppFunctionSkipper::exception, FitHist, hitCollection_, hitProducer_, hfClusterShapes_cfi::hits, iEvent, dqmiolumiharvest::j, dqmdumpme::k, SiStripPI::max, peakAPD, peakAPDPN, PNdigiCollection_, simplePhotonAnalyzer_cfi::sample, EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength, and z.

◆ beginJob()

void EcalLaserAnalyzerYousi::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 304 of file EcalLaserAnalyzerYousi.cc.

304  {
305  edm::LogInfo("EcalLaserAnalyzerYousi") << "running laser analyzer \n\n";
306 
307  fROOT = new TFile(outFileName_.c_str(), "RECREATE");
308  fROOT->cd();
309 
310  //init all the histos and files?
311  APD = new TH2F("APD", "APD", 85, 0., 85., 20, 0., 20.);
312  APD_RMS = new TH2F("APD_RMS", "APD_RMS", 85, 0., 85., 20, 0., 20.);
313  APDPN = new TH2F("APDPN", "APDPN", 85, 0., 85., 20, 0., 20.);
314  APDPN_RMS = new TH2F("APDPN_RMS", "APDPN_RMS", 85, 0., 85., 20, 0., 20.);
315  PN = new TH2F("PN", "PN", 85, 0., 85., 20, 0., 20.);
316  APDPN_J = new TH2F("JittervAPDPN", "JittervAPDPN", 250, 3., 7., 250, 1., 2.);
317  APDPN_C = new TH2F("Chi2vAPDPN", "Chi2vAPDPN", 250, 0., 50., 250, 0., 5.0);
318  FitHist = new TH1F("FitHist", "FitHist", 50, 0, 50);
319  Count = new TH2F("Count", "Count", 85, 0., 1., 20, 0., 1.);
320 
321  for (int i = 0; i < 1700; i++) {
322  std::ostringstream name_1;
323  std::ostringstream name_2;
324  std::ostringstream name_3;
325  std::ostringstream name_4;
326  std::ostringstream name_5;
327  name_1 << "C_APD_" << i + 1;
328  name_2 << "C_APDPN_" << i + 1;
329  name_3 << "C_PN_" << i + 1;
330  name_4 << "C_J_" << i + 1;
331  name_5 << "C_APDPN_J_" << i + 1;
332  C_APD[i] = new TH1F(name_1.str().c_str(), name_1.str().c_str(), 2500, 0., 5000.);
333  C_APDPN[i] = new TH1F(name_2.str().c_str(), name_2.str().c_str(), 20000, 0., 25.);
334  C_PN[i] = new TH1F(name_3.str().c_str(), name_3.str().c_str(), 1000, 0., 4000.);
335  C_J[i] = new TH1F(name_4.str().c_str(), name_4.str().c_str(), 250, 3.0, 7.);
336  C_APDPN_J[i] = new TH2F(name_5.str().c_str(), name_5.str().c_str(), 250, 3.0, 6., 250, 1., 2.2);
337  }
338 
339  for (int i = 0; i < 2; i++) {
340  std::ostringstream aname_1;
341  std::ostringstream aname_2;
342  std::ostringstream aname_3;
343  aname_1 << "peakAPD_" << i;
344  aname_2 << "peakAPDPN_" << i;
345  aname_3 << "JittervAPDPN_Half_" << i;
346  peakAPD[i] = new TH1F(aname_1.str().c_str(), aname_1.str().c_str(), 1000, 0., 5000.);
347  peakAPDPN[i] = new TH1F(aname_2.str().c_str(), aname_2.str().c_str(), 1000, 0., 8.);
348  APDPN_J_H[i] = new TH2F(aname_3.str().c_str(), aname_3.str().c_str(), 250, 3., 7., 250, 1., 2.2);
349  }
350 
351  for (int i = 0; i < 9; i++) {
352  std::ostringstream bname_1;
353  std::ostringstream bname_2;
354  std::ostringstream bname_3;
355  bname_1 << "APD_LM_" << i;
356  bname_2 << "APDPN_LM_" << i;
357  bname_3 << "APDPN_J_LM_" << i;
358  APD_LM[i] = new TH1F(bname_1.str().c_str(), bname_1.str().c_str(), 500, 0., 5000.);
359  APDPN_LM[i] = new TH1F(bname_2.str().c_str(), bname_2.str().c_str(), 500, 0., 8.);
360  APDPN_J_LM[i] = new TH2F(bname_3.str().c_str(), bname_3.str().c_str(), 250, 3., 7., 250, 1., 2.2);
361  }
362 
363  //get the PN file. or don't get, and read from event.
364 
365  //don't need to get AB, it will be read in via framework poolsource = ???
366 
367  //configure the final NTuple
368  std::ostringstream varlist;
369  varlist << "APD:PN:APDPN:Jitter:Chi2:ped:EVT";
370  for (int i = 0; i < 1700; i++) {
371  std::ostringstream name;
372  name << "C_Tree_" << i + 1;
373  C_Tree[i] = (TNtuple *)new TNtuple(name.str().c_str(), name.str().c_str(), varlist.str().c_str());
374  }
375 }

References APD, APD_LM, APD_RMS, APDPN, APDPN_C, APDPN_J, APDPN_J_H, APDPN_J_LM, APDPN_LM, APDPN_RMS, C_APD, C_APDPN, C_APDPN_J, C_J, C_PN, C_Tree, Count, FitHist, fROOT, mps_fire::i, Skims_PA_cff::name, outFileName_, peakAPD, peakAPDPN, and PN.

◆ endJob()

void EcalLaserAnalyzerYousi::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 378 of file EcalLaserAnalyzerYousi.cc.

378  {
379  //write the file (get ouput file name first).
380  TFile *fROOT = (TFile *)new TFile(outFileName_.c_str(), "RECREATE");
381 
382  // TDirectory *DIR = fROOT->Get(Run_.c_str());
383  TDirectory *DIR;
384  // if(DIR == NULL){
385  DIR = fROOT->mkdir(Run_.c_str());
386  // }
387  DIR->cd();
388  for (int j = 0; j < 1700; j++) {
389  Float_t min_r, max_r;
390  Float_t RMS, Sigma, K;
391  Int_t iCount;
392  TF1 *gs1;
393  TF1 *gs2;
394  TF1 *gs3;
395 
396  RMS = C_APD[j]->GetRMS();
397  APD_RMS->SetBinContent(85 - (j / 20), 20 - (j % 20), RMS);
398  Sigma = 999999;
399  K = 2.5;
400  iCount = 0;
401  while (Sigma > RMS) {
402  min_r = C_APD[j]->GetBinCenter(C_APD[j]->GetMaximumBin()) - K * RMS;
403  max_r = C_APD[j]->GetBinCenter(C_APD[j]->GetMaximumBin()) + K * RMS;
404  gs1 = new TF1("gs1", "gaus", min_r, max_r);
405  C_APD[j]->Fit(gs1, "RQI");
406  Sigma = gs1->GetParameter(2);
407  K = K * 1.5;
408  iCount++;
409  if (iCount > 2) {
410  C_APD[j]->Fit("gaus", "QI");
411  gs1 = C_APD[j]->GetFunction("gaus");
412  break;
413  }
414  }
415 
416  RMS = C_APDPN[j]->GetRMS();
417  APDPN_RMS->SetBinContent(85 - (j / 20), 20 - (j % 20), RMS);
418  Sigma = 999999;
419  K = 2.5;
420  iCount = 0;
421  while (Sigma > RMS) {
422  min_r = C_APDPN[j]->GetBinCenter(C_APDPN[j]->GetMaximumBin()) - K * RMS;
423  max_r = C_APDPN[j]->GetBinCenter(C_APDPN[j]->GetMaximumBin()) + K * RMS;
424  gs2 = new TF1("gs2", "gaus", min_r, max_r);
425  C_APDPN[j]->Fit(gs2, "RQI");
426  Sigma = gs2->GetParameter(2);
427  K = K * 1.5;
428  iCount++;
429  if (iCount > 2) {
430  C_APDPN[j]->Fit("gaus", "QI");
431  gs2 = C_APDPN[j]->GetFunction("gaus");
432  break;
433  }
434  }
435 
436  TF1 *newgs1;
437  TF1 *newgs2;
438 
439  C_PN[j]->Fit("gaus", "Q");
440  C_APD[j]->Fit("gaus", "QI");
441  C_APDPN[j]->Fit("gaus", "QI");
442  C_APD[j]->Write("", TObject::kOverwrite);
443  C_APDPN[j]->Write("", TObject::kOverwrite);
444  C_PN[j]->Write("", TObject::kOverwrite);
445  C_J[j]->Write("", TObject::kOverwrite);
446  C_APDPN_J[j]->Write("", TObject::kOverwrite);
447  newgs1 = C_APD[j]->GetFunction("gaus");
448  newgs2 = C_APDPN[j]->GetFunction("gaus");
449  gs3 = C_PN[j]->GetFunction("gaus");
450  Float_t theAPD = newgs1->GetParameter(1);
451  APD->SetBinContent(85 - (j / 20), 20 - (j % 20), theAPD);
452  Float_t theAPDPN = newgs2->GetParameter(1);
453  APDPN->SetBinContent(85 - (j / 20), 20 - (j % 20), theAPDPN);
454  Float_t thePN = gs3->GetParameter(1);
455  // cout<<"LOOK HERE thePN = "<< thePN<<endl;
456  PN->SetBinContent(85 - (j / 20), 20 - (j % 20), thePN);
457  C_Tree[j]->Write("", TObject::kOverwrite);
458  }
459 
460  for (int i = 0; i < 9; i++) {
461  APD_LM[i]->Write("", TObject::kOverwrite);
462  APDPN_LM[i]->Write("", TObject::kOverwrite);
463  APDPN_J_LM[i]->Write("", TObject::kOverwrite);
464  }
465 
466  // Time->Write("", TObject::kOverwrite);
467  APD->Write("", TObject::kOverwrite);
468  APD_RMS->Write("", TObject::kOverwrite);
469  APDPN_RMS->Write("", TObject::kOverwrite);
470  APDPN->Write("", TObject::kOverwrite);
471  APDPN_J->Write("", TObject::kOverwrite);
472  APDPN_C->Write("", TObject::kOverwrite);
473  PN->Write("", TObject::kOverwrite);
474  peakAPD[0]->Write("", TObject::kOverwrite);
475  peakAPD[1]->Write("", TObject::kOverwrite);
476  peakAPDPN[0]->Write("", TObject::kOverwrite);
477  peakAPDPN[1]->Write("", TObject::kOverwrite);
478  APDPN_J_H[0]->Write("", TObject::kOverwrite);
479  APDPN_J_H[1]->Write("", TObject::kOverwrite);
480 
481  // don't Make plots
482  // fROOT->Close();
483 
484  // fPN->Close();
485  // fAPD->Close();
486 
487  fROOT->Write();
488  // fROOT->Close();
489 }

References APD, APD_LM, APD_RMS, APDPN, APDPN_C, APDPN_J, APDPN_J_H, APDPN_J_LM, APDPN_LM, APDPN_RMS, C_APD, C_APDPN, C_APDPN_J, C_J, C_PN, C_Tree, dqmPostProcessing_online::DIR, fROOT, mps_fire::i, dqmiolumiharvest::j, outFileName_, peakAPD, peakAPDPN, PN, RMS, and Run_.

Referenced by o2olib.O2ORunMgr::executeJob().

Member Data Documentation

◆ APD

TH2F* EcalLaserAnalyzerYousi::APD
private

Definition at line 78 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob(), and endJob().

◆ APD_LM

TH1F* EcalLaserAnalyzerYousi::APD_LM[9]
private

Definition at line 72 of file EcalLaserAnalyzerYousi.cc.

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

◆ APD_RMS

TH2F* EcalLaserAnalyzerYousi::APD_RMS
private

Definition at line 79 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob(), and endJob().

◆ APDPN

TH2F* EcalLaserAnalyzerYousi::APDPN
private

Definition at line 80 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob(), and endJob().

◆ APDPN_C

TH2F* EcalLaserAnalyzerYousi::APDPN_C
private

Definition at line 84 of file EcalLaserAnalyzerYousi.cc.

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

◆ APDPN_J

TH2F* EcalLaserAnalyzerYousi::APDPN_J
private

Definition at line 83 of file EcalLaserAnalyzerYousi.cc.

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

◆ APDPN_J_H

TH2F* EcalLaserAnalyzerYousi::APDPN_J_H[2]
private

Definition at line 75 of file EcalLaserAnalyzerYousi.cc.

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

◆ APDPN_J_LM

TH2F* EcalLaserAnalyzerYousi::APDPN_J_LM[9]
private

Definition at line 74 of file EcalLaserAnalyzerYousi.cc.

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

◆ APDPN_LM

TH1F* EcalLaserAnalyzerYousi::APDPN_LM[9]
private

Definition at line 73 of file EcalLaserAnalyzerYousi.cc.

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

◆ APDPN_RMS

TH2F* EcalLaserAnalyzerYousi::APDPN_RMS
private

Definition at line 81 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob(), and endJob().

◆ C_APD

TH1F* EcalLaserAnalyzerYousi::C_APD[1700]
private

Definition at line 64 of file EcalLaserAnalyzerYousi.cc.

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

◆ C_APDPN

TH1F* EcalLaserAnalyzerYousi::C_APDPN[1700]
private

Definition at line 65 of file EcalLaserAnalyzerYousi.cc.

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

◆ C_APDPN_J

TH2F* EcalLaserAnalyzerYousi::C_APDPN_J[1700]
private

Definition at line 68 of file EcalLaserAnalyzerYousi.cc.

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

◆ C_J

TH1F* EcalLaserAnalyzerYousi::C_J[1700]
private

Definition at line 67 of file EcalLaserAnalyzerYousi.cc.

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

◆ C_PN

TH1F* EcalLaserAnalyzerYousi::C_PN[1700]
private

Definition at line 66 of file EcalLaserAnalyzerYousi.cc.

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

◆ C_Tree

TNtuple* EcalLaserAnalyzerYousi::C_Tree[1700]
private

Definition at line 93 of file EcalLaserAnalyzerYousi.cc.

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

◆ Count

TH2F* EcalLaserAnalyzerYousi::Count
private

Definition at line 87 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob().

◆ digiProducer_

std::string EcalLaserAnalyzerYousi::digiProducer_
private

Definition at line 104 of file EcalLaserAnalyzerYousi.cc.

Referenced by analyze(), and EcalLaserAnalyzerYousi().

◆ fAPD

TFile* EcalLaserAnalyzerYousi::fAPD
private

Definition at line 90 of file EcalLaserAnalyzerYousi.cc.

◆ FitHist

TH1F* EcalLaserAnalyzerYousi::FitHist
private

Definition at line 86 of file EcalLaserAnalyzerYousi.cc.

Referenced by analyze(), and beginJob().

◆ fPN

TFile* EcalLaserAnalyzerYousi::fPN
private

Definition at line 89 of file EcalLaserAnalyzerYousi.cc.

◆ fROOT

TFile* EcalLaserAnalyzerYousi::fROOT
private

Definition at line 91 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob(), and endJob().

◆ hitCollection_

std::string EcalLaserAnalyzerYousi::hitCollection_
private

Definition at line 97 of file EcalLaserAnalyzerYousi.cc.

Referenced by analyze(), and EcalLaserAnalyzerYousi().

◆ hitProducer_

std::string EcalLaserAnalyzerYousi::hitProducer_
private

Definition at line 98 of file EcalLaserAnalyzerYousi.cc.

Referenced by analyze(), and EcalLaserAnalyzerYousi().

◆ outFileName_

std::string EcalLaserAnalyzerYousi::outFileName_
private

Definition at line 101 of file EcalLaserAnalyzerYousi.cc.

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

◆ peakAPD

TH1F* EcalLaserAnalyzerYousi::peakAPD[2]
private

Definition at line 70 of file EcalLaserAnalyzerYousi.cc.

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

◆ peakAPDPN

TH1F* EcalLaserAnalyzerYousi::peakAPDPN[2]
private

Definition at line 71 of file EcalLaserAnalyzerYousi.cc.

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

◆ PN

TH2F* EcalLaserAnalyzerYousi::PN
private

Definition at line 82 of file EcalLaserAnalyzerYousi.cc.

Referenced by beginJob(), and endJob().

◆ PNdigiCollection_

std::string EcalLaserAnalyzerYousi::PNdigiCollection_
private

Definition at line 105 of file EcalLaserAnalyzerYousi.cc.

Referenced by analyze(), and EcalLaserAnalyzerYousi().

◆ Run_

std::string EcalLaserAnalyzerYousi::Run_
private

Definition at line 103 of file EcalLaserAnalyzerYousi.cc.

Referenced by EcalLaserAnalyzerYousi(), and endJob().

◆ SM_

std::string EcalLaserAnalyzerYousi::SM_
private

Definition at line 102 of file EcalLaserAnalyzerYousi.cc.

Referenced by EcalLaserAnalyzerYousi().

dqmPostProcessing_online.DIR
DIR
Definition: dqmPostProcessing_online.py:10
mps_fire.i
i
Definition: mps_fire.py:428
EcalLaserAnalyzerYousi::APDPN_RMS
TH2F * APDPN_RMS
Definition: EcalLaserAnalyzerYousi.cc:81
CN
static const float CN[]
Definition: sicif.h:75
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EBDetId
Definition: EBDetId.h:17
EcalLaserAnalyzerYousi::APDPN_J_LM
TH2F * APDPN_J_LM[9]
Definition: EcalLaserAnalyzerYousi.cc:74
edm
HLT enums.
Definition: AlignableModifier.h:19
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
EcalLaserAnalyzerYousi::C_Tree
TNtuple * C_Tree[1700]
Definition: EcalLaserAnalyzerYousi.cc:93
EcalLaserAnalyzerYousi::peakAPDPN
TH1F * peakAPDPN[2]
Definition: EcalLaserAnalyzerYousi.cc:71
EcalLaserAnalyzerYousi::Count
TH2F * Count
Definition: EcalLaserAnalyzerYousi.cc:87
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalLaserAnalyzerYousi::PNdigiCollection_
std::string PNdigiCollection_
Definition: EcalLaserAnalyzerYousi.cc:105
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
EcalLaserAnalyzerYousi::APDPN_LM
TH1F * APDPN_LM[9]
Definition: EcalLaserAnalyzerYousi.cc:73
EcalLaserAnalyzerYousi::SM_
std::string SM_
Definition: EcalLaserAnalyzerYousi.cc:102
edm::Handle
Definition: AssociativeIterator.h:50
EcalLaserAnalyzerYousi::hitProducer_
std::string hitProducer_
Definition: EcalLaserAnalyzerYousi.cc:98
EcalLaserAnalyzerYousi::APDPN_J
TH2F * APDPN_J
Definition: EcalLaserAnalyzerYousi.cc:83
EcalLaserAnalyzerYousi::APD
TH2F * APD
Definition: EcalLaserAnalyzerYousi.cc:78
Chi2
Definition: Chi2.h:15
EcalLaserAnalyzerYousi::peakAPD
TH1F * peakAPD[2]
Definition: EcalLaserAnalyzerYousi.cc:70
EcalLaserAnalyzerYousi::APDPN_J_H
TH2F * APDPN_J_H[2]
Definition: EcalLaserAnalyzerYousi.cc:75
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
EcalLaserAnalyzerYousi::APDPN_C
TH2F * APDPN_C
Definition: EcalLaserAnalyzerYousi.cc:84
EcalLaserAnalyzerYousi::Run_
std::string Run_
Definition: EcalLaserAnalyzerYousi.cc:103
DDAxes::z
dqmdumpme.k
k
Definition: dqmdumpme.py:60
RMS
Definition: trackSplitPlot.h:34
EcalLaserAnalyzerYousi::digiProducer_
std::string digiProducer_
Definition: EcalLaserAnalyzerYousi.cc:104
EcalLaserAnalyzerYousi::C_J
TH1F * C_J[1700]
Definition: EcalLaserAnalyzerYousi.cc:67
EcalDCCHeaderBlock::EcalDCCEventSettings
Definition: EcalDCCHeaderBlock.h:64
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
align::ID
uint32_t ID
Definition: Definitions.h:24
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EcalLaserAnalyzerYousi::APD_RMS
TH2F * APD_RMS
Definition: EcalLaserAnalyzerYousi.cc:79
EcalLaserAnalyzerYousi::C_APDPN_J
TH2F * C_APDPN_J[1700]
Definition: EcalLaserAnalyzerYousi.cc:68
RecoSummaryTask_cfi.Chi2
Chi2
Definition: RecoSummaryTask_cfi.py:22
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalLaserAnalyzerYousi::FitHist
TH1F * FitHist
Definition: EcalLaserAnalyzerYousi.cc:86
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalLaserAnalyzerYousi::outFileName_
std::string outFileName_
Definition: EcalLaserAnalyzerYousi.cc:101
EcalLaserAnalyzerYousi::APDPN
TH2F * APDPN
Definition: EcalLaserAnalyzerYousi.cc:80
EcalDCCHeaderBlock::EcalDCCEventSettings::wavelength
short wavelength
Definition: EcalDCCHeaderBlock.h:67
EcalLaserAnalyzerYousi::C_APD
TH1F * C_APD[1700]
Definition: EcalLaserAnalyzerYousi.cc:64
EcalLaserAnalyzerYousi::PN
TH2F * PN
Definition: EcalLaserAnalyzerYousi.cc:82
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EcalLaserAnalyzerYousi::C_PN
TH1F * C_PN[1700]
Definition: EcalLaserAnalyzerYousi.cc:66
EcalLaserAnalyzerYousi::APD_LM
TH1F * APD_LM[9]
Definition: EcalLaserAnalyzerYousi.cc:72
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EcalLaserAnalyzerYousi::C_APDPN
TH1F * C_APDPN[1700]
Definition: EcalLaserAnalyzerYousi.cc:65
EcalLaserAnalyzerYousi::fROOT
TFile * fROOT
Definition: EcalLaserAnalyzerYousi.cc:91
EcalLaserAnalyzerYousi::hitCollection_
std::string hitCollection_
Definition: EcalLaserAnalyzerYousi.cc:97