]>
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 | ||
7b825f44 | 6 | // $Id: AliEvent.h,v 1.17 2004/06/29 11:29:37 nick Exp $ |
d16062ac | 7 | |
d16062ac | 8 | #include <math.h> |
9 | ||
10 | #include "TObject.h" | |
11 | #include "TObjArray.h" | |
12 | #include "TDatime.h" | |
387a745b | 13 | #include "TTimeStamp.h" |
d16062ac | 14 | |
15 | #include "AliVertex.h" | |
7a086578 | 16 | #include "AliDevice.h" |
d16062ac | 17 | |
18 | class AliEvent : public AliVertex | |
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 |
387a745b | 27 | void SetDayTime(TTimeStamp& stamp); // Set the date and time stamp exactly as specified (1 ns accuracy) |
28 | void SetDayTime(TDatime& stamp); // Set date and time stamp interpreted as local time (1 s 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 |
261c0caf | 42 | TTimeStamp GetDayTime() const; // Provide the date and time stamp |
43 | Int_t GetRunNumber() const; // Provide the run number | |
44 | Int_t GetEventNumber() const; // Provide the event number | |
45 | virtual void HeaderData() const; // Print the event header information | |
1c01b4f8 | 46 | virtual void Data(TString f="car"); // Print the event info within coordinate frame f |
47 | void SetDevCopy(Int_t j); // (De)activate creation of private copies of the devices | |
261c0caf | 48 | Int_t GetDevCopy() const; // Provide DevCopy flag value |
1c01b4f8 | 49 | void AddDevice(TObject& d); // Add a device to the event |
50 | void AddDevice(TObject* d) { AddDevice(*d); } | |
261c0caf | 51 | Int_t GetNdevices() const; // Provide the number of devices |
52 | void ShowDevices() const; // Provide on overview of the available devices | |
53 | TObject* GetDevice(Int_t i) const; // Provide i-th device of the event | |
54 | TObject* GetDevice(TString name) const; // Provide device with name "name" | |
7a086578 | 55 | Int_t GetNhits(const char* classname); // Provide number of hits for the specified device class |
56 | TObjArray* GetHits(const char* classname); // Provide refs to all hits of the specified device class | |
7b825f44 | 57 | TObjArray* SortHits(TObjArray* hits,TString name,Int_t mode=-1); // Sort hits by named signal value |
58 | TObjArray* SortHits(TObjArray* hits,Int_t idx=1,Int_t mode=-1); // Sort hits by indexed signal value | |
d16062ac | 59 | |
60 | protected: | |
7a086578 | 61 | TTimeStamp fDaytime; // The date and time stamp |
62 | Int_t fRun; // The run number | |
63 | Int_t fEvent; // The event number | |
64 | Int_t fAproj; // The projectile A value | |
65 | Int_t fZproj; // The projectile Z value | |
66 | Double_t fPnucProj; // The projectile momentum per nucleon | |
67 | Int_t fIdProj; // User defined projectile particle ID | |
68 | Int_t fAtarg; // The target A value | |
69 | Int_t fZtarg; // The target Z value | |
70 | Double_t fPnucTarg; // The target momentum per nucleon | |
71 | Int_t fIdTarg; // User defined target particle ID | |
72 | TObjArray* fDevices; // Array to hold the pointers to the various devices | |
73 | Int_t fDevCopy; // Flag to denote creation of private copies of the devices | |
74 | void LoadHits(const char* classname); // Load references to the hits registered to the specified device class | |
75 | TObjArray* fHits; //! Temp. array to hold references to the registered AliDevice hits | |
d16062ac | 76 | |
7b825f44 | 77 | ClassDef(AliEvent,15) // Creation and investigation of an Alice physics event. |
d16062ac | 78 | }; |
79 | #endif |