1 #ifndef TH2D_ANTARCTICA_H 2 #define TH2D_ANTARCTICA_H 4 #include "TProfile2D.h" 6 #include "AntarcticaBackground.h" 7 #include "UsefulAdu5Pat.h" 57 #define GF(var_type, internal_var_decl, FunctionName) \ 58 var_type Get##FunctionName() const \ 60 internal_var_decl f##FunctionName = getBackground()->Get##FunctionName(); \ 61 return f##FunctionName; \ 64 #define SF(var_type, FunctionName, forceRescale) \ 65 void Set##FunctionName(var_type use##FunctionName) \ 67 getBackground()->Set##FunctionName(use##FunctionName); \ 69 RescaleBackground(); \ 95 TProfile2DAntarctica(
const char* name,
const char* title,
const std::vector<Double_t>& x,
const std::vector<Double_t>& y);
97 if(fAntarcticaBackground){
98 delete fAntarcticaBackground;
99 fAntarcticaBackground = NULL;
103 virtual void Draw(Option_t* opt=
"");
104 virtual Int_t Fill(Double_t lon, Double_t lat, Double_t val=1);
106 void UnZoom(){getBackground()->UnZoom();}
108 GF(
bool,
bool,GrayScale)
109 SF(
bool,GrayScale,
false)
110 GF(
bool,
bool,ShowBases)
111 SF(
bool,ShowBases,
false)
112 GF(
bool,
bool,ToolTip);
113 SF(
bool,ToolTip,
false)
116 SF(
int,Coarseness,
false)
118 GF(
bool,
bool,Rampdem)
119 SF(
bool,Rampdem,
true)
122 GF(
bool,
bool,Icemask)
123 SF(
bool,Icemask,
true)
124 GF(
bool,
bool,Surface)
125 SF(
bool,Surface,
true)
126 GF(
bool,
bool,Thickness)
127 SF(
bool,Thickness,
true)
131 void SetGridDivisions(Int_t deltaLon, Int_t deltaLat){
132 getBackground()->SetGridDivisions(deltaLon, deltaLat);
135 virtual void ExecuteEvent(
int event,
int px,
int py);
138 Bool_t GetShowBackgroundColorAxis()
const {
return getBackground()->GetShowColorAxis();}
139 void ShowBackgroundColorAxis(Bool_t b){getBackground()->SetShowColorAxis(b);}
140 void ResetBackgroundColorAxis(){getBackground()->
ResetColorAxis();}
141 void RescaleBackground()
const {getBackground()->
scale(GetMinimum(), GetMaximum());}
142 virtual void SetMaximum(Double_t maximum = -1111) { fMaximum = maximum; RescaleBackground();}
143 virtual void SetMinimum(Double_t minimum = -1111) { fMinimum = minimum; RescaleBackground();}
144 virtual TAxis* GetXaxis();
145 virtual TAxis* GetYaxis();
148 void setAcceptStereographic(
bool accept) { accept_stereographic = accept ; }
149 bool getAcceptStereographic()
const {
return accept_stereographic; }
153 mutable int fCoarseness;
154 mutable int fDeltaLat;
155 mutable int fDeltaLon;
157 bool accept_stereographic;
160 if(!fAntarcticaBackground){
163 return fAntarcticaBackground;
186 TH2DAntarctica(
const char* name,
const char* title, Int_t nx=-1, Int_t ny=-1);
191 TH2DAntarctica(
const char* name,
const char* title,
const std::vector<Double_t>& x,
const std::vector<Double_t>& y);
193 if(fAntarcticaBackground){
194 delete fAntarcticaBackground;
195 fAntarcticaBackground = NULL;
199 virtual void Draw(Option_t* opt=
"");
200 virtual Int_t Fill(Double_t lon, Double_t lat, Double_t val=1);
212 Int_t
FillWithErrorContours(Double_t lon, Double_t lat, Double_t phi, Double_t theta, Double_t sigmaPhi, Double_t sigmaTheta, Double_t ll_thresh,
UsefulAdu5Pat upat, Double_t dist_thresh=0);
214 void UnZoom(){getBackground()->UnZoom();}
216 GF(
bool,
bool,GrayScale)
217 SF(
bool,GrayScale,
false)
218 GF(
bool,
bool,ShowBases)
219 SF(
bool,ShowBases,
false)
220 GF(
bool,
bool,ToolTip);
221 SF(
bool,ToolTip,
false)
224 SF(
int,Coarseness,
false)
226 GF(
bool,
bool,Rampdem)
227 SF(
bool,Rampdem,
true)
230 GF(
bool,
bool,Icemask)
231 SF(
bool,Icemask,
true)
232 GF(
bool,
bool,Surface)
233 SF(
bool,Surface,
true)
234 GF(
bool,
bool,Thickness)
235 SF(
bool,Thickness,
true)
239 void SetGridDivisions(Int_t deltaLon, Int_t deltaLat){
240 getBackground()->SetGridDivisions(deltaLon, deltaLat);
243 virtual void ExecuteEvent(
int event,
int px,
int py);
246 Bool_t GetShowBackgroundColorAxis()
const {
return getBackground()->GetShowColorAxis();}
247 void ShowBackgroundColorAxis(Bool_t b){getBackground()->SetShowColorAxis(b);}
248 void ResetBackgroundColorAxis(){getBackground()->
ResetColorAxis();}
249 void RescaleBackground()
const {getBackground()->
scale(GetMinimum(), GetMaximum());}
250 virtual void SetMaximum(Double_t maximum = -1111) { fMaximum = maximum; RescaleBackground();}
251 virtual void SetMinimum(Double_t minimum = -1111) { fMinimum = minimum; RescaleBackground();}
253 void setAcceptStereographic(
bool accept) { accept_stereographic = accept ; }
254 bool getAcceptStereographic()
const {
return accept_stereographic; }
256 virtual TAxis* GetXaxis();
257 virtual TAxis* GetYaxis();
262 mutable int fCoarseness;
263 mutable int fDeltaLat;
264 mutable int fDeltaLon;
266 bool accept_stereographic;
269 if(!fAntarcticaBackground){
272 return fAntarcticaBackground;
void FillRandomly(Int_t nTimes=5000)
void FillRandomly(Int_t nTimes=5000)
Int_t FillWithErrorContours(Double_t lon, Double_t lat, Double_t phi, Double_t theta, Double_t snr, Double_t ll_thresh, UsefulAdu5Pat upat, Double_t dist_thresh=0)
void scale(double newMin, double newMax)
Does not persist in ROOT!
void ResetColorAxis(bool trigger_redraw=false)
As UsefulAnitaEvent is to RawAnitaEvent, UsefulAdu5Pat is to Adu5Pat. Well not quite as useful but yo...