Public Member Functions | Public Attributes | Private Attributes | List of all members
dprf::RawFebPlots Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/DetectorPerformance/RawFebPlots.h"

Public Member Functions

 RawFebPlots (std::string, std::string, bool, fhicl::ParameterSet const &)
 
 ~RawFebPlots ()
 
void AddHit (float, unsigned int)
 
void Reset ()
 
void FinishEvent ()
 

Public Attributes

std::string fLabel
 
std::string fSuffix
 
std::vector< unsigned inthitsPerEvent
 
std::vector< TH1F * > hADC
 
std::vector< TH1F * > hADC_MZ
 
std::vector< TH1F * > hADC_Z
 
std::vector< TH1F * > hDigitsPerEvent
 
std::vector< TH1F * > hStats
 
TH1D * hSumADC
 
TH1D * hSumADC2
 
TH1I * hSumHits
 

Private Attributes

bool fDetailed
 

Detailed Description

Definition at line 14 of file RawFebPlots.h.

Constructor & Destructor Documentation

dprf::RawFebPlots::RawFebPlots ( std::string  label,
std::string  suffix,
bool  detailed,
fhicl::ParameterSet const &  pset 
)

Definition at line 19 of file RawFebPlots.cxx.

References fLabel, fSuffix, hADC, hADC_MZ, hADC_Z, hDigitsPerEvent, hSumADC, hSumADC2, hSumHits, ip, art::TFileDirectory::make(), daqchannelmap::NUM_PIXELS, Reset(), and string.

19  :
20  fLabel(label),
21  fSuffix(suffix),
22  hitsPerEvent(std::vector<unsigned int>(daqchannelmap::NUM_PIXELS+1)),
23  hADC(std::vector<TH1F*>(daqchannelmap::NUM_PIXELS+1)),
24  hADC_MZ(std::vector<TH1F*>(daqchannelmap::NUM_PIXELS+1)),
25  hADC_Z(std::vector<TH1F*>(daqchannelmap::NUM_PIXELS+1)),
26  hDigitsPerEvent(std::vector<TH1F*>(daqchannelmap::NUM_PIXELS+1)),
27  hStats(std::vector<TH1F*>(daqchannelmap::NUM_PIXELS+1)),
28  fDetailed(detailed)
29  {
30  /*
31  unsigned int hits_per_event_n=pset.get<unsigned int>("HitsPerEvtN");
32  float hits_per_event_l=pset.get<float>("HitsPerEvtXmin");
33  float hits_per_event_h=pset.get<float>("HitsPerEvtXmax");
34  */
35  unsigned int hits_per_event_n=100;
36  float hits_per_event_l=-0.5;
37  float hits_per_event_h=99.5;
38 
40 
41  for (unsigned int ip=detailed ? 0 : (unsigned int)daqchannelmap::NUM_PIXELS;
43  std::string pixelstring,pix;
45  {
46  pixelstring=Form(", px=%2.2d",ip);
47  pix=Form("_%2.2d",ip);
48  } else {
49  pixelstring=" ";
50  pix="_F";
51  }
52 
53 
54  std::string label_suffix(Form("%s%s_%s",
55  fLabel.c_str(),pix.c_str(),fSuffix.c_str()));
56  std::string title_suffix(Form("%s%s (%s)",
57  fLabel.c_str(),pixelstring.c_str(),fSuffix.c_str()));
58  hADC[ip]=tfs->make<TH1F>(Form("hADC_%s",label_suffix.c_str()),
59  Form("ADC Distribution for %s",title_suffix.c_str()),
60  100,-.5,4999.5);
61  hADC_MZ[ip]=tfs->make<TH1F>(Form("hADC_MZ_%s",label_suffix.c_str()),
62  Form("ADC Distribution (Mid-Zoomed) for %s",title_suffix.c_str()),
63  100,-.5,999.5);
64  hADC_Z[ip]=tfs->make<TH1F>(Form("hADC_Z_%s",label_suffix.c_str()),
65  Form("ADC Distribution (Zoomed) for %s",title_suffix.c_str()),
66  200,-.5,199.5);
67  hDigitsPerEvent[ip]=tfs->make<TH1F>(Form("hDigitsPerEvent_%s",label_suffix.c_str()),
68  Form("Digits per event for %s",title_suffix.c_str()),
69  hits_per_event_n,hits_per_event_l,hits_per_event_h);
70  } // pixel
71 
72  std::string label_suffix(Form("%s_%s",
73  fLabel.c_str(),fSuffix.c_str()));
74  std::string title_suffix(Form("%s (%s)",
75  fLabel.c_str(),fSuffix.c_str()));
76  hSumADC=tfs->make<TH1D>(Form("hSumADC_%s",label_suffix.c_str()),
77  Form("Sum of ADC vs. Pixel, %s",title_suffix.c_str()),daqchannelmap::NUM_PIXELS+1,
78  -.5,(float) daqchannelmap::NUM_PIXELS+.5);
79  hSumADC2=tfs->make<TH1D>(Form("hSumADC2_%s",label_suffix.c_str()),
80  Form("Sum of ADC^2 vs. Pixel, %s",title_suffix.c_str()),daqchannelmap::NUM_PIXELS+1,
81  -.5,(float) daqchannelmap::NUM_PIXELS+.5);
82  hSumHits=tfs->make<TH1I>(Form("hSumHits_%s",label_suffix.c_str()),
83  Form("Sum of Hits vs. Pixel, %s",title_suffix.c_str()),daqchannelmap::NUM_PIXELS+1,
84  -.5,(float) daqchannelmap::NUM_PIXELS+.5);
85 
86  this->Reset();
87 
88  }
std::vector< TH1F * > hADC
Definition: RawFebPlots.h:26
std::vector< unsigned int > hitsPerEvent
Definition: RawFebPlots.h:25
std::vector< TH1F * > hStats
Definition: RawFebPlots.h:30
TString ip
Definition: loadincs.C:5
std::string fLabel
Definition: RawFebPlots.h:20
f cosmic PID use this for the final state era of
Definition: Vars.h:69
const char * label
std::string fSuffix
Definition: RawFebPlots.h:23
std::vector< TH1F * > hDigitsPerEvent
Definition: RawFebPlots.h:29
const XML_Char * s
Definition: expat.h:262
std::vector< TH1F * > hADC_Z
Definition: RawFebPlots.h:28
T * make(ARGS...args) const
std::vector< TH1F * > hADC_MZ
Definition: RawFebPlots.h:27
enum BeamMode string
dprf::RawFebPlots::~RawFebPlots ( )
inline

Definition at line 20 of file RawFebPlots.h.

References fLabel, and string.

20 {};

Member Function Documentation

void dprf::RawFebPlots::AddHit ( float  adc,
unsigned int  pixel 
)

Definition at line 89 of file RawFebPlots.cxx.

References fDetailed, hADC, hADC_MZ, hADC_Z, hitsPerEvent, hSumADC, hSumADC2, hSumHits, and daqchannelmap::NUM_PIXELS.

90  {
91 
92  //fill for the actual pixel, plus the "33rd" pixel for the entire FEB
93 
94  if (fDetailed) {
95  hitsPerEvent[pixel]++;
96  hADC[pixel]->Fill(adc);
97  hADC_MZ[pixel]->Fill(adc);
98  hADC_Z[pixel]->Fill(adc);
99  }
100 
102  hADC[daqchannelmap::NUM_PIXELS]->Fill(adc);
104  hADC_Z[daqchannelmap::NUM_PIXELS]->Fill(adc);
105 
106  hSumADC->Fill(pixel,adc);
107  hSumADC2->Fill(pixel,adc*adc);
108  hSumHits->Fill(pixel);
109 
111  hSumADC2->Fill(daqchannelmap::NUM_PIXELS,adc*adc);
113 
114  } //AddHit
std::vector< TH1F * > hADC
Definition: RawFebPlots.h:26
std::vector< unsigned int > hitsPerEvent
Definition: RawFebPlots.h:25
std::vector< TH1F * > hADC_Z
Definition: RawFebPlots.h:28
std::vector< TH1F * > hADC_MZ
Definition: RawFebPlots.h:27
void dprf::RawFebPlots::FinishEvent ( )

Definition at line 123 of file RawFebPlots.cxx.

References fDetailed, hDigitsPerEvent, hitsPerEvent, ip, and daqchannelmap::NUM_PIXELS.

124  {
125  for (unsigned int ip=fDetailed ? 0 : (unsigned int)daqchannelmap::NUM_PIXELS;
128 
129  }
130  }
std::vector< unsigned int > hitsPerEvent
Definition: RawFebPlots.h:25
TString ip
Definition: loadincs.C:5
std::vector< TH1F * > hDigitsPerEvent
Definition: RawFebPlots.h:29
void dprf::RawFebPlots::Reset ( )

Definition at line 116 of file RawFebPlots.cxx.

References fDetailed, hitsPerEvent, ip, and daqchannelmap::NUM_PIXELS.

Referenced by RawFebPlots().

116  {
117  for (unsigned int ip=fDetailed ? 0 : (unsigned int)daqchannelmap::NUM_PIXELS;
119  hitsPerEvent[ip]=0;
120  }
121  } //Reset
std::vector< unsigned int > hitsPerEvent
Definition: RawFebPlots.h:25
TString ip
Definition: loadincs.C:5

Member Data Documentation

bool dprf::RawFebPlots::fDetailed
private

Definition at line 41 of file RawFebPlots.h.

Referenced by AddHit(), FinishEvent(), and Reset().

std::string dprf::RawFebPlots::fLabel

Definition at line 20 of file RawFebPlots.h.

Referenced by RawFebPlots(), and ~RawFebPlots().

std::string dprf::RawFebPlots::fSuffix

Definition at line 23 of file RawFebPlots.h.

Referenced by RawFebPlots().

std::vector<TH1F*> dprf::RawFebPlots::hADC

Definition at line 26 of file RawFebPlots.h.

Referenced by AddHit(), and RawFebPlots().

std::vector<TH1F*> dprf::RawFebPlots::hADC_MZ

Definition at line 27 of file RawFebPlots.h.

Referenced by AddHit(), and RawFebPlots().

std::vector<TH1F*> dprf::RawFebPlots::hADC_Z

Definition at line 28 of file RawFebPlots.h.

Referenced by AddHit(), and RawFebPlots().

std::vector<TH1F*> dprf::RawFebPlots::hDigitsPerEvent

Definition at line 29 of file RawFebPlots.h.

Referenced by FinishEvent(), and RawFebPlots().

std::vector<unsigned int> dprf::RawFebPlots::hitsPerEvent

Definition at line 25 of file RawFebPlots.h.

Referenced by AddHit(), FinishEvent(), and Reset().

std::vector<TH1F*> dprf::RawFebPlots::hStats

Definition at line 30 of file RawFebPlots.h.

TH1D* dprf::RawFebPlots::hSumADC

Definition at line 35 of file RawFebPlots.h.

Referenced by AddHit(), and RawFebPlots().

TH1D* dprf::RawFebPlots::hSumADC2

Definition at line 36 of file RawFebPlots.h.

Referenced by AddHit(), and RawFebPlots().

TH1I* dprf::RawFebPlots::hSumHits

Definition at line 37 of file RawFebPlots.h.

Referenced by AddHit(), and RawFebPlots().


The documentation for this class was generated from the following files: