#ifndef TPAIDeltaRay_hxx_seen #define TPAIDeltaRay_hxx_seen #include #include #include #include #include "IDatum.hxx" #include "IHandle.hxx" //#include "IG4TrajectoryPoint.hxx" namespace COMET { class IPAIDeltaRay; class IPAIDeltaRayContainer; } /// A class to save a Delta Ray from PAI physics list class COMET::IPAIDeltaRay: public TObject { public: IPAIDeltaRay(void); IPAIDeltaRay(std::string particleName, double eKin, double time, double posX, double posY, double posZ, double dirX, double dirY, double dirZ ); IPAIDeltaRay(const IPAIDeltaRay& rhs); virtual ~IPAIDeltaRay(); std::string GetParticleName() const {return fParticleName;} //int GetPDGEncoding() const {return fPDGEncoding;} TVector3 GetPosition() const {return TVector3(fPosX,fPosY,fPosZ);} TVector3 GetDirection() const {return TVector3(fDirX,fDirY,fDirZ);} double GetPosT() const {return fTime;} double GetTime() const {return fTime;} double GetKineticEnergy() const {return fKinEnergy;} /// Note:: G4 ID tracker is not developed yet int GetG4TrackID() const {return fG4TrackID;}; void SetG4TrackID(int t) {fG4TrackID = t;}; int GetG4ParentID() const {return fG4ParentID;} void SetG4ParentID(int t) {fG4ParentID = t;} void IncrementNumOfSecondaries() { fNumOfSecondaries=fNumOfSecondaries+1; } void SetNumOfSecondaries(int nd) { fNumOfSecondaries = nd; } int GetNumOfSecondaries() { return fNumOfSecondaries; } void SetChannelID(int chanID) { fChannelID = chanID; } void SetADCSum(short adcSum) { fADCSum = adcSum; } void SetPulseHeight(double pulseHeight) { fPulseHeight = pulseHeight; } void SetInducedCharge(double inducedCharge) { fInducedCharge = inducedCharge; } int GetChannelID() const { return fChannelID; } int GetADCSum() const { return fADCSum; } double GetPulseHeight() const { return fPulseHeight; } double GetInducedCharge() const { return fInducedCharge; } /// Print the delta ray information. virtual void ls(Option_t* opt = "") const; /// Less-than operator virtual bool operator< (const IPAIDeltaRay& rhs) const { return GetTime() < rhs.GetTime(); } protected: /// The TrackID of this trajectory. int fG4TrackID; /// The unique ID of the parent trajectory (The TrackID of the parent). int fG4ParentID; /// The name of the particle. std::string fParticleName; /// Kinematic Energy double fKinEnergy; /// time double fTime; // Temporary members /// 1. channelID: this value is assigned after executing the SimDetectorResponse /// 2. ADC Sum Contribution to the corresponding channel: this value is assigned after executing the SimDetectorResponse /// 3. induced charge: this value is assigned after executing the SimDetectorResponse int fChannelID; short int fADCSum; double fPulseHeight; double fInducedCharge; // unit [fC] /// position & direction double fPosX, fPosY, fPosZ; double fDirX, fDirY, fDirZ; int fNumOfSecondaries; ClassDef(IPAIDeltaRay,2); }; class COMET::IPAIDeltaRayContainer : public IDatum, public std::vector { public: IPAIDeltaRayContainer(const char* name="PAIDeltaRays", const char* title="PAI Delta Rays") : IDatum(name,title) {}; virtual ~IPAIDeltaRayContainer() {} void ls(Option_t* opt) const; private: ClassDef(IPAIDeltaRayContainer,2); }; #endif