Changeset 1442 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 07/25/02 14:18:34 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc
r1285 r1442 68 68 // connect all the histogram with the container fHist 69 69 // 70 fAlpha = new TH1F("Alpha", "Alpha of Ellipse", 90, 0, 90); 71 fDist = new TH1F("Dist", "Dist of Ellipse", 100, 0, 600); 70 fAlpha = new TH1F("Alpha", "Alpha of Ellipse", 90, 0, 90); 71 fDist = new TH1F("Dist", "Dist of Ellipse", 100, 0, 600); 72 fHeadTail = new TH1F("HeadTail", "HeadTail of Ellipse", 45, 0, 90); 73 fCosDA = new TH1F("CosDA", "cos(Delta,Alpha) of Ellipse", 100, -1, 1); 72 74 73 75 fAlpha->SetDirectory(NULL); 74 76 fDist->SetDirectory(NULL); 75 76 fAlpha->SetXTitle("\\alpha [mm]"); 77 fHeadTail->SetDirectory(NULL); 78 fCosDA->SetDirectory(NULL); 79 80 fAlpha->SetXTitle("\\alpha [\\circ]"); 77 81 fDist->SetXTitle("Dist [mm]"); 82 fHeadTail->SetXTitle("Head-Tail [\\circ]"); 83 fCosDA->SetXTitle("cos(\\delta,\\alpha) [mm]"); 78 84 79 85 fAlpha->SetYTitle("Counts"); 80 86 fDist->SetYTitle("Counts"); 87 fHeadTail->SetYTitle("Counts"); 88 fCosDA->SetYTitle("Counts"); 81 89 } 82 90 … … 89 97 delete fAlpha; 90 98 delete fDist; 99 delete fHeadTail; 100 delete fCosDA; 91 101 } 92 102 … … 138 148 const MHillasSrc &h = *(MHillasSrc*)par; 139 149 140 fAlpha->Fill(fabs(h.GetAlpha())); 141 fDist ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist()); 150 fAlpha ->Fill(fabs(h.GetAlpha())); 151 fDist ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist()); 152 fHeadTail->Fill(h.GetHeadTail()); 153 fCosDA ->Fill(h.GetCosDeltaAlpha()); 142 154 143 155 return kTRUE; … … 154 166 TObject *MHHillasSrc::DrawClone(Option_t *opt) const 155 167 { 156 TCanvas *c = MakeDefCanvas("Hillas ", "Histograms of Source dependant Parameters",157 350, 500);158 c->Divide( 1, 2);168 TCanvas *c = MakeDefCanvas("HillasSrc", "Histograms of Source dependant Parameters", 169 700, 500); 170 c->Divide(2, 2); 159 171 160 172 // FIXME: Display Source position … … 170 182 c->cd(2); 171 183 fDist->DrawCopy(); 184 185 c->cd(3); 186 fHeadTail->DrawCopy(); 187 188 c->cd(4); 189 fCosDA->DrawCopy(); 172 190 173 191 c->Modified(); … … 186 204 { 187 205 if (!gPad) 188 MakeDefCanvas("Hillas", "Histograms of Src dependant Parameters", 350, 500); 206 MakeDefCanvas("HillasSrc", "Histograms of Src dependant Parameters", 207 700, 500); 189 208 190 209 // FIXME: Display Source position 191 210 192 gPad->Divide( 1, 2);211 gPad->Divide(2, 2); 193 212 194 213 gPad->cd(1); … … 198 217 fDist->Draw(); 199 218 219 gPad->cd(1); 220 fHeadTail->Draw(); 221 222 gPad->cd(2); 223 fCosDA->Draw(); 224 200 225 gPad->Modified(); 201 226 gPad->Update(); -
trunk/MagicSoft/Mars/mhist/MHHillasSrc.h
r1216 r1442 14 14 TH1F *fAlpha; 15 15 TH1F *fDist; 16 TH1F *fHeadTail; 17 TH1F *fCosDA; 16 18 17 19 Float_t fMm2Deg; … … 27 29 Bool_t Fill(const MParContainer *par); 28 30 29 TH1F *GetHistAlpha() { return fAlpha; } 30 TH1F *GetHistDist() { return fDist; } 31 TH1F *GetHistAlpha() { return fAlpha; } 32 TH1F *GetHistDist() { return fDist; } 33 TH1F *GetHistHeadTail() { return fHeadTail; } 34 TH1F *GetHistCosDeltaAlpha() { return fCosDA; } 31 35 32 36 void Draw(Option_t *opt=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.