1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: PhotonsDatabaseBuilder.hh 1112 2004-09-28 12:10:53Z thea $ |
---|
3 | // A.Thea, J.Watts created Mar, 19 2004 |
---|
4 | |
---|
5 | #ifndef __PHOTONSDATABASEBUILDER_HH_ |
---|
6 | #define __PHOTONSDATABASEBUILDER_HH_ |
---|
7 | |
---|
8 | #include "euso.hh" |
---|
9 | #include "EsafConfigurable.hh" |
---|
10 | #include "ScanPhotonsOnPupil.hh" |
---|
11 | #include "OADBTree.hh" |
---|
12 | #include "OADBPhotons.hh" |
---|
13 | #include "TFile.h" |
---|
14 | |
---|
15 | class OpticalSystem; |
---|
16 | |
---|
17 | class PhotonsDatabaseBuilder: public EsafConfigurable { |
---|
18 | public: |
---|
19 | // ctor |
---|
20 | PhotonsDatabaseBuilder(); |
---|
21 | |
---|
22 | // dtor |
---|
23 | virtual ~PhotonsDatabaseBuilder(); |
---|
24 | |
---|
25 | // build the database |
---|
26 | void Go(); |
---|
27 | |
---|
28 | EsafConfigClass(Tools,PhotonsDatabaseBuilder) |
---|
29 | private: |
---|
30 | |
---|
31 | Bool_t Sample( Photon* ); // resamples a photon fSamples time |
---|
32 | |
---|
33 | void OpenRoot(); // open rootfile |
---|
34 | void CloseRoot(); // close rootfile |
---|
35 | void InitDBTree(); // create tree and branches |
---|
36 | void FillDBTree(); // fill tree and clean event |
---|
37 | void CloseDBTree(); // write tree, delete event |
---|
38 | |
---|
39 | ScanPhotonsOnPupil fPupil; // photons generator |
---|
40 | pair<Photon, Double_t> fLastPath; // |
---|
41 | Int_t fSamples; // number of times each position has to be sampled |
---|
42 | |
---|
43 | OpticalSystem *fOptics; // EUSO Optical System |
---|
44 | OADBTree *fTree; // database tree |
---|
45 | OADBPhotons *fPhotons; // photons container |
---|
46 | string fRootFileName; |
---|
47 | TFile *fRootFile; |
---|
48 | |
---|
49 | ClassDef(PhotonsDatabaseBuilder,0) |
---|
50 | |
---|
51 | }; |
---|
52 | |
---|
53 | #endif /* __PHOTONSDATABASEBUILDER_HH_ */ |
---|
54 | |
---|