//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // A Framework Task for // creating the Space-Charge-Map // // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Cristoforo Simonetto TUM (original author) // Felix Boehmer TUM // //----------------------------------------------------------- #ifndef TPCSPACECHARGETASK_HH #define TPCSPACECHARGETASK_HH //Base class #include "FairTask.h" #include // Collaborating Class Declarations -------------------------------------- class TClonesArray; class TpcGas; class TpcDigiPar; class TpcSpaceChargeTask : public FairTask { public: // Constructor ----------------------------------------------------------- TpcSpaceChargeTask(); //default constructor ~TpcSpaceChargeTask(); virtual InitStatus Init(); //needs to be overidden as usual virtual void Exec(Option_t* opt); //... virtual void SetParContainers(); void writeToFile(const char*); // Modifiers ------------------------------------------------------------- // these have to be called BEFORE the Init() function is called in the macro! void SetMinR(double rmin) {ftpcMinR = rmin;} void SetMaxR(double rmax) {ftpcMaxR = rmax;} void SetMinZ(double zmin) {ftpcMinZ = zmin;} void SetMaxZ(double zmax) {ftpcMaxZ = zmax;} void SetRBins(int r) {frBinCount=r;} void SetZBins(int z) {fzBinCount=z;} void SetBins(int rbins, int zbins) {frBinCount = rbins; fzBinCount = zbins;} void SetRate(double rate) {frate = rate;} void SetEpsilon(unsigned int eps) {fEpsilon = eps;} void SetPrimChargeMode(bool opt) {fprimChargeOnly = opt;} void SetAliceMode(bool opt) {fALICEmode = opt;} //experimental, should not be used void SetPrimClBranchName(const TString& p) {fPrimClBranchName = p;} void SetPointBranchName(const TString& t) {fpointBranchName = t;} private: TString fpointBranchName; TString fPrimClBranchName; TClonesArray* fpointArray; TClonesArray* fPrimClArray; const TpcGas* fgas; double fwriteDownTime; //timestep to write file [ns] double frate; //inverse time between 2 events [1/ns] double fionDriftVelocity; //[cm/ns] double fsupression; //supression-factor of ion-creation at the gems double ftpcMinR; //starting radius for the Space-Charge-Map [cm] double ftpcMaxR; double ftpcMinZ; //Z geometry double ftpcMaxZ; int frBinCount; //number of segments in r direction int fzBinCount; double frBinWidth; //size of one Bin double fzBinWidth; double fangle; //opening angle between the 2 tpc volumes [rad] int ftime; //controls Ion-drift. Steered by frate int ferrorCount; //keep track of # of hits outside the volume unsigned int fEvtCounter; double fdistPerTime; //Ion-travel-distance each time-step unsigned int fEpsilon; double fWGas; //obtained from TpcGas-Object bool fprimChargeOnly; //no Charge is created at gems if true bool fALICEmode; std::vector< std::vector > fchargeMap; //segmented map of net charge TpcDigiPar* fpar; public: ClassDef(TpcSpaceChargeTask,3) }; #endif