#ifndef HSTSDIGITIZER_H #define HSTSDIGITIZER_H #include "hlocation.h" #include "hreconstructor.h" #include "stsdef.h" class HCategory; class HStsDigiPar; class HStsGeomPar; class HGeomVector; class HStsDigitizer : public HReconstructor { private: HCategory* pGeantStsCat; HCategory* pStrawCalCat; HCategory* pStartHitCat; // StartHit data category HStsDigiPar* pStrawDigiPar; HStsGeomPar* pStrawGeomPar; HLocation fLoc; public: HStsDigitizer(); HStsDigitizer(const Text_t* name, const Text_t* title); void initVariables(); Bool_t init(); Bool_t reinit(); Int_t execute(); Bool_t finalize() { return kTRUE; } private: struct GeantFields { Int_t trackNumber; // geant track number Float_t xHit; // geant x of hit (in mm) in cell coord. system Float_t yHit; // geant y of hit (in mm) in cell coord. system Float_t zHit; // geant z of hit (in mm) in cell coord. system Float_t pxHit; // geant x component of hit momentum (in MeV/c) Float_t pyHit; // geant y component of hit momentum (in MeV/c) Float_t pzHit; // geant z component of hit momentum (in MeV/c) Float_t tofHit; // geant time of flight of hit (in ns) Float_t trackLength; // geant track length (in mm) Float_t eHit; // geant energy deposited (in MeV) Float_t lab_x; // x, y, z lab coordinates Float_t lab_y; Float_t lab_z; }; struct DigiFields { Int_t m; Int_t l; Int_t s; Int_t ud; Float_t time; // total time: tof + drift Float_t adc; // adc(tdc) value Float_t radius; Float_t posU; Float_t posZ; Int_t hitnr; }; Int_t fillStrawCalSim(const DigiFields& df, const GeantFields& gf); Float_t calcDriftTime(Float_t x) const; Float_t dt_p[5]; Float_t sina[STS_MAX_MODULES][STS_MAX_LAYERS]; // rotation matrix of the STS sector Float_t cosa[STS_MAX_MODULES][STS_MAX_LAYERS]; HGeomVector* stsCellsLab[STS_MAX_MODULES][STS_MAX_LAYERS][STS_MAX_CELLS]; // Centre of the strip [mm] ClassDef(HStsDigitizer, 0) }; #endif /* !HSTSDIGITIZER_H */