]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsim.h
Changed timebin 0 to be the one closest to the readout
[u/mrichter/AliRoot.git] / TRD / AliTRDsim.h
index 1c1e6d880298429c72fe044dc0794480769739c5..0d1f1ffc848ca90ba2398de1d48802b970d8b578 100644 (file)
-#ifndef AliTRDsim_H
-#define AliTRDsim_H
+#ifndef ALITRDSIM_H
+#define ALITRDSIM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
 
-#include "TObject.h"
+/* $Id$ */
+
+#include <TObject.h>
+
+class TH1D;
+
+class AliModule;
 
 class AliTRDsim : public TObject {
-private:
-  Int_t fNj;            // Number of channel of the histogram
-  Float_t fU, fL, fBin;
-  Double_t fRo1, fRo2, fOmega1, fOmega2;
-  Int_t fIrst;
 
-public:
+ public:
+
   AliTRDsim();
-  virtual ~AliTRDsim() {}
-  virtual void trd_sim();
-  virtual void xtr(Double_t gamma, Double_t omega1, Double_t omega2,
-                   Float_t *sigmaRad, Int_t &np, Float_t *trEn);
-  virtual Float_t fsigmaRad(Int_t ifl, Int_t ig, Float_t o);
-  virtual Int_t locate(Double_t *xv, Int_t n, Double_t xval, 
-                      Int_t &kl, Double_t &dx);
-  virtual Float_t hisran(Float_t *y, Int_t n, Float_t xlo, Float_t xwid);
-
-  
-  ClassDef(AliTRDsim,1)  //Base class for all Alice hits
+  AliTRDsim(const AliTRDsim &s);
+  AliTRDsim(AliModule *mod, Int_t foil, Int_t gap);
+  virtual ~AliTRDsim();
+  AliTRDsim &operator=(const AliTRDsim &s);
+
+  virtual void          Copy(TObject &s);
+  virtual void          Init();
+  virtual Int_t         CreatePhotons(Int_t pdg, Float_t p
+                                    , Int_t &nPhoton, Float_t *ePhoton);
+  virtual Int_t         TrPhotons(Double_t gamma, Int_t &nPhoton, Float_t *ePhoton);
+  virtual Double_t      Sigma(Double_t energykeV);
+  virtual Double_t      Interpolate(Double_t energyMeV
+                                  , Double_t *en, Double_t *mu, Int_t n);
+  virtual Int_t         Locate(Double_t *xv, Int_t n, Double_t xval
+                             , Int_t &kl, Double_t &dx);
+  virtual Double_t      Omega(Float_t rho, Float_t z, Float_t a) 
+                             { return (28.8 * TMath::Sqrt(rho * z / a)); };
+
+          void          SetNFoils(Int_t n)      { fNFoils    = n;       };
+          void          SetFoilThick(Float_t t) { fFoilThick = t;
+                           SetSigma();                                  };
+          void          SetGapThick(Float_t t)  { fGapThick  = t;
+                           SetSigma();                                  };
+          void          SetFoilDens(Float_t d)  { fFoilDens  = d; 
+                           fFoilOmega = Omega(fFoilDens,fFoilZ,fFoilA);
+                           SetSigma();                                  };
+          void          SetFoilZ(Float_t z)     { fFoilZ     = z; 
+                           fFoilOmega = Omega(fFoilDens,fFoilZ,fFoilA); };
+          void          SetFoilA(Float_t a)     { fFoilA     = a; 
+                           fFoilOmega = Omega(fFoilDens,fFoilZ,fFoilA); };
+          void          SetGapDens(Float_t d)   { fGapDens   = d;
+                           fGapOmega  = Omega(fGapDens ,fGapZ ,fGapA );
+                           SetSigma();                                  };
+          void          SetGapZ(Float_t z)      { fGapZ      = z;
+                           fGapOmega  = Omega(fGapDens ,fGapZ ,fGapA ); };
+          void          SetGapA(Float_t a)      { fGapA      = a;
+                           fGapOmega  = Omega(fGapDens ,fGapZ ,fGapA ); };
+          void          SetTemp(Float_t t)      { fTemp      = t; 
+                           SetSigma();                                  };
+          void          SetSigma();
+
+  virtual Double_t      GetMuPo(Double_t energyMeV);
+  virtual Double_t      GetMuCO(Double_t energyMeV);
+  virtual Double_t      GetMuXe(Double_t energyMeV);
+  virtual Double_t      GetMuBu(Double_t energyMeV);
+  virtual Double_t      GetMuMy(Double_t energyMeV);
+  virtual Double_t      GetMuN2(Double_t energyMeV);
+  virtual Double_t      GetMuO2(Double_t energyMeV);
+  virtual Double_t      GetMuHe(Double_t energyMeV);
+
+          Int_t         GetNFoils() const       { return fNFoils;    };
+          Float_t       GetFoilThick() const    { return fFoilThick; };
+          Float_t       GetGapThick() const     { return fGapThick;  };
+          Float_t       GetFoilDens() const     { return fFoilDens;  };
+          Float_t       GetGapDens() const      { return fGapDens;   };
+          Double_t      GetFoilOmega() const    { return fFoilOmega; };
+          Double_t      GetGapOmega() const     { return fGapOmega;  };
+          Float_t       GetTemp() const         { return fTemp;      };
+          TH1D         *GetSpectrum() const     { return fSpectrum;  };
+
+ protected:
+
+  Int_t     fNFoils;               // Number of foils in the radiator stack
+  Float_t   fFoilThick;            // Thickness of the foils (cm)
+  Float_t   fGapThick;             // Thickness of the gaps between the foils (cm)
+
+  Float_t   fFoilDens;             // Density of the radiator foils (g/cm^3) 
+  Float_t   fGapDens;              // Density of the gas in the radiator gaps (g/cm^3)
+
+  Double_t  fFoilOmega;            // Plasma frequency of the radiator foils
+  Double_t  fGapOmega;             // Plasma frequency of the gas in the radiator gaps
+
+  Float_t   fFoilZ;                // Z of the foil material
+  Float_t   fGapZ;                 // Z of the gas in the gaps
+
+  Float_t   fFoilA;                // A of the foil material
+  Float_t   fGapA;                 // A of the gas in the gaps
+
+  Float_t   fTemp;                 // Temperature of the radiator gas (Kelvin)
+
+  Int_t     fSpNBins;              // Number of bins of the TR spectrum
+  Float_t   fSpRange;              // Range of the TR spectrum
+  Float_t   fSpBinWidth;           // Bin width of the TR spectrum
+  Float_t   fSpLower;              // Lower border of the TR spectrum
+  Float_t   fSpUpper;              // Upper border of the TR spectrum
+
+  Double_t *fSigma;                // Array of sigma values
+
+  TH1D     *fSpectrum;             // TR photon energy spectrum
+
+  ClassDef(AliTRDsim,1)            // Simulates TR photons
+
 };
 #endif