source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/common/root/include/EDetector.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 5.5 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: EDetector.hh 2648 2006-03-31 16:04:00Z thea $
3// Author: A.Thea
4
5/*****************************************************************************
6 * ESAF: Euso Simulation and Analysis Framework                              *
7 *                                                                           *
8 *  Id: EDetector                                                            *
9 *  Package: SimuEvent                                                       *
10 *  Coordinator: Alessandro.Thea                                             *
11 *                                                                           *
12 *****************************************************************************/
13
14#ifndef __EDETECTOR_HH__
15#define __EDETECTOR_HH__
16
17#include "TROOT.h"
18#include "TObject.h"
19#include "TRef.h"
20#include "TClonesArray.h"
21#include "TString.h"
22
23#include "EFillable.hh"
24
25#include "ERunParameters.hh"
26#include "EElectronics.hh"
27#include "EDetStatus.hh"
28
29class EDetPhoton;
30class EMacroCellHit;
31class EMacroCell;
32class EFee;
33class EAFee;
34
35class ERunParameters;
36
37////////////////////////////////////////////////////////////////////////////////
38//                                                                            //
39// EDetector                                                                  //
40//                                                                            //
41// Simu Event Object dedicated holding all the data about the detector        //
42// simulation                                                                 //
43//                                                                            //
44////////////////////////////////////////////////////////////////////////////////
45
46class EDetector : public TObject, public EFillable { 
47public:
48    EDetector();
49    EDetector(const EDetector&);
50    virtual ~EDetector();
51 
52    virtual void   Copy( TObject& ) const;
53    virtual void   Clear( Option_t* ="");
54    virtual void   Print(Option_t* option) const;
55    virtual void   ClearAndShrink( Option_t* ="" );
56   
57    inline void    SetPhotonFillingMode( Int_t mode = kAllPhotons ) { fPhotonFillingMode = mode; }
58    inline UInt_t  GetPhotonFillingMode() { return fPhotonFillingMode; }
59
60    inline void    SetNightGlowFillable( Bool_t e = kTRUE ) { fNightGlowFillable = e; }
61    inline Bool_t  IsNightGlowFillable() { return fNightGlowFillable; }
62
63    inline void    SetRunPars( ERunParameters* );
64    inline ERunParameters* RunPars();
65    // getters
66    inline const   EElectronics* GetElectronics() const {return &fElectronics;}
67    inline const   EDetStatus* GetStatus() const { return &fStatus; }
68 
69    inline Int_t   GetNumPhotons() const {return fNumPhotons; }
70    inline Int_t   GetNumCellHits() const {return fNumCellHits; }
71    inline Int_t   GetNumFee() const {return fNumFee; }
72    inline Int_t   GetNumAFee() const {return fNumAFee; }
73    inline Int_t   GetNumCells() const {return fNumCells; }
74    inline Float_t GetFirstTime() const {return fFirstTime; }
75    inline Float_t GetLastTime() const {return fLastTime; }
76    inline Float_t GetFirstGtuTime() const {return fFirstTime; }
77
78    inline EDetPhoton*    GetPhoton(Int_t index) const;
79    inline EMacroCellHit* GetMacroCellHit(Int_t index) const;
80    inline EFee*          GetFee(Int_t index) const;
81    inline EAFee*         GetAFee(Int_t index) const;
82    inline EMacroCell*    GetMacroCell(Int_t index) const;
83
84    enum  EPhotonFillingMode {
85        kNoPhotons = 0,
86        kMadeSignalOnly,
87        kAllPhotons
88    };
89
90private:
91   
92    UInt_t  fPhotonFillingMode;   // true to enable photon adders
93    Bool_t fNightGlowFillable;    // true to enable ng hits adders
94
95    TRef          fRunPars;       // pointer to run parameters
96    EElectronics  fElectronics;   // euso detector electronics status
97    EDetStatus    fStatus;        // a summary of the content of the detector
98   
99    Int_t         fNumPhotons;    // number of EDetPhoton in fPhotons array
100    Int_t         fNumCellHits;   // number of EMacroCellHit in fMacroCellHits array
101    Int_t         fNumFee;        // number of EFee objects in fFee
102    Int_t         fNumAFee;       // number of EAFee objects in fAFee
103    Int_t         fNumCells;      // number of EMacroCell objects
104    Float_t       fFirstTime;     // time of the first photon entering pupil
105    Float_t       fLastTime;      // time of the last photon entering pupil
106
107    TClonesArray* fPhotons;       // all photons entering the pupil with history in detector
108    TClonesArray* fMacroCellHits; // macroCell hit data
109    TClonesArray* fFee;           // front end chip data (digital+full analog if present)
110    TClonesArray* fAFee;          // analog specific data (last dynode + trigger info if any)
111    TClonesArray* fMacroCell;     // data for each macroCell with activity
112
113    SetEVisitable()
114   
115    ClassDef(EDetector,5)
116};
117
118inline void EDetector::SetRunPars( ERunParameters* r) {
119    fRunPars = r;
120}
121
122inline ERunParameters* EDetector::RunPars() {
123    return (ERunParameters*)fRunPars.GetObject();
124}
125
126inline EDetPhoton* EDetector::GetPhoton(Int_t index)  const{
127    return (EDetPhoton*)fPhotons->At(index);
128}
129
130inline EMacroCellHit* EDetector::GetMacroCellHit(Int_t index) const {
131    return (EMacroCellHit*)fMacroCellHits->At(index);
132}
133
134inline EFee* EDetector::GetFee(Int_t index) const {
135    return (EFee*)fFee->At(index);
136}
137
138inline EAFee* EDetector::GetAFee(Int_t index) const {
139    return (EAFee*)fAFee->At(index);
140}
141inline EMacroCell* EDetector::GetMacroCell(Int_t index) const {
142    return (EMacroCell*)fMacroCell->At(index);
143}
144
145#endif  /* __EDETECTOR_HH__ */
Note: See TracBrowser for help on using the repository browser.