Changeset 3682 for trunk/MagicSoft/Mars/mimage
- Timestamp:
- 04/08/04 19:52:13 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHHillasExt.cc
r2414 r3682 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 2001 <mailto:tbretz@uni-sw.gwdg.de>19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 218 ! Author(s): Thomas Bretz, 2001 <mailto:tbretz@astro.uni-wuerzburg.de> 19 ! 20 ! Copyright: MAGIC Software Development, 2000-2004 21 21 ! 22 22 ! … … 75 75 fHM3Long.SetDirectory(NULL); 76 76 fHM3Trans.SetDirectory(NULL); 77 fHMaxDist.SetDirectory(NULL); 77 78 78 79 fHAsym.UseCurrentStyle(); 79 80 fHM3Long.UseCurrentStyle(); 80 81 fHM3Trans.UseCurrentStyle(); 82 fHMaxDist.UseCurrentStyle(); 81 83 82 84 fHAsym.SetName("Asymmetry"); 83 85 fHM3Long.SetName("3rd Mom Long"); 84 86 fHM3Trans.SetName("3rd Mom Trans"); 87 fHMaxDist.SetName("Max Dist"); 85 88 86 89 fHAsym.SetTitle("Asymmetry"); 87 90 fHM3Long.SetTitle("3^{rd} Moment Longitudinal"); 88 91 fHM3Trans.SetTitle("3^{rd} Moment Transverse"); 92 fHMaxDist.SetTitle("Distance of max distant pixel"); 89 93 90 94 fHAsym.SetXTitle("Asym [mm]"); 91 95 fHM3Long.SetXTitle("3^{rd} M_{l} [mm]"); 92 96 fHM3Trans.SetXTitle("3^{rd} M_{t} [mm]"); 97 fHMaxDist.SetXTitle("D_{max} [mm]"); 93 98 94 99 fHAsym.SetYTitle("Counts"); 95 100 fHM3Long.SetYTitle("Counts"); 96 101 fHM3Trans.SetYTitle("Counts"); 102 fHMaxDist.SetYTitle("Counts"); 97 103 98 104 fHAsym.SetFillStyle(4000); 99 105 fHM3Long.SetFillStyle(4000); 100 106 fHM3Trans.SetFillStyle(4000); 107 fHMaxDist.SetFillStyle(4000); 101 108 102 109 fHM3Trans.SetLineColor(kBlue); … … 104 111 MBinning bins; 105 112 106 bins.SetEdges( 101, -326, 326);113 bins.SetEdges(51, -326, 326); 107 114 bins.Apply(fHM3Long); 108 115 bins.Apply(fHM3Trans); 109 116 110 bins.SetEdges( 101, -593, 593);117 bins.SetEdges(51, -593, 593); 111 118 bins.Apply(fHAsym); 119 120 bins.SetEdges(101, 0, 593); 121 bins.Apply(fHMaxDist); 112 122 } 113 123 … … 143 153 ApplyBinning(*plist, "M3Long", &fHM3Long); 144 154 ApplyBinning(*plist, "M3Trans", &fHM3Trans); 155 ApplyBinning(*plist, "MaxDist", &fHMaxDist); 145 156 146 157 return kTRUE; … … 161 172 fHM3Long.Fill(scale*fHillasExt->GetM3Long(), w); 162 173 fHM3Trans.Fill(scale*fHillasExt->GetM3Trans(), w); 163 //fHAsymna.Fill(scale*ext.GetAsymna()); 164 //fHAsym0.Fill(scale*ext.GetAsym0()); 174 fHMaxDist.Fill(TMath::Abs(scale*fHillasExt->GetMaxDist()), w); 165 175 166 176 return kTRUE; … … 187 197 MH::ScaleAxis(&fHM3Long, scale); 188 198 MH::ScaleAxis(&fHM3Trans, scale); 199 MH::ScaleAxis(&fHMaxDist, scale); 189 200 190 201 if (mmscale) … … 193 204 fHM3Long.SetXTitle("3^{rd} M_{l} [mm]"); 194 205 fHM3Trans.SetXTitle("3^{rd} M_{t} [mm]"); 206 fHMaxDist.SetXTitle("D_{max} [mm]"); 195 207 } 196 208 else … … 199 211 fHM3Long.SetXTitle("3^{rd} M_{l} [\\circ]"); 200 212 fHM3Trans.SetXTitle("3^{rd} M_{t} [\\circ]"); 213 fHMaxDist.SetXTitle("D_{max} [\\circ]"); 201 214 } 202 215 … … 238 251 AppendPad(""); 239 252 240 pad->Divide(2, 1);253 pad->Divide(2, 2); 241 254 242 255 pad->cd(1); … … 244 257 MH::DrawSame(fHM3Long, fHM3Trans, "3^{rd} Moments"); 245 258 259 pad->cd(3); 260 gPad->SetBorderMode(0); 261 fHAsym.Draw(); 262 246 263 pad->cd(2); 247 264 gPad->SetBorderMode(0); 248 fHAsym.Draw(); 265 fHMaxDist.Draw(); 266 267 delete pad->GetPad(4); 249 268 250 269 pad->Modified(); … … 260 279 if (name.Contains("M3Trans", TString::kIgnoreCase)) 261 280 return &fHM3Trans; 281 if (name.Contains("MaxDist", TString::kIgnoreCase)) 282 return &fHMaxDist; 262 283 263 284 return NULL; -
trunk/MagicSoft/Mars/mimage/MHHillasExt.h
r2043 r3682 19 19 TH1F fHM3Long; // [mm] 3rd moment (e-weighted) along major axis 20 20 TH1F fHM3Trans; // [mm] 3rd moment (e-weighted) along minor axis 21 TH1F fHMaxDist; // [mm] Distance between shower center maximum distant pixel 21 22 22 23 Float_t fMm2Deg; -
trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc
r3568 r3682 19 19 ! Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 321 ! Copyright: MAGIC Software Development, 2000-2004 22 22 ! 23 23 ! … … 95 95 fHistCorePix.SetFillStyle(4000); 96 96 97 fHistUsedArea.SetName("UsedArea"); 98 fHistUsedArea.SetTitle("Area of used pixels"); 99 fHistUsedArea.SetXTitle("Area [m^2]"); 100 fHistUsedArea.SetYTitle("Counts"); 101 fHistUsedArea.SetDirectory(NULL); 102 fHistUsedArea.UseCurrentStyle(); 103 fHistUsedArea.SetLineColor(kBlue); 104 fHistUsedArea.SetFillStyle(4000); 105 106 fHistCoreArea.SetName("CoreArea"); 107 fHistCoreArea.SetTitle("Area of core pixels"); 108 fHistCoreArea.SetXTitle("Area [m^2]"); 109 fHistCoreArea.SetYTitle("Counts"); 110 fHistCoreArea.SetDirectory(NULL); 111 fHistCoreArea.UseCurrentStyle(); 112 fHistCoreArea.SetLineColor(kBlack); 113 fHistCoreArea.SetFillStyle(4000); 114 97 115 fHistConc.SetDirectory(NULL); 98 116 fHistConc1.SetDirectory(NULL); … … 121 139 bins.Apply(fHistConc1); 122 140 123 bins.SetEdges( 150, 0, 150);141 bins.SetEdges(75, 0, 150); 124 142 bins.Apply(fHistUsedPix); 125 143 bins.Apply(fHistCorePix); 144 145 bins.SetEdges(75, 0, 0.249); 146 bins.Apply(fHistUsedArea); 147 bins.Apply(fHistCoreArea); 126 148 } 127 149 … … 136 158 ApplyBinning(*plist, "Leakage", &fHistLeakage2); 137 159 138 ApplyBinning(*plist, "Pixels", &fHistUsedPix); 139 ApplyBinning(*plist, "Pixels", &fHistCorePix); 140 141 ApplyBinning(*plist, "Conc", &fHistConc); 142 ApplyBinning(*plist, "Conc1", &fHistConc1); 160 ApplyBinning(*plist, "Pixels", &fHistUsedPix); 161 ApplyBinning(*plist, "Pixels", &fHistCorePix); 162 163 ApplyBinning(*plist, "Area", &fHistUsedArea); 164 ApplyBinning(*plist, "Area", &fHistCoreArea); 165 166 ApplyBinning(*plist, "Conc", &fHistConc); 167 ApplyBinning(*plist, "Conc1", &fHistConc1); 143 168 144 169 return kTRUE; … … 166 191 fHistCorePix.Fill(h.GetNumCorePixels(), w); 167 192 193 fHistUsedArea.Fill(h.GetUsedArea()/1000000, w); 194 fHistCoreArea.Fill(h.GetCoreArea()/1000000, w); 195 168 196 fHistConc.Fill(h.GetConc(), w); 169 197 fHistConc1.Fill(h.GetConc1(), w); … … 203 231 pad->cd(4); 204 232 gPad->SetBorderMode(0); 233 MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels"); 205 234 206 235 pad->Modified(); … … 222 251 if (name.Contains("CorePix", TString::kIgnoreCase)) 223 252 return &fHistCorePix; 253 if (name.Contains("UsedArea", TString::kIgnoreCase)) 254 return &fHistUsedArea; 255 if (name.Contains("CoreArea", TString::kIgnoreCase)) 256 return &fHistCoreArea; 224 257 225 258 return NULL; -
trunk/MagicSoft/Mars/mimage/MHNewImagePar.h
r2043 r3682 14 14 { 15 15 private: 16 TH1F fHistLeakage1; //17 TH1F fHistLeakage2; //16 TH1F fHistLeakage1; // 17 TH1F fHistLeakage2; // 18 18 19 TH1F fHistUsedPix; // Number of used pixels20 TH1F fHistCorePix; // Number of core pixels19 TH1F fHistUsedPix; // Number of used pixels 20 TH1F fHistCorePix; // Number of core pixels 21 21 22 TH1F fHistConc; // [ratio] concentration ratio: sum of the two highest pixels / fSize 23 TH1F fHistConc1; // [ratio] concentration ratio: sum of the highest pixel / fSize 22 TH1F fHistUsedArea; // Area of used pixels 23 TH1F fHistCoreArea; // Area of core pixels 24 25 TH1F fHistConc; // [ratio] concentration ratio: sum of the two highest pixels / fSize 26 TH1F fHistConc1; // [ratio] concentration ratio: sum of the highest pixel / fSize 24 27 25 28 public: … … 31 34 TH1 *GetHistByName(const TString name); 32 35 33 TH1F &GetHistLeakage1() { return fHistLeakage1; }34 TH1F &GetHistLeakage2() { return fHistLeakage2; }36 TH1F &GetHistLeakage1() { return fHistLeakage1; } 37 TH1F &GetHistLeakage2() { return fHistLeakage2; } 35 38 36 TH1F &GetHistUsedPix() { return fHistUsedPix; }37 TH1F &GetHistCorePix() { return fHistCorePix; }39 TH1F &GetHistUsedPix() { return fHistUsedPix; } 40 TH1F &GetHistCorePix() { return fHistCorePix; } 38 41 39 TH1F &GetHistConc() { return fHistConc; } 40 TH1F &GetHistConc1() { return fHistConc1; } 42 TH1F &GetHistUsedArea() { return fHistUsedArea; } 43 TH1F &GetHistCoreArea() { return fHistCoreArea; } 44 45 TH1F &GetHistConc() { return fHistConc; } 46 TH1F &GetHistConc1() { return fHistConc1; } 41 47 42 48 void Draw(Option_t *opt=NULL); -
trunk/MagicSoft/Mars/mimage/MHillasCalc.cc
r3526 r3682 196 196 *fLog << " " << setw(7) << fErrors[i] << " ("; 197 197 *fLog << setw(3) << (int)(100.*fErrors[i]/GetNumExecutions()); 198 *fLog << "%) Evts skipped due to: " << str << endl;198 *fLog << "%) Evts skipped: " << str << endl; 199 199 } 200 200 … … 212 212 *fLog << GetDescriptor() << " execution statistics:" << endl; 213 213 *fLog << dec << setfill(' '); 214 PrintSkipped(1, " Event has less than 3 pixels\n (before image cleaning)");215 PrintSkipped(2, "Calculated Size == 0 \n (no pixels survived imagecleaning)");214 PrintSkipped(1, "Less than 3 pixels (before cleaning)"); 215 PrintSkipped(2, "Calculated Size == 0 (after cleaning)"); 216 216 PrintSkipped(3, "Number of used pixels < 3"); 217 217 PrintSkipped(4, "CorrXY==0"); -
trunk/MagicSoft/Mars/mimage/MHillasExt.cc
r3666 r3682 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@ uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! Author(s): Rudolf Bock 10/2001 <mailto:Rudolf.Bock@cern.ch> 20 20 ! Author(s): Wolfgang Wittek 06/2002 <mailto:wittek@mppmu.mpg.de> 21 21 ! 22 ! Copyright: MAGIC Software Development, 2000-200 222 ! Copyright: MAGIC Software Development, 2000-2004 23 23 ! 24 24 ! … … 101 101 fM3Trans = 0; 102 102 103 fMaxDist = -1;103 fMaxDist = 0; 104 104 } 105 105 … … 170 170 const Double_t dy = gpix.GetY() - hil.GetMeanY(); // [mm] 171 171 172 const Double_t dist = dx*dx+dy*dy;173 if (dist>maxdist)174 maxdist=dist; // [mm^2]175 176 172 Double_t nphot = pix.GetNumPhotons(); // [1] 177 173 178 174 const Double_t dzx = hil.GetCosDelta()*dx + hil.GetSinDelta()*dy; // [mm] 179 175 const Double_t dzy = -hil.GetSinDelta()*dx + hil.GetCosDelta()*dy; // [mm] 176 177 const Double_t dist = dx*dx+dy*dy; 178 if (TMath::Abs(dist)>TMath::Abs(maxdist)) 179 maxdist = dzx<0 ? -dist : dist; // [mm^2] 180 180 181 181 m3x += nphot * dzx*dzx*dzx; // [mm^3] … … 210 210 fM3Trans = m3y<0 ? -pow(-m3y, 1./3) : pow(m3y, 1./3); // [mm] 211 211 212 fMaxDist = TMath::Sqrt(maxdist); // [mm] 212 const Double_t md = TMath::Sqrt(TMath::Abs(maxdist)); 213 fMaxDist = maxdist<0 ? -md : md; // [mm] 213 214 214 215 SetReadyToSave(); … … 224 225 void MHillasExt::Set(const TArrayF &arr) 225 226 { 226 if (arr.GetSize() != 3)227 if (arr.GetSize() != 4) 227 228 return; 228 229 229 fAsym = arr.At(0); // [mm] fDist minus dist: center of ellipse, highest pixel 230 fM3Long = arr.At(1); // [mm] 3rd moment (e-weighted) along major axis 231 fM3Trans = arr.At(2); // [mm] 3rd moment (e-weighted) along minor axis 232 } 230 fAsym = arr.At(0); 231 fM3Long = arr.At(1); 232 fM3Trans = arr.At(2); 233 fMaxDist = arr.At(3); 234 } -
trunk/MagicSoft/Mars/mimage/MNewImagePar.cc
r3666 r3682 17 17 ! 18 18 ! Author(s): Wolfgang Wittek 03/2003 <mailto:wittek@mppmu.mpg.de> 19 ! Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de> 19 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2004 … … 29 30 // Storage Container for new image parameters 30 31 // 31 // fLeakage1 ratio: (photons in most outer ring of pixels) over fSize 32 // fLeakage2 ratio: (photons in the 2 outer rings of pixels) over fSize 33 // fNumSaturatedPixels: number of pixels in which at least one slice 34 // of the low gain FADC was saturated. 32 // Float_t fLeakage1; // (photons in most outer ring of pixels) over fSize 33 // Float_t fLeakage2; // (photons in the 2 outer rings of pixels) over fSize 34 // Float_t fInnerLeakage1; // (photons in most outer rings of inner pixels) over fInnerSize 35 // Float_t fInnerLeakage2; // (photons in the 2 outer rings of inner pixels) over fInnerSize 36 // Float_t fInnerSize; // 37 // 38 // Float_t fConc; // [ratio] concentration ratio: sum of the two highest pixels / fSize 39 // Float_t fConc1; // [ratio] concentration ratio: sum of the highest pixel / fSize 40 // 41 // Float_t fUsedArea; // Area of pixels which survived the image cleaning 42 // Float_t fCoreArea; // Area of core pixels 43 // Short_t fNumUsedPixels; // Number of pixels which survived the image cleaning 44 // Short_t fNumCorePixels; // number of core pixels 45 // Short_t fNumHGSaturatedPixels; // number of pixels with saturating hi-gains 46 // Short_t fNumSaturatedPixels; // number of pixels with saturating lo-gains 35 47 // 36 48 // Version 2: … … 46 58 // - added fUsedArea 47 59 // - added fCoreArea 48 // 49 // 60 // 61 // 50 62 ///////////////////////////////////////////////////////////////////////////// 51 63 #include "MNewImagePar.h" … … 187 199 } 188 200 189 // Compute Concetration 1 -2 190 201 // Compute Concentration 1-2 191 202 if (nphot>maxpix1) 192 203 { … … 217 228 *fLog << all; 218 229 *fLog << "New Image Parameters (" << GetName() << ")" << endl; 219 *fLog << " - Leakage1 [1] = " << fLeakage1 << endl; 220 *fLog << " - Leakage2 [1] = " << fLeakage2 << endl; 221 *fLog << " - Conc [1] = " << fConc << " (ratio)" << endl; 222 *fLog << " - Conc1 [1] = " << fConc1 << " (ratio)" << endl; 223 *fLog << " - Used Pixels [#] = " << fNumUsedPixels << " Pixels" << endl; 224 *fLog << " - Core Pixels [#] = " << fNumCorePixels << " Pixels" << endl; 225 *fLog << " - Sat. Pixels (HG) [#] = " << fNumHGSaturatedPixels << " Pixels" << endl; 226 *fLog << " - Sat. Pixels (LG) [#] = " << fNumSaturatedPixels << " Pixels" << endl; 227 } 230 *fLog << " - Leakage1 [1] = " << fLeakage1 << endl; 231 *fLog << " - Leakage2 [1] = " << fLeakage2 << endl; 232 *fLog << " - Conc [1] = " << fConc << " (ratio)" << endl; 233 *fLog << " - Conc1 [1] = " << fConc1 << " (ratio)" << endl; 234 *fLog << " - Used Pixels [#] = " << fNumUsedPixels << " Pixels" << endl; 235 *fLog << " - Core Pixels [#] = " << fNumCorePixels << " Pixels" << endl; 236 *fLog << " - Used Area [mm^2] = " << fUsedArea << endl; 237 *fLog << " - Core Area [mm^2] = " << fCoreArea << endl; 238 *fLog << " - Sat.Pixels/HG [#] = " << fNumHGSaturatedPixels << " Pixels" << endl; 239 *fLog << " - Sat.Pixels/LG [#] = " << fNumSaturatedPixels << " Pixels" << endl; 240 } 241 242 // ------------------------------------------------------------------------- 243 // 244 // Print contents of MNewImagePar to *fLog, depending on the geometry in 245 // units of deg. 246 // 247 void MNewImagePar::Print(const MGeomCam &geom) const 248 { 249 *fLog << all; 250 *fLog << "New Image Parameters (" << GetName() << ")" << endl; 251 *fLog << " - Leakage1 [1] = " << fLeakage1 << endl; 252 *fLog << " - Leakage2 [1] = " << fLeakage2 << endl; 253 *fLog << " - Conc [1] = " << fConc << " (ratio)" << endl; 254 *fLog << " - Conc1 [1] = " << fConc1 << " (ratio)" << endl; 255 *fLog << " - Used Pixels [#] = " << fNumUsedPixels << " Pixels" << endl; 256 *fLog << " - Core Pixels [#] = " << fNumCorePixels << " Pixels" << endl; 257 *fLog << " - Used Area [deg^2] = " << fUsedArea*geom.GetConvMm2Deg()*geom.GetConvMm2Deg() << endl; 258 *fLog << " - Core Area [deg^2] = " << fCoreArea*geom.GetConvMm2Deg()*geom.GetConvMm2Deg() << endl; 259 *fLog << " - Sat.Pixels/HG [#] = " << fNumHGSaturatedPixels << " Pixels" << endl; 260 *fLog << " - Sat.Pixels/LG [#] = " << fNumSaturatedPixels << " Pixels" << endl; 261 } -
trunk/MagicSoft/Mars/mimage/MNewImagePar.h
r3666 r3682 43 43 Short_t GetNumCorePixels() const { return fNumCorePixels; } 44 44 45 Float_t Get NumUsedArea() const { return fUsedArea; }46 Float_t Get NumCoreArea() const { return fCoreArea; }45 Float_t GetUsedArea() const { return fUsedArea; } 46 Float_t GetCoreArea() const { return fCoreArea; } 47 47 48 48 Short_t GetNumSaturatedPixels() const { return fNumSaturatedPixels; } … … 50 50 51 51 void Print(Option_t *opt=NULL) const; 52 void Print(const MGeomCam &geom) const; 52 53 53 54 void Calc(const MGeomCam &geom, const MCerPhotEvt &evt,
Note:
See TracChangeset
for help on using the changeset viewer.