123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #ifndef UEVENT_H
- #define UEVENT_H
- // C++ headers
- #include <limits>
- // ROOT headers
- #include "TObject.h"
- #include "TLorentzVector.h"
- // Forward declarations
- class TString;
- class TClonesArray;
- class UParticle;
- //_________________
- class UEvent : public TObject {
- public:
- /// Default constructor
- UEvent();
- /// Copy constructor
- UEvent(const UEvent& right);
- /// Default destructor
- virtual ~UEvent();
- /// Print event information
- void print(Option_t* option = "");
- //
- // Getters
- //
- /// Return event number
- Int_t eventNr() const { return fEventNr; }
- /// Return imparct parameter (fm)
- Double_t b() const { return (Double_t)fB; }
- /// Return impact parameter (fm)
- Double_t impact() const { return (Double_t)fB; }
- /// Return reaction plane angle
- Double_t phi() const { return (Double_t)fPhi; }
- /// Return number of event steps
- Int_t numberOfSteps() const { return (Int_t)fNes; }
- /// Return time step (stamp) number
- Int_t stepNumber() const { return (Int_t)fStepNr; }
- /// Return time of the step (stamp)
- Double_t stepT() const { return (Double_t)fStepT; }
- /// Return time of the step (stamp)
- Double_t stepTime() const { return stepT(); }
- /// Return comment
- void comment(TString& comment) const { comment = fComment; }
- Int_t GetNpa() const {return (Int_t)fNpa;}
- TClonesArray* getParticleList() const {return fParticles;}
- UParticle* getParticle(Int_t index) const;
- //
- // Setters
- //
- /// Set all event parameters
- void setParameters(const Int_t& eventNr, const Double_t& b, const Double_t& phi,
- const Int_t& nes, const Int_t& stepNr, const Double_t& stepT,
- const char* comment = "");
- /// Set event number
- void setEventNr(const Int_t& eventNr) { fEventNr = (UInt_t)eventNr; }
- /// Set impact parameter
- void setB(const Double_t& b) { fB = (Float_t)b; }
- /// Set impact parameter
- void setImpact(const Double_t& impact) { setB( impact ); }
- /// Set reaction plane angle
- void setPhi(const Double_t& phi) { fPhi = (Float_t)phi; }
- /// Set number of steps
- void setNumberOfSteps(const Int_t& nes)
- { fNes = ( ( nes > std::numeric_limits<unsigned short>::max() ) ?
- std::numeric_limits<unsigned short>::max() : (UShort_t)nes ); }
- /// Set number of steps
- void setNes(const Int_t& nes)
- { fNes = ( ( nes > std::numeric_limits<unsigned short>::max() ) ?
- std::numeric_limits<unsigned short>::max() : (UShort_t)nes ); }
- /// Set the current step number
- void setStepNr(const Int_t& stepNr)
- { fStepNr = ( ( stepNr > std::numeric_limits<unsigned short>::max() ) ?
- std::numeric_limits<unsigned short>::max() : (UShort_t)stepNr ); }
- /// Set time of the current step
- void setStepT(const Double_t& stepT) { fStepT = (Float_t)stepT; }
- /// Set time of the current step
- void setStepTime(const Double_t& time) { setStepT( time ); }
- /// Set comment
- void setComment(const char* comment) { fComment = comment; }
- void clear();
- void removeAt(Int_t i);
- private:
- /// Event number
- UInt_t fEventNr;
- /// Impact parameter (fm)
- Float_t fB;
- /// Reaction plane angle
- Float_t fPhi;
- /// Number of event steps
- UShort_t fNes;
- // Event step number
- UShort_t fStepNr;
- /// Event step time
- Float_t fStepT;
- /// Number of particles
- UShort_t fNpa;
- /// Generator-specific information
- TString fComment;
- ClassDef(UEvent, 5);
- };
- #endif
|