MyDetector.h

Go to the documentation of this file.
00001 // Author: Bertrand Bellenot   22/08/02
00002 
00003 /*************************************************************************
00004  * Copyright (C) 1995-2002, Bertrand Bellenot.                           *
00005  * All rights reserved.                                                  *
00006  *                                                                       *
00007  * For the licensing terms see the LICENSE file.                         *
00008  *************************************************************************/
00009 
00010 //////////////////////////////////////////////////////////////////////////
00011 //                                                                      //
00012 // MyDetector                                                           //
00013 // defines a simple detector class with one geometry, one material      //
00014 // and the physical properties of the detector's material               //
00015 //                                                                      //
00016 //////////////////////////////////////////////////////////////////////////
00017 
00018 #ifndef MYDETECTOR_H
00019 #define MYDETECTOR_H
00020 
00021 #include "constants.h"
00022 
00023 #include "TObject.h"
00024 #include "TObjArray.h"
00025 #include "TGeoManager.h"
00026 #include "TGeoMaterial.h"
00027 #include "TGeoMedium.h"
00028 #include "TGeoVolume.h"
00029 #include "TGeoMatrix.h"
00030 
00031 class MyDetector : public TObject {
00032 
00033 private:
00034     Double_t        fMinX,fMinY,fMinZ; // Detector min. boundaries
00035     Double_t        fMaxX,fMaxY,fMaxZ; // Detector max. boundaries
00036     Double_t        fDimX,fDimY,fDimZ; // Detector dimensions
00037     Double_t        fI[6];             // Ionisation constant for current material (in MeV/cm)
00038     Double_t        fPreconst[6];      // First factor in the Bethe-Bloch equation for current material (in MeV/cm)
00039     Double_t        fEc[6];            // Critical Energy for current material (in MeV)
00040     Double_t        fX0[6];            // Radiation Length for current material (in cm)
00041     Double_t        fdT[6];            // Time step dT for current material (in ms - about 0.015 times X_0/c)
00042     Double_t        fTheta0[6];        // Scatter angle for current material
00043     Double_t        fTotalELoss;       // Total Energy loss by particles into the detector
00044 
00045 public:
00046     MyDetector();
00047     virtual ~MyDetector();
00048     void        Init();
00049     Double_t    GetI(Int_t idx) { return fI[idx]; }
00050     Double_t    GetPreconst(Int_t idx) { return fPreconst[idx]; }
00051     Double_t    GetEc(Int_t idx) { return fEc[idx]; }
00052     Double_t    GetX0(Int_t idx) { return fX0[idx]; }
00053     Double_t    GetdT(Int_t idx) { return fdT[idx]; }
00054     Double_t    GetTheta0(Int_t idx) { return fTheta0[idx]; }
00055     Double_t    GetDimX() { return fDimX; }
00056     Double_t    GetDimY() { return fDimY; }
00057     Double_t    GetDimZ() { return fDimZ; }
00058     Double_t    GetMaxX() { return fMaxX; }
00059     Double_t    GetMaxY() { return fMaxY; }
00060     Double_t    GetMaxZ() { return fMaxZ; }
00061     Double_t    GetMinX() { return fMinX; }
00062     Double_t    GetMinY() { return fMinY; }
00063     Double_t    GetMinZ() { return fMinZ; }
00064     Double_t    GetTotalELoss() { return fTotalELoss; }
00065     void        GetDimensions(Double_t *dimx, Double_t *dimy, Double_t *dimz)
00066                 { *dimx = fDimX; *dimy = fDimY; *dimz = fDimZ; }
00067     TGeoManager *GetGeoManager() { return gGeoManager; }
00068 
00069     void        SetI(Int_t idx, Double_t val) { fI[idx] = val; }
00070     void        SetPreconst(Int_t idx, Double_t val) { fPreconst[idx] = val; }
00071     void        SetEc(Int_t idx, Double_t val) { fEc[idx] = val; }
00072     void        SetX0(Int_t idx, Double_t val) { fX0[idx] = val; }
00073     void        SetdT(Int_t idx, Double_t val) { fdT[idx] = val; }
00074     void        SetTheta0(Int_t idx, Double_t val) { fTheta0[idx] = val; }
00075     void        AddELoss(Double_t val) { fTotalELoss += val; }
00076     void        ClearELoss() { fTotalELoss = 0.0; }
00077 
00078     ClassDef(MyDetector,1)   // Detector structure
00079 };
00080 
00081 #endif // MYDETECTOR_H
00082 

Generated on Tue Jul 5 15:15:11 2011 for ROOT_528-00b_version by  doxygen 1.5.1