Changeset 2004 for trunk/MagicSoft
- Timestamp:
- 04/24/03 13:10:43 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2003 r2004 30 30 * mhist/MH.h: 31 31 - fixed a bug in the overloading of DrawClone 32 33 * mimage/MHillasSrc.[h,cc], mimage/MHHillasSrc.[h,cc]: 34 - like suggested by Wolfgang: removed Head-Tail 32 35 33 36 -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
r1992 r2004 70 70 fAlpha = new TH1F("Alpha", "Alpha of Ellipse", 181, -90, 90); 71 71 fDist = new TH1F("Dist", "Dist of Ellipse", 100, 0, 445); 72 fHeadTail = new TH1F("HeadTail", "HeadTail of Ellipse", 101, -445, 445);73 72 fCosDA = new TH1F("CosDA", "cos(Delta,Alpha) of Ellipse", 101, -1, 1); 74 73 75 74 fAlpha->SetDirectory(NULL); 76 75 fDist->SetDirectory(NULL); 77 fHeadTail->SetDirectory(NULL);78 76 fCosDA->SetDirectory(NULL); 79 77 80 78 fAlpha->SetXTitle("\\alpha [\\circ]"); 81 79 fDist->SetXTitle("Dist [mm]"); 82 fHeadTail->SetXTitle("Head-Tail [mm]");83 80 fCosDA->SetXTitle("cos(\\delta,\\alpha)"); 84 81 85 82 fAlpha->SetYTitle("Counts"); 86 83 fDist->SetYTitle("Counts"); 87 fHeadTail->SetYTitle("Counts");88 84 fCosDA->SetYTitle("Counts"); 89 85 } … … 97 93 delete fAlpha; 98 94 delete fDist; 99 delete fHeadTail;100 95 delete fCosDA; 101 96 } … … 124 119 ApplyBinning(*plist, "Alpha", fAlpha); 125 120 ApplyBinning(*plist, "Dist", fDist); 126 ApplyBinning(*plist, "HeadTail", fHeadTail);127 121 128 122 return kTRUE; … … 138 132 const MHillasSrc &h = *(MHillasSrc*)par; 139 133 140 fAlpha ->Fill(h.GetAlpha()); 141 fDist ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist()); 142 fHeadTail->Fill(fUseMmScale ? h.GetHeadTail() : fMm2Deg*h.GetHeadTail()); 143 fCosDA ->Fill(h.GetCosDeltaAlpha()); 134 fAlpha->Fill(h.GetAlpha()); 135 fDist ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist()); 136 fCosDA->Fill(h.GetCosDeltaAlpha()); 144 137 145 138 return kTRUE; … … 184 177 185 178 const Double_t scale = mmscale ? 1./fMm2Deg : fMm2Deg; 186 MH::ScaleAxis(fDist, scale); 187 MH::ScaleAxis(fHeadTail, scale); 188 189 if (mmscale) 190 { 191 fDist->SetXTitle("Dist [mm]"); 192 fHeadTail->SetXTitle("Head-Tail [mm]"); 193 } 194 else 195 { 196 fDist->SetXTitle("Dist [\\circ]"); 197 fHeadTail->SetXTitle("Head-Tail [\\circ]"); 198 } 179 MH::ScaleAxis(fDist, scale); 180 181 fDist->SetXTitle(mmscale ? "Dist [mm]" : "Dist [\\circ]"); 199 182 200 183 fUseMmScale = mmscale; … … 239 222 fDist->Draw(); 240 223 241 pad->cd(3);242 gPad->SetBorderMode(0);243 fHeadTail->Draw();244 245 224 pad->cd(4); 246 225 gPad->SetBorderMode(0); … … 258 237 if (name.Contains("Dist", TString::kIgnoreCase)) 259 238 return fDist; 260 if (name.Contains("HeadTail", TString::kIgnoreCase))261 return fHeadTail;262 239 if (name.Contains("CosDA", TString::kIgnoreCase)) 263 240 return fCosDA; -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.h
r1992 r2004 14 14 TH1F *fAlpha; //-> 15 15 TH1F *fDist; //-> 16 TH1F *fHeadTail; //->17 16 TH1F *fCosDA; //-> 18 17 … … 34 33 TH1F *GetHistAlpha() { return fAlpha; } 35 34 TH1F *GetHistDist() { return fDist; } 36 TH1F *GetHistHeadTail() { return fHeadTail; }37 35 TH1F *GetHistCosDeltaAlpha() { return fCosDA; } 38 36 -
trunk/MagicSoft/Mars/mimage/MHillasSrc.cc
r1940 r2004 51 51 // defined with positive x-component 52 52 // 53 // Version 4: 54 // ---------- 55 // 56 // fHeadTail removed 57 // 58 // 53 59 ///////////////////////////////////////////////////////////////////////////// 54 60 #include "MHillasSrc.h" … … 78 84 fDist = -1; 79 85 fAlpha = 0; 80 fHeadTail = 0;81 86 fCosDeltaAlpha = 0; 82 87 } … … 103 108 const Double_t tand = tan(GetDelta()); // [1] 104 109 105 fHeadTail = cd*sx + sd*sy;// [mm]110 const Double_t headtail = cd*sx + sd*sy; // [mm] 106 111 107 112 // … … 126 131 127 132 fAlpha = asin(arg)*kRad2Deg; // [deg] 128 fCosDeltaAlpha = fHeadTail/dist;// [1]133 fCosDeltaAlpha = headtail/dist; // [1] 129 134 fDist = dist; // [mm] 130 135 … … 140 145 *fLog << " - Dist [mm] = " << fDist << endl; 141 146 *fLog << " - Alpha [deg] = " << fAlpha << endl; 142 *fLog << " - HeadTail [mm] = " << fHeadTail << endl;143 147 *fLog << " - CosDeltaAlpha = " << fCosDeltaAlpha << endl; 144 148 } … … 150 154 void MHillasSrc::Set(const TArrayF &arr) 151 155 { 152 if (arr.GetSize() != 4)156 if (arr.GetSize() != 3) 153 157 return; 154 158 155 159 fAlpha = arr.At(0); // [deg] angle of major axis with vector to src 156 160 fDist = arr.At(1); // [mm] distance between src and center of ellipse 157 fHeadTail = arr.At(2); // [mm] 158 fCosDeltaAlpha = arr.At(3); // [1] cosine of angle between d and a 161 fCosDeltaAlpha = arr.At(2); // [1] cosine of angle between d and a 159 162 } 160 163 -
trunk/MagicSoft/Mars/mimage/MHillasSrc.h
r1940 r2004 16 16 Float_t fAlpha; // [deg] angle of major axis with vector to src 17 17 Float_t fDist; // [mm] distance between src and center of ellipse 18 Float_t fHeadTail; // [mm]19 18 Float_t fCosDeltaAlpha; // [1] cosine of angle between d and a 20 19 … … 35 34 Float_t GetAlpha() const { return fAlpha; } 36 35 Float_t GetDist() const { return fDist; } 37 Float_t GetHeadTail() const { return fHeadTail; }38 36 Float_t GetCosDeltaAlpha() const { return fCosDeltaAlpha; } 39 37 … … 47 45 //virtual void AsciiWrite(ofstream &fout) const; 48 46 49 ClassDef(MHillasSrc, 3) // Container to hold source position dependant parameters47 ClassDef(MHillasSrc, 4) // Container to hold source position dependant parameters 50 48 }; 51 49 -
trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.cc
r1940 r2004 55 55 // of type MHillasSrc (or derived) in which the parameters are stored 56 56 // The default is "MHillasSrc" 57 //58 //MHillasSrcCalc::MHillasSrcCalc(const char *src, const char *hil,59 // const char *name, const char *title)60 // : fHillas(NULL), fSrcPos(NULL), fHillasSrc(NULL)61 //{62 // fName = name ? name : gsDefName.Data();63 // fTitle = title ? title : gsDefTitle.Data();64 65 // fSrcName = src;66 // fHillasName = hil;67 // fHillasInput = "MHillas";68 //}69 // -------------------------------------------------------------------------70 57 // 71 58 MHillasSrcCalc::MHillasSrcCalc(const char *src, const char *hil, -
trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.h
r1940 r2004 30 30 31 31 public: 32 // MHillasSrcCalc(const char *src="MSrcPosCam", const char *hil="MHillasSrc",33 // const char *name=NULL, const char *title=NULL);34 35 32 MHillasSrcCalc(const char *src="MSrcPosCam", const char *hil="MHillasSrc", 36 33 const char *name=NULL, const char *title=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.