]>
Commit | Line | Data |
---|---|---|
d16062ac | 1 | #ifndef ALIEVENT_H |
2 | #define ALIEVENT_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
4f368c8c | 6 | // $Id: AliEvent.h,v 1.19 2004/10/20 10:49:44 nick Exp $ |
d16062ac | 7 | |
d16062ac | 8 | #include <math.h> |
9 | ||
10 | #include "TObject.h" | |
11 | #include "TObjArray.h" | |
12 | #include "TDatime.h" | |
13 | ||
14 | #include "AliVertex.h" | |
7a086578 | 15 | #include "AliDevice.h" |
3ea81e9c | 16 | #include "AliTimestamp.h" |
d16062ac | 17 | |
3ea81e9c | 18 | class AliEvent : public AliVertex,public AliTimestamp |
d16062ac | 19 | { |
20 | public: | |
21 | AliEvent(); // Default constructor | |
22 | AliEvent(Int_t n); // Create an event to hold initially n tracks | |
c72198f1 | 23 | virtual ~AliEvent(); // Default destructor |
261c0caf | 24 | AliEvent(const AliEvent& evt); // Copy constructor |
25 | virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer | |
8e8e6c7f | 26 | virtual void SetOwner(Bool_t own=kTRUE);// Set ownership of all added objects |
3ea81e9c | 27 | void SetDayTime(TTimeStamp& stamp); // (Obsolete, see docs) Set date/time exactly as specified (1ns accuracy) |
28 | void SetDayTime(TDatime& stamp); // (Obsolete, see docs) Set date/time interpreted as local time (1s accuracy) | |
d16062ac | 29 | void SetRunNumber(Int_t run); // Set the run number |
30 | void SetEventNumber(Int_t evt); // Set the event number | |
da17f667 | 31 | void SetProjectile(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set projectile A, Z, p per nucleon and id |
261c0caf | 32 | Int_t GetProjectileA() const; // Provide A value of the projectile |
33 | Int_t GetProjectileZ() const; // Provide Z value of the projectile | |
34 | Double_t GetProjectilePnuc() const; // Provide the projectile momentum value per nucleon | |
35 | Int_t GetProjectileId() const; // Provide the user defined particle ID of the projectile | |
da17f667 | 36 | void SetTarget(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set target A, Z, p per nucleon and id |
261c0caf | 37 | Int_t GetTargetA() const; // Provide A value of the target |
38 | Int_t GetTargetZ() const; // Provide Z value of the target | |
39 | Double_t GetTargetPnuc() const; // Provide the target momentum value per nucleon | |
40 | Int_t GetTargetId() const; // Provide the user defined particle ID of the target | |
d16062ac | 41 | void Reset(); // Reset all values |
3ea81e9c | 42 | TTimeStamp GetDayTime() const; // (Obsolete, see docs) Provide the date and time stamp |
261c0caf | 43 | Int_t GetRunNumber() const; // Provide the run number |
44 | Int_t GetEventNumber() const; // Provide the event number | |
3ea81e9c | 45 | virtual void HeaderData(); // Print the event header information |
64b63904 | 46 | using AliVertex::Data; |
1f241680 | 47 | virtual void Data(TString f="car",TString u="rad"); // Print the event info within frame f and ang units u |
1c01b4f8 | 48 | void SetDevCopy(Int_t j); // (De)activate creation of private copies of the devices |
261c0caf | 49 | Int_t GetDevCopy() const; // Provide DevCopy flag value |
1c01b4f8 | 50 | void AddDevice(TObject& d); // Add a device to the event |
ea0b5b7f | 51 | void AddDevice(TObject* d) { if (d) AddDevice(*d); } |
caa58e1a | 52 | void RemoveDevice(TObject* d); // Remove the specified device from the event |
261c0caf | 53 | Int_t GetNdevices() const; // Provide the number of devices |
95f2b820 | 54 | Int_t GetNdevices(const char* classname) const; // Provide the number of selected devices |
ea0b5b7f | 55 | void ShowDevices(Int_t mode=1) const; // Provide on overview of the available devices |
95f2b820 | 56 | void ShowDevices(const char* classname,Int_t mode=1) const; // Overview of selected devices |
27e6d856 | 57 | TObjArray* GetDevices(const char* classname); // Provide references to the devices derived from the specified class |
261c0caf | 58 | TObject* GetDevice(Int_t i) const; // Provide i-th device of the event |
4f368c8c | 59 | TObject* GetDevice(TString name) const; // Provide the device with name "name" |
95f2b820 | 60 | TObject* GetIdDevice(Int_t id, TObjArray* devs=0) const; // Get device with identifier "id" |
61 | TObject* GetIdDevice(Int_t id, const char* classname) const; // Get device with identifier "id" of specified class | |
7a086578 | 62 | Int_t GetNhits(const char* classname); // Provide number of hits for the specified device class |
63 | TObjArray* GetHits(const char* classname); // Provide refs to all hits of the specified device class | |
4f368c8c | 64 | AliSignal* GetIdHit(Int_t id,const char* classname); // Provide hit with unique "id" for the specified device class |
27e6d856 | 65 | TObjArray* SortHits(const char* classname,TString name,Int_t mode=-1,Int_t mcal=1); // Sort hits by named signal |
66 | TObjArray* SortHits(const char* classname,Int_t idx=1,Int_t mode=-1,Int_t mcal=1); // Sort hits by indexed signal | |
67 | void GetExtremes(const char* classname,Float_t& vmin,Float_t& vmax,Int_t idx=1,Int_t mode=1); // min and max signal | |
68 | void GetExtremes(const char* classname,Float_t& vmin,Float_t& vmax,TString name,Int_t mode=1);// min and max signal | |
69 | void DisplayHits(const char* classname,TString name,Float_t scale=-1,Int_t dp=0,Int_t mode=1,Int_t mcol=4); | |
70 | void DisplayHits(const char* classname,Int_t idx=1,Float_t scale=-1,Int_t dp=0,Int_t mode=1,Int_t mcol=4); | |
71 | TObjArray* SortDevices(const char* classname,TString name,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal | |
72 | TObjArray* SortDevices(const char* classname,Int_t idx=1,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal | |
73 | TObjArray* SortDevices(TObjArray* hits,TString name,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal | |
74 | TObjArray* SortDevices(TObjArray* hits,Int_t idx=1,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal | |
d16062ac | 75 | |
76 | protected: | |
7a086578 | 77 | Int_t fRun; // The run number |
78 | Int_t fEvent; // The event number | |
7a086578 | 79 | TObjArray* fDevices; // Array to hold the pointers to the various devices |
80 | Int_t fDevCopy; // Flag to denote creation of private copies of the devices | |
81 | void LoadHits(const char* classname); // Load references to the hits registered to the specified device class | |
82 | TObjArray* fHits; //! Temp. array to hold references to the registered AliDevice hits | |
965bd237 | 83 | TObjArray* fOrdered; //! Temp. array to hold references to various ordered objects |
84 | TObject* fDisplay; //! Temp. pointer to hold objects which serve event displays | |
27e6d856 | 85 | TObjArray* fDevs; //! Temp. array to hold references to user selected devices |
d16062ac | 86 | |
caa58e1a | 87 | ClassDef(AliEvent,25) // Creation and investigation of an Alice physics event. |
d16062ac | 88 | }; |
89 | #endif |