//----------------------------------------------------------- // 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 PndTpcGas; class PndTpcDigiPar; class PndTpcSpaceChargeTask : public FairTask { public: // Constructor ----------------------------------------------------------- PndTpcSpaceChargeTask(); //default constructor ~PndTpcSpaceChargeTask(); 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) {_tpcMinR = rmin;} void setMaxR(double rmax) {_tpcMaxR = rmax;} void setMinZ(double zmin) {_tpcMinZ = zmin;} void setMaxZ(double zmax) {_tpcMaxZ = zmax;} void setRBins(int r) {_rBinCount=r;} void setZBins(int z) {_zBinCount=z;} void setBins(int rbins, int zbins) {_rBinCount = rbins; _zBinCount = zbins;} void setRate(double rate) {_rate = rate;} void setSupression(double sup) {_supression = sup;} void setGain(double gain) {_gemGain = gain;} void setPrimChargeMode(bool opt) {_primChargeOnly = opt;} void setAliceMode(bool opt) {_ALICEmode = opt;} //experimental, should not be used private: TString _pointBranchName; TClonesArray* _pointArray; const PndTpcGas* _gas; double _writeDownTime; //timestep to write file [ns] double _rate; //inverse time between 2 events [1/ns] double _ionDriftVelocity; //[cm/ns] double _supression; //supression-factor of ion-creation at the gems double _tpcMinR; //starting radius for the Space-Charge-Map [cm] double _tpcMaxR; double _tpcMinZ; //Z geometry double _tpcMaxZ; int _rBinCount; //number of segments in r direction int _zBinCount; double _rBinWidth; //size of one Bin double _zBinWidth; double _angle; //opening angle between the 2 tpc volumes [rad] int _time; //controls Ion-drift. Steered by _rate int _errorCount; //keep track of # of hits outside the volume double _distPerTime; //Ion-travel-distance each time-step double _gemGain; //gain factor of the gem. Set by hand atm double _gemCharge; //net charge produced at the gems double _WGas; //obtained from PndTpcGas-Object bool _primChargeOnly; //no Charge is created at gems if true bool _ALICEmode; std::vector< std::vector > _chargeMap; //segmented map of net charge PndTpcDigiPar* _par; public: ClassDef(PndTpcSpaceChargeTask,1) }; #endif