// $Id: UnisimPhotonsOnPupil.hh,v 1.10 2005/10/04 02:55:48 thea Exp $ // Author: M. Pallavicini created Jul, 2 2002 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * UnisimId: UnisimPhotonsOnPupil * * Package: RadiativeTransfer * * Coordinator: Sylvain.Moreggia * * * *****************************************************************************/ #ifndef __UNISIMPHOTONSONPUPIL_HH__ #define __UNISIMPHOTONSONPUPIL_HH__ #include "euso.hh" #include "EsafMsgSource.hh" #include "PhotonsOnPupil.hh" #include "ParentPhoton.hh" #include "MCTruth.hh" #include #include //////////////////////////////////////////////////////////////////////////////// // // // UnisimPhotonsOnPupil // // // // Photons on Pupil as described in Unism File .php // // These file may become standard for Photons on Pupil format but // // we foresee the possibility that each simulation piece has its own // // format // // Event are made by an header and a list of ParentPhoton objects // // Class ParentPhoton is slightly different from Photon and describes // // a photon as it enters the pupil // // Class Photon is used to propagate the photon inside the detector // // Each Photon holds a pointer to its ParentPhoton // // // //////////////////////////////////////////////////////////////////////////////// class UnisimPhotonsOnPupil : public PhotonsOnPupil, public EsafMsgSource { public: // ctor UnisimPhotonsOnPupil(); // dtor virtual ~UnisimPhotonsOnPupil(); virtual void Clear(); Bool_t Load( FILE* ); Bool_t SkipEvent( FILE*); // skip one event // returns Montecarlo truth informations for this event virtual MCTruth* Truth(); virtual Photon* GetPhoton(); Double_t GetZdisk() const { return fZdisk; } Double_t GetRmaxDisk() const { return fRmaxDisk; } Bool_t IsPhotonOnDisk() const { return fPhotonOndisk; } void SetZdisk( Double_t z ) { fZdisk = z; } void SetRmaxDisk( Double_t r ) { fRmaxDisk = r; } void SetPhotonOnDisk( Bool_t disk = kTRUE) { fPhotonOndisk = disk; } private: ParentPhoton** fPhotons; // array of parent photons Int_t fEvCounter; // event counter Int_t fBufferSize; // number of max photons storable in the local photon buffer Double_t fZdisk; // Z coordinate of the disk where photons are expected for tracking Double_t fRmaxDisk; // radius of disk where photons are expected for tracking Bool_t fPhotonOndisk; // Tracks unisim photons on the horizontal disk. void NewPhotonBuffer(Int_t); // utilities to handle the photon buffer void DeletePhotonBuffer(); Bool_t LoadHeader( FILE* ); // read the header and store it in a key-value map map fHeader; MCTruth* fTheTruth; ClassDef(UnisimPhotonsOnPupil,0) }; #endif /* __UNISIMPHOTONSONPUPIL_HH__ */