//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // This class describes a Laser beam in the tpc volume // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Felix Boehmer TUM (original author) // // //----------------------------------------------------------- #ifndef TPCLASER_H #define TPCLASER_H #include "TVector3.h" #include "TClonesArray.h" #include "TObject.h" class TpcLaser : public TObject { //Constructors ---------------------------------------------- public: //either supply direction here, or set direction or endpoint //manually via set-functions TpcLaser(); TpcLaser(unsigned int id, const TVector3& start, const TVector3& direction, double iondens=0, double width=0, double time=0, bool dirisend=false); TpcLaser(unsigned int id, double rMin, double rMax, double zMin, double zMax, const TVector3& start, const TVector3& direction, double iondens=0, double width=0, double time=0, bool dirisend=false); virtual ~TpcLaser(); //Modifiers ------------------------------------------------- void setEndPos(TVector3 end) {fend = end;} void setDirection(TVector3 dir) {fdir = dir * (1/(double)dir.Mag());} void setIonDens(double iondens) {fionDens = iondens;} void setWidth(double width) {fwidth = width;} void setTime(double time) {ftime = time;} //create PrimaryClusters of 1 electron each //(using LinearInterpolPolicy) and returns a TCA //Ownership of the TCA lies with the caller! TClonesArray* activate(); //fires the laser //Acessors -------------------------------------------------- TVector3 getStart() const {return fstart;} TVector3 getDir() const {return fdir;} TVector3 getEnd() const {return fend;} double getIonDens() const {return fionDens;} double getWidth() const {return fwidth;} double getTime() const {return ftime;} int getNE() const {return ftotalNE;} //-1 if laser was never activated unsigned int getId() const {return fId;} void print(); // ---------------------------------------------------------- private: TVector3 fstart; //starting position TVector3 fend; //end point TVector3 fdir; //direction, normalized double fionDens; //mean ion density on track //[electrons/cm] double fwidth; //width of laser beam double ftime; //fire time int ftotalNE; //total number of electrons unsigned int fId; bool fEval; double frMin, frMax, fzMin, fzMax; //Tpc geometry. void evalGeometry(); //evaluates endpoint or direction public: ClassDef(TpcLaser,1) }; #endif