///////////////////////////////////////////////////////////////////////////////
#include <TTree.h>
-#include <TVirtualMC.h>
-#include "AliCRT.h"
-#include "AliCRTConstants.h"
-#include "AliCRThit.h"
-#include "AliLoader.h"
-#include "AliMagF.h"
#include "AliRun.h"
-
+#include "AliMagF.h"
+
+#include "AliCRT.h"
+
ClassImp(AliCRT)
//_____________________________________________________________________________
AliCRT::AliCRT()
+ : AliDetector()
{
//
- // Default constructor for the CRT
+ // Default constructor
//
-
- fIshunt = 0;
- fHits = 0;
-
}
//_____________________________________________________________________________
AliCRT::AliCRT(const char *name, const char *title)
- : AliDetector(name,title)
+ : AliDetector(name, title)
{
//
- // Standard constructor for the CRT module
+ // Standard constructor
//
-
- fIshunt = 1; // All hits are associated with primary particles
-
- fHits = new TClonesArray("AliCRThit",400) ;
-
- gAlice->AddHitList(fHits);
-
- SetMarkerColor(7);
- SetMarkerStyle(2);
- SetMarkerSize(0.4);
-
}
//_____________________________________________________________________________
AliCRT::AliCRT(const AliCRT& crt)
+ : AliDetector(crt)
{
//
- // Copy ctor.
- //
- crt.Copy(*this);
-}
-
-//_____________________________________________________________________________
-AliCRT& AliCRT::operator= (const AliCRT& crt)
-{
- //
- // Asingment operator.
+ // Copy constructor
//
crt.Copy(*this);
- return *this;
}
//_____________________________________________________________________________
AliCRT::~AliCRT()
{
//
- // Standar destructor.
- //
- if (fHits) {
- fHits->Delete();
- delete fHits;
- }
-}
-
-//_____________________________________________________________________________
-void AliCRT::AddHit(Int_t track, Int_t *vol, Float_t *hits)
-{
- //
- // Add a CRT hit
+ // Default destructor
//
- TClonesArray &lhits = *fHits;
- new(lhits[fNhits++]) AliCRThit(fIshunt,track,vol,hits);
}
//_____________________________________________________________________________
-void AliCRT::AddDigit(Int_t *tracks,Int_t *digits)
+AliCRT& AliCRT::operator=(const AliCRT& crt)
{
- //
- // Add a CRT digit to the list. Dummy function.
//
-}
-
-//_____________________________________________________________________________
-void AliCRT::Init() const
-{
- //
- // Initialise ...
- //
-
- Int_t i;
- //
- if(fDebug) {
- printf("\n%s: ",ClassName());
- for(i=0;i<35;i++) printf("*");
- printf(" CRT_INIT ");
- for(i=0;i<35;i++) printf("*");
- printf("\n%s: ",ClassName());
- //
- // Here the CRT initialisation code (if any!)
- for(i=0;i<80;i++) printf("*");
- printf("\n");
- }
-}
-
-//_____________________________________________________________________________
-void AliCRT::ResetHits()
-{
- // Reset number of clusters and the cluster array for this detector
- AliDetector::ResetHits();
-}
-
-//_____________________________________________________________________________
-void AliCRT::ResetDigits()
-{
- //
- // Reset number of digits and the digits array for this detector
- AliDetector::ResetDigits();
-}
-
-//____________________________________________________________________________
-void AliCRT::FinishEvent()
-{
-// do nothing
-}
-
-//_____________________________________________________________________________
-void AliCRT::BuildGeometry()
-{
- //
- // Build simple ROOT TNode geometry for event display
- //
-}
-
-//_____________________________________________________________________________
-void AliCRT::CreateGeometry()
-{
- //
- // Build simple ROOT TNode geometry for GEANT simulations
+ // Asingment operator.
//
+ crt.Copy(*this);
+ return *this;
}
//_____________________________________________________________________________
Float_t wMolasse[10] = {0.008, 0.043, 0.485, 0.007, 0.042, 0.037, 0.215, 0.023, 0.1, 0.04};
Float_t dMolasse = 2.40;
AliMixture(24, "Molasse$", aMolasse, zMolasse, dMolasse, 10, wMolasse);
-
+
// ****************
// Defines tracking media parameters.
// Les valeurs sont commentees pour laisser le defaut
AliMedium(35, "AIR_C1 ", 35, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
AliMedium(55, "AIR_C2 ", 55, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
AliMedium(75, "AIR_C4 ", 75, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
- AliMedium(75, "AIR_C5 ", 95, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
+ AliMedium(95, "AIR_C5 ", 95, 0, isxfld, sxmgmx, atmaxfd, stemax, adeemax, aepsil, astmin);
// The scintillator of the CPV made of Polystyrene
// scintillator -> idtmed[1112]
+ AliMedium(12 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
AliMedium(13 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
-
+ AliMedium(14 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+
// Molasse -> idtmed[1123]
AliMedium(24 , "Molasse ", 24, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin);
Float_t aconc[10] = { 1.,12.01,15.994,22.99,24.305,26.98,28.086,39.1,40.08,55.85 };
Float_t zconc[10] = { 1.,6.,8.,11.,12.,13.,14.,19.,20.,26. };
Float_t wconc[10] = { .01,.001,.529107,.016,.002,.033872,.337021,.013,.044,.014 };
-
+
AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc);
// Concrete
AliMedium(17, "CC_C0 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(27, "CC_C1 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // MX24
+ AliMedium(37, "CC_C2 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // PM25
+ AliMedium(47, "CC_C3 ", 17, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); // PGC2
}
-/*
-//_____________________________________________________________________________
-void AliCRT::MakeBranch(Option_t* option, const char *file)
-{
- //
- // Specific CRT branches
- //
- // Create Tree branches for the CRT.
- Int_t buffersize = 400;
- char branchname[10];
- sprintf(branchname,"%s",GetName());
-
- AliDetector::MakeBranch(option,file);
-
- const char *cD = strstr(option,"D");
-
- if (cD) {
- digits = new AliCRTdigit();
- MakeBranchInTree(gAlice->TreeD(), branchname, "AliCRTdigit",
- digits, buffersize, 1, file);
- }
-}
-*/
//_____________________________________________________________________________
void AliCRT::SetTreeAddress()
{
TBranch *branch;
char branchname[20];
sprintf(branchname,"%s",GetName());
-
+
// Branch address for hit tree
TTree *treeH = fLoader->TreeH();
if (treeH && fHits) {
branch = treeH->GetBranch(branchname);
if (branch) branch->SetAddress(&fHits);
}
-
}
#include "AliDetector.h"
-class TFile;
-class TDirectory;
-class TString ;
-class TTask ;
-class TFolder ;
-
class AliCRT : public AliDetector {
-
public:
-
- AliCRT();
- AliCRT(const char *name, const char *title);
- AliCRT(const AliCRT& crt);
- AliCRT& operator= (const AliCRT& crt);
- virtual ~AliCRT();
-
- virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
- virtual void AddDigit(Int_t *tracks,Int_t *digits);
-
- virtual void BuildGeometry();
- virtual void CreateGeometry();
- virtual void Init() const;
- virtual void CreateMaterials();
- virtual Int_t IsVersion() const {return 0;}
- virtual TString Version(void) {return TString("");}
- virtual void DrawDetector() const {}
- virtual void DrawModule() const {}
- virtual void StepManager() {}
-
- virtual void FinishEvent();
- virtual void ResetHits();
- virtual void ResetDigits();
- virtual void SetTreeAddress();
-
-protected:
+ AliCRT();
+ AliCRT(const char* name, const char* title);
+ AliCRT(const AliCRT& crt);
+ virtual ~AliCRT();
+
+ AliCRT& operator=(const AliCRT& crt);
+ virtual void CreateMaterials();
+
+ virtual Int_t IsVersion() const;
+ virtual TString Version();
+
+ virtual void SetTreeAddress();
private:
- ClassDef(AliCRT,1) //Class manager for CRT(ACORDE)
+ ClassDef(AliCRT, 1) // Cosmic Ray Trigger (ACORDE) base class
};
+inline Int_t AliCRT::IsVersion() const
+{ return 0; }
+
+inline TString AliCRT::Version()
+{ return TString(""); }
#endif // ALICRT_H
// easily accessible place. All constants are public const static data
// members. The class is never instatiated.
//
-//
// Author: Arturo Fernandez, Enrique Gamez
// FCFM-UAP, Mexico.
//
#include "AliCRTConstants.h"
-const Float_t AliCRTConstants::fgCageLenght = 477.6;
-const Float_t AliCRTConstants::fgCageWidth = 166.7;
-const Float_t AliCRTConstants::fgCageHeight = 10.7;
+const Float_t AliCRTConstants::fgCageLenght = 477.6;
+const Float_t AliCRTConstants::fgCageWidth = 166.7;
+const Float_t AliCRTConstants::fgCageHeight = 10.7;
const Float_t AliCRTConstants::fgSinglePaletteLenght = 363.0;
const Float_t AliCRTConstants::fgSinglePaletteWidth = 19.7;
-const Float_t AliCRTConstants::fgSinglePaletteHeight = 1.0;
-const Float_t AliCRTConstants::fgActiveAreaGap = 0.7;
-const Float_t AliCRTConstants::fgActiveAreaLenght = fgSinglePaletteLenght;
-const Float_t AliCRTConstants::fgActiveAreaWidth = 156.7;
-const Float_t AliCRTConstants::fgActiveAreaHeight = 2*fgSinglePaletteHeight + fgActiveAreaGap;
-const Float_t AliCRTConstants::fgMagnetWidth = 654.4;
-const Float_t AliCRTConstants::fgMagnetLenght = 1200.;
-const Float_t AliCRTConstants::fgDepth=4420.; // cm.
+const Float_t AliCRTConstants::fgSinglePaletteHeight = 1;
+const Float_t AliCRTConstants::fgActiveAreaGap = 0.7;
+const Float_t AliCRTConstants::fgActiveAreaLenght = AliCRTConstants::fgSinglePaletteLenght;
+const Float_t AliCRTConstants::fgActiveAreaWidth = 156.7;
+const Float_t AliCRTConstants::fgActiveAreaHeight = 2*AliCRTConstants::fgSinglePaletteHeight + AliCRTConstants::fgActiveAreaGap;
+const Float_t AliCRTConstants::fgMagnetWidth = 654.4;
+const Float_t AliCRTConstants::fgMagnetLenght = 1200;
+const Float_t AliCRTConstants::fgMagMinRadius = 790;
+const Float_t AliCRTConstants::fgMagMaxRadius = AliCRTConstants::fgMagMinRadius + 20;
+const Float_t AliCRTConstants::fgDepth =4420; // cm
ClassImp(AliCRTConstants)
// easily accessible place. All constants are public const static data
// members. The class is never instatiated.
//
-//
// Author: Arturo Fernandez, Enrique Gamez
// FCFM-UAP, Mexico.
//
/////////////////////////////////////////////////////////////////////////
-#include <TObject.h>
+#include <Rtypes.h>
+
+enum ECRMode {
+ kSingleMuons,
+ kMuonBundle,
+ kMuonFlux
+};
class AliCRTConstants {
- public:
- // Modules
+public:
+ // Module dimentions
static const Float_t fgCageLenght; // Module lenght
static const Float_t fgCageWidth; // Module width
static const Float_t fgCageHeight; // Module height
-// The dimensions of the active area of a single palette are:
- static const Float_t fgSinglePaletteLenght; //
- static const Float_t fgSinglePaletteWidth; //
- static const Float_t fgSinglePaletteHeight; //
-
- static const Float_t fgActiveAreaGap; //
-
+ // The dimensions of the active area of a single palette are:
+ static const Float_t fgSinglePaletteLenght; //
+ static const Float_t fgSinglePaletteWidth; //
+ static const Float_t fgSinglePaletteHeight; //
+
+ static const Float_t fgActiveAreaGap; //
+
// Aproximate dimensions of the active area of the module.
static const Float_t fgActiveAreaLenght;
- static const Float_t fgActiveAreaWidth; //
+ static const Float_t fgActiveAreaWidth; //
static const Float_t fgActiveAreaHeight;
-
+
// Magnet
- static const Float_t fgMagnetWidth; //
- static const Float_t fgMagnetLenght; //
+ static const Float_t fgMagnetWidth; //
+ static const Float_t fgMagnetLenght; //
+ static const Float_t fgMagMinRadius; //
+ static const Float_t fgMagMaxRadius; //
// Surface
static const Float_t fgDepth;
-
+
AliCRTConstants() {}
- AliCRTConstants(const AliCRTConstants& ct) {}
- AliCRTConstants& operator= (const AliCRTConstants& ct) {return *this;}
virtual ~AliCRTConstants() {}
+protected:
+ AliCRTConstants(const AliCRTConstants& ct) {}
+ AliCRTConstants& operator=(const AliCRTConstants& ct) {return *this;}
+
private:
ClassDef(AliCRTConstants, 0) // CRT(ACORDE) global constants
};
-
-enum ECRMode {
- kSingleMuons,
- kMuonBundle,
- kMuonFlux
-};
-
#endif // ALICRTCONSTANTS_H
/* $Id$ */
-#include "AliCRT.h"
+#include <TArrayF.h>
+#include <TArrayI.h>
+
#include "AliCRTdigit.h"
-#include "AliRun.h"
ClassImp(AliCRTdigit)
//_____________________________________________________________________________
AliCRTdigit::AliCRTdigit()
+ : AliDigit(),
+ fSector(0),
+ fPlate(0),
+ fStrip(0),
+ fPadx(0),
+ fPadz(0),
+ fNDigits(0),
+ fTdc(0),
+ fAdc(0),
+ fTracks(0)
{
- // Default ctor.
-
- fNDigits = 0;
- fTdc = 0;
- fAdc = 0;
- fTracks = 0;
+ //
+ // Default constructor
+ //
}
//_____________________________________________________________________________
-AliCRTdigit::AliCRTdigit(Int_t tracknum, Int_t *vol,Float_t *digit)
+AliCRTdigit::AliCRTdigit(Int_t tracknum, Int_t *vol, Float_t *digit)
+ : AliDigit(),
+ fSector(vol[0]),
+ fPlate(vol[1]),
+ fStrip(vol[2]),
+ fPadx(vol[3]),
+ fPadz(vol[4]),
+ fNDigits(1),
+ fTdc(new TArrayF(fNDigits)),
+ fAdc(new TArrayF(fNDigits)),
+ fTracks(new TArrayI(fNDigits))
{
//
// The creator for the AliCRTdigit class. This routine fills the
// AliCRTdigit data members from the array digits.
//
-
- fSector = vol[0];
- fPlate = vol[1];
- fStrip = vol[2];
- fPadx = vol[3];
- fPadz = vol[4];
- fNDigits = 1;
- fTdc = new TArrayF(fNDigits);
(*fTdc)[0] = digit[0];
- fAdc = new TArrayF(fNDigits);
(*fAdc)[0] = digit[1];
//fTracks = new TArrayI(kMAXDIGITS*fNDigits);
- fTracks = new TArrayI(fNDigits);
(*fTracks)[0] = tracknum;
//for (Int_t i = 1; i <kMAXDIGITS*fNDigits; i++) {
for (Int_t i = 1; i <fNDigits; i++) {
}
//_____________________________________________________________________________
-AliCRTdigit::AliCRTdigit(const AliCRTdigit & digit)
+AliCRTdigit::AliCRTdigit(const AliCRTdigit& digit)
+ : AliDigit(digit),
+ fSector(digit.fSector),
+ fPlate(digit.fPlate),
+ fStrip(digit.fStrip),
+ fPadx(digit.fPadx),
+ fPadz(digit.fPadz),
+ fNDigits(digit.fNDigits),
+ fTdc(digit.fTdc),
+ fAdc(digit.fAdc),
+ fTracks(digit.fTracks)
{
//
- //-- Copy ctor.
+ //-- Copy constructor
//
- fSector = digit.fSector;
- fPlate = digit.fPlate;
- fStrip = digit.fStrip;
- fPadx = digit.fPadx;
- fPadz = digit.fPadz;
- fNDigits = digit.fNDigits;
- fTdc = new TArrayF(*digit.fTdc);
- fAdc = new TArrayF(*digit.fAdc);
- fTracks = new TArrayI(*digit.fTracks);
+}
+//_____________________________________________________________________________
+AliCRTdigit::~AliCRTdigit()
+{
+ //
+ //
+ //
+ if ( fTracks ) { delete fTracks; fTracks = 0; }
+ if ( fAdc ) { delete fAdc; fAdc = 0; }
+ if ( fTdc ) { delete fTdc; fTdc = 0; }
}
//_____________________________________________________________________________
-AliCRTdigit& AliCRTdigit::operator= (const AliCRTdigit & digit)
+AliCRTdigit& AliCRTdigit::operator=(const AliCRTdigit& digit)
{
//
//-- Asingment operator.
fPadx = digit.fPadx;
fPadz = digit.fPadz;
fNDigits = digit.fNDigits;
- fTdc = new TArrayF(*digit.fTdc);
- fAdc = new TArrayF(*digit.fAdc);
- fTracks = new TArrayI(*digit.fTracks);
-
+ fTdc = digit.fTdc;
+ fAdc = digit.fAdc;
+ fTracks = digit.fTracks;
return *this;
}
/* $Id$ */
-#include <TArrayF.h>
-#include <TArrayI.h>
-
#include "AliDigit.h"
-#include "AliCRT.h"
-class AliCRTdigit: public TObject {
+class TArrayF;
+class TArrayI;
+class AliCRTdigit: public AliDigit {
public:
- AliCRTdigit();
- AliCRTdigit(Int_t tracknum, Int_t* vol, Float_t* digit);
- AliCRTdigit(const AliCRTdigit & digit);
- AliCRTdigit& operator= (const AliCRTdigit& digit);
- virtual ~AliCRTdigit() {}
+ AliCRTdigit();
+ AliCRTdigit(Int_t tracknum, Int_t* vol, Float_t* digit);
+ AliCRTdigit(const AliCRTdigit& digit);
+ virtual ~AliCRTdigit();
+
+ AliCRTdigit& operator= (const AliCRTdigit& digit);
protected:
Int_t fSector; // number of sector
Int_t fPadx; // number of pad along x
Int_t fPadz; // number of pad along z
Int_t fNDigits; // dimension of fTdc array
- TArrayF *fTdc; // tdc values for sdigit
- TArrayF *fAdc; // adc values for sdigit
- TArrayI *fTracks; // contributing tracks, kMAXDIGITS entries per
+ TArrayF* fTdc; // tdc values for sdigit
+ TArrayF* fAdc; // adc values for sdigit
+ TArrayI* fTracks; // contributing tracks, kMAXDIGITS entries per
// 1 tdc value
-
private:
ClassDef(AliCRTdigit,1) //Digit (Header) object for set : CRT (ACORDE)
};
/* $Id$ */
+#include <TMath.h>
+
+#include "AliConst.h"
#include "AliCRThit.h"
ClassImp(AliCRThit)
//____________________________________________________________________________
AliCRThit::AliCRThit()
+ : AliHit(),
+ fId(0),
+ fPx(0),
+ fPy(0),
+ fPz(0),
+ fEloss(0),
+ fMedium(0)
{
- //
- // default ctor for AliCRThit object
- //
-
- fId = 0.;
- fX = 0.;
- fY = 0.;
- fZ = 0.;
- fPx = 0.;
- fPy = 0.;
- fPz = 0.;
- fMedium = 0.;
- fELoss = 0.;
- fCRTh = 0.;
- fCRTMod = 0.;
- fCRTMag = 0.;
- fCRTRICH = 0.;
- fCRTTPC = 0.;
-
- fCopy = 0;
- for (Int_t i = 0; i < 5; i++ ) {
- fVolume[i] = 0;
- }
-
+ //
+ // default ctor for AliCRThit object
+ //
}
+//_____________________________________________________________________________
+AliCRThit::AliCRThit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits)
+ : AliHit(shunt, track),
+ fId(hits[0]),
+ fPx(hits[4]),
+ fPy(hits[5]),
+ fPz(hits[6]),
+ fEloss(hits[7]),
+ fMedium(vol[0])
+{
+ //
+ // Constructor of hit object
+ //
+ fX = hits[1];
+ fY = hits[2];
+ fZ = hits[3];
+}
//____________________________________________________________________________
AliCRThit::AliCRThit(const AliCRThit & hit)
+ : AliHit(hit),
+ fId(hit.fId),
+ fPx(hit.fPx),
+ fPy(hit.fPy),
+ fPz(hit.fPz),
+ fEloss(hit.fEloss),
+ fMedium(hit.fMedium)
+{
+ //
+ // copy ctor
+ //
+ fX = hit.fX;
+ fY = hit.fY;
+ fZ = hit.fZ;
+}
+
+//_____________________________________________________________________________
+AliCRThit::~AliCRThit()
{
- //
- // copy ctor
- //
+ //
+ // Default destructor.
+ //
+}
+//_____________________________________________________________________________
+AliCRThit& AliCRThit::operator=(const AliCRThit & hit)
+{
+ //
+ // aisngment operator.
+ //
fId = hit.fId;
fX = hit.fX;
fY = hit.fY;
fPx = hit.fPx;
fPy = hit.fPy;
fPz = hit.fPz;
+ fEloss = hit.fEloss;
fMedium = hit.fMedium;
- fELoss = hit.fELoss;
- fCRTh = hit.fCRTh;
- fCRTMod = hit.fCRTMod;
- fCRTMag = hit.fCRTMag;
- fCRTRICH = hit.fCRTRICH;
- fCRTTPC = hit.fCRTTPC;
-
- //fCopy = hit.fCopy;
- //fVolume = hit.fVolume;
-
+ return *this;
}
//_____________________________________________________________________________
-AliCRThit& AliCRThit::operator= (const AliCRThit & hit)
+Float_t AliCRThit::Energy() const
{
- //
- // aisngment operator.
- //
-
- //fId = hit.fId;
- //fX = hit.fX;
- //fY = hit.fY;
- //fZ = hit.fZ;
- //fPx = hit.fPx;
- //fPy = hit.fPy;
- //fPz = hit.fPz;
- //fMedium = hit.fMedium;
- //fELoss = hit.fELoss;
- //fCRTh = hit.fCRTh;
- //fCRTMod = hit.fCRTMod;
- //fCRTMag = hit.fCRTMag;
- //fCRTRICH = hit.fCRTRICH;
- //fCRTTPC = hit.fCRTTPC;
-
- //fCopy = hit.fCopy;
- //fVolume = hit.fVolume;
-
- return *this;
+ //
+ //
+ //
+ return TMath::Sqrt(fPx*fPx + fPy*fPy + fPz*fPz);
}
//_____________________________________________________________________________
-AliCRThit::AliCRThit(Int_t shunt, Int_t track, Int_t *vol,
- Float_t *hits) :AliHit(shunt, track)
+Float_t AliCRThit::PolarAngle() const
{
-//
-// Constructor of hit object
-//
-
- fId = hits[0];
- fX = hits[1];
- fY = hits[2];
- fZ = hits[3];
- fPx = hits[4];
- fPy = hits[5];
- fPz = hits[6];
- fMedium = hits[7];
- fELoss = hits[8];
- fCRTh = hits[9];
- fCRTMod = hits[10];
- fCRTMag = hits[11];
- fCRTRICH = hits[12];
- fCRTTPC = hits[13];
-
- //fTrack = (Int_t)hits[9];
+ //
+ //
+ //
+ return kRaddeg*TMath::ACos(-fPy/this->Energy());
+}
- for (Int_t i = 0; i < 5 ; i++ ) {
- fVolume[i] = vol[i];
- }
+//_____________________________________________________________________________
+Float_t AliCRThit::AzimuthAngle() const
+{
+ //
+ //
+ //
+ return kRaddeg*TMath::ATan2(-fPx, -fPz);
+}
+//_____________________________________________________________________________
+Bool_t AliCRThit::operator==(const AliCRThit& hit)
+{
+ //
+ //
+ //
+ Float_t energy = TMath::Sqrt(fPx*fPx + fPy*fPy + fPz*fPz);
+ Float_t energy2=TMath::Sqrt(hit.fPx*hit.fPx+hit.fPy*hit.fPy+hit.fPz*hit.fPz);
+ return (energy == energy2);
+ //return (fTrack == hit.fTrack);
}
+//_____________________________________________________________________________
+Bool_t AliCRThit::operator<(const AliCRThit& hit)
+{
+ //
+ //
+ //
+ Float_t energy = TMath::Sqrt(fPx*fPx + fPy*fPy + fPz*fPz);
+ Float_t energy2=TMath::Sqrt(hit.fPx*hit.fPx+hit.fPy*hit.fPy+hit.fPz*hit.fPz);
+ return (energy < energy2);
+}
#include "AliHit.h"
-class AliCRThit : public AliHit {
-
+class AliCRThit : public AliHit {
public:
AliCRThit();
AliCRThit(Int_t shunt, Int_t track, Int_t* vol, Float_t *hits);
- AliCRThit(const AliCRThit & hit);
- AliCRThit& operator= (const AliCRThit& hit);
- virtual ~AliCRThit() {}
-
- // getters for AliCRThit object
- Float_t GetId() const {return fId;}
- Float_t GetX() const {return fX;}
- Float_t GetY() const {return fY;}
- Float_t GetZ() const {return fZ;}
- Float_t GetPx() const {return fPx;}
- Float_t GetPy() const {return fPy;}
- Float_t GetPz() const {return fPz;}
- Float_t GetMedium() const {return fMedium;}
- Float_t GetELoss() const {return fELoss;}
- Float_t GetCRT() const {return fCRTh;}
- Float_t GetCRTMod() const {return fCRTMod;}
- Float_t GetCRTMag() const {return fCRTMag;}
- Float_t GetCRTRICH() const {return fCRTRICH;}
- Float_t GetCRTTPC() const {return fCRTTPC;}
-
- const Int_t* GetVolume() const {return fVolume;}
+ AliCRThit(const AliCRThit& hit);
+ virtual ~AliCRThit();
+
+ AliCRThit& operator=(const AliCRThit& hit);
+ Bool_t operator==(const AliCRThit& hit);
+ Bool_t operator<(const AliCRThit& hit);
+
+ Float_t ParticleId() const {return fId;}
+ Float_t Px() const {return fPx;}
+ Float_t Py() const {return fPy;}
+ Float_t Pz() const {return fPz;}
+ Float_t Eloss() const {return fEloss;}
+ Float_t Medium() const {return fMedium;}
+ Float_t Energy() const;
+ Float_t PolarAngle() const;
+ Float_t AzimuthAngle() const;
protected:
- Int_t fVolume[5];
- Int_t fCopy;
- Float_t fId;
- Float_t fPx; //
- Float_t fPy; //
- Float_t fPz; //
- Float_t fMedium; //
- Float_t fELoss; //
- Float_t fCRTh;
- Float_t fCRTMod;
- Float_t fCRTMag;
- Float_t fCRTRICH;
- Float_t fCRTTPC;
+ Float_t fId; //
+ Float_t fPx; //
+ Float_t fPy; //
+ Float_t fPz; //
+ Float_t fEloss; //
+ Float_t fMedium; //
private:
ClassDef(AliCRThit,1) // Hit for CRT (ACORDE)
-
};
-
#endif /* ALICRTHIT_H */