11-nov-2003 NvE Double_t dum=GetScalar() replaced by e[0]=GetScalar() in Ali4Vector.cxx to prevent
a warning for the gcc compiler (thanks to Thomas Burgess).
AliJet derived from TNamed instead of TObject to allow identification via name.
12-nov-2003 NvE fDaytime datamember of AliEvent changed from TDatime to TTimeStamp in order to
obtain nanosecond precision. Setting of date and time via a TDatime argument is
still supported to provide backward compatibility.
13-nov-2003 NvE Invokation of AliAttrib memberfunction Data() replaced by List() in the example
in AliAttrib.cxx (was just a typo; thanks Adam Bouchta).
Also test on pointer value introduced in AliAttrib::GetSlotIndex to prevent
crash when first slot is empty (thanks to Adam Bouchta).
21-nov-2003 NvE Variable names of type "const" started with the character "k" in various
memberfunctions of AliMath in order to comply with the strict Alice
coding conventions.
Double_t a[3];
fV.GetErrors(a,f);
- Double_t dum=GetScalar();
+ // Dummy invokation of GetScalar to obtain automatic proper error determination
+ e[0]=GetScalar();
+
e[0]=GetResultError();
for (Int_t i=0; i<3; i++)
// a.SetOffset(-22.5,2);
// a.SetSlotName("Time of flight in ns",2);
// a.SetDead(1);
-// a.Data();
+// a.List();
//
//--- Author: Nick van Eijndhoven 18-sep-2003 Utrecht University
//- Modified: NvE $Date$ Utrecht University
for (Int_t i=0; i<size; i++)
{
TObjString* so=(TObjString*)fNames->At(i);
- s=so->GetString();
+ if (so) s=so->GetString();
if (s==name) index=i+1;
}
}
fAttributes=0;
fPositions=0;
SetName("Unspecified");
+ SetTitle("Unspecified");
}
///////////////////////////////////////////////////////////////////////////
AliCalorimeter::~AliCalorimeter()
fVetos=0;
SetName("Unspecified");
+ SetTitle("Unspecified");
}
///////////////////////////////////////////////////////////////////////////
AliCalorimeter::AliCalorimeter(AliCalorimeter& c) : TNamed(c)
* provided "as is" without express or implied warranty. *
**************************************************************************/
-// $Id: AliEvent.cxx,v 1.13 2003/08/29 09:05:11 nick Exp $
+// $Id: AliEvent.cxx,v 1.14 2003/10/26 14:53:44 nick Exp $
///////////////////////////////////////////////////////////////////////////
// Class AliEvent
// Note : All quantities are in GeV, GeV/c or GeV/c**2
//
//--- Author: Nick van Eijndhoven 27-may-2001 UU-SAP Utrecht
-//- Modified: NvE $Date: 2003/08/29 09:05:11 $ UU-SAP Utrecht
+//- Modified: NvE $Date: 2003/10/26 14:53:44 $ UU-SAP Utrecht
///////////////////////////////////////////////////////////////////////////
#include "AliEvent.h"
{
// Default constructor.
// All variables initialised to default values.
- fDaytime.Set();
+ TTimeStamp tx;
+ fDaytime=tx;
fRun=0;
fEvent=0;
fAproj=0;
{
cout << " *** This AliVertex initialisation was invoked via the AliEvent ctor." << endl;
}
- fDaytime.Set();
+ TTimeStamp tx;
+ fDaytime=tx;
fRun=0;
fEvent=0;
fAproj=0;
AliVertex::Reset();
- fDaytime.Set();
+ TTimeStamp tx;
+ fDaytime=tx;
fRun=0;
fEvent=0;
fAproj=0;
AliVertex::SetOwner(own);
}
///////////////////////////////////////////////////////////////////////////
-void AliEvent::SetDayTime(TDatime& stamp)
+void AliEvent::SetDayTime(TTimeStamp& stamp)
{
-// Set the date and time stamp for this event
+// Set the date and time stamp for this event.
+// An exact copy of the entered date/time stamp will be saved with an
+// accuracy of 1 second.
fDaytime=stamp;
}
///////////////////////////////////////////////////////////////////////////
+void AliEvent::SetDayTime(TDatime& stamp)
+{
+// Set the date and time stamp for this event.
+// The entered date/time will be interpreted as being the local date/time
+// and the accuracy is 1 second.
+// This function with the TDatime argument is mainly kept for backward
+// compatibility reasons. It is recommended to use the corresponding
+// function with the TTimeStamp argument.
+
+ TTimeStamp ts(stamp.GetDate(),stamp.GetTime(),0,kFALSE);
+ fDaytime=ts;
+}
+///////////////////////////////////////////////////////////////////////////
void AliEvent::SetRunNumber(Int_t run)
{
// Set the run number for this event
fEvent=evt;
}
///////////////////////////////////////////////////////////////////////////
-TDatime AliEvent::GetDayTime()
+TTimeStamp AliEvent::GetDayTime()
{
// Provide the date and time stamp for this event
return fDaytime;
void AliEvent::HeaderData()
{
// Provide event header information
- cout << " *" << ClassName() << "::Data* Run : " << fRun << " Event : " << fEvent
- << " Date : " << fDaytime.AsString() << endl;
+ cout << " *" << ClassName() << "::Data* Name : " << GetName()
+ << " Title : " << GetTitle() << endl;
+ cout << " " << fDaytime.AsString() << endl;
+ cout << " Run : " << fRun << " Event : " << fEvent << endl;
ShowDevices();
}
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-// $Id: AliEvent.h,v 1.10 2003/08/29 09:05:11 nick Exp $
+// $Id: AliEvent.h,v 1.11 2003/10/26 14:53:44 nick Exp $
#include <math.h>
#include "TObject.h"
#include "TObjArray.h"
#include "TDatime.h"
+#include "TTimeStamp.h"
#include "AliVertex.h"
-#include "AliCalorimeter.h"
class AliEvent : public AliVertex
{
virtual ~AliEvent(); // Default destructor
AliEvent(AliEvent& evt); // Copy constructor
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); // Set the date and time stamp exactly as specified (1 ns accuracy)
+ void SetDayTime(TDatime& stamp); // Set date and time stamp interpreted as local time (1 s 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
Double_t GetTargetPnuc(); // Provide the target momentum value per nucleon
Int_t GetTargetId(); // Provide the user defined particle ID of the target
void Reset(); // Reset all values
- TDatime GetDayTime(); // Provide the date and time stamp
+ TTimeStamp GetDayTime(); // Provide the date and time stamp
Int_t GetRunNumber(); // Provide the run number
Int_t GetEventNumber(); // Provide the event number
virtual void HeaderData(); // Print the event header information
TObject* GetDevice(TString name); // Provide device with name "name"
protected:
- TDatime fDaytime; // The date and time stamp
+ TTimeStamp 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
TObjArray* fDevices; // Array to hold the pointers to the various devices
Int_t fDevCopy; // Flag to denote creation of private copies of the devices
- ClassDef(AliEvent,9) // Creation and investigation of an Alice physics event.
+ ClassDef(AliEvent,10) // Creation and investigation of an Alice physics event.
};
#endif
ClassImp(AliJet) // Class implementation to enable ROOT I/O
-AliJet::AliJet() : TObject(),Ali4Vector()
+AliJet::AliJet() : TNamed(),Ali4Vector()
{
// Default constructor
// All variables initialised to 0
Init();
Reset();
SetNtinit();
+ SetName("Unspecified");
+ SetTitle("Unspecified");
}
///////////////////////////////////////////////////////////////////////////
void AliJet::Init()
fTrackCopy=0;
}
///////////////////////////////////////////////////////////////////////////
-AliJet::AliJet(Int_t n) : TObject(),Ali4Vector()
+AliJet::AliJet(Int_t n) : TNamed(),Ali4Vector()
{
// Create a jet to hold initially a maximum of n tracks
// All variables initialised to 0
cout << endl;
SetNtinit();
}
+ SetName("Unspecified");
+ SetTitle("Unspecified");
}
///////////////////////////////////////////////////////////////////////////
AliJet::~AliJet()
fTrackCopy=mode;
}
///////////////////////////////////////////////////////////////////////////
-AliJet::AliJet(AliJet& j) : TObject(j),Ali4Vector(j)
+AliJet::AliJet(AliJet& j) : TNamed(j),Ali4Vector(j)
{
// Copy constructor
fNtinit=j.fNtinit;
void AliJet::Data(TString f)
{
// Provide jet information within the coordinate frame f
- cout << " *AliJet::Data* Id : " << fUserId << " Invmass : " << GetInvmass() << " Charge : " << fQ
+ cout << " *AliJet::Data* Name : " << GetName() << " Title : " << GetTitle() << endl;
+ cout << " Id : " << fUserId << " Invmass : " << GetInvmass() << " Charge : " << fQ
<< " Momentum : " << GetMomentum() << " Ntracks : " << fNtrk << endl;
Ali4Vector::Data(f);
#include <math.h>
-#include "TObject.h"
+#include "TNamed.h"
#include "TObjArray.h"
#include "Ali4Vector.h"
#include "AliTrack.h"
-class AliJet : public TObject,public Ali4Vector
+class AliJet : public TNamed,public Ali4Vector
{
public:
AliJet(); // Default constructor
Int_t fTrackCopy; // Flag to denote creation of private copies in fTracks
Int_t fUserId; // The user defined identifier
- ClassDef(AliJet,5) // Creation and investigation of a jet of particle tracks.
+ ClassDef(AliJet,6) // Creation and investigation of a jet of particle tracks.
};
#endif
//--- Nve 14-nov-1998 UU-SAP Utrecht
// The parameters of the Chebyshev fit
- const Double_t a1=-1.26551223, a2=1.00002368,
- a3= 0.37409196, a4=0.09678418,
- a5=-0.18628806, a6=0.27886807,
- a7=-1.13520398, a8=1.48851587,
- a9=-0.82215223, a10=0.17087277;
+ const Double_t ka1=-1.26551223, ka2=1.00002368,
+ ka3= 0.37409196, ka4=0.09678418,
+ ka5=-0.18628806, ka6=0.27886807,
+ ka7=-1.13520398, ka8=1.48851587,
+ ka9=-0.82215223, ka10=0.17087277;
Double_t v=1.; // The return value
Double_t t=1./(1.+0.5*z);
v=t*exp((-z*z)
- +a1+t*(a2+t*(a3+t*(a4+t*(a5+t*(a6+t*(a7+t*(a8+t*(a9+t*a10)))))))));
+ +ka1+t*(ka2+t*(ka3+t*(ka4+t*(ka5+t*(ka6+t*(ka7+t*(ka8+t*(ka9+t*ka10)))))))));
if (x < 0.) v=2.-v; // erfc(-x)=2-erfc(x)
//--- NvE 12-mar-2000 UU-SAP Utrecht
// Parameters of the polynomial approximation
- const Double_t p1=1.0, p2=3.5156229, p3=3.0899424,
- p4=1.2067492, p5=0.2659732, p6=3.60768e-2, p7=4.5813e-3;
+ const Double_t kp1=1.0, kp2=3.5156229, kp3=3.0899424,
+ kp4=1.2067492, kp5=0.2659732, kp6=3.60768e-2, kp7=4.5813e-3;
- const Double_t q1= 0.39894228, q2= 1.328592e-2, q3= 2.25319e-3,
- q4=-1.57565e-3, q5= 9.16281e-3, q6=-2.057706e-2,
- q7= 2.635537e-2, q8=-1.647633e-2, q9= 3.92377e-3;
+ const Double_t kq1= 0.39894228, kq2= 1.328592e-2, kq3= 2.25319e-3,
+ kq4=-1.57565e-3, kq5= 9.16281e-3, kq6=-2.057706e-2,
+ kq7= 2.635537e-2, kq8=-1.647633e-2, kq9= 3.92377e-3;
Double_t ax=fabs(x);
if (ax < 3.75)
{
y=pow(x/3.75,2);
- result=p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7)))));
+ result=kp1+y*(kp2+y*(kp3+y*(kp4+y*(kp5+y*(kp6+y*kp7)))));
}
else
{
y=3.75/ax;
- result=(exp(ax)/sqrt(ax))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*(q7+y*(q8+y*q9))))))));
+ result=(exp(ax)/sqrt(ax))
+ *(kq1+y*(kq2+y*(kq3+y*(kq4+y*(kq5+y*(kq6+y*(kq7+y*(kq8+y*kq9))))))));
}
return result;
//--- NvE 12-mar-2000 UU-SAP Utrecht
// Parameters of the polynomial approximation
- const Double_t p1=-0.57721566, p2=0.42278420, p3=0.23069756,
- p4= 3.488590e-2, p5=2.62698e-3, p6=1.0750e-4, p7=7.4e-5;
+ const Double_t kp1=-0.57721566, kp2=0.42278420, kp3=0.23069756,
+ kp4= 3.488590e-2, kp5=2.62698e-3, kp6=1.0750e-4, kp7=7.4e-5;
- const Double_t q1= 1.25331414, q2=-7.832358e-2, q3= 2.189568e-2,
- q4=-1.062446e-2, q5= 5.87872e-3, q6=-2.51540e-3, q7=5.3208e-4;
+ const Double_t kq1= 1.25331414, kq2=-7.832358e-2, kq3= 2.189568e-2,
+ kq4=-1.062446e-2, kq5= 5.87872e-3, kq6=-2.51540e-3, kq7=5.3208e-4;
if (x <= 0)
{
if (x <= 2)
{
y=x*x/4.;
- result=(-log(x/2.)*BesselI0(x))+(p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7))))));
+ result=(-log(x/2.)*BesselI0(x))
+ +(kp1+y*(kp2+y*(kp3+y*(kp4+y*(kp5+y*(kp6+y*kp7))))));
}
else
{
y=2./x;
- result=(exp(-x)/sqrt(x))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*q7))))));
+ result=(exp(-x)/sqrt(x))
+ *(kq1+y*(kq2+y*(kq3+y*(kq4+y*(kq5+y*(kq6+y*kq7))))));
}
return result;
//--- NvE 12-mar-2000 UU-SAP Utrecht
// Parameters of the polynomial approximation
- const Double_t p1=0.5, p2=0.87890594, p3=0.51498869,
- p4=0.15084934, p5=2.658733e-2, p6=3.01532e-3, p7=3.2411e-4;
+ const Double_t kp1=0.5, kp2=0.87890594, kp3=0.51498869,
+ kp4=0.15084934, kp5=2.658733e-2, kp6=3.01532e-3, kp7=3.2411e-4;
- const Double_t q1= 0.39894228, q2=-3.988024e-2, q3=-3.62018e-3,
- q4= 1.63801e-3, q5=-1.031555e-2, q6= 2.282967e-2,
- q7=-2.895312e-2, q8= 1.787654e-2, q9=-4.20059e-3;
+ const Double_t kq1= 0.39894228, kq2=-3.988024e-2, kq3=-3.62018e-3,
+ kq4= 1.63801e-3, kq5=-1.031555e-2, kq6= 2.282967e-2,
+ kq7=-2.895312e-2, kq8= 1.787654e-2, kq9=-4.20059e-3;
Double_t ax=fabs(x);
if (ax < 3.75)
{
y=pow(x/3.75,2);
- result=x*(p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7))))));
+ result=x*(kp1+y*(kp2+y*(kp3+y*(kp4+y*(kp5+y*(kp6+y*kp7))))));
}
else
{
y=3.75/ax;
- result=(exp(ax)/sqrt(ax))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*(q7+y*(q8+y*q9))))))));
+ result=(exp(ax)/sqrt(ax))
+ *(kq1+y*(kq2+y*(kq3+y*(kq4+y*(kq5+y*(kq6+y*(kq7+y*(kq8+y*kq9))))))));
if (x < 0) result=-result;
}
//--- NvE 12-mar-2000 UU-SAP Utrecht
// Parameters of the polynomial approximation
- const Double_t p1= 1., p2= 0.15443144, p3=-0.67278579,
- p4=-0.18156897, p5=-1.919402e-2, p6=-1.10404e-3, p7=-4.686e-5;
+ const Double_t kp1= 1., kp2= 0.15443144, kp3=-0.67278579,
+ kp4=-0.18156897, kp5=-1.919402e-2, kp6=-1.10404e-3, kp7=-4.686e-5;
- const Double_t q1= 1.25331414, q2= 0.23498619, q3=-3.655620e-2,
- q4= 1.504268e-2, q5=-7.80353e-3, q6= 3.25614e-3, q7=-6.8245e-4;
+ const Double_t kq1= 1.25331414, kq2= 0.23498619, kq3=-3.655620e-2,
+ kq4= 1.504268e-2, kq5=-7.80353e-3, kq6= 3.25614e-3, kq7=-6.8245e-4;
if (x <= 0)
{
if (x <= 2)
{
y=x*x/4.;
- result=(log(x/2.)*BesselI1(x))+(1./x)*(p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7))))));
+ result=(log(x/2.)*BesselI1(x))
+ +(1./x)*(kp1+y*(kp2+y*(kp3+y*(kp4+y*(kp5+y*(kp6+y*kp7))))));
}
else
{
y=2./x;
- result=(exp(-x)/sqrt(x))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*q7))))));
+ result=(exp(-x)/sqrt(x))
+ *(kq1+y*(kq2+y*(kq3+y*(kq4+y*(kq5+y*(kq6+y*kq7))))));
}
return result;
fDsignals=0;
fWaveforms=0;
SetName("Unspecified");
+ SetTitle("Unspecified");
}
///////////////////////////////////////////////////////////////////////////
AliSignal::~AliSignal()
{
// Provide all signal information within the coordinate frame f.
- cout << " *" << ClassName() << "::Data* Signal of kind : " << GetName() << endl;
+ cout << " *" << ClassName() << "::Data* Name : " << GetName()
+ << " Title : " << GetTitle() << endl;
cout << " Position";
Ali3Vector::Data(f);
return;
}
- if (j != -1) cout << " *" << ClassName() << "::List* Signal of kind : " << GetName() << endl;
+ if (j != -1) cout << " *" << ClassName() << "::List* Name : " << GetName()
+ << " Title : " << GetTitle() << endl;
Int_t nvalues=GetNvalues();
Int_t nerrors=GetNerrors();
+ Int_t nwforms=GetNwaveforms();
Int_t n=nvalues;
if (nerrors>n) n=nerrors;
+ if (nwforms>n) n=nwforms;
if (j<=0)
{
if (i<=nerrors) cout << " error : " << GetSignalError(i);
AliAttrib::List(i);
cout << endl;
+ if (GetWaveform(i)) cout << " Waveform : " << GetWaveform(i)->ClassName()
+ << " " << GetWaveform(i)->GetTitle() << endl;
}
}
else
if (j<=nerrors) cout << " error : " << GetSignalError(j);
AliAttrib::List(j);
cout << endl;
+ if (GetWaveform(j)) cout << " Waveform : " << GetWaveform(j)->ClassName()
+ << " " << GetWaveform(j)->GetTitle() << endl;
}
}
}
void AliVertex::Data(TString f)
{
// Provide vertex information within the coordinate frame f
- cout << " *AliVertex::Data* Id : " << fUserId << " Invmass : " << GetInvmass()
+ cout << " *AliVertex::Data* Name : " << GetName() << " Title : " << GetTitle() << endl;
+ cout << " Id : " << fUserId << " Invmass : " << GetInvmass()
<< " Charge : " << GetCharge() << " Momentum : " << GetMomentum()
<< " Ntracks : " << GetNtracks() << " Nvertices : " << fNvtx
<< " Njets : " << fNjets << endl;
26-oct-2003 NvE Class AliSignal derived from TNamed and MakeCopy() memberfunction replaced by Clone()
like was done for AliCalorimeter.
The latter was also done for AliCalmodule and AliAttribObj.
+29-oct-2003 NvE Obsolete include of AliCalorimeter.h removed from AliEvent header file.
+11-nov-2003 NvE Double_t dum=GetScalar() replaced by e[0]=GetScalar() in Ali4Vector.cxx to prevent
+ a warning for the gcc compiler (thanks to Thomas Burgess).
+ AliJet derived from TNamed instead of TObject to allow identification via name.
+12-nov-2003 NvE fDaytime datamember of AliEvent changed from TDatime to TTimeStamp in order to
+ obtain nanosecond precision. Setting of date and time via a TDatime argument is
+ still supported to provide backward compatibility.
+13-nov-2003 NvE Invokation of AliAttrib memberfunction Data() replaced by List() in the example
+ in AliAttrib.cxx (was just a typo; thanks Adam Bouchta).
+ Also test on pointer value introduced in AliAttrib::GetSlotIndex to prevent
+ crash when first slot is empty (thanks to Adam Bouchta).
+21-nov-2003 NvE Variable names of type "const" started with the character "k" in various
+ memberfunctions of AliMath in order to comply with the strict Alice
+ coding conventions.