CMS 3D CMS Logo

Macros | Functions
makeModulePlots.cc File Reference
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include "TFile.h"
#include "TH1D.h"
#include "TCanvas.h"

Go to the source code of this file.

Macros

#define NOISEPREFIX   "Profile_NoiseFromCondDB__det__"
 
#define PEDESTALPREFIX   "Profile_PedestalFromCondDB__det__"
 

Functions

int main (int argc, char *argv[])
 
void printPlot (TH1D *hist, char *prefix, char *postfix)
 

Macro Definition Documentation

◆ NOISEPREFIX

#define NOISEPREFIX   "Profile_NoiseFromCondDB__det__"

Definition at line 10 of file makeModulePlots.cc.

Referenced by main().

◆ PEDESTALPREFIX

#define PEDESTALPREFIX   "Profile_PedestalFromCondDB__det__"

Definition at line 11 of file makeModulePlots.cc.

Referenced by main().

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk




















































































eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:







Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Sticking ADC counts in neughbouring TS for HB:

Sticking ADC counts in neughbouring TS for HE:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:





Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Definition at line 15 of file makeModulePlots.cc.

References dir2webdir::argc, GCPpyPlots::argv, gather_cfg::cout, compareTotals::hist, NOISEPREFIX, PEDESTALPREFIX, nano_postproc::postfix, hcallasereventfilter2012_cfi::prefix, printPlot(), and doHarvest::rootfile.

15  {
16 
17  char* rootfilename;
18  char* modulelistname;
19  int pnbits;
20  char* prefix;
21  char* postfix;
22 
23  if(argc==6) {
24  rootfilename = argv[1];
25  modulelistname = argv[2];
26  pnbits = atoi(argv[3]);
27  prefix = argv[4];
28  postfix = argv[5];
29  }
30  else {
31  std::cout << "Wrong number of parameters " << argc << std::endl;
32  return 1;
33  }
34 
35  std::cout << "ready to go " << rootfilename << ' ' << modulelistname << std::endl;
36 
37  TFile* rootfile = new TFile(rootfilename,"READ");
38  if(!rootfile) {
39  std::cout << "Problems with input root file" << std::endl;
40  return 2;
41  }
42  int detid;
43  std::ifstream modulelist(modulelistname);
44 
45 
46 
47  while (modulelist >> detid) {
48  std::cout << " ready to go with detid " << detid << " " << pnbits << std::endl;
49  // bit 0: noise
50  if(pnbits & 1) {
51  std::stringstream histoname;
52  histoname << NOISEPREFIX << detid;
53  std::cout << " ready to go with histogram " << histoname.str() << std::endl;
54  TH1D* hist = (TH1D*)rootfile->FindObjectAny(histoname.str().c_str());
55  if(hist) {
56  std:: cout << histoname.str() << " found!" << std::endl;
58  } else {
59  std:: cout << histoname.str() << " NOT found..." << std::endl;
60  }
61  }
62  // bit 1: pedestal
63  if(pnbits & 2) {
64  std::stringstream histoname;
65  histoname << PEDESTALPREFIX << detid;
66  std::cout << " ready to go with histogram " << histoname.str() << std::endl;
67  TH1D* hist = (TH1D*)rootfile->FindObjectAny(histoname.str().c_str());
68  if(hist) {
69  std:: cout << histoname.str() << " found!" << std::endl;
71  } else {
72  std:: cout << histoname.str() << " NOT found..." << std::endl;
73  }
74  }
75  }
76 
77  return 0;
78 
79 }
#define PEDESTALPREFIX
void printPlot(TH1D *hist, char *prefix, char *postfix)
#define NOISEPREFIX

◆ printPlot()

void printPlot ( TH1D *  hist,
char *  prefix,
char *  postfix 
)

Definition at line 81 of file makeModulePlots.cc.

References gpuPixelDoublets::cc, corrVsCorr::filename, compareTotals::hist, nano_postproc::postfix, and hcallasereventfilter2012_cfi::prefix.

Referenced by main().

81  {
82 
83  TCanvas* cc= new TCanvas;
84  hist->Draw("hist");
85  std::stringstream filename;
86  filename << prefix << hist->GetName() << postfix << ".png";
87  cc->Print(filename.str().c_str());
88  delete cc;
89 
90 }
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49