pxar
All Classes Namespaces Functions Variables Typedefs Friends
PixTestXray.hh
1 #ifndef PIXTESTXRAY_H
2 #define PIXTESTXRAY_H
3 
4 #include "PixTest.hh"
5 #include "PHCalibration.hh"
6 
7 #include <TProfile2D.h>
8 
9 
10 class DLLEXPORT PixTestXray: public PixTest {
11 public:
12  PixTestXray(PixSetup *, std::string);
13  PixTestXray();
14  virtual ~PixTestXray();
15  virtual bool setParameter(std::string parName, std::string sval);
16  void init();
17  void setToolTips();
18  void bookHist(std::string);
19  std::vector<TH2D*> bookHotPixelMap();
20 
21  void runCommand(std::string command);
22  void doStop();
23  void doPhRun();
24  void doRateScan();
25  void doRunMaskHotPixels();
26  void doTest();
27 
28  // bool setTrgFrequency(uint8_t TrgTkDel);
29  // void finalCleanup();
30  // void pgToDefault(std::vector<std::pair<std::string, uint8_t> > pg_setup);
31 
32  void readData();
33  void readDataOld();
34  void analyzeData();
35 
36  double meanHit(TH2D*);
37  double noiseLevel(TH2D*);
38  int countHitsAndMaskPixels(TH2D*, double noiseLevel, int iroc);
39 
40  void processData(uint16_t numevents = 1000);
41 
42 private:
43 
44  std::string fParSource, fParMaskFileName;
45  int fParTriggerFrequency;
46  int fParRunSeconds;
47  int fParStepSeconds;
48  int fParVthrCompMin, fParVthrCompMax;
49  bool fParFillTree;
50  bool fParDelayTBM;
51  uint16_t fParNtrig;
52  int fParVcal;
53 
54  bool fPhCalOK;
55  PHCalibration fPhCal;
56 
57  int fParSaveMaskedPixels;
58  bool fSourceChanged;
59 
60  bool fDaq_loop;
61 
62  int fVthrComp;
63  long int fEventsMax;
64 
65  std::vector<std::pair<std::string, uint8_t> > fPg_setup;
66 
67  // -- rateScan
68  std::vector<TH1D*> fHits, fMpix;
69  std::vector<TH2D*> fHitMap;
70 
71  // -- PhRun
72  std::vector<TH1D*> fQ;
73  std::vector<TProfile2D*> fQmap;
74 
75  std::vector<TH1D*> fPH;
76  std::vector<TProfile2D*> fPHmap;
77  std::vector<TH2D*> fHmap;
78  std::vector<TH2D*> fHotPixelMap;
79 
80  std::vector<TH1D*> fTriggers;
81  std::vector<TH1D*> fHitsVsEvents, fHitsVsColumn;
82  std::vector<TH2D*> fHitsVsEvtCol;
83 
84  ClassDef(PixTestXray, 1)
85 
86 };
87 #endif
virtual void runCommand(std::string command)
allow execution of any button in the test
Definition: PixTest.cc:129
virtual void doTest()
function connected to "DoTest" button of PixTab
Definition: PixTest.cc:602
void bookHist(std::string name)
use if you want, or define the histograms in the specific member functions
Definition: PixTest.cc:93
virtual void setToolTips()
implement this to provide updated tool tips if the user changes test parameters
Definition: PixTest.cc:85
virtual bool setParameter(std::string parName, std::string sval)
set the string value of a parameter
Definition: PixTest.cc:433
void init()
sets all test parameters
Definition: PixTest.cc:62