source: JEM-EUSO/esaf_cc_at_lal/packages/simulation/radiativetransfer/include/UnisimPhotonsOnPupil.hh @ 114

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

actual version of ESAF at CCin2p3

File size: 3.8 KB
Line 
1// $Id: UnisimPhotonsOnPupil.hh 2604 2006-03-20 21:51:35Z thea $
2// Author: M. Pallavicini created Jul,  2 2002
3
4/*****************************************************************************
5 * ESAF: Euso Simulation and Analysis Framework                              *
6 *                                                                           *
7 *  UnisimId: UnisimPhotonsOnPupil                                           *
8 *  Package: RadiativeTransfer                                               *
9 *  Coordinator: Sylvain.Moreggia                                            *
10 *                                                                           *
11 *****************************************************************************/         
12#ifndef __UNISIMPHOTONSONPUPIL_HH__
13#define __UNISIMPHOTONSONPUPIL_HH__
14
15#include "euso.hh"
16#include "EsafMsgSource.hh"
17#include "PhotonsOnPupil.hh"
18#include "ParentPhoton.hh"
19#include "MCTruth.hh"
20#include <string>
21#include <map>
22
23////////////////////////////////////////////////////////////////////////////////
24//                                                                            //
25// UnisimPhotonsOnPupil                                                       //
26//                                                                            //
27// Photons on Pupil as described in Unism File .php                           //
28// These file may become standard for Photons on Pupil format but             //
29// we foresee the possibility that each simulation piece has its own          //
30// format                                                                     //
31// Event are made by an header and a list of ParentPhoton objects             //
32// Class ParentPhoton is slightly different from Photon and describes         //
33// a photon as it enters the pupil                                            //
34// Class Photon is used to propagate the photon inside the detector           //
35// Each Photon holds a pointer to its ParentPhoton                            //
36//                                                                            //
37//////////////////////////////////////////////////////////////////////////////// 
38
39class UnisimPhotonsOnPupil : public PhotonsOnPupil, public EsafMsgSource {
40public:
41    // ctor
42    UnisimPhotonsOnPupil();
43    // dtor
44    virtual ~UnisimPhotonsOnPupil();
45
46    virtual void Clear();
47    Bool_t Load( FILE* );
48    Bool_t SkipEvent( FILE*);      // skip one event
49    // returns Montecarlo truth informations for this event
50    virtual MCTruth* Truth();
51
52    virtual Photon* GetPhoton();
53
54    Double_t GetZdisk() const { return fZdisk; }
55    Double_t GetRmaxDisk() const { return fRmaxDisk; }
56    Bool_t IsPhotonOnDisk() const { return fPhotonOndisk; }
57   
58    void SetZdisk( Double_t z ) { fZdisk = z; }
59    void SetRmaxDisk( Double_t r ) { fRmaxDisk = r; }
60    void SetPhotonOnDisk( Bool_t disk = kTRUE) { fPhotonOndisk = disk; }
61
62    // release all the mem hold in the buffers
63    virtual Bool_t ClearMemory();
64
65private:
66    ParentPhoton** fPhotons;  // array of parent photons
67    Int_t fEvCounter;         // event counter           
68    Int_t fBufferSize;        // number of max photons storable in the local photon buffer
69    Double_t fZdisk;          // Z coordinate of the disk where photons are expected for tracking
70    Double_t fRmaxDisk;       // radius of disk where photons are expected for tracking 
71    Bool_t   fPhotonOndisk;    // Tracks unisim photons on the horizontal disk.
72
73    void NewPhotonBuffer(Int_t);   // utilities to handle the photon buffer
74    void DeletePhotonBuffer();
75
76    Bool_t LoadHeader( FILE* );    // read the header and store it in a key-value map
77    map<string,double> fHeader;
78    MCTruth* fTheTruth;
79 
80    ClassDef(UnisimPhotonsOnPupil,0)
81};
82
83#endif  /* __UNISIMPHOTONSONPUPIL_HH__ */
84
Note: See TracBrowser for help on using the repository browser.