// ESAF : Euso Simulation and Analysis Framework
// $Id: ElecTestDetTransManager.hh,v 1.16 2005/10/31 16:02:19 pesce Exp $
// Electronic test
// This DetectorTransportManager does not move real photon
// Just put fake photons on focal surface to test electroncis and trigger
// M. Pallavicini created May, 12 2003

#ifndef __ELECTESTDETTRANSMANAGER_HH_
#define __ELECTESTDETTRANSMANAGER_HH_

#include "euso.hh"
#include "DetectorTransportManager.hh"

class ElecTestDetTransManager : public DetectorTransportManager {
public:
    // ctor
    ElecTestDetTransManager();

    // dtor
    virtual ~ElecTestDetTransManager();

    // draw does nothing in this case
    virtual void Draw() const {}

    // put photons on focal surface
    virtual void Go( PhotonsOnPupil* );

    // trace one photon
    virtual Photon* Transport( Photon* ) const { return 0; }

    //getters
    inline Int_t GetNumPhotons() { return fNumPhotons; }
    inline Int_t GetUniqueChanId() { return fUniqueChanId; }
    inline Int_t GetPmtId() { return fPmtId; }
    inline Int_t GetChanId() { return fChanId; }
    inline Int_t GetMacroCellId() { return fMacroCellId; }
    inline Float_t GetStartTime() { return fStartTime; }
    inline Float_t GetEndTime() { return fEndTime; }
    inline Int_t GetTrackLength() { return fTrackLength; }
    inline Bool_t GetHole() { return fHole; }
    inline Int_t GetHolePosition() { return fHolePosition; }
    
    //setters
    inline void SetNumPhotons( Int_t n ) { fNumPhotons = n; }
    inline void SetUniqueChanId( Int_t n ) { fUniqueChanId = n; }
    inline void SetPmtId( Int_t n ) { fPmtId = n; }
    inline void SetChanId( Int_t n ) { fChanId = n; }
    inline void SetMacroCellId( Int_t n ) { fMacroCellId = n; }
    inline void SetStartTime( Float_t n ) { fStartTime = n; }
    inline void SetEndTime( Float_t n ) { fEndTime = n; }
    inline void SetTrackLength( Int_t n ) { fTrackLength = n; }
    inline void SetHole( Bool_t n ) { fHole = n; }
    inline void SetHolePosition( Int_t n ) { fHolePosition = n; }
    

    EsafConfigClass(Optics,ElecTestDetTransManager)

private:
    Int_t   fNumPhotons;      // total number of photons
    Int_t   fUniqueChanId;    // unique channel id
    Int_t   fPmtId;           // pmt identifier
    Int_t   fChanId;          // channel in pmt
    Int_t   fMacroCellId;     // macrocell to be hit
    Float_t fStartTime;       // first photon time
    Float_t fEndTime;         // last photon time
    Int_t   fTrackLength;     // length of simple track along row or column
    Bool_t  fHole;            // true if the track has an hole
    Int_t   fHolePosition;    // position of hole in the track

    void Track();
    void SinglePmt();
    void MultiPmt();
    void BackgroundStudy();
    void PixelTest();

    ClassDef(ElecTestDetTransManager,0)
};

#endif  /* __ELECTESTDETTRANSMANAGER_HH_ */