Changeset 6190 for trunk/MagicSoft/Mars/mtemp/mmpi/MSkyPlot.h
- Timestamp:
- 02/01/05 22:54:10 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mmpi/MSkyPlot.h
r5490 r6190 6 6 #endif 7 7 8 #include <vector>9 10 8 #ifndef ROOT_TH2 11 9 #include <TH2.h> … … 14 12 #ifndef ROOT_TH1 15 13 #include <TH1.h> 14 #endif 15 16 #ifndef ROOT_TOrdCollection 17 #include <TOrdCollection.h> 16 18 #endif 17 19 … … 29 31 class MHillasSrc; 30 32 class MNewImagePar; 33 class MHadronness; 31 34 class MGeomCam; 32 35 class TOrdCollection; 33 36 class MSkyPlot : public MTask 34 37 { 35 38 private: 36 MGeomCam *fGeomCam; //! container to take the event time from 39 40 MGeomCam *fGeomCam; //! container to take the event time from 37 41 MTime *fTime; //! container to take the event time from 38 42 MPointingPos *fPointPos; //! container to take pointing position from 39 MReportDrive *fRepDrive; 40 MSrcPosCam *fSrcPosCam; 41 MSrcPosCam *fPntPosCam; 43 MReportDrive *fRepDrive; //! 44 MSrcPosCam *fSrcPosCam; //! container with x and y of the source 45 MSrcPosCam *fPntPosCam; //! container with x and y of the position MReportDrive.GetRa, MReportDrive.GetDec 42 46 MObservatory *fObservatory; //! container to take observatory location from 43 MHillas *fHillas; 44 MHillasExt *fHillasExt; 45 MHillasSrc *fHillasSrc; 46 MNewImagePar *fNewImagePar; 47 MHillas *fHillas; //! 48 MHillasExt *fHillasExt; //! 49 MHillasSrc *fHillasSrc; //! 50 MNewImagePar *fNewImagePar; //! 51 MHadronness *fHadron; //! 47 52 48 Float_t fMm2Deg; // conversion factor for display in degrees 49 Double_t fGridBinning; // degrees 50 Double_t fGridFineBin; // degrees 53 TOrdCollection *fHistAlpha; // vector of histograms for alpha 54 55 Float_t fMm2Deg; // conversion factor for display in degrees 56 Double_t fGridBinning; // degrees 57 Double_t fGridFineBin; // degrees 51 58 52 59 // Float_t fAlphaCut; // Alpha cut … … 59 66 // Float_t fMaxLD; // Maximum distance in percent of dist 60 67 61 std::vector <TH1D> fHistAlpha; // vector of histograms for alpha62 68 Int_t fNumalphahist; // number of histograms for alpha 63 69 Int_t fNumBinsAlpha; … … 65 71 Float_t fAlphaLeftEdge; 66 72 Float_t fAlphaRightEdge; 67 Float_t fAlphaONMax; // [deg] , upper cut for alpha ON region in the alpha plot 68 // [deg], ON region in the alpha plot, maybe 5 deg is better 69 // NOTE: up to now only values of 5, 10, 15, 20 degrees are possible 73 Float_t fAlphaONMax; // [deg] , upper cut for alpha ON region in the alpha plot, [deg], ON region in the alpha plot, maybe 5 deg is better, NOTE: up to now only values of 5, 10, 15, 20 degrees are possible 70 74 Float_t fAlphaBgLow; // lower limit for bg region in the ON alpha plot 71 75 Float_t fAlphaBgUp; // upper limit for bg region in the ON alpha plot 72 76 73 TH2D fHistSignif; // sky plot of significance vs. x and y 74 TH2D fHistNexcess; // sky plot of number of excess events vs. x and y 75 TH2D fHistOn; // sky plot of events below fAlphaONMax vs. x and y 76 TH1D fHistSignifGaus; // distribution of significance 77 Bool_t fSetCenter; // used to set the center of these histograms once 78 Double_t fRa0; 79 Double_t fDec0; 80 Bool_t kSaveAlphaPlots; 81 Bool_t kSaveSkyPlots; 82 Bool_t kSaveNexPlot; 83 84 Float_t fMinXGrid; // [deg] , left edge of the skyplot 85 Float_t fMaxXGrid; // [deg] , right edge of the skyplot 86 Float_t fMinYGrid; // [deg] , upper edge of the skyplot 87 Float_t fMaxYGrid; // [deg] , lower edge of the skyplot 88 Float_t fBinStepGrid; // [deg] , grid size 89 Int_t fNumStepsX; // number of bins in x 90 Int_t fNumStepsY; // number of bins in y 77 TH2D fHistSignif; // sky plot of significance vs. x and y 78 TH2D fHistNexcess; // sky plot of number of excess events vs. x and y 79 TH2D fHistOn; // sky plot of events below fAlphaONMax vs. x and y 80 TH1D fHistSignifGaus; // distribution of significance 81 Bool_t fSetCenter; // used to set the center of these histograms once 82 Bool_t fUseRF; // use RF hadronness cut instead of supercuts 83 Double_t fRa0; // 84 Double_t fDec0; // 85 Bool_t fSaveAlphaPlots; // 86 Bool_t fSaveSkyPlots; // 87 Bool_t fSaveNexPlot; // 88 89 Float_t fMinXGrid; // [deg] , left edge of the skyplot 90 Float_t fMaxXGrid; // [deg] , right edge of the skyplot 91 Float_t fMinYGrid; // [deg] , upper edge of the skyplot 92 Float_t fMaxYGrid; // [deg] , lower edge of the skyplot 93 Float_t fBinStepGrid; // [deg] , grid size 94 Int_t fNumStepsX; // number of bins in x 95 Int_t fNumStepsY; // number of bins in y 91 96 92 97 … … 97 102 Float_t fMaxDist; // dist max cut (ever possible) 98 103 Float_t fMinDist; // dist min cut (ever possible) 104 Float_t fHadrCut; // hadronness cut 99 105 100 106 // coefficients for the cuts: … … 107 113 TString fSkyHName; // name for histogram with sky plots 108 114 TString fNexHName; // name for canvas with Nex plot 109 110 Int_t DistancetoPrimitive(Int_t px, Int_t py); 115 Float_t fElaTime; // elapsed time [min] 111 116 112 117 TObject *GetCatalog(); … … 119 124 public: 120 125 MSkyPlot(const char *name=NULL, const char *title=NULL); 126 ~MSkyPlot(); 121 127 122 // TH1 *GetHistByName(const TString name) { return &fHist; } 123 TH2D *GetHistSignif() { return &fHistSignif; } 124 TH2D *GetHistNexcess() { return &fHistNexcess; } 125 TH2D *GetHistOn() { return &fHistOn; } 128 Double_t CalcLimit(Double_t *a, Double_t ls, Double_t ls2, Double_t dd2); 129 130 TH2D *GetHistSignif () { return &fHistSignif; } 131 TH2D *GetHistNexcess () { return &fHistNexcess; } 132 TH2D *GetHistOn () { return &fHistOn; } 126 133 TH1D *GetHistSignifGaus() { return &fHistSignifGaus; } 134 135 Int_t GetSize() const { return fHistAlpha->GetSize(); } 136 137 TH1D *GetAlphaPlot( const Int_t i=-1); 138 const TH1D *GetAlphaPlot( const Int_t=-1) const; 139 140 void ReadCuts(const TString parSCinit); 141 142 void SaveAlphaPlots(const TString stri2); 143 void SaveNexPlot(const TString stri3); 144 void SaveSkyPlots(TString stri); 145 146 void SetAlphaCut(Float_t alpha); 147 void SetAlphaBGLimits(Float_t alphalow, Float_t alphalup); 127 148 128 149 void SetMinDist(Float_t dist) { fMinDist = dist; } // Absolute minimum distance … … 130 151 void SetSizeMin(Float_t size) { fSizeMin = size; } // Absolute minimum Size 131 152 void SetSizeMax(Float_t size) { fSizeMax = size; } // Absolute maximum Size 132 void ReadCuts(const TString parSCinit);133 153 void SetSkyPlot(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Float_t step); 134 Double_t CalcLimit(Double_t *a, Double_t ls, Double_t ls2, Double_t dd2);154 void SetHadrCut(Float_t b) { fHadrCut = b; } // hadronness cut 135 155 136 156 void SetOutputSkyName(TString outname2) { fSkyHName = outname2; } 137 void SaveSkyPlots(TString stri); 138 void SetNotSaveSkyPlots() { kSaveSkyPlots = kFALSE; } 139 157 void SetNotSaveSkyPlots() { fSaveSkyPlots = kFALSE; } 140 158 141 159 void SetOutputAlphaName(TString outname1) { fAlphaHName = outname1; } 142 void SaveAlphaPlots(const TString stri2); 143 void SetNotSaveAlphaPlots() { kSaveAlphaPlots = kFALSE; } 160 void SetNotSaveAlphaPlots() { fSaveAlphaPlots = kFALSE; } 144 161 145 162 void SetOutputNexName(TString outname3) { fNexHName = outname3; } 146 void S aveNexPlot(const TString stri3);147 void SetNotSaveNexPlot() { kSaveNexPlot = kFALSE; }163 void SetElapsedTime(Float_t g) { fElaTime = g; } 164 void SetNotSaveNexPlot() { fSaveNexPlot = kFALSE; } 148 165 166 void SetUseRF() { fUseRF = kTRUE; } 149 167 150 void SetAlphaCut(Float_t alpha); 151 void SetAlphaBGLimits(Float_t alphalow, Float_t alphalup); 152 153 //std::vector <TH1D>::iterator GetAlphaPlots() { std::vector <TH1D>::iterator iter; return iter = fHistAlpha.begin() ; } 154 std::vector <TH1D> GetAlphaPlots() { return fHistAlpha ; } 155 156 void Draw(Option_t *option=""); 157 158 ClassDef(MSkyPlot, 0) //2D-histogram in alpha, x and y 168 ClassDef(MSkyPlot, 1) //2D-histogram in alpha, x and y 159 169 }; 160 170
Note:
See TracChangeset
for help on using the changeset viewer.