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

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