Changeset 8288
- Timestamp:
- 02/02/07 13:50:45 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8287 r8288 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2007/02/02 Thomas Bretz 22 23 * mreflector/MRflSinglePhoton.[h,cc], mreflector/MRflEvtData.[h,cc]: 24 - added new Fill functions allowing to fill photons versus 25 a z-value, e.g. energy. 26 27 20 28 21 29 2007/02/01 Thomas Bretz -
trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc
r8270 r8288 147 147 // -------------------------------------------------------------------------- 148 148 // 149 // Fills all photon distances into a TH1 scaled with scale (default=1) 150 // 151 void MRflEvtData::FillRad(TH2 &hist, Double_t z, Float_t scale) const 152 { 153 MRflSinglePhoton *ph=NULL; 154 155 TIter Next(&fList); 156 while ((ph=(MRflSinglePhoton*)Next())) 157 ph->FillRad(hist, z, scale); 158 } 159 160 // -------------------------------------------------------------------------- 161 // 149 162 // Fills all photons into a TH2 scaled with scale (default=1) 150 163 // … … 156 169 while ((ph=(MRflSinglePhoton*)Next())) 157 170 ph->Fill(hist, scale); 171 } 172 173 // -------------------------------------------------------------------------- 174 // 175 // Fills all photons into a TH2 scaled with scale (default=1) 176 // 177 void MRflEvtData::Fill(TH3 &hist, Double_t z, Float_t scale) const 178 { 179 MRflSinglePhoton *ph=NULL; 180 181 TIter Next(&fList); 182 while ((ph=(MRflSinglePhoton*)Next())) 183 ph->Fill(hist, z, scale); 158 184 } 159 185 -
trunk/MagicSoft/Mars/mreflector/MRflEvtData.h
r8270 r8288 16 16 class TH1; 17 17 class TH2; 18 class TH3; 19 18 20 class MRflSinglePhoton; 19 21 … … 39 41 40 42 void FillRad(TH1 &hist, Float_t scale=1) const; 43 void FillRad(TH2 &hist, Double_t z, Float_t scale=1) const; 41 44 void Fill(TH2 &hist, Float_t scale=1) const; 45 void Fill(TH3 &hist, Double_t z, Float_t scale=1) const; 42 46 43 47 void Print(Option_t *o="") const; -
trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.cc
r8270 r8288 33 33 34 34 #include <TH2.h> 35 #include <TH3.h> 35 36 36 37 #include "MLog.h" … … 52 53 // -------------------------------------------------------------------------- 53 54 // 55 // Fill radial photon distance into histogram scaled by scale. 56 // 57 void MRflSinglePhoton::FillRad(TH2 &hist, Double_t z, Float_t scale) const 58 { 59 hist.Fill(TMath::Hypot(fX, fY)*scale, z); 60 } 61 62 // -------------------------------------------------------------------------- 63 // 54 64 // Fill photon position into histogram scaled by scale. 55 65 // 56 66 void MRflSinglePhoton::Fill(TH2 &hist, Float_t scale) const 67 { 68 hist.Fill(fX*scale, fY*scale); 69 } 70 71 // -------------------------------------------------------------------------- 72 // 73 // Fill photon position into histogram scaled by scale. 74 // 75 void MRflSinglePhoton::Fill(TH3 &hist, Double_t z, Float_t scale) const 57 76 { 58 77 hist.Fill(fX*scale, fY*scale); -
trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.h
r8270 r8288 8 8 class TH1; 9 9 class TH2; 10 class TH3; 10 11 11 12 class MRflSinglePhoton : public MParContainer … … 19 20 Float_t fHeight; // [cm] production height 20 21 Float_t fPhi; // [rad] camera inc. angle (rad) 22 21 23 public: 22 24 MRflSinglePhoton() { } … … 37 39 38 40 void FillRad(TH1 &hist, Float_t scale=1) const; 41 void FillRad(TH2 &hist, Double_t z, Float_t scale=1) const; 39 42 void Fill(TH2 &hist, Float_t scale=1) const; 43 void Fill(TH3 &hist, Double_t z, Float_t scale=1) const; 40 44 41 45 void Print(Option_t *o="") const;
Note:
See TracChangeset
for help on using the changeset viewer.