Changeset 9348 for trunk/MagicSoft/Mars/msim
- Timestamp:
- 02/19/09 15:38:48 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msim
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9347 r9348 258 258 */ 259 259 260 const Int_t f = fPermanentReset ? 2 : 1;261 262 Double_t xmin = h->GetWavelengthMin() ;263 Double_t xmax = h->GetWavelengthMax() ;264 Int_t num = TMath::CeilNint((xmax-xmin)/ (5*f));265 266 MH::FindGoodLimits(num, num, xmin, xmax, k FALSE);267 268 MBinning(abs(num), xmin , xmax).Apply(fHistWL);260 const Int_t f = fPermanentReset ? 10 : 2; 261 262 Double_t xmin = h->GetWavelengthMin()-20; 263 Double_t xmax = h->GetWavelengthMax()+20; 264 Int_t num = TMath::CeilNint((xmax-xmin)/f); 265 266 MH::FindGoodLimits(num, num, xmin, xmax, kTRUE); 267 268 MBinning(abs(num), xmin-.5, xmax-.5).Apply(fHistWL); 269 269 270 270 return kTRUE; -
trunk/MagicSoft/Mars/msim/MPhotonData.cc
r9285 r9348 30 30 // Storage container to store Corsika events 31 31 // 32 // For details on the coordinate systems see our Wiki. 33 // 32 34 // Version 1: 33 35 // ---------- … … 97 99 // -------------------------------------------------------------------------- 98 100 // 101 // Return the square cosine of the Theta-angle == 1-CosU^2-CosV^2 102 // 103 Double_t MPhotonData::GetCosW2() const 104 { 105 return 1 - GetSinW2(); 106 } 107 108 // -------------------------------------------------------------------------- 109 // 110 // Return the square sine of the Theta-angle == CosU^2+CosV^2 111 // 112 Double_t MPhotonData::GetSinW2() const 113 { 114 return fCosU*fCosU + fCosV*fCosV; 115 } 116 117 // -------------------------------------------------------------------------- 118 // 99 119 // return the cosine of the Theta-angle == sqrt(1-CosU^2-CosV^2) 100 120 // 101 121 Double_t MPhotonData::GetCosW() const 102 122 { 103 return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV); 123 return TMath::Sqrt(GetCosW2()); 124 } 125 126 // -------------------------------------------------------------------------- 127 // 128 // return the sine of the Theta-angle == sqrt(CosU^2+CosV^2) 129 // 130 Double_t MPhotonData::GetSinW() const 131 { 132 return TMath::Sqrt(GetSinW2()); 104 133 } 105 134 … … 110 139 Double_t MPhotonData::GetTheta() const 111 140 { 112 return TMath::A Cos(GetCosW());141 return TMath::ASin(GetSinW()); 113 142 } 114 143 … … 186 215 { 187 216 // FIXME: Could be done in MPhotonEvent::ReadCorsikaEvent 188 gLog << err << "ERROR - MPhotonData::FillCorsika: fNum mPhotons not 1, but " << fNumPhotons << endl;217 gLog << err << "ERROR - MPhotonData::FillCorsika: fNumPhotons not 1, but " << fNumPhotons << endl; 189 218 gLog << " This is not yet supported." << endl; 190 219 return kERROR; … … 196 225 //fCosU = f[3]; // cos to x 197 226 //fCosV = f[4]; // cos to y 198 // x= east, y=north227 // x=west, y=south 199 228 fPosX = f[2]; // [cm] 200 229 fPosY = -f[1]; // [cm] -
trunk/MagicSoft/Mars/msim/MPhotonData.h
r9332 r9348 49 49 Float_t fWeight; //! A weight for external use 50 50 51 protected:52 virtual Int_t FillCorsika(Float_t f[7]);53 virtual Int_t FillRfl(Float_t f[8]);54 55 51 public: 56 52 MPhotonData(/*const char *name=NULL, const char *title=NULL*/); … … 64 60 Float_t GetCosV() const { return fCosV; } 65 61 Double_t GetCosW() const; 62 Double_t GetSinW() const; 63 Double_t GetCosW2() const; 64 Double_t GetSinW2() const; 66 65 Double_t GetTheta() const; 67 66 … … 111 110 Int_t GetTag() const { return fTag; } 112 111 112 // TObject 113 113 //void Clear(Option_t * = NULL); 114 114 void Print(Option_t * = NULL) const; … … 124 124 return 0; 125 125 } 126 /* 127 void FillRad(TH1 &hist, Float_t scale=1) const; 128 void FillRad(TH2 &hist, Double_t x, Float_t scale=1) const; 129 void Fill(TH2 &hist, Float_t scale=1) const; 130 void Fill(TH3 &hist, Double_t z, Float_t scale=1) const; 131 */ 126 127 // I/O 132 128 Int_t ReadCorsikaEvt(istream &fin); 133 129 Int_t ReadRflEvt(istream &fin); 134 130 131 Int_t FillCorsika(Float_t f[7]); 132 Int_t FillRfl(Float_t f[8]); 133 135 134 ClassDef(MPhotonData, 1) //Container to store a cherenkov photon bunch from a CORSUKA file 136 135 }; 137 /*138 class MPhotonDataWeighted : public MPhotonData139 {140 private:141 Float_t fWeight; // A weight for external use142 136 143 public:144 Float_t GetWeight() const { return fWeight; }145 146 ClassDef(MPhotonData, 1)147 };148 */149 137 #endif -
trunk/MagicSoft/Mars/msim/MSimAbsorption.cc
r9347 r9348 264 264 Bool_t MSimAbsorption::ReInit(MParList *pList) 265 265 { 266 if (fUseTheta) 267 return kTRUE; 268 266 269 MCorsikaRunHeader *h = (MCorsikaRunHeader*)pList->FindObject("MCorsikaRunHeader"); 267 270 if (!h)
Note:
See TracChangeset
for help on using the changeset viewer.