source: fact/tools/rootmacros/PulseTemplates/pixel.h@ 13961

Last change on this file since 13961 was 13857, checked in by Jens Buss, 12 years ago
whitespace
File size: 5.0 KB
Line 
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 <TFile.h>
25#include "TCanvas.h"
26#include "TObjArray.h"
27//
28
29//#include "rootfilehandler.h"
30//#include "rootfilehandler.C"
31
32// LOCAL INCLUDES
33//
34
35// FORWARD REFERENCES
36//
37
38
39class Pixel
40{
41public:
42// LIFECYCLE
43
44 /** Default constructor.
45 */
46 Pixel(
47 int pixelID,
48 int maxPulsorder,
49 int verbosityLevel,
50 bool stats,
51 TString options,
52 int pixelOverlayXaxisLeft,
53 int pixelOverlayXaxisRight,
54 float bSLMean,
55 float gainMean,
56 TFile* filename,
57 TFile* outfilename
58 );
59
60 Pixel(
61 int pixelID,
62 int maxPulsorder,
63 int verbosityLevel,
64 bool stats,
65 TString options,
66 int pixelOverlayXaxisLeft,
67 int pixelOverlayXaxisRight,
68 float bSLMean,
69 float gainMean
70 );
71
72
73 // /** Copy constructor.
74 // *
75 // * @param from The value to copy to this object.
76 // */
77
78
79 /** Destructor.
80 */
81 ~Pixel();
82
83
84// OPERATORS
85
86// /** Assignment operator.
87// *
88// * @param from THe value to assign to this object.
89// *
90// * @return A reference to this object.
91// */
92// XX& operator=(const XX& from);
93
94// OPERATIONS
95
96 //Histogram Booking
97protected:
98 void BookPixelHistos();
99 void BookDistributionHistos();
100 void BookTemplateHistos();
101 void BookEdgeTemplateHistos();
102
103 //Histogram deletion
104 void DeletePixelHistos();
105 void DeleteDistributionHistos();
106 void DeleteTemplateHistos();
107 void DeleteEdgeTemplateHistos();
108
109 void
110 MakeTH1Pretty(
111 TH1* histo,
112 TString histName,
113 TString histTitle,
114 int order
115 );
116 void
117 MakeTH2Pretty(
118 TH2* histo,
119 TString histName,
120 TString histTitle,
121 int order
122 );
123 void
124 MakeTProfilePretty(
125 TProfile* histo,
126 TString histName,
127 TString histTitle,
128 int order
129 );
130
131public:
132 //Histogram Drawing
133 void DrawOverlayHistograms(
134 TCanvas **pixelCanvas, //Array of Canvases
135 int *histoFrameNR //Array with Canvas Frame numbers
136 );
137 void DrawDistributionHistograms(
138 TCanvas **pixelCanvas, //Array of Canvases
139 int *histoFrameNr //Array with Canvas Frame numbers
140 );
141 void DrawTemplateHistograms(
142 TCanvas **pixelCanvas, //Array of Canvases
143 int *histoFrameNr //Array with Canvas Frame numbers
144 );
145 void DrawEdgeTemplateHistograms(
146 TCanvas **pixelCanvas, //Array of Canvases
147 int *histoFrameNr //Array with Canvas Frame numbers
148 );
149
150 //File Handling
151 void SavePixelHistograms( TString loc_fname, bool);
152
153protected:
154 void LoadPulseHistos( );
155
156public:
157 //File Handling Service Functions
158 TString HistoTitle(TString, int );
159 TString HistoName(TString, int);
160 TString ChooseCycleNumber(TString , int);
161 virtual TString CsvFileName(TString, TString, int );
162
163// ACCESS
164// INQUIRY
165 int mChid;
166 bool mStats;
167 int mMaxPulseOrder;
168 int mVerbosityLevel;
169 int mPixelOverlayXaxisLeft;
170 int mPixelOverlayXaxisRight;
171 float mBSLMean;
172 float mGainMean;
173 TString mOptions;
174
175 //Pixel Histos
176 TH2F** hMaxOverlay; //histogrammm for overlay of detected Peaks
177 TH2F** hEdgeOverlay;
178 TProfile** hMaxProfile; //histogrammm for Profile of detected Peaks
179 TProfile** hEdgeProfile; //histogrammm for Profile of detected Peaks
180
181 //Distribution Histos
182 TH1F** hSlopeRisingEdge;
183 TH1I** hRisingEdgeToMax;
184 TH1I** hPosOfMax;
185
186 //Max Overlay Template Histos
187 TH1F** hPixelMax;
188 TH1F** hPixelMedian;
189 TH1F** hPixelMean;
190 //Edge OverlayTemplate Histos
191 TH1F** hPixelEdgeMax;
192 TH1F** hPixelEdgeMedian;
193 TH1F** hPixelEdgeMean;
194
195 TList* hList;
196
197 TFile* mRootFile;
198 TFile* mOutRootFile;
199 TDirectory* mDirectory;
200
201protected:
202 int mConstructorType; //0 delete distributions, 1 delete TemplateHistos
203private:
204};
205
206
207
208#endif // _PIXEL_H_
Note: See TracBrowser for help on using the repository browser.