| 1 | /** container with all attributes and histograms of a pixel.
|
|---|
| 2 | *
|
|---|
| 3 | * #include "XX.h" <BR>
|
|---|
| 4 | * -llib
|
|---|
| 5 | *
|
|---|
| 6 | * A longer description.
|
|---|
| 7 | *
|
|---|
| 8 | * @see something
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifndef PIXEL_H
|
|---|
| 12 | #define PIXEL_H
|
|---|
| 13 |
|
|---|
| 14 | // SYSTEM INCLUDES
|
|---|
| 15 | //
|
|---|
| 16 |
|
|---|
| 17 | // PROJECT INCLUDES
|
|---|
| 18 | #include <TROOT.h>
|
|---|
| 19 | #include <TProfile.h>
|
|---|
| 20 | #include <TH2F.h>
|
|---|
| 21 | #include <TH1I.h>
|
|---|
| 22 | #include <TH1F.h>
|
|---|
| 23 | #include <TString.h>
|
|---|
| 24 | #include "TCanvas.h"
|
|---|
| 25 | #include "TObjArray.h"
|
|---|
| 26 | //
|
|---|
| 27 |
|
|---|
| 28 | //#include "rootfilehandler.h"
|
|---|
| 29 | //#include "rootfilehandler.C"
|
|---|
| 30 |
|
|---|
| 31 | // LOCAL INCLUDES
|
|---|
| 32 | //
|
|---|
| 33 |
|
|---|
| 34 | // FORWARD REFERENCES
|
|---|
| 35 | //
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | class Pixel
|
|---|
| 39 | {
|
|---|
| 40 | public:
|
|---|
| 41 | // LIFECYCLE
|
|---|
| 42 |
|
|---|
| 43 | /** Default constructor.
|
|---|
| 44 | */
|
|---|
| 45 | Pixel(
|
|---|
| 46 | int pixelID,
|
|---|
| 47 | int maxPulsorder,
|
|---|
| 48 | int verbosityLevel,
|
|---|
| 49 | bool stats,
|
|---|
| 50 | TFile* filename
|
|---|
| 51 | );
|
|---|
| 52 |
|
|---|
| 53 | Pixel(
|
|---|
| 54 | int pixelID,
|
|---|
| 55 | int maxPulsorder,
|
|---|
| 56 | int verbosityLevel,
|
|---|
| 57 | bool stats,
|
|---|
| 58 | TFile* filename,
|
|---|
| 59 | int pixelOverlayXaxisLeft,
|
|---|
| 60 | int pixelOverlayXaxisRight,
|
|---|
| 61 | float bSLMean,
|
|---|
| 62 | float gainMean,
|
|---|
| 63 | TString options
|
|---|
| 64 | );
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 | // /** Copy constructor.
|
|---|
| 68 | // *
|
|---|
| 69 | // * @param from The value to copy to this object.
|
|---|
| 70 | // */
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 | /** Destructor.
|
|---|
| 74 | */
|
|---|
| 75 | ~Pixel();
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 | // OPERATORS
|
|---|
| 79 |
|
|---|
| 80 | // /** Assignment operator.
|
|---|
| 81 | // *
|
|---|
| 82 | // * @param from THe value to assign to this object.
|
|---|
| 83 | // *
|
|---|
| 84 | // * @return A reference to this object.
|
|---|
| 85 | // */
|
|---|
| 86 | // XX& operator=(const XX& from);
|
|---|
| 87 |
|
|---|
| 88 | // OPERATIONS
|
|---|
| 89 |
|
|---|
| 90 | //Histogram Booking
|
|---|
| 91 | protected:
|
|---|
| 92 | void BookPixelHistos();
|
|---|
| 93 | void BookDistributionHistos();
|
|---|
| 94 | void BookTemplateHistos();
|
|---|
| 95 | void BookEdgeTemplateHistos();
|
|---|
| 96 |
|
|---|
| 97 | //Histogram deletion
|
|---|
| 98 | void DeletePixelHistos();
|
|---|
| 99 | void DeleteDistributionHistos();
|
|---|
| 100 | void DeleteTemplateHistos();
|
|---|
| 101 | void DeleteEdgeTemplateHistos();
|
|---|
| 102 |
|
|---|
| 103 | void
|
|---|
| 104 | MakeTH1Pretty(
|
|---|
| 105 | TH1* histo,
|
|---|
| 106 | TString histName,
|
|---|
| 107 | TString histTitle,
|
|---|
| 108 | int order
|
|---|
| 109 | );
|
|---|
| 110 | void
|
|---|
| 111 | MakeTH2Pretty(
|
|---|
| 112 | TH2* histo,
|
|---|
| 113 | TString histName,
|
|---|
| 114 | TString histTitle,
|
|---|
| 115 | int order
|
|---|
| 116 | );
|
|---|
| 117 | void
|
|---|
| 118 | MakeTProfilePretty(
|
|---|
| 119 | TProfile* histo,
|
|---|
| 120 | TString histName,
|
|---|
| 121 | TString histTitle,
|
|---|
| 122 | int order
|
|---|
| 123 | );
|
|---|
| 124 |
|
|---|
| 125 | public:
|
|---|
| 126 | //Histogram Drawing
|
|---|
| 127 | void DrawOverlayHistograms(
|
|---|
| 128 | TCanvas **pixelCanvas, //Array of Canvases
|
|---|
| 129 | int *histoFrameNR //Array with Canvas Frame numbers
|
|---|
| 130 | );
|
|---|
| 131 | void DrawDistributionHistograms(
|
|---|
| 132 | TCanvas **pixelCanvas, //Array of Canvases
|
|---|
| 133 | int *histoFrameNr //Array with Canvas Frame numbers
|
|---|
| 134 | );
|
|---|
| 135 | void DrawTemplateHistograms(
|
|---|
| 136 | TCanvas **pixelCanvas, //Array of Canvases
|
|---|
| 137 | int *histoFrameNr //Array with Canvas Frame numbers
|
|---|
| 138 | );
|
|---|
| 139 | void DrawEdgeTemplateHistograms(
|
|---|
| 140 | TCanvas **pixelCanvas, //Array of Canvases
|
|---|
| 141 | int *histoFrameNr //Array with Canvas Frame numbers
|
|---|
| 142 | );
|
|---|
| 143 |
|
|---|
| 144 | //File Handling
|
|---|
| 145 | void SavePixelHistograms(TString loc_fname, bool);
|
|---|
| 146 | protected:
|
|---|
| 147 | void LoadPulseHistos( );
|
|---|
| 148 |
|
|---|
| 149 | public:
|
|---|
| 150 | //File Handling Service Functions
|
|---|
| 151 | TString HistoTitle(TString, int );
|
|---|
| 152 | TString HistoName(TString, int);
|
|---|
| 153 | TString CsvFileName(TString, TString, int );
|
|---|
| 154 |
|
|---|
| 155 | // ACCESS
|
|---|
| 156 | // INQUIRY
|
|---|
| 157 | int mChid;
|
|---|
| 158 | bool mStats;
|
|---|
| 159 | int mMaxPulseOrder;
|
|---|
| 160 | int mVerbosityLevel;
|
|---|
| 161 | int mPixelOverlayXaxisLeft;
|
|---|
| 162 | int mPixelOverlayXaxisRight;
|
|---|
| 163 | float mBSLMean;
|
|---|
| 164 | float mGainMean;
|
|---|
| 165 | TString mOptions;
|
|---|
| 166 |
|
|---|
| 167 | //Pixel Histos
|
|---|
| 168 | TH2F** hMaxOverlay; //histogrammm for overlay of detected Peaks
|
|---|
| 169 | TH2F** hEdgeOverlay;
|
|---|
| 170 | TProfile** hMaxProfile; //histogrammm for Profile of detected Peaks
|
|---|
| 171 | TProfile** hEdgeProfile; //histogrammm for Profile of detected Peaks
|
|---|
| 172 |
|
|---|
| 173 | //Distribution Histos
|
|---|
| 174 | TH1F** hSlopeRisingEdge;
|
|---|
| 175 | TH1I** hRisingEdgeToMax;
|
|---|
| 176 | TH1I** hPosOfMax;
|
|---|
| 177 |
|
|---|
| 178 | //Max Overlay Template Histos
|
|---|
| 179 | TH1F** hPixelMax;
|
|---|
| 180 | TH1F** hPixelMedian;
|
|---|
| 181 | TH1F** hPixelMean;
|
|---|
| 182 | //Edge OverlayTemplate Histos
|
|---|
| 183 | TH1F** hPixelEdgeMax;
|
|---|
| 184 | TH1F** hPixelEdgeMedian;
|
|---|
| 185 | TH1F** hPixelEdgeMean;
|
|---|
| 186 |
|
|---|
| 187 | TObjArray* hList;
|
|---|
| 188 |
|
|---|
| 189 | TFile* mRootFile;
|
|---|
| 190 |
|
|---|
| 191 | protected:
|
|---|
| 192 | int mConstructorType; //0 delete distributions, 1 delete TemplateHistos
|
|---|
| 193 | private:
|
|---|
| 194 | };
|
|---|
| 195 |
|
|---|
| 196 |
|
|---|
| 197 |
|
|---|
| 198 | #endif // _PIXEL_H_
|
|---|