X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RALICE%2FAliEvent.h;h=19ff1fa5059a795fe8be01502ce83291f5226d35;hb=7d297381c12cca29a9615cd416f7b7291ab32450;hp=d3c866df330ee59d2771f14a46806f55d0942a84;hpb=88cb7938ca21d4a80991d4e7aa564008c29340f7;p=u%2Fmrichter%2FAliRoot.git diff --git a/RALICE/AliEvent.h b/RALICE/AliEvent.h index d3c866df330..19ff1fa5059 100644 --- a/RALICE/AliEvent.h +++ b/RALICE/AliEvent.h @@ -3,9 +3,8 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -// $Id: AliEvent.h,v 1.4 2002/06/25 09:38:28 nick Exp $ +// $Id: AliEvent.h,v 1.19 2004/10/20 10:49:44 nick Exp $ -#include "Riostream.h" #include #include "TObject.h" @@ -13,59 +12,78 @@ #include "TDatime.h" #include "AliVertex.h" -#include "AliCalorimeter.h" +#include "AliDevice.h" +#include "AliTimestamp.h" -class AliEvent : public AliVertex +class AliEvent : public AliVertex,public AliTimestamp { public: AliEvent(); // Default constructor AliEvent(Int_t n); // Create an event to hold initially n tracks - ~AliEvent(); // Default destructor + virtual ~AliEvent(); // Default destructor + AliEvent(const AliEvent& evt); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer virtual void SetOwner(Bool_t own=kTRUE);// Set ownership of all added objects - void SetDayTime(TDatime& stamp); // Set the date and time stamp + void SetDayTime(TTimeStamp& stamp); // (Obsolete, see docs) Set date/time exactly as specified (1ns accuracy) + void SetDayTime(TDatime& stamp); // (Obsolete, see docs) Set date/time interpreted as local time (1s accuracy) void SetRunNumber(Int_t run); // Set the run number void SetEventNumber(Int_t evt); // Set the event number void SetProjectile(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set projectile A, Z, p per nucleon and id - Int_t GetProjectileA(); // Provide A value of the projectile - Int_t GetProjectileZ(); // Provide Z value of the projectile - Double_t GetProjectilePnuc(); // Provide the projectile momentum value per nucleon - Int_t GetProjectileId(); // Provide the user defined particle ID of the projectile + Int_t GetProjectileA() const; // Provide A value of the projectile + Int_t GetProjectileZ() const; // Provide Z value of the projectile + Double_t GetProjectilePnuc() const; // Provide the projectile momentum value per nucleon + Int_t GetProjectileId() const; // Provide the user defined particle ID of the projectile void SetTarget(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set target A, Z, p per nucleon and id - Int_t GetTargetA(); // Provide A value of the target - Int_t GetTargetZ(); // Provide Z value of the target - Double_t GetTargetPnuc(); // Provide the target momentum value per nucleon - Int_t GetTargetId(); // Provide the user defined particle ID of the target + Int_t GetTargetA() const; // Provide A value of the target + Int_t GetTargetZ() const; // Provide Z value of the target + Double_t GetTargetPnuc() const; // Provide the target momentum value per nucleon + Int_t GetTargetId() const; // Provide the user defined particle ID of the target void Reset(); // Reset all values - TDatime GetDayTime(); // Provide the date and time stamp - Int_t GetRunNumber(); // Provide the run number - Int_t GetEventNumber(); // Provide the event number - void HeaderData(); // Print the event header information - void Data(TString f="car"); // Print the event info within coordinate frame f - void SetCalCopy(Int_t j); // (De)activate creation of private copies in fCalorimeters - Int_t GetCalCopy(); // Provide CalCopy flag value - void AddCalorimeter(AliCalorimeter& c); // Add a calorimeter system to the event - void AddCalorimeter(AliCalorimeter* c) { AddCalorimeter(*c); } - Int_t GetNcalorimeters(); // Provide the number of calorimeter systems - void ShowCalorimeters(); // Provide on overview of the available calorimeter systems - AliCalorimeter* GetCalorimeter(Int_t i);// Provide i-th calorimeter system of the event - AliCalorimeter* GetCalorimeter(TString name); // Provide calorimeter with name "name" + TTimeStamp GetDayTime() const; // (Obsolete, see docs) Provide the date and time stamp + Int_t GetRunNumber() const; // Provide the run number + Int_t GetEventNumber() const; // Provide the event number + virtual void HeaderData(); // Print the event header information + using AliVertex::Data; + virtual void Data(TString f="car",TString u="rad"); // Print the event info within frame f and ang units u + void SetDevCopy(Int_t j); // (De)activate creation of private copies of the devices + Int_t GetDevCopy() const; // Provide DevCopy flag value + void AddDevice(TObject& d); // Add a device to the event + void AddDevice(TObject* d) { if (d) AddDevice(*d); } + void RemoveDevice(TObject* d); // Remove the specified device from the event + Int_t GetNdevices() const; // Provide the number of devices + Int_t GetNdevices(const char* classname) const; // Provide the number of selected devices + void ShowDevices(Int_t mode=1) const; // Provide on overview of the available devices + void ShowDevices(const char* classname,Int_t mode=1) const; // Overview of selected devices + TObjArray* GetDevices(const char* classname); // Provide references to the devices derived from the specified class + TObject* GetDevice(Int_t i) const; // Provide i-th device of the event + TObject* GetDevice(TString name) const; // Provide the device with name "name" + TObject* GetIdDevice(Int_t id, TObjArray* devs=0) const; // Get device with identifier "id" + TObject* GetIdDevice(Int_t id, const char* classname) const; // Get device with identifier "id" of specified class + Int_t GetNhits(const char* classname); // Provide number of hits for the specified device class + TObjArray* GetHits(const char* classname); // Provide refs to all hits of the specified device class + AliSignal* GetIdHit(Int_t id,const char* classname); // Provide hit with unique "id" for the specified device class + TObjArray* SortHits(const char* classname,TString name,Int_t mode=-1,Int_t mcal=1); // Sort hits by named signal + TObjArray* SortHits(const char* classname,Int_t idx=1,Int_t mode=-1,Int_t mcal=1); // Sort hits by indexed signal + void GetExtremes(const char* classname,Float_t& vmin,Float_t& vmax,Int_t idx=1,Int_t mode=1); // min and max signal + void GetExtremes(const char* classname,Float_t& vmin,Float_t& vmax,TString name,Int_t mode=1);// min and max signal + void DisplayHits(const char* classname,TString name,Float_t scale=-1,Int_t dp=0,Int_t mode=1,Int_t mcol=4); + 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); + TObjArray* SortDevices(const char* classname,TString name,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal + TObjArray* SortDevices(const char* classname,Int_t idx=1,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal + TObjArray* SortDevices(TObjArray* hits,TString name,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal + TObjArray* SortDevices(TObjArray* hits,Int_t idx=1,Int_t mode=-1,Int_t mcal=1); // Sort devices by signal protected: - TDatime fDaytime; // The date and time stamp - Int_t fRun; // The run number - Int_t fEvent; // The event number - Int_t fAproj; // The projectile A value - Int_t fZproj; // The projectile Z value - Double_t fPnucProj; // The projectile momentum per nucleon - Int_t fIdProj; // User defined projectile particle ID - Int_t fAtarg; // The target A value - Int_t fZtarg; // The target Z value - Double_t fPnucTarg; // The target momentum per nucleon - Int_t fIdTarg; // User defined target particle ID - Int_t fNcals; // The number of calorimeter systems - TObjArray* fCalorimeters; // Array to hold the pointers to the calorimeter systems - Int_t fCalCopy; // Flag to denote creation of private copies in fCalorimeters + Int_t fRun; // The run number + Int_t fEvent; // The event number + TObjArray* fDevices; // Array to hold the pointers to the various devices + Int_t fDevCopy; // Flag to denote creation of private copies of the devices + void LoadHits(const char* classname); // Load references to the hits registered to the specified device class + TObjArray* fHits; //! Temp. array to hold references to the registered AliDevice hits + TObjArray* fOrdered; //! Temp. array to hold references to various ordered objects + TObject* fDisplay; //! Temp. pointer to hold objects which serve event displays + TObjArray* fDevs; //! Temp. array to hold references to user selected devices - ClassDef(AliEvent,6) // Creation and investigation of an Alice physics event. + ClassDef(AliEvent,25) // Creation and investigation of an Alice physics event. }; #endif