/* History of cvs commits:
*
* $Log$
+ * Revision 1.85 2005/09/27 16:08:08 hristov
+ * New version of CDB storage framework (A.Colla)
+ *
* Revision 1.84 2005/09/21 10:02:47 kharlov
* Reading calibration from CDB (Boris Polichtchouk)
*
#include "AliPHOSCalibrationDB.h"
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
+#include "AliCDBEntry.h"
ClassImp(AliPHOSClusterizerv1)
// - AliAlignObjAngles
// - AliAlignObjMatrix
//-----------------------------------------------------------------
+/*****************************************************************************
+ * AliAlignObjAngles: derived alignment class storing alignment information *
+ * for a single volume in form of three doubles for the translation *
+ * and three doubles for the rotation expressed with the euler angles *
+ * in the xyz-convention (http://mathworld.wolfram.com/EulerAngles.html), *
+ * also known as roll, pitch, yaw. PLEASE NOTE THE ANGLES SIGNS ARE *
+ * INVERSE WITH RESPECT TO THIS REFERENCE!!! In this way the representation*
+ * is fully consistent with the TGeo Rotation methods. *
+ *****************************************************************************/
#include "AliAlignObj.h"
//#include "AliLog.h"
//_____________________________________________________________________________
void AliAlignObj::AnglesToMatrix(const Double_t *angles, Double_t *rot) const
{
+ // Calculates the rotation matrix using the
+ // Euler angles in "x y z" notation
Double_t degrad = TMath::DegToRad();
Double_t sinpsi = TMath::Sin(degrad*angles[0]);
Double_t cospsi = TMath::Cos(degrad*angles[0]);
//_____________________________________________________________________________
Bool_t AliAlignObj::MatrixToAngles(const Double_t *rot, Double_t *angles) const
{
+ // Calculates the Euler angles in "x y z" notation
+ // using the rotation matrix
if(rot[0]<1e-7 || rot[8]<1e-7) return kFALSE;
Double_t raddeg = TMath::RadToDeg();
angles[0]=raddeg*TMath::ATan2(-rot[5],rot[8]);
//_____________________________________________________________________________
void AliAlignObjAngles::SetTranslation(const TGeoMatrix& m)
{
+ // Sets the translation parameters from an existing TGeoMatrix
if(m.IsTranslation()){
const Double_t* tr = m.GetTranslation();
fTranslation[0]=tr[0]; fTranslation[1]=tr[1]; fTranslation[2]=tr[2];
//_____________________________________________________________________________
Bool_t AliAlignObjAngles::SetRotation(const TGeoMatrix& m)
{
+ // Sets the rotation components from an existing TGeoMatrix
if(m.IsRotation()){
const Double_t* rot = m.GetRotationMatrix();
return MatrixToAngles(rot,fRotation);
//_____________________________________________________________________________
void AliAlignObjAngles::SetMatrix(const TGeoMatrix& m)
{
+ // Sets both the rotation and translation components from an
+ // existing TGeoMatrix
SetTranslation(m);
SetRotation(m);
}
//_____________________________________________________________________________
void AliAlignObjAngles::GetPars(Double_t tr[], Double_t angles[]) const
{
+ // Returns the translations and the rotation angles
GetTranslation(tr);
GetAngles(angles);
}
//_____________________________________________________________________________
void AliAlignObjAngles::GetMatrix(TGeoHMatrix& m) const
{
+ // Extracts the information in an existing TGeoHMatrix using the translations
+ // and the rotation parameters
m.SetTranslation(&fTranslation[0]);
Double_t rot[9];
AnglesToMatrix(fRotation,rot);
//_____________________________________________________________________________
void AliAlignObjMatrix::SetTranslation(Double_t x, Double_t y, Double_t z)
{
+ // Sets the translation parameters
Double_t tr[3];
tr[0]=x; tr[1]=y; tr[2]=z;
fMatrix.SetTranslation(tr);
//_____________________________________________________________________________
void AliAlignObjMatrix::SetTranslation(const TGeoMatrix& m)
{
+ // Sets the translation parameters from an existing TGeoMatrix
const Double_t *tr = m.GetTranslation();
fMatrix.SetTranslation(tr);
}
//_____________________________________________________________________________
void AliAlignObjMatrix::SetRotation(Double_t psi, Double_t theta, Double_t phi)
{
+ // Sets the rotation parameters
Double_t angles[3] = {psi, theta, phi};
Double_t rot[9];
AnglesToMatrix(angles,rot);
//_____________________________________________________________________________
Bool_t AliAlignObjMatrix::SetRotation(const TGeoMatrix& m)
{
+ // Sets the rotation parameters from an existing TGeoMatrix
const Double_t* rot = m.GetRotationMatrix();
fMatrix.SetRotation(rot);
return kTRUE;
//_____________________________________________________________________________
void AliAlignObjMatrix::GetPars(Double_t tr[], Double_t angles[]) const
{
+ // Gets the translations and the rotation angles
GetTranslation(tr);
GetAngles(angles);
}
//_____________________________________________________________________________
void AliAlignObjMatrix::GetMatrix(TGeoHMatrix& m) const
{
- // Get TGeoHMatrix
- //
+ // Extracts the translations and the rotation parameters
+ // in an existing TGeoHMatrix
const Double_t *tr = fMatrix.GetTranslation();
m.SetTranslation(tr);
const Double_t *rot = fMatrix.GetRotationMatrix();
#ifndef ALIALIGNOBJ_H
#define ALIALIGNOBJ_H
-/*************************************************************************
- * AliAlignObj: alignment base class for the storage of alignment *
- * information for a single volume, that is a translation, a rotation *
- * and a the identity of the volume itself in form of a TGeo path and *
- * as a unique integer identifier *
- *************************************************************************/
+//************************************************************************
+// AliAlignObj: alignment base class for the storage of alignment *
+// information for a single volume, that is a translation, a rotation *
+// and a the identity of the volume itself in form of a TGeo path and *
+// as a unique integer identifier *
+// ***********************************************************************
#include "TObject.h"
#include "TString.h"
#include "TGeoMatrix.h"
ClassDef(AliAlignObj, 1)
};
-/*****************************************************************************
- * AliAlignObjAngles: derived alignment class storing alignment information *
- * for a single volume in form of three doubles for the translation *
- * and three doubles for the rotation expressed with the euler angles *
- * in the xyz-convention (http://mathworld.wolfram.com/EulerAngles.html), *
- * also known as roll, pitch, yaw. PLEASE NOTE THE ANGLES SIGNS ARE *
- * INVERSE WITH RESPECT TO THIS REFERENCE!!! In this way the representation*
- * is fully consistent with the TGeo Rotation methods. *
- *****************************************************************************/
+//****************************************************************************
+// AliAlignObjAngles: derived alignment class storing alignment information *
+// for a single volume in form of three doubles for the translation *
+// and three doubles for the rotation expressed with the euler angles *
+// in the xyz-convention (http://mathworld.wolfram.com/EulerAngles.html), *
+// also known as roll, pitch, yaw. PLEASE NOTE THE ANGLES SIGNS ARE *
+// INVERSE WITH RESPECT TO THIS REFERENCE!!! In this way the representation*
+// is fully consistent with the TGeo Rotation methods. *
+//****************************************************************************
class AliAlignObjAngles : public AliAlignObj{
public:
AliAlignObjAngles();
//_____________________________________________________________________________
Bool_t AliCDBDump::KeyNameToId(const char* keyname, AliCDBRunRange& runRange,
-// build AliCDBId from keyname numbers
-
Int_t& version, Int_t& subVersion) {
+// build AliCDBId from keyname numbers
Ssiz_t mSize;
public:
- virtual Bool_t IsReadOnly() {return fReadOnly;};
- virtual Bool_t HasSubVersion() {return kFALSE;};
+ virtual Bool_t IsReadOnly() const {return fReadOnly;};
+ virtual Bool_t HasSubVersion() const {return kFALSE;};
protected:
virtual Bool_t Validate(const char* dbString);
virtual AliCDBParam* CreateParameter(const char* dbString);
+ virtual ~AliCDBDumpFactory() {}
protected:
virtual AliCDBStorage* Create(const AliCDBParam* param);
#include <TRegexp.h>
#include "AliLog.h"
+#include "AliCDBEntry.h"
#include "AliCDBGrid.h"
public:
- virtual Bool_t IsReadOnly() {return kFALSE;};
- virtual Bool_t HasSubVersion() {return kFALSE;};
+ virtual Bool_t IsReadOnly() const {return kFALSE;};
+ virtual Bool_t HasSubVersion() const {return kFALSE;};
protected:
public:
- virtual Bool_t IsReadOnly() {return kFALSE;};
- virtual Bool_t HasSubVersion() {return kTRUE;};
+ virtual Bool_t IsReadOnly() const {return kFALSE;};
+ virtual Bool_t HasSubVersion() const {return kTRUE;};
protected:
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
+//-------------------------------------------------------------------------
+// Implementation of AliCDBManager and AliCDBParam classe
+// Author: Alberto Colla
+// e-mail: Alberto.Colla@cern.ch
+//-------------------------------------------------------------------------
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
#include "AliCDBDump.h"
#include "AliCDBLocal.h"
#include "AliCDBGrid.h"
+//#include "AliCDBEntry.h"
-#include <TObjString.h>
+//#include <TObjString.h>
#include <TSystem.h>
ClassImp(AliCDBParam)
}
//_____________________________________________________________________________
-Bool_t AliCDBManager::HasStorage(const char* dbString) {
+Bool_t AliCDBManager::HasStorage(const char* dbString) const {
// check if dbString is a URI valid for one of the registered factories
TIter iter(&fFactories);
}
//_____________________________________________________________________________
-AliCDBParam* AliCDBManager::CreateParameter(const char* dbString) {
+AliCDBParam* AliCDBManager::CreateParameter(const char* dbString) const {
// create AliCDBParam object from URI string
TIter iter(&fFactories);
#include <TList.h>
#include <TMap.h>
-#include "AliCDBEntry.h"
-
+class AliCDBEntry;
class AliCDBStorage;
class AliCDBStorageFactory;
class AliCDBParam;
void RegisterFactory(AliCDBStorageFactory* factory);
- Bool_t HasStorage(const char* dbString);
+ Bool_t HasStorage(const char* dbString) const;
- AliCDBParam* CreateParameter(const char* dbString);
+ AliCDBParam* CreateParameter(const char* dbString) const;
AliCDBStorage* GetStorage(const char* dbString);
AliCDBStorage* GetStorage(const AliCDBParam* param);
void SetDefaultStorage(const AliCDBParam* param);
void SetDefaultStorage(AliCDBStorage *storage);
- Bool_t IsDefaultStorageSet() {return fDefaultStorage != 0;}
+ Bool_t IsDefaultStorageSet() const {return fDefaultStorage != 0;}
- AliCDBStorage* GetDefaultStorage() {return fDefaultStorage;}
+ AliCDBStorage* GetDefaultStorage() const {return fDefaultStorage;}
void RemoveDefaultStorage();
void SetDrain(const AliCDBParam* param);
void SetDrain(AliCDBStorage *storage);
- Bool_t IsDrainSet() {return fDrainStorage != 0;}
+ Bool_t IsDrainSet() const {return fDrainStorage != 0;}
Bool_t Drain(AliCDBEntry* entry);
private:
AliCDBManager();
- static AliCDBManager* fgInstance;
+ static AliCDBManager* fgInstance; // AliCDBManager instance
AliCDBStorage* GetActiveStorage(const AliCDBParam* param);
void PutActiveStorage(AliCDBParam* param, AliCDBStorage* storage);
public:
virtual Bool_t Validate(const char* dbString) = 0;
- virtual AliCDBParam* CreateParameter(const char* dbString) = 0;
+ virtual AliCDBParam* CreateParameter(const char* dbString) = 0;
+ virtual ~AliCDBStorageFactory(){}
protected:
virtual AliCDBStorage* Create(const AliCDBParam* param) = 0;
private:
- TString fType;
- TString fURI;
+ TString fType; // CDB type?
+ TString fURI; // CDB URI?
ClassDef(AliCDBParam, 0);
};
Bool_t Put(AliCDBEntry* entry);
- virtual Bool_t IsReadOnly() = 0;
- virtual Bool_t HasSubVersion() = 0;
+ virtual Bool_t IsReadOnly() const = 0;
+ virtual Bool_t HasSubVersion() const = 0;
protected:
**************************************************************************/
/* $Id$ */
+//-------------------------------------------------------------------------
+// Class AliCollisionGeometry
+// This is a class to handle the collison geometry defined by
+// the generator
+// Author: A.Morsch Andreas.Morsch@cern.ch
+//-------------------------------------------------------------------------
#include "AliCollisionGeometry.h"
* See cxx source for full Copyright notice */
/* $Id$ */
+//-------------------------------------------------------------------------
+// Class AliCollisionGeometry
+// This is a class to handle the collison geometry defined by
+// the generator
+//-------------------------------------------------------------------------
#include <Rtypes.h>
AliCollisionGeometry();
virtual ~AliCollisionGeometry(){;}
// Getters
- Float_t ImpactParameter() {return fImpactParameter;}
- Float_t ReactionPlaneAngle() {return fReactionPlaneAngle;}
- Int_t HardScatters() {return fNHardScatters;}
- Int_t ProjectileParticipants() {return fNProjectileParticipants;}
- Int_t TargetParticipants() {return fNTargetParticipants;}
- Int_t ProjSpectatorsn() {return fProjectileSpecn;}
- Int_t ProjSpectatorsp() {return fProjectileSpecp;}
- Int_t TargSpectatorsn() {return fTargetSpecn; }
- Int_t TargSpectatorsp() {return fTargetSpecp; }
- Int_t NN() {return fNNColl;}
- Int_t NNw() {return fNNwColl;}
- Int_t NwN() {return fNwNColl;}
- Int_t NwNw() {return fNwNwColl;}
+ Float_t ImpactParameter() const {return fImpactParameter;}
+ Float_t ReactionPlaneAngle() const {return fReactionPlaneAngle;}
+ Int_t HardScatters() const {return fNHardScatters;}
+ Int_t ProjectileParticipants() const {return fNProjectileParticipants;}
+ Int_t TargetParticipants() const {return fNTargetParticipants;}
+ Int_t ProjSpectatorsn() const {return fProjectileSpecn;}
+ Int_t ProjSpectatorsp() const {return fProjectileSpecp;}
+ Int_t TargSpectatorsn() const {return fTargetSpecn; }
+ Int_t TargSpectatorsp() const {return fTargetSpecp; }
+ Int_t NN() const {return fNNColl;}
+ Int_t NNw() const {return fNNwColl;}
+ Int_t NwN() const {return fNwNColl;}
+ Int_t NwNw() const {return fNwNwColl;}
// Setters
void SetImpactParameter(Float_t b) {fImpactParameter=b;}
void SetReactionPlaneAngle(Float_t phi) {fReactionPlaneAngle = phi;}
fSizeY(0),
fPID(0)
{
+ // Default constructor
fRowRange[0] = fRowRange[1] = 0;
fFirstPoint[0] = fFirstPoint[1] = fFirstPoint[2] = 0;
fLastPoint[0] = fLastPoint[1] = fLastPoint[2] = 0;
Double_t AliESDHLTtrack::GetPseudoRapidity() const
{
+ // Calculates the pseudorapidity
return 0.5 * TMath::Log((GetP() + GetPz()) / (GetP() - GetPz()));
}
Int_t fRowRange[2]; //Subsector where this track was build
UShort_t fSector; //Sector # where this track was build
- Float_t fFirstPoint[3]; //First and last track point in TPC
- Float_t fLastPoint[3];
+ Float_t fFirstPoint[3]; //First track point in TPC
+ Float_t fLastPoint[3]; //Last track point in TPC
Int_t fQ; //track charge
Float_t fTanl; //tan of dipangle
Float_t fPsi; //azimuthal angle of the momentum
Float_t fPt; //transverse momentum
- Float_t fPterr;
- Float_t fPsierr;
- Float_t fTanlerr;
+ Float_t fPterr; //Pt error
+ Float_t fPsierr; //Psi error
+ Float_t fTanlerr; //Error of Tangent lambda
- Float_t fBinX;
- Float_t fBinY;
- Float_t fSizeX;
- Float_t fSizeY;
+ Float_t fBinX; //X bin?
+ Float_t fBinY; //Y bin?
+ Float_t fSizeX; //X size?
+ Float_t fSizeY; //Y size?
Float_t fPID; //so far filled only for conformal mapper tracks
/* $Id$ */
-#include "TBrowser.h"
#include "TFile.h"
#include "TObjArray.h"
#include "TTree.h"
//-------------------------------------------------------------
TTreeDataElement:: TTreeDataElement(Char_t type) :
- fName(),
+ TNamed(),
fType(type),
fDType(0),
fClass(0),
}
TTreeDataElement:: TTreeDataElement(TDataType* type) :
- fName(),
+ TNamed(),
fType(0),
fDType(type),
fClass(0),
}
TTreeDataElement:: TTreeDataElement(TClass* cl) :
- fName(),
+ TNamed(),
fType(0),
fDType(0),
fClass(cl),
TTreeDataElement(const TTreeDataElement & tde);
TTreeDataElement & operator=(const TTreeDataElement & tde);
- TString fName; // name of the data element
Char_t fType; // type of data element
TDataType *fDType; //data type pointer
TClass *fClass; //data type pointer
void * fPointer; // pointer to element
- ClassDef(TTreeDataElement,1)
+ ClassDef(TTreeDataElement,2)
};
class TTreeStream: public TNamed {