/*
$Log$
+Revision 1.19 2000/06/07 16:25:37 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.18 2000/05/08 16:17:27 cblume
Merge TRD-develop
// Check that FRAME is there otherwise we have no place where to
// put TRD
- AliModule* FRAME=gAlice->GetModule("FRAME");
- if (!FRAME) {
+ AliModule* frame = gAlice->GetModule("FRAME");
+ if (!frame) {
Error("Ctor","TRD needs FRAME to be present\n");
exit(1);
}
// Define the TRD geometry according to the FRAME geometry
- if (FRAME->IsVersion() == 0) {
+ if (frame->IsVersion() == 0) {
// Geometry with hole
fGeometry = new AliTRDgeometryHole();
}
- else if (FRAME->IsVersion() == 1) {
+ else if (frame->IsVersion() == 1) {
// Geometry without hole
fGeometry = new AliTRDgeometryFull();
}
}
+//_____________________________________________________________________________
+AliTRD::AliTRD(AliTRD &trd)
+{
+ //
+ // Copy constructor
+ //
+
+ trd.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRD::~AliTRD()
{
// Add a reconstructed point for the TRD
//
- AliTRDrecPoint *RecPoint = new AliTRDrecPoint();
+ AliTRDrecPoint *recPoint = new AliTRDrecPoint();
TVector3 posVec(pos[0],pos[1],pos[2]);
- RecPoint->SetLocalPosition(posVec);
- RecPoint->SetDetector(det);
- RecPoint->SetEnergy(amp);
+ recPoint->SetLocalPosition(posVec);
+ recPoint->SetDetector(det);
+ recPoint->SetEnergy(amp);
for (Int_t iDigit = 0; iDigit < 3; iDigit++) {
- RecPoint->AddDigit(digits[iDigit]);
+ recPoint->AddDigit(digits[iDigit]);
}
- fRecPoints->Add(RecPoint);
+ fRecPoints->Add(recPoint);
}
}
//_____________________________________________________________________________
-void AliTRD::AddHit(Int_t track, Int_t* det, Float_t *hits)
+void AliTRD::AddHit(Int_t track, Int_t *det, Float_t *hits)
{
//
// Add a hit for the TRD
// Create the ROOT TNode geometry for the TRD
//
- TNode *Node, *Top;
+ TNode *node, *top;
TPGON *pgon;
const Int_t kColorTRD = 46;
// Find the top node alice
- Top = gAlice->GetGeometry()->GetNode("alice");
+ top = gAlice->GetGeometry()->GetNode("alice");
pgon = new TPGON("S_TRD","TRD","void",0,360,kNsect,4);
Float_t ff = TMath::Cos(kDegrad * 180 / kNsect);
pgon->DefineSection(1,-kZmax2,rrmin,rrmax);
pgon->DefineSection(2, kZmax2,rrmin,rrmax);
pgon->DefineSection(3, kZmax1,rrmax,rrmax);
- Top->cd();
- Node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
- Node->SetLineColor(kColorTRD);
- fNodes->Add(Node);
+ top->cd();
+ node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
+ node->SetLineColor(kColorTRD);
+ fNodes->Add(node);
}
+//_____________________________________________________________________________
+void AliTRD::Copy(AliTRD &trd)
+{
+ //
+ // Copy function
+ //
+
+ trd.fGasMix = fGasMix;
+ trd.fGeometry = fGeometry;
+ trd.fRecPoints = fRecPoints;
+ trd.fNRecPoints = fNRecPoints;
+
+ //AliDetector::Copy(trd);
+
+}
+
//_____________________________________________________________________________
void AliTRD::CreateGeometry()
{
//
// Check that FRAME is there otherwise we have no place where to put the TRD
- AliModule* FRAME = gAlice->GetModule("FRAME");
- if (!FRAME) {
+ AliModule* frame = gAlice->GetModule("FRAME");
+ if (!frame) {
printf(" The TRD needs the FRAME to be defined first\n");
return;
}
// Origin Y.Foka
//
- Int_t ISXFLD = gAlice->Field()->Integ();
- Float_t SXMGMX = gAlice->Field()->Max();
+ Int_t isxfld = gAlice->Field()->Integ();
+ Float_t sxmgmx = gAlice->Field()->Max();
// For polyethilene (CH2)
Float_t ape[2] = { 12., 1. };
//////////////////////////////////////////////////////////////////////////
// Al Frame
- AliMedium(1, "Al Frame$", 1, 0, ISXFLD, SXMGMX
+ AliMedium(1, "Al Frame$", 1, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Air
- AliMedium(2, "Air$", 2, 0, ISXFLD, SXMGMX
+ AliMedium(2, "Air$", 2, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Polyethilene
- AliMedium(3, "Radiator$", 3, 0, ISXFLD, SXMGMX
+ AliMedium(3, "Radiator$", 3, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Xe
- AliMedium(4, "Xe$", 4, 1, ISXFLD, SXMGMX
+ AliMedium(4, "Xe$", 4, 1, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Cu pads
- AliMedium(5, "Padplane$", 5, 1, ISXFLD, SXMGMX
+ AliMedium(5, "Padplane$", 5, 1, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Fee + cables
- AliMedium(6, "Readout$", 1, 0, ISXFLD, SXMGMX
+ AliMedium(6, "Readout$", 1, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// C frame
- AliMedium(7, "C Frame$", 6, 0, ISXFLD, SXMGMX
+ AliMedium(7, "C Frame$", 6, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Mylar foils
- AliMedium(8, "Mylar$", 7, 0, ISXFLD, SXMGMX
+ AliMedium(8, "Mylar$", 7, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
if (fGasMix == 1) {
// Gas-mixture (Xe/CO2)
- AliMedium(9, "Gas-mix$", 10, 1, ISXFLD, SXMGMX
+ AliMedium(9, "Gas-mix$", 10, 1, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
}
else {
// Gas-mixture (Xe/Isobutane)
- AliMedium(9, "Gas-mix$", 11, 1, ISXFLD, SXMGMX
+ AliMedium(9, "Gas-mix$", 11, 1, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
}
// Nomex-honeycomb (use carbon for the time being)
- AliMedium(10, "Nomex$", 6, 0, ISXFLD, SXMGMX
+ AliMedium(10, "Nomex$", 6, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Kapton foils (use Mylar for the time being)
- AliMedium(11, "Kapton$", 7, 0, ISXFLD, SXMGMX
+ AliMedium(11, "Kapton$", 7, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Gas-filling of the radiator
- AliMedium(12, "CO2$", 8, 0, ISXFLD, SXMGMX
+ AliMedium(12, "CO2$", 8, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// G10-plates
- AliMedium(13, "G10-plates$",12, 0, ISXFLD, SXMGMX
+ AliMedium(13, "G10-plates$",12, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
// Cooling water
- AliMedium(14, "Water$", 13, 0, ISXFLD, SXMGMX
+ AliMedium(14, "Water$", 13, 0, isxfld, sxmgmx
, tmaxfd, stemax, deemax, epsil, stmin);
}
AliDetector::MakeBranch(option);
- Char_t *R = strstr(option,"R");
+ Char_t *r = strstr(option,"R");
sprintf(branchname,"%srecPoints",GetName());
- if (fRecPoints && gAlice->TreeR() && R) {
+ if (fRecPoints && gAlice->TreeR() && r) {
gAlice->TreeR()->Branch(branchname,fRecPoints->IsA()->GetName()
,&fRecPoints,buffersize,0);
printf("* AliTRD::MakeBranch * Making Branch %s for points in TreeR\n",branchname);
-#ifndef TRD_H
-#define TRD_H
+#ifndef ALITRD_H
+#define ALITRD_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRD();
AliTRD(const char *name, const char *title);
+ AliTRD(AliTRD &trd);
virtual ~AliTRD();
- virtual void AddHit(Int_t, Int_t*, Float_t*);
- virtual void AddDigit(Int_t*, Int_t*);
- virtual void AddRecPoint(Float_t*, Int_t*, Int_t, Float_t);
+ virtual void AddHit(Int_t track, Int_t *det, Float_t *hits);
+ virtual void AddDigit(Int_t *digits, Int_t *amp);
+ virtual void AddRecPoint(Float_t *pos, Int_t *digits
+ , Int_t det, Float_t amp);
virtual void BuildGeometry();
+ virtual void Copy(AliTRD &trd);
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void DrawModule();
virtual Int_t GetSensSector() = 0;
virtual Int_t GetSensSectorRange() = 0;
+ inline AliTRD &operator=(AliTRD &trd);
+
protected:
Int_t fGasMix; // Gas mixture. 0: Xe/Isobutane 1: Xe/CO2
};
+//_____________________________________________________________________________
+AliTRD &AliTRD::operator=(AliTRD &trd)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &trd) trd.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.2.1 2000/05/08 14:35:38 cblume
Add float array
}
+//_____________________________________________________________________________
+void AliTRDarrayF::Copy(AliTRDarrayF &a)
+{
+ //
+ // Copy function
+ //
+
+ TObject::Copy(a);
+ TArrayF::Copy(a);
+
+}
+
//_____________________________________________________________________________
void AliTRDarrayF::Expand(Int_t n)
{
-#ifndef AliTRDArrayF_H
-#define AliTRDArrayF_H
+#ifndef ALITRDARRAYF_H
+#define ALITRDARRAYF_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
~AliTRDarrayF();
+ void Copy(AliTRDarrayF &a);
void Expand(Int_t n);
ClassDef(AliTRDarrayF,1)
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.4.1 2000/05/08 14:35:54 cblume
Update
}
+//_____________________________________________________________________________
+void AliTRDarrayI::Copy(AliTRDarrayI &a)
+{
+ //
+ // Copy function
+ //
+
+ TObject::Copy(a);
+ TArrayI::Copy(a);
+
+}
+
+
//_____________________________________________________________________________
void AliTRDarrayI::Expand(Int_t n)
{
-#ifndef AliTRDArrayI_H
-#define AliTRDArrayI_H
+#ifndef ALITRDARRAYI_H
+#define ALITRDARRAYI_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
~AliTRDarrayI();
+ void Copy(AliTRDarrayI &a);
void Expand(Int_t n);
ClassDef(AliTRDarrayI,1)
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.4.1 2000/05/08 15:08:03 cblume
Remove the class AliTRDcluster
}
+//_____________________________________________________________________________
+AliTRDclusterizer::AliTRDclusterizer(AliTRDclusterizer &c)
+{
+ //
+ // AliTRDclusterizer copy constructor
+ //
+
+ c.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDclusterizer::~AliTRDclusterizer()
{
+ //
+ // AliTRDclusterizer destructor
+ //
if (fInputFile) {
fInputFile->Close();
}
+//_____________________________________________________________________________
+void AliTRDclusterizer::Copy(AliTRDclusterizer &c)
+{
+ //
+ // Copy function
+ //
+
+ c.fInputFile = NULL;
+ c.fEvent = 0;
+
+}
+
//_____________________________________________________________________________
void AliTRDclusterizer::Init()
{
-#ifndef TRDclusterizer_h
-#define TRDclusterizer_h
+#ifndef ALITRDCLUSTERIZER_H
+#define ALITRDCLUSTERIZER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDclusterizer();
AliTRDclusterizer(const Text_t* name, const Text_t* title);
- ~AliTRDclusterizer();
-
+ AliTRDclusterizer(AliTRDclusterizer &c);
+ virtual ~AliTRDclusterizer();
+
+ inline AliTRDclusterizer &operator=(AliTRDclusterizer &c);
+ virtual void Copy(AliTRDclusterizer &c);
virtual void Init();
virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
virtual Bool_t MakeCluster() = 0;
};
+//_____________________________________________________________________________
+AliTRDclusterizer &AliTRDclusterizer::operator=(AliTRDclusterizer &c)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &c) c.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.3 2000/06/07 16:27:01 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
//_____________________________________________________________________________
AliTRDclusterizerV0::~AliTRDclusterizerV0()
{
+ //
+ // AliTRDclusterizerV0 destructor
+ //
}
//
// Get the pointer to the detector class and check for version 1
- AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD");
- if (TRD->IsVersion() != 0) {
+ AliTRD *trd = (AliTRD*) gAlice->GetDetector("TRD");
+ if (trd->IsVersion() != 0) {
printf("AliTRDclusterizerV0::MakeCluster -- ");
printf("TRD must be version 0 (fast simulator).\n");
return kFALSE;
}
// Get the geometry
- AliTRDgeometry *Geo = TRD->GetGeometry();
+ AliTRDgeometry *geo = trd->GetGeometry();
printf("AliTRDclusterizerV0::MakeCluster -- ");
printf("Start creating cluster.\n");
Int_t nBytes = 0;
- AliTRDhit *Hit;
+ AliTRDhit *hit;
// Get the pointer to the hit tree
- TTree *HitTree = gAlice->TreeH();
+ TTree *hitTree = gAlice->TreeH();
// Get the pointer to the reconstruction tree
- TTree *ClusterTree = gAlice->TreeR();
+ TTree *clusterTree = gAlice->TreeR();
- TObjArray *Chamber = new TObjArray();
+ TObjArray *chamberArray = new TObjArray();
// Get the number of entries in the hit tree
// (Number of primary particles creating a hit somewhere)
- Int_t nTrack = (Int_t) HitTree->GetEntries();
+ Int_t nTrack = (Int_t) hitTree->GetEntries();
// Loop through all the chambers
for (Int_t icham = 0; icham < kNcham; icham++) {
for (Int_t iplan = 0; iplan < kNplan; iplan++) {
for (Int_t isect = 0; isect < kNsect; isect++) {
- Int_t nColMax = Geo->GetColMax(iplan);
- Float_t row0 = Geo->GetRow0(iplan,icham,isect);
- Float_t col0 = Geo->GetCol0(iplan);
- Float_t time0 = Geo->GetTime0(iplan);
+ Int_t nColMax = geo->GetColMax(iplan);
+ Float_t row0 = geo->GetRow0(iplan,icham,isect);
+ Float_t col0 = geo->GetCol0(iplan);
+ Float_t time0 = geo->GetTime0(iplan);
- Float_t rowPadSize = Geo->GetRowPadSize();
- Float_t colPadSize = Geo->GetColPadSize();
- Float_t timeBinSize = Geo->GetTimeBinSize();
+ Float_t rowPadSize = geo->GetRowPadSize();
+ Float_t colPadSize = geo->GetColPadSize();
+ Float_t timeBinSize = geo->GetTimeBinSize();
// Loop through all entries in the tree
for (Int_t iTrack = 0; iTrack < nTrack; iTrack++) {
gAlice->ResetHits();
- nBytes += HitTree->GetEvent(iTrack);
+ nBytes += hitTree->GetEvent(iTrack);
// Get the number of hits in the TRD created by this particle
- Int_t nHit = TRD->Hits()->GetEntriesFast();
+ Int_t nHit = trd->Hits()->GetEntriesFast();
// Loop through the TRD hits
for (Int_t iHit = 0; iHit < nHit; iHit++) {
- if (!(Hit = (AliTRDhit *) TRD->Hits()->UncheckedAt(iHit)))
+ if (!(hit = (AliTRDhit *) trd->Hits()->UncheckedAt(iHit)))
continue;
Float_t pos[3];
- pos[0] = Hit->fX;
- pos[1] = Hit->fY;
- pos[2] = Hit->fZ;
- Int_t track = Hit->fTrack;
- Int_t detector = Hit->fDetector;
- Int_t plane = Geo->GetPlane(detector);
- Int_t sector = Geo->GetSector(detector);
- Int_t chamber = Geo->GetChamber(detector);
+ pos[0] = hit->fX;
+ pos[1] = hit->fY;
+ pos[2] = hit->fZ;
+ Int_t track = hit->fTrack;
+ Int_t detector = hit->GetDetector();
+ Int_t plane = geo->GetPlane(detector);
+ Int_t sector = geo->GetSector(detector);
+ Int_t chamber = geo->GetChamber(detector);
if ((sector != isect) ||
(plane != iplan) ||
// Rotate the sectors on top of each other
Float_t rot[3];
- Geo->Rotate(detector,pos,rot);
+ geo->Rotate(detector,pos,rot);
// Add this recPoint to the temporary array for this chamber
- AliTRDrecPoint *RecPoint = new AliTRDrecPoint();
- RecPoint->SetLocalRow(rot[2]);
- RecPoint->SetLocalCol(rot[1]);
- RecPoint->SetLocalTime(rot[0]);
- RecPoint->SetEnergy(0);
- RecPoint->SetDetector(detector);
- RecPoint->AddDigit(track);
- Chamber->Add(RecPoint);
+ AliTRDrecPoint *recPoint = new AliTRDrecPoint();
+ recPoint->SetLocalRow(rot[2]);
+ recPoint->SetLocalCol(rot[1]);
+ recPoint->SetLocalTime(rot[0]);
+ recPoint->SetEnergy(0);
+ recPoint->SetDetector(detector);
+ recPoint->AddDigit(track);
+ chamberArray->Add(recPoint);
}
}
// Loop through the temporary cluster-array
- for (Int_t iClus1 = 0; iClus1 < Chamber->GetEntries(); iClus1++) {
+ for (Int_t iClus1 = 0; iClus1 < chamberArray->GetEntries(); iClus1++) {
- AliTRDrecPoint *RecPoint1 = (AliTRDrecPoint *) Chamber->UncheckedAt(iClus1);
- Float_t row1 = RecPoint1->GetLocalRow();
- Float_t col1 = RecPoint1->GetLocalCol();
- Float_t time1 = RecPoint1->GetLocalTime();
+ AliTRDrecPoint *recPoint1 = (AliTRDrecPoint *)
+ chamberArray->UncheckedAt(iClus1);
+ Float_t row1 = recPoint1->GetLocalRow();
+ Float_t col1 = recPoint1->GetLocalCol();
+ Float_t time1 = recPoint1->GetLocalTime();
- if (RecPoint1->GetEnergy() < 0) continue; // Skip marked cluster
+ if (recPoint1->GetEnergy() < 0) continue; // Skip marked cluster
- const Int_t nSave = 5;
- Int_t idxSave[nSave];
+ const Int_t kNsave = 5;
+ Int_t idxSave[kNsave];
Int_t iSave = 0;
- const Int_t nSaveTrack = 3;
- Int_t tracks[nSaveTrack];
- tracks[0] = RecPoint1->GetDigit(0);
+ const Int_t kNsaveTrack = 3;
+ Int_t tracks[kNsaveTrack];
+ tracks[0] = recPoint1->GetDigit(0);
// Check the other cluster to see, whether there are close ones
- for (Int_t iClus2 = iClus1 + 1; iClus2 < Chamber->GetEntries(); iClus2++) {
+ for (Int_t iClus2 = iClus1 + 1; iClus2 < chamberArray->GetEntries(); iClus2++) {
- AliTRDrecPoint *RecPoint2 = (AliTRDrecPoint *) Chamber->UncheckedAt(iClus2);
- Float_t row2 = RecPoint2->GetLocalRow();
- Float_t col2 = RecPoint2->GetLocalCol();
+ AliTRDrecPoint *recPoint2 = (AliTRDrecPoint *)
+ chamberArray->UncheckedAt(iClus2);
+ Float_t row2 = recPoint2->GetLocalRow();
+ Float_t col2 = recPoint2->GetLocalCol();
if ((TMath::Abs(row1 - row2) < rowPadSize) ||
(TMath::Abs(col1 - col2) < fRphiDist)) {
- if (iSave == nSave) {
+ if (iSave == kNsave) {
printf("AliTRDclusterizerV0::MakeCluster -- ");
- printf("Boundary error: iSave = %d, nSave = %d.\n"
- ,iSave,nSave);
+ printf("Boundary error: iSave = %d, kNsave = %d.\n"
+ ,iSave,kNsave);
}
else {
idxSave[iSave] = iClus2;
iSave++;
- if (iSave < nSaveTrack) tracks[iSave] = RecPoint2->GetDigit(0);
+ if (iSave < kNsaveTrack) tracks[iSave] = recPoint2->GetDigit(0);
}
}
}
Float_t colMerge = col1;
if (iSave) {
for (Int_t iMerge = 0; iMerge < iSave; iMerge++) {
- AliTRDrecPoint *RecPoint2 =
- (AliTRDrecPoint *) Chamber->UncheckedAt(idxSave[iMerge]);
- rowMerge += RecPoint2->GetLocalRow();
- colMerge += RecPoint2->GetLocalCol();
- RecPoint2->SetEnergy(-1); // Mark merged cluster
+ AliTRDrecPoint *recPoint2 =
+ (AliTRDrecPoint *) chamberArray->UncheckedAt(idxSave[iMerge]);
+ rowMerge += recPoint2->GetLocalRow();
+ colMerge += recPoint2->GetLocalCol();
+ recPoint2->SetEnergy(-1); // Mark merged cluster
}
rowMerge /= (iSave + 1);
colMerge /= (iSave + 1);
smear[2] = (Int_t) ((smear[2] - time0) / timeBinSize);
// Add the smeared cluster to the output array
- Int_t detector = RecPoint1->GetDetector();
+ Int_t detector = recPoint1->GetDetector();
Int_t digits[3] = {0};
- TRD->AddRecPoint(smear,digits,detector,0.0);
+ trd->AddRecPoint(smear,digits,detector,0.0);
}
// Clear the temporary cluster-array and delete the cluster
- Chamber->Delete();
+ chamberArray->Delete();
}
}
}
printf("AliTRDclusterizerV0::MakeCluster -- ");
- printf("Found %d points.\n",TRD->RecPoints()->GetEntries());
+ printf("Found %d points.\n",trd->RecPoints()->GetEntries());
printf("AliTRDclusterizerV0::MakeCluster -- ");
printf("Fill the cluster tree.\n");
- ClusterTree->Fill();
+ clusterTree->Fill();
return kTRUE;
-#ifndef TRDclusterizerV0_h
-#define TRDclusterizerV0_h
+#ifndef ALITRDCLUSTERIZERV0_h
+#define ALITRDCLUSTERIZERV0_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDclusterizerV0();
AliTRDclusterizerV0(const Text_t* name, const Text_t* title);
- ~AliTRDclusterizerV0();
+ virtual ~AliTRDclusterizerV0();
virtual void Init();
virtual Bool_t MakeCluster();
/*
$Log$
+Revision 1.4 2000/06/07 16:27:01 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.3 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
+//_____________________________________________________________________________
+AliTRDclusterizerV1::AliTRDclusterizerV1(AliTRDclusterizerV1 &c)
+{
+ //
+ // AliTRDclusterizerV1 copy constructor
+ //
+
+ c.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDclusterizerV1::~AliTRDclusterizerV1()
{
+ //
+ // AliTRDclusterizerV1 destructor
+ //
if (fDigitsManager) {
delete fDigitsManager;
}
+//_____________________________________________________________________________
+void AliTRDclusterizerV1::Copy(AliTRDclusterizerV1 &c)
+{
+ //
+ // Copy function
+ //
+
+ c.fClusMaxThresh = fClusMaxThresh;
+ c.fClusSigThresh = fClusSigThresh;
+ c.fClusMethod = fClusMethod;
+ c.fDigitsManager = NULL;
+
+ AliTRDclusterizer::Copy(c);
+
+}
+
//_____________________________________________________________________________
void AliTRDclusterizerV1::Init()
{
Int_t row, col, time;
// Get the pointer to the detector class and check for version 1
- AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD");
- if (TRD->IsVersion() != 1) {
+ AliTRD *trd = (AliTRD*) gAlice->GetDetector("TRD");
+ if (trd->IsVersion() != 1) {
printf("AliTRDclusterizerV1::MakeCluster -- ");
printf("TRD must be version 1 (slow simulator).\n");
return kFALSE;
}
// Get the geometry
- AliTRDgeometry *Geo = TRD->GetGeometry();
+ AliTRDgeometry *geo = trd->GetGeometry();
printf("AliTRDclusterizerV1::MakeCluster -- ");
printf("Start creating clusters.\n");
- AliTRDdataArrayI *Digits;
+ AliTRDdataArrayI *digits;
// Parameters
Float_t maxThresh = fClusMaxThresh; // threshold value for maximum
Int_t clusteringMethod = fClusMethod; // clustering method option (for testing)
// Iteration limit for unfolding procedure
- const Float_t epsilon = 0.01;
+ const Float_t kEpsilon = 0.01;
- const Int_t nClus = 3;
- const Int_t nSig = 5;
+ const Int_t kNclus = 3;
+ const Int_t kNsig = 5;
Int_t chamBeg = 0;
Int_t chamEnd = kNcham;
- if (TRD->GetSensChamber() >= 0) {
- chamBeg = TRD->GetSensChamber();
+ if (trd->GetSensChamber() >= 0) {
+ chamBeg = trd->GetSensChamber();
chamEnd = chamBeg + 1;
}
Int_t planBeg = 0;
Int_t planEnd = kNplan;
- if (TRD->GetSensPlane() >= 0) {
- planBeg = TRD->GetSensPlane();
+ if (trd->GetSensPlane() >= 0) {
+ planBeg = trd->GetSensPlane();
planEnd = planBeg + 1;
}
Int_t sectBeg = 0;
for (Int_t iplan = planBeg; iplan < planEnd; iplan++) {
for (Int_t isect = sectBeg; isect < sectEnd; isect++) {
- if (TRD->GetSensSector() >= 0) {
- Int_t sens1 = TRD->GetSensSector();
- Int_t sens2 = sens1 + TRD->GetSensSectorRange();
+ if (trd->GetSensSector() >= 0) {
+ Int_t sens1 = trd->GetSensSector();
+ Int_t sens2 = sens1 + trd->GetSensSectorRange();
sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
if (sens1 < sens2)
if ((isect < sens1) || (isect >= sens2)) continue;
if ((isect < sens1) && (isect >= sens2)) continue;
}
- Int_t idet = Geo->GetDetector(iplan,icham,isect);
+ Int_t idet = geo->GetDetector(iplan,icham,isect);
Int_t nClusters = 0;
printf("AliTRDclusterizerV1::MakeCluster -- ");
printf("Analyzing chamber %d, plane %d, sector %d.\n"
,icham,iplan,isect);
- Int_t nRowMax = Geo->GetRowMax(iplan,icham,isect);
- Int_t nColMax = Geo->GetColMax(iplan);
- Int_t nTimeMax = Geo->GetTimeMax();
+ Int_t nRowMax = geo->GetRowMax(iplan,icham,isect);
+ Int_t nColMax = geo->GetColMax(iplan);
+ Int_t nTimeMax = geo->GetTimeMax();
// Create a detector matrix to keep maxima
AliTRDmatrix *digitMatrix = new AliTRDmatrix(nRowMax,nColMax,nTimeMax
,isect,icham,iplan);
// Read in the digits
- Digits = fDigitsManager->GetDigits(idet);
+ digits = fDigitsManager->GetDigits(idet);
// Loop through the detector pixel
for (time = 0; time < nTimeMax; time++) {
for ( col = 0; col < nColMax; col++) {
for ( row = 0; row < nRowMax; row++) {
- Int_t signal = Digits->GetData(row,col,time);
- Int_t index = Digits->GetIndex(row,col,time);
+ Int_t signal = digits->GetData(row,col,time);
+ Int_t index = digits->GetIndex(row,col,time);
// Fill the detector matrix
if (signal > signalThresh) {
&& (digitMatrix->GetSignal(row,col,time) > maxThresh)) {
// Ratio resulting from unfolding
- Float_t ratio = 0;
+ Float_t ratio = 0;
// Signals on max and neighbouring pads
- Float_t padSignal[nSig] = {0};
+ Float_t padSignal[kNsig] = {0};
// Signals from cluster
- Float_t clusterSignal[nClus] = {0};
+ Float_t clusterSignal[kNclus] = {0};
// Cluster pad info
- Float_t clusterPads[nClus] = {0};
+ Float_t clusterPads[kNclus] = {0};
// Cluster digit info
- Int_t clusterDigit[nClus] = {0};
+ Int_t clusterDigit[kNclus] = {0};
Int_t iPad;
- for (iPad = 0; iPad < nClus; iPad++) {
+ for (iPad = 0; iPad < kNclus; iPad++) {
clusterSignal[iPad] = digitMatrix->GetSignal(row,col-1+iPad,time);
clusterDigit[iPad] = digitMatrix->GetTrack(row,col-1+iPad,time,0);
}
}
// unfold:
- ratio = Unfold(epsilon, padSignal);
+ ratio = Unfold(kEpsilon, padSignal);
// set signal on overlapping pad to ratio
clusterSignal[2] *= ratio;
+ clusterSignal[2];
// Add the cluster to the output array
- TRD->AddRecPoint(clusterPads,clusterDigit,idet,clusterCharge);
+ trd->AddRecPoint(clusterPads,clusterDigit,idet,clusterCharge);
}
} // time
printf("AliTRDclusterizerV1::MakeCluster -- ");
printf("Total number of points found: %d\n"
- ,TRD->RecPoints()->GetEntries());
+ ,trd->RecPoints()->GetEntries());
// Get the pointer to the cluster branch
- TTree *ClusterTree = gAlice->TreeR();
+ TTree *clusterTree = gAlice->TreeR();
// Fill the cluster-branch
printf("AliTRDclusterizerV1::MakeCluster -- ");
printf("Fill the cluster tree.\n");
- ClusterTree->Fill();
+ clusterTree->Fill();
printf("AliTRDclusterizerV1::MakeCluster -- ");
printf("Done.\n");
//
// The parameters for the response function
- const Float_t aa = 0.8872;
- const Float_t bb = -0.00573;
- const Float_t cc = 0.454;
- const Float_t cc2 = cc*cc;
+ const Float_t kA = 0.8872;
+ const Float_t kB = -0.00573;
+ const Float_t kC = 0.454;
+ const Float_t kC2 = kC*kC;
- Float_t pr = aa * (bb + TMath::Exp(-x*x / (2. * cc2)));
+ Float_t pr = kA * (kB + TMath::Exp(-x*x / (2. * kC2)));
return (pr);
-#ifndef TRDclusterizerV1_h
-#define TRDclusterizerV1_h
+#ifndef ALITRDCLUSTERIZERV1_h
+#define ALITRDCLUSTERIZERV1_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDclusterizerV1();
AliTRDclusterizerV1(const Text_t* name, const Text_t* title);
- ~AliTRDclusterizerV1();
+ AliTRDclusterizerV1(AliTRDclusterizerV1 &c);
+ virtual ~AliTRDclusterizerV1();
+ virtual void Copy(AliTRDclusterizerV1 &c);
virtual void Init();
virtual Bool_t MakeCluster();
virtual Bool_t ReadDigits();
virtual Float_t GetClusSigThresh() { return fClusSigThresh; };
virtual Int_t GetClusMethod() { return fClusMethod; };
+ inline AliTRDclusterizerV1 &operator=(AliTRDclusterizerV1 &c);
+
protected:
AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
};
+//_____________________________________________________________________________
+AliTRDclusterizerV1 &AliTRDclusterizerV1::operator=(AliTRDclusterizerV1 &c)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &c) c.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.4 2000/06/07 16:27:01 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.3 2000/05/18 07:56:44 cblume
Added #include <stdlib.h>
}
+//_____________________________________________________________________________
+AliTRDdataArray::AliTRDdataArray(AliTRDdataArray &d)
+{
+ //
+ // AliTRDdataArray copy constructor
+ //
+
+ d.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDdataArray::~AliTRDdataArray()
{
//
- // Destructor
+ // AliTRDdataArray destructor
//
if (fIndex) fIndex->Delete();
}
+//_____________________________________________________________________________
+void AliTRDdataArray::Copy(AliTRDdataArray &d)
+{
+ //
+ // Copy function
+ //
+
+ d.fNrow = fNrow;
+ d.fNcol = fNcol;
+ d.fNtime = fNtime;
+
+ d.fNdim1 = fNdim1;
+ d.fNdim2 = fNdim2;
+
+ d.fBufType = fBufType;
+ d.fNelems = fNelems;
+
+ d.fCurrentIdx1 = 0;
+ d.fCurrentIdx2 = 0;
+ d.fCurrentIndex = 0;
+
+ fIndex->Copy(*d.fIndex);
+
+}
+
//_____________________________________________________________________________
void AliTRDdataArray::Allocate(Int_t nrow, Int_t ncol,Int_t ntime)
{
-#ifndef TRDdataArray_H
-#define TRDdataArray_H
+#ifndef ALITRDDATAARRAY_H
+#define ALITRDDATAARRAY_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDdataArray();
AliTRDdataArray(Int_t nrow, Int_t ncol,Int_t ntime);
- ~AliTRDdataArray();
+ AliTRDdataArray(AliTRDdataArray &d);
+ virtual ~AliTRDdataArray();
+ virtual void Copy(AliTRDdataArray &d);
virtual void Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
virtual void Reset();
virtual Int_t GetNtime() { return fNtime; };
Int_t GetIndex(Int_t row, Int_t col, Int_t time);
+ inline AliTRDdataArray &operator=(AliTRDdataArray &d);
protected:
};
//_____________________________________________________________________________
-inline Bool_t AliTRDdataArray::CheckBounds(const char *where
- , Int_t idx1, Int_t idx2)
+Bool_t AliTRDdataArray::CheckBounds(const char *where, Int_t idx1, Int_t idx2)
{
//
// Does the boundary checking
}
//_____________________________________________________________________________
-inline Bool_t AliTRDdataArray::OutOfBoundsError(const char *where
- , Int_t idx1, Int_t idx2)
+Bool_t AliTRDdataArray::OutOfBoundsError(const char *where, Int_t idx1, Int_t idx2)
{
//
// Generate an out-of-bounds error. Always returns false.
}
+//_____________________________________________________________________________
+AliTRDdataArray &AliTRDdataArray::operator=(AliTRDdataArray &d)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &d) d.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.2.1 2000/05/08 15:14:34 cblume
Add new data array classes
}
+//_____________________________________________________________________________
+AliTRDdataArrayF::AliTRDdataArrayF(AliTRDdataArrayF &a)
+{
+ //
+ // AliTRDdataArrayF copy constructor
+ //
+
+ a.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDdataArrayF::~AliTRDdataArrayF()
{
}
+//_____________________________________________________________________________
+void AliTRDdataArrayF::Copy(AliTRDdataArrayF &a)
+{
+ //
+ // Copy function
+ //
+
+ fElements->Copy(*a.fElements);
+
+ a.fThreshold = fThreshold;
+
+ AliTRDdataArray::Copy(a);
+
+}
+
//_____________________________________________________________________________
void AliTRDdataArrayF::Reset()
{
Int_t idx1 = 0;
Int_t idx2 = 0;
- Int_t N = fElements->fN;
+ Int_t n = fElements->fN;
- for (i = 0; i < N; i++){
+ for (i = 0; i < n; i++){
// Negative sign counts the unwritten values (under threshold)
if ((*fElements)[i] < 0) {
Int_t idx1 = 0;
Int_t idx2 = 0;
- Int_t N = fElements->fN;
- for (i = 0; i < N; i++){
+ Int_t n = fElements->fN;
+ for (i = 0; i < n; i++){
// Negative sign counts the unwritten values (under threshold)
if ((*fElements)[i] < 0) {
idx1 -= (Int_t) fElements->At(i);
//_____________________________________________________________________________
void AliTRDdataArrayF::Compress2()
{
+ //
+ // Compress a buffer of type 2 - not implemented!
+ //
}
-#ifndef TRDdataArrayF_H
-#define TRDdataArrayF_H
+#ifndef ALITRDDATAARRAYF_H
+#define ALITRDDATAARRAYF_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDdataArrayF();
AliTRDdataArrayF(Int_t nrow, Int_t ncol,Int_t ntime);
- ~AliTRDdataArrayF();
+ AliTRDdataArrayF(AliTRDdataArrayF &a);
+ virtual ~AliTRDdataArrayF();
virtual void Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
+ virtual void Copy(AliTRDdataArrayF &a);
virtual void Compress(Int_t bufferType, Float_t threshold);
virtual void Compress(Int_t bufferType);
virtual void Expand();
virtual Int_t GetDataSize();
virtual Int_t GetOverThreshold(Float_t threshold);
+ inline AliTRDdataArrayF &operator=(AliTRDdataArrayF &a);
+
protected:
inline void SetDataFast(Int_t idx1, Int_t idx2, Float_t value);
};
-
-//_____________________________________________________________________________
-inline Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
+//____________________________________________________________________________
+Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
{
//
// Returns the value at a given position in the array
}
//_____________________________________________________________________________
-inline void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time
- , Float_t value)
+void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time, Float_t value)
{
//
// Sets the data value at a given position of the array
}
//_____________________________________________________________________________
-inline void AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value)
+void AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value)
{
//
// Set the value at a given position in the array
}
+//_____________________________________________________________________________
+AliTRDdataArrayF &AliTRDdataArrayF::operator=(AliTRDdataArrayF &a)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &a) a.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.2.1 2000/05/08 15:14:34 cblume
Add new data array classes
}
+//_____________________________________________________________________________
+AliTRDdataArrayI::AliTRDdataArrayI(AliTRDdataArrayI &a)
+{
+ //
+ // AliTRDdataArrayI copy constructor
+ //
+
+ a.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDdataArrayI::~AliTRDdataArrayI()
{
}
+//_____________________________________________________________________________
+void AliTRDdataArrayI::Copy(AliTRDdataArrayI &a)
+{
+ //
+ // Copy function
+ //
+
+ fElements->Copy(*a.fElements);
+
+ a.fThreshold = fThreshold;
+
+ AliTRDdataArray::Copy(a);
+
+}
+
//_____________________________________________________________________________
void AliTRDdataArrayI::Reset()
{
Int_t idx1 = 0;
Int_t idx2 = 0;
- Int_t N = fElements->fN;
+ Int_t n = fElements->fN;
- for (i = 0; i < N; i++){
+ for (i = 0; i < n; i++){
// Negative sign counts the unwritten values (under threshold)
if ((*fElements)[i] < 0) {
Int_t idx1 = 0;
Int_t idx2 = 0;
- Int_t N = fElements->fN;
- for (i = 0; i < N; i++){
+ Int_t n = fElements->fN;
+ for (i = 0; i < n; i++){
// Negative sign counts the unwritten values (under threshold)
if ((*fElements)[i] < 0) {
idx1 -= fElements->At(i);
//_____________________________________________________________________________
void AliTRDdataArrayI::Compress2()
{
+ //
+ // Compress a buffer of type 2 - not implemented!
+ //
}
-#ifndef TRDdataArrayI_H
-#define TRDdataArrayI_H
+#ifndef ALITRDDATAARRAYI_H
+#define ALITRDDATAARRAYI_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDdataArrayI();
AliTRDdataArrayI(Int_t nrow, Int_t ncol, Int_t ntime);
- ~AliTRDdataArrayI();
+ AliTRDdataArrayI(AliTRDdataArrayI &a);
+ virtual ~AliTRDdataArrayI();
virtual void Allocate(Int_t nrow, Int_t ncol, Int_t ntime);
+ virtual void Copy(AliTRDdataArrayI &a);
virtual void Compress(Int_t bufferType, Int_t threshold);
virtual void Compress(Int_t bufferType);
virtual void Expand();
virtual Int_t GetDataSize();
virtual Int_t GetOverThreshold(Int_t threshold);
+ inline AliTRDdataArrayI &operator=(AliTRDdataArrayI &a);
+
protected:
inline void SetDataFast(Int_t idx1, Int_t idx2, Int_t value);
//_____________________________________________________________________________
-inline Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
+Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
{
//
// Returns the value at a given position in the array
}
//_____________________________________________________________________________
-inline void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time
- , Int_t value)
+void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time, Int_t value)
{
//
// Sets the data value at a given position of the array
}
//_____________________________________________________________________________
-inline void AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
+void AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
{
//
// Set the value at a given position in the array
}
+//_____________________________________________________________________________
+AliTRDdataArrayI &AliTRDdataArrayI::operator=(AliTRDdataArrayI &a)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &a) a.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.3 2000/06/07 16:25:37 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
if (isRaw) SetBit(kRawDigit);
}
+
+//_____________________________________________________________________________
+AliTRDdigit::~AliTRDdigit()
+{
+ //
+ // AliTRDdigit destructor
+ //
+
+}
-#ifndef TRDdigit_h
-#define TRDdigit_h
+#ifndef ALITRDDIGIT_H
+#define ALITRDDIGIT_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDdigit();
AliTRDdigit(Bool_t isRaw, Int_t *digits, Int_t *amp);
- ~AliTRDdigit() {};
+ virtual ~AliTRDdigit();
Int_t GetAmp() const { if (TestBit(kRawDigit))
return DecodeAmp();
protected:
- Int_t fRow; // Pad row number
- Int_t fCol; // Pad col number
- Int_t fTime; // Time bucket
+ Int_t fRow; // Pad row number
+ Int_t fCol; // Pad col number
+ Int_t fTime; // Time bucket
- ClassDef(AliTRDdigit,1) // Digit for the TRD
+ ClassDef(AliTRDdigit,1) // Digit for the TRD
};
/*
$Log$
+Revision 1.6 2000/06/07 16:27:32 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.5 2000/05/09 16:38:57 cblume
Removed PadResponse(). Merge problem
}
+//_____________________________________________________________________________
+AliTRDdigitizer::AliTRDdigitizer(AliTRDdigitizer &d)
+{
+ //
+ // AliTRDdigitizer copy constructor
+ //
+
+ d.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDdigitizer::~AliTRDdigitizer()
{
+ //
+ // AliTRDdigitizer destructor
+ //
if (fInputFile) {
fInputFile->Close();
}
+//_____________________________________________________________________________
+void AliTRDdigitizer::Copy(AliTRDdigitizer &d)
+{
+ //
+ // Copy function
+ //
+
+ d.fInputFile = NULL;
+ d.fDigits = NULL;
+ d.fTRD = NULL;
+ d.fGeo = NULL;
+
+ d.fEvent = 0;
+
+ d.fGasGain = fGasGain;
+ d.fNoise = fNoise;
+ d.fChipGain = fChipGain;
+ d.fADCoutRange = fADCoutRange;
+ d.fADCinRange = fADCinRange;
+ d.fADCthreshold = fADCthreshold;
+ d.fDiffusionOn = fDiffusionOn;
+ d.fDiffusionT = fDiffusionT;
+ d.fDiffusionL = fDiffusionL;
+ d.fElAttachOn = fElAttachOn;
+ d.fElAttachProp = fElAttachProp;
+ d.fExBOn = fExBOn;
+ d.fLorentzAngle = fLorentzAngle;
+ d.fLorentzFactor = fLorentzFactor;
+
+ fPRF->Copy(*d.fPRF);
+
+}
+
//_____________________________________________________________________________
Int_t AliTRDdigitizer::Diffusion(Float_t driftlength, Float_t *xyz)
{
///////////////////////////////////////////////////////////////
// Converts number of electrons to fC
- const Float_t el2fC = 1.602E-19 * 1.0E15;
+ const Float_t kEl2fC = 1.602E-19 * 1.0E15;
///////////////////////////////////////////////////////////////
Int_t totalSizeDict1 = 0;
Int_t totalSizeDict2 = 0;
- AliTRDdataArrayI *Digits;
- AliTRDdataArrayI *Dictionary[kNDict];
+ AliTRDdataArrayI *digits;
+ AliTRDdataArrayI *dictionary[kNDict];
if (!fGeo) {
printf("AliTRDdigitizer::MakeDigits -- ");
fDigits = new AliTRDdigitsManager();
// Create detector arrays to keep the signal and track numbers
- AliTRDdataArrayF *Signal = new AliTRDdataArrayF();
- AliTRDdataArrayI *Tracks[kNDict];
+ AliTRDdataArrayF *signal = new AliTRDdataArrayF();
+ AliTRDdataArrayI *tracks[kNDict];
for (iDict = 0; iDict < kNDict; iDict++) {
- Tracks[iDict] = new AliTRDdataArrayI();
+ tracks[iDict] = new AliTRDdataArrayI();
}
// Get the pointer to the hit tree
- TTree *HitTree = gAlice->TreeH();
+ TTree *hitTree = gAlice->TreeH();
// Get the number of entries in the hit tree
// (Number of primary particles creating a hit somewhere)
- Int_t nTrack = (Int_t) HitTree->GetEntries();
+ Int_t nTrack = (Int_t) hitTree->GetEntries();
printf("AliTRDdigitizer::MakeDigits -- ");
printf("Start creating digits.\n");
Int_t sectBeg = 0;
Int_t sectEnd = kNsect;
- Int_t count_hits = 0;
+ Int_t countHits = 0;
// Loop through all the chambers
for (Int_t iCham = chamBeg; iCham < chamEnd; iCham++) {
Float_t timeBinSize = fGeo->GetTimeBinSize();
// Adjust the size of the detector arrays
- Signal->Allocate(nRowMax,nColMax,nTimeMax);
+ signal->Allocate(nRowMax,nColMax,nTimeMax);
for (iDict = 0; iDict < kNDict; iDict++) {
- Tracks[iDict]->Allocate(nRowMax,nColMax,nTimeMax);
+ tracks[iDict]->Allocate(nRowMax,nColMax,nTimeMax);
}
// Loop through all entries in the tree
for (Int_t iTrack = 0; iTrack < nTrack; iTrack++) {
gAlice->ResetHits();
- nBytes += HitTree->GetEvent(iTrack);
+ nBytes += hitTree->GetEvent(iTrack);
// Get the number of hits in the TRD created by this particle
Int_t nHit = fTRD->Hits()->GetEntriesFast();
// Loop through the TRD hits
for (Int_t iHit = 0; iHit < nHit; iHit++) {
- count_hits++;
+ countHits++;
- AliTRDhit *Hit = (AliTRDhit *) fTRD->Hits()->UncheckedAt(iHit);
+ AliTRDhit *hit = (AliTRDhit *) fTRD->Hits()->UncheckedAt(iHit);
Float_t pos[3];
- pos[0] = Hit->fX;
- pos[1] = Hit->fY;
- pos[2] = Hit->fZ;
- Float_t q = Hit->fQ;
- Int_t track = Hit->fTrack;
- Int_t detector = Hit->fDetector;
+ pos[0] = hit->fX;
+ pos[1] = hit->fY;
+ pos[2] = hit->fZ;
+ Float_t q = hit->GetCharge();
+ Int_t track = hit->fTrack;
+ Int_t detector = hit->GetDetector();
Int_t plane = fGeo->GetPlane(detector);
Int_t sector = fGeo->GetSector(detector);
Int_t chamber = fGeo->GetChamber(detector);
// Array to sum up the signal in a box surrounding the
// hit postition
- const Int_t timeBox = 7;
- const Int_t colBox = 9;
- const Int_t rowBox = 7;
- Float_t signalSum[rowBox][colBox][timeBox];
- for (iRow = 0; iRow < rowBox; iRow++ ) {
- for (iCol = 0; iCol < colBox; iCol++ ) {
- for (iTime = 0; iTime < timeBox; iTime++) {
+ const Int_t kTimeBox = 7;
+ const Int_t kColBox = 9;
+ const Int_t kRowBox = 7;
+ Float_t signalSum[kRowBox][kColBox][kTimeBox];
+ for (iRow = 0; iRow < kRowBox; iRow++ ) {
+ for (iCol = 0; iCol < kColBox; iCol++ ) {
+ for (iTime = 0; iTime < kTimeBox; iTime++) {
signalSum[iRow][iCol][iTime] = 0;
}
}
// Sum up the signal in the different pixels
// and apply the pad response
- Int_t rowIdx = rowD + (Int_t) ( rowBox / 2);
- Int_t colIdx = colD + (Int_t) ( colBox / 2);
- Int_t timeIdx = timeD + (Int_t) (timeBox / 2);
+ Int_t rowIdx = rowD + (Int_t) ( kRowBox / 2);
+ Int_t colIdx = colD + (Int_t) ( kColBox / 2);
+ Int_t timeIdx = timeD + (Int_t) (kTimeBox / 2);
- if (( rowIdx < 0) || ( rowIdx > rowBox)) {
+ if (( rowIdx < 0) || ( rowIdx > kRowBox)) {
printf("AliTRDdigitizer::MakeDigits -- ");
- printf("Boundary error. rowIdx = %d (%d)\n", rowIdx, rowBox);
+ printf("Boundary error. rowIdx = %d (%d)\n", rowIdx, kRowBox);
continue;
}
- if (( colIdx < 0) || ( colIdx > colBox)) {
+ if (( colIdx < 0) || ( colIdx > kColBox)) {
printf("AliTRDdigitizer::MakeDigits -- ");
- printf("Boundary error. colIdx = %d (%d)\n", colIdx, colBox);
+ printf("Boundary error. colIdx = %d (%d)\n", colIdx, kColBox);
continue;
}
- if ((timeIdx < 0) || (timeIdx > timeBox)) {
+ if ((timeIdx < 0) || (timeIdx > kTimeBox)) {
printf("AliTRDdigitizer::MakeDigits -- ");
- printf("Boundary error. timeIdx = %d (%d)\n",timeIdx,timeBox);
+ printf("Boundary error. timeIdx = %d (%d)\n",timeIdx,kTimeBox);
continue;
}
signalSum[rowIdx][colIdx-1][timeIdx] += fPRF->Eval(dist-1.0,0,0) * signal;
}
// Add the padcluster to the detector matrix
- for (iRow = 0; iRow < rowBox; iRow++ ) {
- for (iCol = 0; iCol < colBox; iCol++ ) {
- for (iTime = 0; iTime < timeBox; iTime++) {
+ for (iRow = 0; iRow < kRowBox; iRow++ ) {
+ for (iCol = 0; iCol < kColBox; iCol++ ) {
+ for (iTime = 0; iTime < kTimeBox; iTime++) {
- Int_t rowB = rowH + iRow - (Int_t) ( rowBox / 2);
- Int_t colB = colH + iCol - (Int_t) ( colBox / 2);
- Int_t timeB = timeH + iTime - (Int_t) (timeBox / 2);
+ Int_t rowB = rowH + iRow - (Int_t) ( kRowBox / 2);
+ Int_t colB = colH + iCol - (Int_t) ( kColBox / 2);
+ Int_t timeB = timeH + iTime - (Int_t) (kTimeBox / 2);
Float_t signalB = signalSum[iRow][iCol][iTime];
if (( rowB < 0) || ( rowB >= nRowMax)) continue;
if (( colB < 0) || ( colB >= nColMax)) continue;
if (signalB > 0.0) {
// Add the signal sum
- signalB += Signal->GetData(rowB,colB,timeB);
- Signal->SetData(rowB,colB,timeB,signalB);
+ signalB += signal->GetData(rowB,colB,timeB);
+ signal->SetData(rowB,colB,timeB,signalB);
// Store the track index in the dictionary
// Note: We store index+1 in order to allow the array to be compressed
for (iDict = 0; iDict < kNDict; iDict++) {
- Int_t oldTrack = Tracks[iDict]->GetData(rowB,colB,timeB);
+ Int_t oldTrack = tracks[iDict]->GetData(rowB,colB,timeB);
if (oldTrack == track+1) break;
if (oldTrack == -1) break;
if (oldTrack == 0) {
- Tracks[iDict]->SetData(rowB,colB,timeB,track+1);
+ tracks[iDict]->SetData(rowB,colB,timeB,track+1);
break;
}
}
}
// Add a container for the digits of this detector
- Digits = fDigits->GetDigits(iDet);
+ digits = fDigits->GetDigits(iDet);
// Allocate memory space for the digits buffer
- Digits->Allocate(nRowMax,nColMax,nTimeMax);
+ digits->Allocate(nRowMax,nColMax,nTimeMax);
// Do the same for the dictionary arrays
for (iDict = 0; iDict < kNDict; iDict++) {
- Dictionary[iDict] = fDigits->GetDictionary(iDet,iDict);
- Dictionary[iDict]->Allocate(nRowMax,nColMax,nTimeMax);
+ dictionary[iDict] = fDigits->GetDictionary(iDet,iDict);
+ dictionary[iDict]->Allocate(nRowMax,nColMax,nTimeMax);
}
// Create the digits for this chamber
for (iCol = 0; iCol < nColMax; iCol++ ) {
for (iTime = 0; iTime < nTimeMax; iTime++) {
- Float_t signalAmp = Signal->GetData(iRow,iCol,iTime);
+ Float_t signalAmp = signal->GetData(iRow,iCol,iTime);
// Add the noise
signalAmp = TMath::Max((Float_t) gRandom->Gaus(signalAmp,fNoise)
,(Float_t) 0.0);
// Convert to fC
- signalAmp *= el2fC;
+ signalAmp *= kEl2fC;
// Convert to mV
signalAmp *= fChipGain;
// Convert to ADC counts
nDigits++;
// Store the amplitude of the digit
- Digits->SetData(iRow,iCol,iTime,adc);
+ digits->SetData(iRow,iCol,iTime,adc);
// Store the track index in the dictionary
// Note: We store index+1 in order to allow the array to be compressed
for (iDict = 0; iDict < kNDict; iDict++) {
- Dictionary[iDict]->SetData(iRow,iCol,iTime
- ,Tracks[iDict]->GetData(iRow,iCol,iTime));
+ dictionary[iDict]->SetData(iRow,iCol,iTime
+ ,tracks[iDict]->GetData(iRow,iCol,iTime));
}
}
}
// Compress the arrays
- Digits->Compress(1,0);
+ digits->Compress(1,0);
for (iDict = 0; iDict < kNDict; iDict++) {
- Dictionary[iDict]->Compress(1,0);
+ dictionary[iDict]->Compress(1,0);
}
- totalSizeDigits += Digits->GetSize();
- totalSizeDict0 += Dictionary[0]->GetSize();
- totalSizeDict1 += Dictionary[1]->GetSize();
- totalSizeDict2 += Dictionary[2]->GetSize();
+ totalSizeDigits += digits->GetSize();
+ totalSizeDict0 += dictionary[0]->GetSize();
+ totalSizeDict1 += dictionary[1]->GetSize();
+ totalSizeDict2 += dictionary[2]->GetSize();
printf("AliTRDdigitizer::MakeDigits -- ");
printf("Number of digits found: %d.\n",nDigits);
// Reset the arrays
- Signal->Reset();
+ signal->Reset();
for (iDict = 0; iDict < kNDict; iDict++) {
- Tracks[iDict]->Reset();
+ tracks[iDict]->Reset();
}
}
}
printf("AliTRDdigitizer::MakeDigits -- ");
- printf("Total number of analyzed hits = %d\n",count_hits);
+ printf("Total number of analyzed hits = %d\n",countHits);
printf("AliTRDdigitizer::MakeDigits -- ");
printf("Total digits data size = %d, %d, %d, %d\n",totalSizeDigits
-#ifndef TRDdigitizer_h
-#define TRDdigitizer_h
+#ifndef ALITRDDIGITIZER_h
+#define ALITRDDIGITIZER_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDdigitizer();
AliTRDdigitizer(const Text_t* name, const Text_t* title);
- ~AliTRDdigitizer();
+ AliTRDdigitizer(AliTRDdigitizer &d);
+ virtual ~AliTRDdigitizer();
+ virtual void Copy(AliTRDdigitizer &d);
virtual void Init();
virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
virtual Bool_t MakeDigits();
virtual void SetADCoutRange(Float_t range) { fADCoutRange = range; };
virtual void SetADCinRange(Float_t range) { fADCinRange = range; };
virtual void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; };
- virtual void SetDiffusion(Int_t diff_on = 1) { fDiffusionOn = diff_on; };
+ virtual void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; };
virtual void SetDiffusionT(Float_t diff) { fDiffusionT = diff; };
virtual void SetDiffusionL(Float_t diff) { fDiffusionL = diff; };
- virtual void SetElAttach(Int_t el_on = 1) { fElAttachOn = el_on; };
+ virtual void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; };
virtual void SetElAttachProp(Float_t prop) { fElAttachProp = prop; };
- virtual void SetExB(Int_t exb_on = 1) { fExBOn = exb_on; };
+ virtual void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; };
virtual void SetLorentzAngle(Float_t angle) { fLorentzAngle = angle; };
virtual void SetPadResponse(TF1 *PRF) { if (fPRF) delete fPRF;
fPRF = PRF; };
virtual Float_t GetLorentzAngle() { return fLorentzAngle; };
virtual TF1 *GetPadResponse() { return fPRF; };
+ inline AliTRDdigitizer &operator=(AliTRDdigitizer &d);
+
protected:
TFile *fInputFile; //! ALIROOT-filename
};
+//_____________________________________________________________________________
+AliTRDdigitizer &AliTRDdigitizer::operator=(AliTRDdigitizer &d)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &d) d.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.3 2000/06/07 16:27:01 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
}
+//_____________________________________________________________________________
+AliTRDdigitsManager::AliTRDdigitsManager(AliTRDdigitsManager &m)
+{
+ //
+ // AliTRDdigitsManager copy constructor
+ //
+
+ m.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDdigitsManager::~AliTRDdigitsManager()
{
+ //
+ // AliTRDdigitsManager destructor
+ //
if (fDigits) {
fDigits->Delete();
}
+//_____________________________________________________________________________
+void AliTRDdigitsManager::Copy(AliTRDdigitsManager &m)
+{
+ //
+ // Copy function
+ //
+
+ m.fIsRaw = fIsRaw;
+
+ TObject::Copy(m);
+
+}
+
//_____________________________________________________________________________
void AliTRDdigitsManager::SetRaw()
{
// Make the branch for the digits
if (fDigits) {
- const AliTRDdataArrayI *Digits =
+ const AliTRDdataArrayI *kDigits =
(AliTRDdataArrayI *) fDigits->At(0);
- if (Digits) {
- gAlice->TreeD()->Branch("TRDdigits",Digits->IsA()->GetName()
- ,&Digits,buffersize,1);
+ if (kDigits) {
+ gAlice->TreeD()->Branch("TRDdigits",kDigits->IsA()->GetName()
+ ,&kDigits,buffersize,1);
printf("AliTRDdigitsManager::MakeBranch -- ");
printf("Making branch TRDdigits\n");
}
Char_t branchname[15];
sprintf(branchname,"TRDdictionary%d",iDict);
if (fDictionary[iDict]) {
- const AliTRDdataArrayI *Dictionary =
+ const AliTRDdataArrayI *kDictionary =
(AliTRDdataArrayI *) fDictionary[iDict]->At(0);
- if (Dictionary) {
- gAlice->TreeD()->Branch(branchname,Dictionary->IsA()->GetName()
- ,&Dictionary,buffersize,1);
+ if (kDictionary) {
+ gAlice->TreeD()->Branch(branchname,kDictionary->IsA()->GetName()
+ ,&kDictionary,buffersize,1);
printf("AliTRDdigitsManager::MakeBranch -- ");
printf("Making branch %s\n",branchname);
}
//_____________________________________________________________________________
Bool_t AliTRDdigitsManager::ReadDigits()
{
+ //
+ // Reads the digit information from the input file
+ //
Bool_t status = kTRUE;
-#ifndef TRDdigitsManager_H
-#define TRDdigitsManager_H
+#ifndef ALITRDDIGITSMANAGER_H
+#define ALITRDDIGITSMANAGER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
AliTRDdigitsManager();
- ~AliTRDdigitsManager();
+ AliTRDdigitsManager(AliTRDdigitsManager &m);
+ virtual ~AliTRDdigitsManager();
+ virtual void Copy(AliTRDdigitsManager &m);
virtual Bool_t MakeBranch();
virtual Bool_t ReadDigits();
virtual Bool_t WriteDigits();
inline AliTRDdataArrayI *GetDictionary(Int_t det, Int_t i);
inline Int_t GetTrack(Int_t track, AliTRDdigit *Digit);
+ inline AliTRDdigitsManager &operator=(AliTRDdigitsManager &m);
+
protected:
AliTRDsegmentArray *fDigits; //! Digits data Array
};
//_____________________________________________________________________________
-inline AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det)
+AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det)
{
//
// Returns the digits array for one detector
}
//_____________________________________________________________________________
-inline AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i)
+AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i)
{
//
// Returns the dictionary for one detector
}
//_____________________________________________________________________________
-inline Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
+Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
{
//
// Returns the MC-track numbers from the dictionary for a given digit
}
+//_____________________________________________________________________________
+AliTRDdigitsManager &AliTRDdigitsManager::operator=(AliTRDdigitsManager &m)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &m) m.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.3 2000/06/07 16:25:37 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
//_____________________________________________________________________________
AliTRDgeometry::~AliTRDgeometry()
{
+ //
+ // AliTRDgeometry destructor
+ //
}
// UL10 (PE) --- The cooling devices
// UL11 (Water) --- The cooling water
- const Int_t npar_cha = 3;
+ const Int_t kNparCha = 3;
- Float_t par_dum[3];
- Float_t par_cha[npar_cha];
+ Float_t parDum[3];
+ Float_t parCha[kNparCha];
Float_t xpos, ypos, zpos;
// The aluminum frames - readout + electronics (Al)
// The inner chambers
- gMC->Gsvolu("UAFI","BOX ",idtmed[1301-1],par_dum,0);
+ gMC->Gsvolu("UAFI","BOX ",idtmed[1301-1],parDum,0);
// The middle chambers
- gMC->Gsvolu("UAFM","BOX ",idtmed[1301-1],par_dum,0);
+ gMC->Gsvolu("UAFM","BOX ",idtmed[1301-1],parDum,0);
// The outer chambers
- gMC->Gsvolu("UAFO","BOX ",idtmed[1301-1],par_dum,0);
+ gMC->Gsvolu("UAFO","BOX ",idtmed[1301-1],parDum,0);
// The inner part of the aluminum frames (Air)
// The inner chambers
- gMC->Gsvolu("UAII","BOX ",idtmed[1302-1],par_dum,0);
+ gMC->Gsvolu("UAII","BOX ",idtmed[1302-1],parDum,0);
// The middle chambers
- gMC->Gsvolu("UAIM","BOX ",idtmed[1302-1],par_dum,0);
+ gMC->Gsvolu("UAIM","BOX ",idtmed[1302-1],parDum,0);
// The outer chambers
- gMC->Gsvolu("UAIO","BOX ",idtmed[1302-1],par_dum,0);
+ gMC->Gsvolu("UAIO","BOX ",idtmed[1302-1],parDum,0);
// The carbon frames - radiator + driftchamber (C)
// The inner chambers
- gMC->Gsvolu("UCFI","BOX ",idtmed[1307-1],par_dum,0);
+ gMC->Gsvolu("UCFI","BOX ",idtmed[1307-1],parDum,0);
// The middle chambers
- gMC->Gsvolu("UCFM","BOX ",idtmed[1307-1],par_dum,0);
+ gMC->Gsvolu("UCFM","BOX ",idtmed[1307-1],parDum,0);
// The outer chambers
- gMC->Gsvolu("UCFO","BOX ",idtmed[1307-1],par_dum,0);
+ gMC->Gsvolu("UCFO","BOX ",idtmed[1307-1],parDum,0);
// The inner part of the carbon frames (Air)
// The inner chambers
- gMC->Gsvolu("UCII","BOX ",idtmed[1302-1],par_dum,0);
+ gMC->Gsvolu("UCII","BOX ",idtmed[1302-1],parDum,0);
// The middle chambers
- gMC->Gsvolu("UCIM","BOX ",idtmed[1302-1],par_dum,0);
+ gMC->Gsvolu("UCIM","BOX ",idtmed[1302-1],parDum,0);
// The outer chambers
- gMC->Gsvolu("UCIO","BOX ",idtmed[1302-1],par_dum,0);
+ gMC->Gsvolu("UCIO","BOX ",idtmed[1302-1],parDum,0);
// The material layers inside the chambers
- par_cha[0] = -1.;
- par_cha[1] = -1.;
+ parCha[0] = -1.;
+ parCha[1] = -1.;
// G10 layer (radiator seal)
- par_cha[2] = kSeThick/2;
- gMC->Gsvolu("UL01","BOX ",idtmed[1313-1],par_cha,npar_cha);
+ parCha[2] = kSeThick/2;
+ gMC->Gsvolu("UL01","BOX ",idtmed[1313-1],parCha,kNparCha);
// CO2 layer (radiator)
- par_cha[2] = kRaThick/2;
- gMC->Gsvolu("UL02","BOX ",idtmed[1312-1],par_cha,npar_cha);
+ parCha[2] = kRaThick/2;
+ gMC->Gsvolu("UL02","BOX ",idtmed[1312-1],parCha,kNparCha);
// PE layer (radiator)
- par_cha[2] = kPeThick/2;
- gMC->Gsvolu("UL03","BOX ",idtmed[1303-1],par_cha,npar_cha);
+ parCha[2] = kPeThick/2;
+ gMC->Gsvolu("UL03","BOX ",idtmed[1303-1],parCha,kNparCha);
// Mylar layer (entrance window + HV cathode)
- par_cha[2] = kMyThick/2;
- gMC->Gsvolu("UL04","BOX ",idtmed[1308-1],par_cha,npar_cha);
+ parCha[2] = kMyThick/2;
+ gMC->Gsvolu("UL04","BOX ",idtmed[1308-1],parCha,kNparCha);
// Xe/Isobutane layer (drift volume, sensitive)
- par_cha[2] = kDrThick/2.;
- gMC->Gsvolu("UL05","BOX ",idtmed[1309-1],par_cha,npar_cha);
+ parCha[2] = kDrThick/2.;
+ gMC->Gsvolu("UL05","BOX ",idtmed[1309-1],parCha,kNparCha);
// Xe/Isobutane layer (amplification volume, not sensitive)
- par_cha[2] = kAmThick/2.;
- gMC->Gsvolu("UL06","BOX ",idtmed[1309-1],par_cha,npar_cha);
+ parCha[2] = kAmThick/2.;
+ gMC->Gsvolu("UL06","BOX ",idtmed[1309-1],parCha,kNparCha);
// Cu layer (pad plane)
- par_cha[2] = kCuThick/2;
- gMC->Gsvolu("UL07","BOX ",idtmed[1305-1],par_cha,npar_cha);
+ parCha[2] = kCuThick/2;
+ gMC->Gsvolu("UL07","BOX ",idtmed[1305-1],parCha,kNparCha);
// G10 layer (support structure)
- par_cha[2] = kSuThick/2;
- gMC->Gsvolu("UL08","BOX ",idtmed[1313-1],par_cha,npar_cha);
+ parCha[2] = kSuThick/2;
+ gMC->Gsvolu("UL08","BOX ",idtmed[1313-1],parCha,kNparCha);
// Cu layer (FEE + signal lines)
- par_cha[2] = kFeThick/2;
- gMC->Gsvolu("UL09","BOX ",idtmed[1305-1],par_cha,npar_cha);
+ parCha[2] = kFeThick/2;
+ gMC->Gsvolu("UL09","BOX ",idtmed[1305-1],parCha,kNparCha);
// PE layer (cooling devices)
- par_cha[2] = kCoThick/2;
- gMC->Gsvolu("UL10","BOX ",idtmed[1303-1],par_cha,npar_cha);
+ parCha[2] = kCoThick/2;
+ gMC->Gsvolu("UL10","BOX ",idtmed[1303-1],parCha,kNparCha);
// Water layer (cooling)
- par_cha[2] = kWaThick/2;
- gMC->Gsvolu("UL11","BOX ",idtmed[1314-1],par_cha,npar_cha);
+ parCha[2] = kWaThick/2;
+ gMC->Gsvolu("UL11","BOX ",idtmed[1314-1],parCha,kNparCha);
// Position the layers in the chambers
xpos = 0;
-#ifndef TRDgeometry_h
-#define TRDgeometry_h
+#ifndef ALITRDGEOMETRY_h
+#define ALITRDGEOMETRY_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
AliTRDgeometry();
- ~AliTRDgeometry();
+ virtual ~AliTRDgeometry();
- virtual void CreateGeometry(Int_t *);
+ virtual void CreateGeometry(Int_t *idtmed);
virtual Int_t IsVersion() const = 0;
virtual void Init();
virtual Bool_t Local2Global(Int_t d, Float_t *local, Float_t *global);
virtual Float_t GetColPadSize() { return fColPadSize; };
virtual Float_t GetTimeBinSize() { return fTimeBinSize; };
- virtual void GetGlobal(const AliRecPoint * p, TVector3 & pos, TMatrix & mat);
- virtual void GetGlobal(const AliRecPoint * p, TVector3 & pos);
+ virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat);
+ virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos);
protected:
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.4.2 2000/05/08 14:46:44 cblume
Include options SetPHOShole() and SetRICHhole()
//_____________________________________________________________________________
AliTRDgeometryFull::~AliTRDgeometryFull()
{
+ //
+ // AliTRDgeometryFull destructor
+ //
}
Int_t iplan;
- const Int_t npar_trd = 4;
- const Int_t npar_cha = 3;
+ const Int_t kNparTrd = 4;
+ const Int_t kNparCha = 3;
- Float_t par_trd[npar_trd];
- Float_t par_cha[npar_cha];
+ Float_t parTrd[kNparTrd];
+ Float_t parCha[kNparCha];
Float_t xpos, ypos, zpos;
AliTRDgeometry::CreateGeometry(idtmed);
// The TRD mother volume for one sector (Air), full length in z-direction
- par_trd[0] = kSwidth1/2.;
- par_trd[1] = kSwidth2/2.;
- par_trd[2] = kSlenTR1/2.;
- par_trd[3] = kSheight/2.;
- gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],par_trd,npar_trd);
+ parTrd[0] = kSwidth1/2.;
+ parTrd[1] = kSwidth2/2.;
+ parTrd[2] = kSlenTR1/2.;
+ parTrd[3] = kSheight/2.;
+ gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
// The TRD mother volume for one sector (Air), leaving hole for PHOS
if (fPHOShole) {
- gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],par_trd,npar_trd);
+ gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
}
// The TRD mother volume for one sector (Air), leaving hole for RICH
if (fRICHhole) {
- gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],par_trd,npar_trd);
+ gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
}
// Position the chambers in the TRD mother volume
// The inner chambers ---------------------------------------------------------------
// the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthI[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthI[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthI[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthI[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
// the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthI[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthI[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthI[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthI[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
// The middle chambers --------------------------------------------------------------
// the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM1[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM1[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM2[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM2[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
}
// the inner part of the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthM1[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthM1[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthM2[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthM2[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
}
// the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM1[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM1[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM2[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM2[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
}
// the inner part of the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthM1[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthM1[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthM2[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthM2[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM2[iplan-1]/2. + y1;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIM",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
}
// The outer chambers ---------------------------------------------------------------
// the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO1[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO1[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO2[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO2[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
}
if (fRICHhole) {
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO3[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO3[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
}
// the inner part of the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthO1[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthO1[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthO2[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthO2[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
}
if (fRICHhole) {
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthO3[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthO3[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
}
// the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO1[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO1[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO2[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO2[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
}
if (fRICHhole) {
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO3[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO3[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
}
// the inner part of the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthO1[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthO1[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
if (fPHOShole) {
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthO2[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthO2[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO2[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIO",iplan+3*kNplan,"TRD2",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
}
if (fRICHhole) {
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthO3[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthO3[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO3[iplan-1]/2. + y2;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIO",iplan+5*kNplan,"TRD3",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
}
}
-#ifndef TRDgeometryFull_h
-#define TRDgeometryFull_h
+#ifndef ALITRDGEOMETRYFULL_h
+#define ALITRDGEOMETRYFULL_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDgeometryFull();
~AliTRDgeometryFull();
- void CreateGeometry(Int_t *);
+ void CreateGeometry(Int_t *idtmed);
Int_t IsVersion() const { return 1; };
void Init();
Float_t fClengthI[kNplan]; // Length of the inner chambers
Float_t fClengthM1[kNplan]; // Length of the middle chambers
- Float_t fClengthM2[kNplan]; //
+ Float_t fClengthM2[kNplan]; // Length of the middle chambers
Float_t fClengthO1[kNplan]; // Length of the outer chambers
- Float_t fClengthO2[kNplan]; //
- Float_t fClengthO3[kNplan]; //
+ Float_t fClengthO2[kNplan]; // Length of the outer chambers
+ Float_t fClengthO3[kNplan]; // Length of the outer chambers
ClassDef(AliTRDgeometryFull,1) // TRD geometry without hole
/*
$Log$
+Revision 1.1 2000/02/28 19:01:42 cblume
+Add new TRD classes
+
*/
///////////////////////////////////////////////////////////////////////////////
//_____________________________________________________________________________
AliTRDgeometryHole::~AliTRDgeometryHole()
{
+ //
+ // AliTRDgeometryHole destructor
+ //
}
Int_t iplan;
- const Int_t npar_trd = 4;
- const Int_t npar_cha = 3;
+ const Int_t kNparTrd = 4;
+ const Int_t kNparCha = 3;
- Float_t par_trd[npar_trd];
- Float_t par_cha[npar_cha];
+ Float_t parTrd[kNparTrd];
+ Float_t parCha[kNparCha];
Float_t xpos, ypos, zpos;
AliTRDgeometry::CreateGeometry(idtmed);
// The TRD mother volume for one sector (Air) (dimensions identical to BTR1)
- par_trd[0] = kSwidth1/2.;
- par_trd[1] = kSwidth2/2.;
- par_trd[2] = kSlenTR1/2.;
- par_trd[3] = kSheight/2.;
- gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],par_trd,npar_trd);
+ parTrd[0] = kSwidth1/2.;
+ parTrd[1] = kSwidth2/2.;
+ parTrd[2] = kSlenTR1/2.;
+ parTrd[3] = kSheight/2.;
+ gMC->Gsvolu("TRD1","TRD1",idtmed[1302-1],parTrd,kNparTrd);
// The TRD mother volume for one sector (Air) (dimensions identical to BTR2)
- par_trd[0] = kSwidth1/2.;
- par_trd[1] = kSwidth2/2.;
- par_trd[2] = kSlenTR2/2.;
- par_trd[3] = kSheight/2.;
- gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],par_trd,npar_trd);
+ parTrd[0] = kSwidth1/2.;
+ parTrd[1] = kSwidth2/2.;
+ parTrd[2] = kSlenTR2/2.;
+ parTrd[3] = kSheight/2.;
+ gMC->Gsvolu("TRD2","TRD1",idtmed[1302-1],parTrd,kNparTrd);
// The TRD mother volume for one sector (Air) (dimensions identical to BTR3)
- par_trd[0] = kSwidth1/2.;
- par_trd[1] = kSwidth2/2.;
- par_trd[2] = kSlenTR3/2.;
- par_trd[3] = kSheight/2.;
- gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],par_trd,npar_trd);
+ parTrd[0] = kSwidth1/2.;
+ parTrd[1] = kSwidth2/2.;
+ parTrd[2] = kSlenTR3/2.;
+ parTrd[3] = kSheight/2.;
+ gMC->Gsvolu("TRD3","TRD1",idtmed[1302-1],parTrd,kNparTrd);
// Position the chambers in the TRD mother volume
for (iplan = 1; iplan <= kNplan; iplan++) {
// The inner chambers ---------------------------------------------------------------
// the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthI[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthI[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthI[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthI[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
// the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthI[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthI[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFI",iplan ,"TRD1",xpos,ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthI[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthI[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = 0.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCII",iplan ,"TRD1",xpos,ypos,zpos,0,"ONLY",parCha,kNparCha);
// The middle chambers --------------------------------------------------------------
// the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM1[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM1[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM2[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ gMC->Gsposp("UAFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM2[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthM1[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthM1[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthM2[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ gMC->Gsposp("UAIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthM2[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
// the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM1[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM1[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthM2[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ gMC->Gsposp("UCFM",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthM2[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthM1[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthM1[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthM2[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ gMC->Gsposp("UCIM",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIM",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthM2[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIM",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
// The outer chambers ---------------------------------------------------------------
// the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO1[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO1[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO2[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ gMC->Gsposp("UAFO",iplan ,"TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UAFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO2[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO3[iplan-1]/2.;
- par_cha[2] = kCaframe/2.;
+ gMC->Gsposp("UAFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO3[iplan-1]/2.;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UAFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the aluminum frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthO1[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthO1[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthO2[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ gMC->Gsposp("UAIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UAIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthO2[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2. - kCathick;
- par_cha[1] = fClengthO3[iplan-1]/2. - kCathick;
- par_cha[2] = kCaframe/2.;
+ gMC->Gsposp("UAIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2. - kCathick;
+ parCha[1] = fClengthO3[iplan-1]/2. - kCathick;
+ parCha[2] = kCaframe/2.;
xpos = 0.;
ypos = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
zpos = kCheight - kCaframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UAIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
// the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO1[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO1[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO2[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ gMC->Gsposp("UCFO",iplan, "TRD1",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ gMC->Gsposp("UCFO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"MANY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO2[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2.;
- par_cha[1] = fClengthO3[iplan-1]/2.;
- par_cha[2] = kCcframe/2.;
+ gMC->Gsposp("UCFO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2.;
+ parCha[1] = fClengthO3[iplan-1]/2.;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",par_cha,npar_cha);
+ gMC->Gsposp("UCFO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"MANY",parCha,kNparCha);
// the inner part of the carbon frame
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthO1[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthO1[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthI[iplan-1]/2. + fClengthM1[iplan-1] + fClengthO1[iplan-1]/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthO2[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ gMC->Gsposp("UCIO",iplan ,"TRD1",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ gMC->Gsposp("UCIO",iplan+ kNplan,"TRD1",xpos,-ypos,zpos,0,"ONLY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthO2[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthM2[iplan-1] + fClengthO2[iplan-1]/2. - kSlenTR2/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
- par_cha[0] = fCwidth[iplan-1]/2. - kCcthick;
- par_cha[1] = fClengthO3[iplan-1]/2. - kCcthick;
- par_cha[2] = kCcframe/2.;
+ gMC->Gsposp("UCIO",iplan+2*kNplan,"TRD2",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
+ parCha[0] = fCwidth[iplan-1]/2. - kCcthick;
+ parCha[1] = fClengthO3[iplan-1]/2. - kCcthick;
+ parCha[2] = kCcframe/2.;
xpos = 0.;
ypos = fClengthO3[iplan-1]/2. - kSlenTR3/2.;
zpos = kCcframe/2. - kSheight/2. + (iplan-1) * (kCheight + kCspace);
- gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",par_cha,npar_cha);
+ gMC->Gsposp("UCIO",iplan+4*kNplan,"TRD3",xpos, ypos,zpos,0,"ONLY",parCha,kNparCha);
}
-#ifndef TRDgeometryHole_h
-#define TRDgeometryHole_h
+#ifndef ALITRDGEOMETRYHOLE_h
+#define ALITRDGEOMETRYHOLE_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
AliTRDgeometryHole();
- ~AliTRDgeometryHole();
+ virtual ~AliTRDgeometryHole();
- void CreateGeometry(Int_t *);
+ void CreateGeometry(Int_t *idtmed);
Int_t IsVersion() const { return 0; };
void Init();
Float_t fClengthI[kNplan]; // Length of the inner chambers
Float_t fClengthM1[kNplan]; // Length of the middle chambers
- Float_t fClengthM2[kNplan]; //
+ Float_t fClengthM2[kNplan]; // Length of the middle chambers
Float_t fClengthO1[kNplan]; // Length of the outer chambers
- Float_t fClengthO2[kNplan]; //
- Float_t fClengthO3[kNplan]; //
+ Float_t fClengthO2[kNplan]; // Length of the outer chambers
+ Float_t fClengthO3[kNplan]; // Length of the outer chambers
ClassDef(AliTRDgeometryHole,1) // TRD geometry with hole
/*
$Log$
+Revision 1.3 2000/06/07 16:25:37 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
#include "AliTRDhit.h"
ClassImp(AliTRDhit)
-
+
+//_____________________________________________________________________________
+AliTRDhit::AliTRDhit():AliHit()
+{
+ //
+ // AliTRDhit default constructor
+ //
+
+}
+
//_____________________________________________________________________________
AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t *det, Float_t *hits)
:AliHit(shunt, track)
fQ = hits[3];
}
+
+//_____________________________________________________________________________
+AliTRDhit::~AliTRDhit()
+{
+ //
+ // AliTRDhit destructor
+ //
+
+}
-#ifndef TRDhit_H
-#define TRDhit_H
+#ifndef ALITRDHIT_H
+#define ALITRDHIT_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
//_____________________________________________________________________________
class AliTRDhit : public AliHit {
-
- public:
-
- Int_t fDetector; // TRD detector number
- Float_t fQ; // Charge created by a hit (slow simulator only)
public:
- AliTRDhit() {}
+ AliTRDhit();
AliTRDhit(Int_t shunt, Int_t track, Int_t *det, Float_t *hits);
- virtual ~AliTRDhit() {};
+ virtual ~AliTRDhit();
+
+ Int_t GetDetector() { return fDetector; };
+ Float_t GetCharge() { return fQ; };
+
+ protected:
+
+ Int_t fDetector; // TRD detector number
+ Float_t fQ; // Charge created by a hit (slow simulator only)
ClassDef(AliTRDhit,2) // Hit for the Transition Radiation Detector
/*
$Log$
+Revision 1.6 2000/05/08 15:48:30 cblume
+Resolved merge conflict
+
Revision 1.4.2.2 2000/05/08 14:50:58 cblume
Add functions ProjRow(), ProjCol(), and ProjTime()
}
+//_____________________________________________________________________________
+AliTRDmatrix::AliTRDmatrix(AliTRDmatrix &m)
+{
+ //
+ // AliTRDmatrix copy constructor
+ //
+
+ m.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDmatrix::~AliTRDmatrix()
{
+ //
+ // AliTRDmatrix destructor
+ //
if (fPixelArray) {
fPixelArray->Delete();
}
+//_____________________________________________________________________________
+void AliTRDmatrix::Copy(AliTRDmatrix &m)
+{
+ //
+ // Copy function
+ //
+
+ m.fRow = fRow;
+ m.fCol = fCol;
+ m.fTime = fTime;
+ m.fPixel = fPixel;
+ m.fSector = fSector;
+ m.fChamber = fChamber;
+ m.fPlane = fPlane;
+
+ m.fPixelArray = new TObjArray(*fPixelArray);
+
+}
+
//_____________________________________________________________________________
void AliTRDmatrix::Draw(Option_t *)
{
-#ifndef TRDmatrix_h
-#define TRDmatrix_h
+#ifndef ALITRDMATRIX_h
+#define ALITRDMATRIX_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
class AliTRDmatrix : public TObject {
-protected:
-
- Int_t fRow; // Number of pad-rows
- Int_t fCol; // Number of pad-columns
- Int_t fTime; // Number of time buckets
- Int_t fPixel; // Number of pixels
- Int_t fSector; // Sector number
- Int_t fChamber; // Chamber number
- Int_t fPlane; // Plane number
- TObjArray *fPixelArray; // Array of pixels
-
- virtual Int_t GetIndex(Int_t iRow, Int_t iCol, Int_t iTime);
- virtual AliTRDpixel *GetPixel(Int_t iRow, Int_t iCol, Int_t iTime);
-
public:
AliTRDmatrix();
AliTRDmatrix(Int_t nRow, Int_t nCol, Int_t nTime, Int_t iSec, Int_t iCha, Int_t iPla);
+ AliTRDmatrix(AliTRDmatrix &m);
virtual ~AliTRDmatrix();
virtual void AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal);
virtual Bool_t AddTrack(Int_t iRow, Int_t iCol, Int_t iTime, Int_t track);
- virtual void Draw(Option_t* = " ");
+ virtual void Copy(AliTRDmatrix &m);
+ virtual void Draw(Option_t *opt = " ");
virtual void DrawRow(Int_t iRow);
virtual void DrawCol(Int_t iCol);
virtual void DrawTime(Int_t iTime);
virtual Int_t GetChamber() { return fChamber; };
virtual Int_t GetPlane() { return fPlane; };
+ inline AliTRDmatrix &operator=(AliTRDmatrix &m);
+
+protected:
+
+ virtual Int_t GetIndex(Int_t iRow, Int_t iCol, Int_t iTime);
+ virtual AliTRDpixel *GetPixel(Int_t iRow, Int_t iCol, Int_t iTime);
+
+ Int_t fRow; // Number of pad-rows
+ Int_t fCol; // Number of pad-columns
+ Int_t fTime; // Number of time buckets
+ Int_t fPixel; // Number of pixels
+ Int_t fSector; // Sector number
+ Int_t fChamber; // Chamber number
+ Int_t fPlane; // Plane number
+ TObjArray *fPixelArray; // Array of pixels
+
ClassDef(AliTRDmatrix,1) // The TRD detector matrix for one readout chamber
};
+//_____________________________________________________________________________
+AliTRDmatrix &AliTRDmatrix::operator=(AliTRDmatrix &m)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &m) m.Copy(*this);
+ return *this;
+
+}
+
#endif
/*
$Log$
+Revision 1.3 2000/02/28 19:10:26 cblume
+Include the new TRD classes
+
Revision 1.2.4.1 2000/02/28 17:59:27 cblume
Initialize fTrack with -1
fTrack[2] = -1;
}
+
+//_____________________________________________________________________________
+AliTRDpixel::~AliTRDpixel()
+{
+ //
+ // AliTRDpixel destructor
+ //
+
+}
+
+//_____________________________________________________________________________
+void AliTRDpixel::Copy(AliTRDpixel &p)
+{
+ //
+ // Copy function
+ //
+
+ p.fSignal = fSignal;
+ for (Int_t iTrackPixel = 0; iTrackPixel < kTrackPixel; iTrackPixel++) {
+ p.fTrack[iTrackPixel] = fTrack[iTrackPixel];
+ }
+
+}
-#ifndef TRDpixel_h
-#define TRDpixel_h
+#ifndef ALITRDPIXEL_h
+#define ALITRDPIXEL_h
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
class AliTRDpixel : public TObject {
-protected:
- Float_t fSignal; // Signal sum
- Int_t fTrack[kTrackPixel]; // Tracks contributing to this pixel
-
public:
+
AliTRDpixel();
- virtual ~AliTRDpixel() {};
+ virtual ~AliTRDpixel();
+
+ virtual void Copy(AliTRDpixel &p);
virtual void SetSignal(Float_t signal) { fSignal = signal; };
virtual void SetTrack(Int_t i, Int_t track) { fTrack[i] = track; };
virtual Float_t GetSignal() { return fSignal; };
virtual Int_t GetTrack(Int_t i) { return fTrack[i]; };
+protected:
+
+ Float_t fSignal; // Signal sum
+ Int_t fTrack[kTrackPixel]; // Tracks contributing to this pixel
+
ClassDef(AliTRDpixel,1) // Information for one detector pixel
};
/*
$Log$
+Revision 1.1 2000/02/28 19:02:07 cblume
+Add new TRD classes
+
*/
///////////////////////////////////////////////////////////////////////////////
fDetector = 0;
- AliTRD *TRD;
+ AliTRD *trd;
if ((gAlice) &&
- (TRD = ((AliTRD*) gAlice->GetDetector("TRD")))) {
- fGeom = TRD->GetGeometry();
+ (trd = ((AliTRD*) gAlice->GetDetector("TRD")))) {
+ fGeom = trd->GetGeometry();
}
else {
fGeom = NULL;
}
+//_____________________________________________________________________________
+AliTRDrecPoint::~AliTRDrecPoint()
+{
+ //
+ // AliTRDrecPoint destructor
+ //
+
+}
+
//_____________________________________________________________________________
void AliTRDrecPoint::AddDigit(Int_t digit)
{
// system.
//
- const Float_t sq12 = 3.464101615;
+ const Float_t kSq12 = 3.464101615;
// Set the position
fLocPos = pos;
// col: not defined yet
// time: bin-size / sqrt(12)
fLocPosM->operator()(0,0) = ((AliTRDgeometry *) fGeom)->GetRowPadSize()
- / sq12;
+ / kSq12;
fLocPosM->operator()(1,1) = 0.0;
fLocPosM->operator()(2,2) = ((AliTRDgeometry *) fGeom)->GetTimeBinSize()
- / sq12;
+ / kSq12;
}
-#ifndef TRDrecPoint_h
-#define TRDrecPoint_h
+#ifndef ALITRDRECPOINT_H
+#define ALITRDRECPOINT_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
AliTRDrecPoint();
- ~AliTRDrecPoint() {};
+ virtual ~AliTRDrecPoint();
+
virtual void Print(Option_t* ) {};
virtual void AddDigit(Int_t digit);
virtual void AddDigit(AliDigitNew &digit) {};
/*
$Log$
+Revision 1.2 2000/05/08 16:17:27 cblume
+Merge TRD-develop
+
Revision 1.1.4.1 2000/05/08 14:55:03 cblume
Bug fixes
///////////////////////////////////////////////////////////////////////////////
// //
+// Alice segment manager class //
+// //
///////////////////////////////////////////////////////////////////////////////
#include "AliTRD.h"
// Constructor creating an array of AliTRDdataArray of size <n>
//
- AliTRDdataArray *DataArray;
+ AliTRDdataArray *dataArray;
for (Int_t i = 0; i < n; i++) {
- DataArray = (AliTRDdataArray *) AddSegment(i);
+ dataArray = (AliTRDdataArray *) AddSegment(i);
}
}
+//_____________________________________________________________________________
+AliTRDsegmentArray::AliTRDsegmentArray(AliTRDsegmentArray &a)
+{
+ //
+ // AliTRDsegmentArray copy constructor
+ //
+
+ a.Copy(*this);
+
+}
+
+//_____________________________________________________________________________
+AliTRDsegmentArray::~AliTRDsegmentArray()
+{
+ //
+ // AliTRDsegmentArray destructor
+ //
+}
+
+//_____________________________________________________________________________
+void AliTRDsegmentArray::Copy(AliTRDsegmentArray &a)
+{
+ //
+ // Copy function
+ //
+
+ AliTRDsegmentArrayBase::Copy(a);
+
+}
+
//_____________________________________________________________________________
void AliTRDsegmentArray::Delete()
{
// Loop through all segments and read them from the tree
Bool_t status = kTRUE;
for (Int_t iSegment = 0; iSegment < fNSegment; iSegment++) {
- AliTRDdataArray *DataArray = (AliTRDdataArray *) fSegment->At(iSegment);
- if (!DataArray) {
+ AliTRDdataArray *dataArray = (AliTRDdataArray *) fSegment->At(iSegment);
+ if (!dataArray) {
status = kFALSE;
break;
}
- fBranch->SetAddress(&DataArray);
+ fBranch->SetAddress(&dataArray);
fBranch->GetEntry(iSegment);
}
// Loop through all segments and fill them into the tree
Bool_t status = kTRUE;
for (Int_t iSegment = 0; iSegment < fNSegment; iSegment++) {
- const AliTRDdataArray *DataArray =
+ const AliTRDdataArray *kDataArray =
(AliTRDdataArray *) AliTRDsegmentArrayBase::At(iSegment);
- if (!DataArray) {
+ if (!kDataArray) {
status = kFALSE;
break;
}
- fBranch->SetAddress(&DataArray);
+ fBranch->SetAddress(&kDataArray);
fBranch->Fill();
}
if (gAlice) {
- AliTRDgeometry *Geo = ((AliTRD*) gAlice->GetDetector("TRD"))->GetGeometry();
- Int_t det = Geo->GetDetector(pla,cha,sec);
+ AliTRDgeometry *geo = ((AliTRD*) gAlice->GetDetector("TRD"))->GetGeometry();
+ Int_t det = geo->GetDetector(pla,cha,sec);
return GetDataArray(det);
}
-#ifndef TRDsegmentArray_H
-#define TRDsegmentArray_H
+#ifndef ALITRDSEGMENTARRAY_H
+#define ALITRDSEGMENTARRAY_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
AliTRDsegmentArray();
AliTRDsegmentArray(Text_t *classname, Int_t n);
- ~AliTRDsegmentArray() { };
+ AliTRDsegmentArray(AliTRDsegmentArray &a);
+ virtual ~AliTRDsegmentArray();
+ virtual void Copy(AliTRDsegmentArray &a);
virtual void Delete();
virtual void Delete(const char *) { Delete(); };
/*
$Log$
+Revision 1.3 2000/06/07 16:27:01 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.2 2000/05/08 16:17:27 cblume
Merge TRD-develop
///////////////////////////////////////////////////////////////////////////////
// //
-// Alice segment manager object //
-// //
-// AliTRDsegmentIDArray object is array of pointers to object derived from //
-// AliTRDsegmentID object //
-// AliTRDsegmentID - object in comparison with TObject enhalt //
-// additional information fSegmentID //
+// Alice segment manager base class //
// //
///////////////////////////////////////////////////////////////////////////////
ClassImp(AliTRDsegmentArrayBase)
//_____________________________________________________________________________
-AliTRDsegmentArrayBase::AliTRDsegmentArrayBase()
+AliTRDsegmentArrayBase::AliTRDsegmentArrayBase():TNamed()
{
//
- //
+ // AliTRDsegmentArrayBase default constructor
//
fNSegment = 0;
AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(Text_t *classname, Int_t n)
{
//
- //constructor which
- //
- // Create an array of objects of classname. The class must inherit from
- // AliTRDsegmentID . The second argument adjust number of entries in
+ // Create an array of objects of <classname>. The class must inherit from
+ // AliTRDsegmentID. The second argument sets the number of entries in
// the array.
- fNSegment=0;
- fSegment =0;
+ //
+
+ fNSegment = 0;
+ fSegment = 0;
fTreeIndex = 0;
- fTree = 0;
- fClass = 0;
+ fTree = 0;
+ fClass = 0;
+
SetClass(classname);
- if (MakeArray(n)==kFALSE){
- Error("AliTRDsegmentArrayBase", "can't allocate %d segments in memory",n);
+
+ if (MakeArray(n) == kFALSE) {
+ Error("AliTRDsegmentArrayBase","Cannot allocate %d segments in memory",n);
return;
- }
+ }
+
+}
+
+//_____________________________________________________________________________
+AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a)
+{
+ //
+ // AliTRDsegmentArrayBase copy constructor
+ //
+
+ a.Copy(*this);
+
+}
+
+//_____________________________________________________________________________
+AliTRDsegmentArrayBase::~AliTRDsegmentArrayBase()
+{
+ //
+ // AliTRDsegmentArrayBase destructor
+ //
+
+ if (fNSegment){
+ fSegment->Delete();
+ delete fSegment;
+ }
+
+ if (fTree) delete fTree;
+ if (fTreeIndex) delete fTreeIndex;
+ if (fClass) delete fClass;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDsegmentArrayBase::Copy(AliTRDsegmentArrayBase &a)
+{
+ //
+ // Copy function
+ //
+
+ TNamed::Copy(a);
+
+ fSegment->Copy(*a.fSegment);
+ fTreeIndex->Copy(*a.fTreeIndex);
+ fClass->Copy(*a.fClass);
+
+ a.fNSegment = fNSegment;
+
}
//_____________________________________________________________________________
-Bool_t AliTRDsegmentArrayBase:: SetClass(Text_t *classname)
+Bool_t AliTRDsegmentArrayBase::SetClass(Text_t *classname)
{
//
- //set class of stored object
- if ( fClass !=0 ) {
+ // Sets the classname of the stored object
+ //
+
+ if (fClass != 0) {
delete fClass;
fClass = 0;
}
- if (fTree !=0) {
+ if (fTree != 0) {
delete fTree;
- fTree = 0;
- fBranch = 0;
+ fTree = 0;
+ fBranch = 0;
delete fTreeIndex;
fTreeIndex = 0;
}
if (fSegment != 0) {
fSegment->Delete();
delete fSegment;
- fSegment = 0;
+ fSegment = 0;
}
- if (!gROOT)
- ::Fatal("AliTRDsegmentArrayBase::AliTRDsegmentArrayBase", "ROOT system not initialized");
+
+ if (!gROOT) ::Fatal("AliTRDsegmentArrayBase::AliTRDsegmentArrayBase"
+ ,"ROOT system not initialized");
fClass = gROOT->GetClass(classname);
if (!fClass) {
- Error("AliTRDsegmentArrayBase", "%s is not a valid class name", classname);
- return kFALSE;
+ Error("AliTRDsegmentArrayBase","%s is not a valid class name",classname);
+ return kFALSE;
}
if (!fClass->InheritsFrom(AliTRDsegmentID::Class())) {
- Error("AliTRDsegmentArrayBase", "%s does not inherit from AliTRDsegmentID", classname);
- return kFALSE;
- }
+ Error("AliTRDsegmentArrayBase"
+ ,"%s does not inherit from AliTRDsegmentID",classname);
+ return kFALSE;
+ }
+
return kTRUE;
-}
-
-//_____________________________________________________________________________
-//Bool_t AliTRDsegmentArrayBase::ClassError( )
-//{
- //signalize class error
- // if (!fClass) {
- // Error("AliTRDsegmentArrayBase", "%s is not a valid class name", classname);
- // return kFALSE;
- // }
-//// return kFALSE;
-//}
-//_____________________________________________________________________________
-AliTRDsegmentArrayBase::~AliTRDsegmentArrayBase()
-{
- if (fNSegment>0){
- fSegment->Delete();
- delete fSegment;
- }
- if (fTree) delete fTree;
- if (fTreeIndex) delete fTreeIndex;
- if (fClass!=0) delete fClass;
}
//_____________________________________________________________________________
AliTRDsegmentID * AliTRDsegmentArrayBase::NewSegment()
{
//
- //create object according class information
- if (fClass==0) return 0;
- AliTRDsegmentID * segment = (AliTRDsegmentID * )fClass->New();
+ // Create a new object according to the class information
+ //
+
+ if (fClass == 0) return 0;
+
+ AliTRDsegmentID *segment = (AliTRDsegmentID *) fClass->New();
if (segment == 0) return 0;
+
return segment;
+
}
//_____________________________________________________________________________
Bool_t AliTRDsegmentArrayBase::AddSegment(AliTRDsegmentID *segment)
{
//
- // add segment to array
+ // Add a segment to the array
//
- if (segment==0) return kFALSE;
- if (fSegment==0) return kFALSE;
- if (fClass==0) return kFALSE;
- if (!(segment->IsA()->InheritsFrom(fClass))){
- Error("AliTRDsegmentArrayBase", "added class %s is not of proper type ",
+
+ if (segment == 0) return kFALSE;
+ if (fSegment == 0) return kFALSE;
+ if (fClass == 0) return kFALSE;
+
+ if (!(segment->IsA()->InheritsFrom(fClass))) {
+ Error("AliTRDsegmentArrayBase","added class %s is not of proper type",
segment->IsA()->GetName());
- return kFALSE;
+ return kFALSE;
}
+
fSegment->AddAt(segment,segment->GetID());
- fNSegment = fSegment->GetLast()+1;
+ fNSegment = fSegment->GetLast() + 1;
+
return kTRUE;
+
}
//_____________________________________________________________________________
AliTRDsegmentID * AliTRDsegmentArrayBase::AddSegment(Int_t index)
{
//
- // add segment to array
+ // Add a segment to the array
//
- if (fSegment==0) return 0;
- if (fClass==0) return 0;
- // AliTRDsegmentID * segment = (AliTRDsegmentID * )fClass->New();
- AliTRDsegmentID * segment = NewSegment();
- if (segment == 0) return 0;
+
+ if (fSegment == 0) return 0;
+ if (fClass == 0) return 0;
+
+ AliTRDsegmentID *segment = NewSegment();
+ if (segment == 0) return 0;
+
fSegment->AddAt(segment,index);
segment->SetID(index);
- fNSegment = fSegment->GetLast()+1;
+ fNSegment = fSegment->GetLast() + 1;
+
return segment;
+
}
//_____________________________________________________________________________
Bool_t AliTRDsegmentArrayBase::MakeArray(Int_t n)
{
//
- //make array of pointers to Segments
+ // Create an array of pointers to the segments
//
+
if (fSegment) {
fSegment->Delete();
delete fSegment;
}
- if (fTreeIndex) delete fTreeIndex;
- fSegment = new TObjArray(n);
+ if (fTreeIndex) delete fTreeIndex;
+
+ fSegment = new TObjArray(n);
fTreeIndex = new AliTRDarrayI;
fTreeIndex->Set(n);
- fNSegment=n;
- if ( (fSegment) && (fTreeIndex)) return kTRUE;
- else return kFALSE;
+ fNSegment = n;
+ if ((fSegment) && (fTreeIndex))
+ return kTRUE;
+ else
+ return kFALSE;
+
}
//_____________________________________________________________________________
void AliTRDsegmentArrayBase::ClearSegment(Int_t index)
{
//
- //remove segment from active memory
+ // Remove a segment from the active memory
//
+
if ((*fSegment)[index]){
- // (*fSegment)[index]->Delete(); //not working for TClonesArray
- delete (*fSegment)[index]; //because problem with deleting TClonesArray
+ delete (*fSegment)[index]; // because problem with deleting TClonesArray
fSegment->RemoveAt(index);
}
+
}
//_____________________________________________________________________________
void AliTRDsegmentArrayBase::MakeTree()
{
- // AliTRDsegmentID segment;
- AliTRDsegmentID * psegment = NewSegment();
+ //
+ // Create a tree for the segment
+ //
+
+ AliTRDsegmentID *psegment = NewSegment();
+
if (fTree) delete fTree;
- fTree = new TTree("Segment Tree","Tree with segments");
+ fTree = new TTree("Segment Tree","Tree with segments");
+
fBranch = fTree->Branch("Segment",psegment->IsA()->GetName(),&psegment,64000,1);
+
delete psegment;
+
}
//_____________________________________________________________________________
Bool_t AliTRDsegmentArrayBase::ConnectTree(const char * treeName)
{
- //connect tree from current directory
+ //
+ // Connect a tree from current directory
+ //
+
if (fTree){
delete fTree;
- fTree = 0;
+ fTree = 0;
fBranch = 0;
}
- fTree =(TTree*)gDirectory->Get(treeName);
- if (fTree == 0) return kFALSE;
+
+ fTree = (TTree*) gDirectory->Get(treeName);
+ if (fTree == 0) return kFALSE;
fBranch = fTree->GetBranch("Segment");
- if (fBranch==0) return kFALSE;
+ if (fBranch == 0) return kFALSE;
+
MakeDictionary(TMath::Max(fNSegment,Int_t(fTree->GetEntries())));
+
return kTRUE;
+
}
//_____________________________________________________________________________
AliTRDsegmentID *AliTRDsegmentArrayBase::LoadSegment(Int_t index)
{
//
- //load segment with index to the memory
- //
+ // Load a segment with index <index> into the memory
//
- if (fTreeIndex ==0 ) MakeDictionary(3000);
- //firstly try to load dictionary
- if (fTreeIndex ==0 ) return 0;
- if (fBranch==0) return 0;
- if (index>fTreeIndex->fN) return 0;
- AliTRDsegmentID *s = (AliTRDsegmentID*)(*fSegment)[index];
- if (s==0) s= NewSegment();
+
+ if (fTreeIndex == 0) MakeDictionary(3000);
+
+ // First try to load dictionary
+ if (fTreeIndex == 0) return 0;
+ if (fBranch == 0) return 0;
+ if (index > fTreeIndex->fN) return 0;
+ AliTRDsegmentID *s = (AliTRDsegmentID*) (*fSegment)[index];
+ if (s == 0) s = NewSegment();
s->SetID(index);
- // new AliTRDsegmentID(index);
- if (s!=0) {
- Int_t treeIndex =(*fTreeIndex)[index];
- if (treeIndex<1) return 0;
- else treeIndex--; //I don't like it Int table I have index shifted by 1
+ if (s != 0) {
+ Int_t treeIndex = (*fTreeIndex)[index];
+ if (treeIndex < 1)
+ return 0;
+ else
+ treeIndex--;
fBranch->SetAddress(&s);
fTree->GetEvent(treeIndex);
(*fSegment)[index] = (TObject*) s;
}
else
return 0;
+
return s;
- // AbstractMethod("LoadSegment");
+
}
//_____________________________________________________________________________
AliTRDsegmentID *AliTRDsegmentArrayBase::LoadEntry(Int_t index)
{
//
- //load segment at position inex in tree to the memory
+ // Load a segment at position <index> in the tree into the memory
//
- //
- if (fBranch==0) return 0;
- if (index>fTree->GetEntries()) return 0;
- AliTRDsegmentID * s = NewSegment();
-
+
+ if (fBranch == 0) return 0;
+ if (index > fTree->GetEntries()) return 0;
+
+ AliTRDsegmentID *s = NewSegment();
if (s) {
fBranch->SetAddress(&s);
fTree->GetEvent(index);
}
else
return 0;
+
Int_t nindex = s->GetID();
ClearSegment(nindex);
- (*fSegment)[nindex] = (TObject*) s;
+ (*fSegment)[nindex] = (TObject *) s;
+
return s;
- // AbstractMethod("LoadSegment");
+
}
+//_____________________________________________________________________________
void AliTRDsegmentArrayBase::StoreSegment(Int_t index)
{
//
- //make segment persistent
+ // Make a segment persistent
//
- const AliTRDsegmentID * segment = (*this)[index];
- if (segment == 0 ) return;
- if (fTree==0) MakeTree();
- fBranch->SetAddress(&segment);
+
+ const AliTRDsegmentID *kSegment = (*this)[index];
+ if (kSegment == 0) return;
+ if (fTree == 0) MakeTree();
+ fBranch->SetAddress(&kSegment);
fTree->Fill();
+
}
//_____________________________________________________________________________
Bool_t AliTRDsegmentArrayBase::MakeDictionary(Int_t size)
{
//
- //create index table for tree
+ // Create an index table for the tree
//
- if (size<1) return kFALSE;
+
+ if (size < 1) return kFALSE;
if (fTreeIndex) delete fTreeIndex;
+
fTreeIndex = new AliTRDarrayI();
fTreeIndex->Set(size);
- AliTRDsegmentID segment;
- AliTRDsegmentID * psegment = &segment;
+ AliTRDsegmentID segment;
+ AliTRDsegmentID *psegment = &segment;
+
fBranch->SetAddress(&psegment);
- TBranch * brindix = fTree->GetBranch("fSegmentID");
- Int_t nevent = (Int_t)fTree->GetEntries();
- for (Int_t i = 0; i<nevent; i++){
+ TBranch *brindix = fTree->GetBranch("fSegmentID");
+
+ Int_t nevent = (Int_t) fTree->GetEntries();
+ for (Int_t i = 0; i < nevent; i++){
brindix->GetEvent(i);
- Int_t treeIndex=segment.GetID();
- if (fTreeIndex->fN<treeIndex) fTreeIndex->Expand(Int_t(Float_t(treeIndex)*1.5)+1);
- // Int_t index = segment.GetID();
- (*fTreeIndex)[treeIndex]=i+1; // MI 19.5. I'm sorry -index 0 couldn't be use in AliTRDarrayI
+ Int_t treeIndex = segment.GetID();
+ if (fTreeIndex->fN < treeIndex)
+ fTreeIndex->Expand(Int_t (Float_t(treeIndex) * 1.5) + 1);
+ (*fTreeIndex)[treeIndex] = i + 1;
}
+
return kTRUE;
+
}
//_____________________________________________________________________________
-const AliTRDsegmentID* AliTRDsegmentArrayBase::operator[](Int_t i)
+const AliTRDsegmentID * AliTRDsegmentArrayBase::operator[](Int_t i)
{
//
- //return segment with given index
+ // Returns a segment with the given index <i>
//
- if ( (i<0) || (i>=fNSegment)) return 0;
- return (AliTRDsegmentID *)fSegment->At(i);
+
+ if ((i < 0) || (i >= fNSegment)) return 0;
+ return (AliTRDsegmentID *) fSegment->At(i);
+
}
//_____________________________________________________________________________
-const AliTRDsegmentID* AliTRDsegmentArrayBase::At(Int_t i)
+const AliTRDsegmentID *AliTRDsegmentArrayBase::At(Int_t i)
{
//
- //return segment with given index
+ // Returns a segment with the given index <i>
//
- if ( (i<0) || (i>=fNSegment)) return 0;
+
+ if ((i < 0) || (i >= fNSegment)) return 0;
return (AliTRDsegmentID *)((*fSegment)[i]);
+
}
-#ifndef ALISEGARRAYBASE_H
-#define ALISEGARRAYBASE_H
+#ifndef ALITRDSEGMENTARRAYBASE_H
+#define ALITRDSEGMENTARRAYBASE_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id: AliTRDsegmentArrayBase.h,v */
////////////////////////////////////////////////
-// Manager class generaol Alice segment
-// segment is for example one pad row in TPC //
+// Manager class for a general Alice segment //
////////////////////////////////////////////////
#include "TNamed.h"
#include "TError.h"
#include "TObjArray.h"
-//#include "AliTRDsegmentID.h"
-
class TTree;
class TBranch;
class AliTRDarrayI;
class AliTRDsegmentID;
class TObjArray;
-class AliTRDsegmentArrayBase: public TNamed{
-public:
+class AliTRDsegmentArrayBase: public TNamed {
+
+ public:
+
AliTRDsegmentArrayBase();
- AliTRDsegmentArrayBase(Text_t *classname, Int_t n); //
- Bool_t SetClass(Text_t *classname); //set class of stored object
- ~AliTRDsegmentArrayBase();
- const AliTRDsegmentID * At(Int_t i); //return pointer to segment with index i
- const AliTRDsegmentID * operator[](Int_t i); //return pointer to segment with index i
-
- Bool_t AddSegment(AliTRDsegmentID *segment); // add segment to array
- AliTRDsegmentID * AddSegment(Int_t index); //create objet and set index
- Bool_t MakeArray(Int_t n); //make array of pointers to Segments
- void ClearSegment(Int_t index); //remove segment from active
- virtual AliTRDsegmentID * NewSegment(); //dynamicaly create new segment
- //input output functions
- TTree * GetTree(){return fTree;} //return pointer to connected tree
-
- virtual void MakeTree(); //Make tree with the name
- virtual Bool_t ConnectTree(const char * treeName); //connect tree from current directory
- virtual AliTRDsegmentID * LoadSegment(Int_t index);//load segment with index to the memory
- virtual AliTRDsegmentID * LoadEntry(Int_t index); //load segment entry from position index in tree
- virtual void StoreSegment(Int_t index);//write segmen persistent
- Bool_t MakeDictionary(Int_t size);//create index table for tree
- TClass * GetClass() {return fClass;}
-public:
- TObjArray * fSegment; //!pointer to array of pointers to segment
- AliTRDarrayI * fTreeIndex; //!pointers(index) table in tree
- Int_t fNSegment;
- TTree * fTree; //!tree with segment objects
- TBranch * fBranch; //!total branch
-private:
- TClass * fClass; //!class type of included objects
- ClassDef(AliTRDsegmentArrayBase,1)
+ AliTRDsegmentArrayBase(Text_t *classname, Int_t n);
+ AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a);
+ virtual ~AliTRDsegmentArrayBase();
+
+ const AliTRDsegmentID *At(Int_t i);
+ const AliTRDsegmentID *operator[](Int_t i);
+
+ Bool_t AddSegment(AliTRDsegmentID *segment);
+ AliTRDsegmentID *AddSegment(Int_t index);
+ void ClearSegment(Int_t index);
+ virtual void Copy(AliTRDsegmentArrayBase &a);
+ virtual Bool_t ConnectTree(const char *treeName);
+ Bool_t MakeArray(Int_t n);
+ virtual AliTRDsegmentID *NewSegment();
+ virtual void MakeTree();
+ virtual AliTRDsegmentID *LoadSegment(Int_t index);
+ virtual AliTRDsegmentID *LoadEntry(Int_t index);
+ virtual void StoreSegment(Int_t index);
+ Bool_t MakeDictionary(Int_t size);
+
+ Bool_t SetClass(Text_t *classname);
+
+ TClass *GetClass() { return fClass; };
+ TTree *GetTree() { return fTree; };
+
+ inline AliTRDsegmentArrayBase &operator=(AliTRDsegmentArrayBase &a);
+
+ protected:
+
+ TObjArray *fSegment; //! Pointer to an array of pointers to a segment
+ AliTRDarrayI *fTreeIndex; //! Pointers(index) table
+ Int_t fNSegment; // Number of segments
+ TTree *fTree; //! Tree with segment objects
+ TBranch *fBranch; //! Branchaddress
+ TClass *fClass; //! Class type of included objects
+
+ ClassDef(AliTRDsegmentArrayBase,1) // TRD detextor segment array base class
+
};
-#endif //ALISEGARRAY_H
+//_____________________________________________________________________________
+AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
+ ::operator=(AliTRDsegmentArrayBase &a)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &a) a.Copy(*this);
+ return *this;
+
+}
+
+#endif
/*
$Log$
+Revision 1.1 2000/02/28 19:03:35 cblume
+Add new TRD classes
+
*/
///////////////////////////////////////////////////////////////////////////////
-// //
-// Alice AliSementID object //
-//
-// //
-// //
+// Base class for a detector segment //
///////////////////////////////////////////////////////////////////////////////
#include "AliTRDsegmentID.h"
ClassImp(AliTRDsegmentID)
-AliTRDsegmentID::AliTRDsegmentID()
+//_____________________________________________________________________________
+AliTRDsegmentID::AliTRDsegmentID():TObject()
+{
+ //
+ // AliTRDsegmentID default constructor
+ //
+
+ fSegmentID = 0;
+
+}
+
+//_____________________________________________________________________________
+AliTRDsegmentID::AliTRDsegmentID(Int_t index):TObject()
{
+ //
+ // Defines a detector segment
+ //
+
+ fSegmentID = index;
+
+}
+
+//_____________________________________________________________________________
+AliTRDsegmentID::~AliTRDsegmentID()
+{
+ //
+ // AliTRDsegmentID destructor
+ //
+
}
/* $Id: AliTRDsegmentID.h,v */
////////////////////////////////////////////////
-// Manager class generaol Alice segment
-// segment is for example one pad row in TPC //
+// Base class for a detector segment //
////////////////////////////////////////////////
#include "TObject.h"
-class AliTRDsegmentID: public TObject{
-public:
+class AliTRDsegmentID : public TObject {
+
+ public:
+
AliTRDsegmentID();
- AliTRDsegmentID(Int_t index){fSegmentID = index;}
- Int_t GetID() {return fSegmentID;}
- void SetID(Int_t index){fSegmentID = index;}
- virtual Int_t GetSize() {return sizeof(*this);} //function which return size of object
-protected:
- Int_t fSegmentID; //identification number of Segment
- ClassDef(AliTRDsegmentID,1)
+ AliTRDsegmentID(Int_t index);
+ virtual ~AliTRDsegmentID();
+
+ Int_t GetID() { return fSegmentID; }
+ virtual Int_t GetSize() { return sizeof(*this); }
+
+ void SetID(Int_t index) { fSegmentID = index;}
+
+ protected:
+
+ Int_t fSegmentID; // Identification number of a segment
+
+ ClassDef(AliTRDsegmentID,1) // Detector segment base class
+
};
-#endif //ALISEGMENTID_H
+#endif
/*
$Log$
+Revision 1.15 2000/06/07 16:25:37 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.14 2000/02/28 19:10:26 cblume
Include the new TRD classes
#include "AliTRDgeometry.h"
ClassImp(AliTRDv0)
-
+
+//_____________________________________________________________________________
+AliTRDv0::AliTRDv0():AliTRD()
+{
+ //
+ // AliTRDv0 default constructor
+ //
+
+ fIdSens = 0;
+ fHitsOn = 0;
+
+ fIdChamber1 = 0;
+ fIdChamber2 = 0;
+ fIdChamber3 = 0;
+
+}
+
//_____________________________________________________________________________
AliTRDv0::AliTRDv0(const char *name, const char *title)
:AliTRD(name, title)
}
+//_____________________________________________________________________________
+AliTRDv0::~AliTRDv0()
+{
+ //
+ // AliTRDv0 destructor
+ //
+
+}
+
//_____________________________________________________________________________
void AliTRDv0::CreateGeometry()
{
//
// Check that FRAME is there otherwise we have no place where to put the TRD
- AliModule* FRAME = gAlice->GetModule("FRAME");
- if (!FRAME) return;
+ AliModule* frame = gAlice->GetModule("FRAME");
+ if (!frame) return;
// Define the chambers
AliTRD::CreateGeometry();
-#ifndef TRDv0_H
-#define TRDv0_H
+#ifndef ALITRDV0_H
+#define ALITRDV0_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
- AliTRDv0() {};
+ AliTRDv0();
AliTRDv0(const char *name, const char *title);
- ~AliTRDv0() {};
+ virtual ~AliTRDv0();
+
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual Int_t IsVersion() const { return 0; };
Int_t fIdSens; // Sensitive volume identifier
Int_t fIdChamber1; // Driftchamber volume identifier
- Int_t fIdChamber2; //
- Int_t fIdChamber3; //
+ Int_t fIdChamber2; // Driftchamber volume identifier
+ Int_t fIdChamber3; // Driftchamber volume identifier
Int_t fHitsOn; // Used to switch hits on
/*
$Log$
+Revision 1.19 2000/06/07 16:27:32 cblume
+Try to remove compiler warnings on Sun and HP
+
Revision 1.18 2000/05/08 16:17:27 cblume
Merge TRD-develop
ClassImp(AliTRDv1)
+
+//_____________________________________________________________________________
+AliTRDv1::AliTRDv1():AliTRD()
+{
+ //
+ // Default constructor
+ //
+
+ fIdSens = 0;
+
+ fIdChamber1 = 0;
+ fIdChamber2 = 0;
+ fIdChamber3 = 0;
+
+ fSensSelect = 0;
+ fSensPlane = -1;
+ fSensChamber = -1;
+ fSensSector = -1;
+ fSensSectorRange = 0;
+
+ fDeltaE = NULL;
+
+}
+
//_____________________________________________________________________________
AliTRDv1::AliTRDv1(const char *name, const char *title)
:AliTRD(name, title)
fSensPlane = -1;
fSensChamber = -1;
fSensSector = -1;
- fSensSectorRange = 0;
+ fSensSectorRange = 0;
fDeltaE = NULL;
}
+//_____________________________________________________________________________
+AliTRDv1::AliTRDv1(AliTRDv1 &trd)
+{
+ //
+ // Copy constructor
+ //
+
+ trd.Copy(*this);
+
+}
+
//_____________________________________________________________________________
AliTRDv1::~AliTRDv1()
{
}
+
+//_____________________________________________________________________________
+void AliTRDv1::Copy(AliTRDv1 &trd)
+{
+ //
+ // Copy function
+ //
+
+ trd.fIdSens = fIdSens;
+
+ trd.fIdChamber1 = fIdChamber1;
+ trd.fIdChamber2 = fIdChamber2;
+ trd.fIdChamber3 = fIdChamber3;
+
+ trd.fSensSelect = fSensSelect;
+ trd.fSensPlane = fSensPlane;
+ trd.fSensChamber = fSensChamber;
+ trd.fSensSector = fSensSector;
+ trd.fSensSectorRange = fSensSectorRange;
+
+ trd.fDeltaE = NULL;
+
+}
+
//_____________________________________________________________________________
void AliTRDv1::CreateGeometry()
{
//
// Check that FRAME is there otherwise we have no place where to put the TRD
- AliModule* FRAME = gAlice->GetModule("FRAME");
- if (!FRAME) return;
+ AliModule* frame = gAlice->GetModule("FRAME");
+ if (!frame) return;
// Define the chambers
AliTRD::CreateGeometry();
// Maximum energy (50 keV);
const Float_t kEend = 50000.0;
// Ermilova distribution for the delta-ray spectrum
- Float_t Poti = TMath::Log(kPoti);
- Float_t Eend = TMath::Log(kEend);
- fDeltaE = new TF1("deltae",Ermilova,Poti,Eend,0);
+ Float_t poti = TMath::Log(kPoti);
+ Float_t eEnd = TMath::Log(kEend);
+ fDeltaE = new TF1("deltae",Ermilova,poti,eEnd,0);
// Identifier of the sensitive volume (drift region)
fIdSens = gMC->VolId("UL05");
const Float_t kPoti = 12.1;
// PDG code electron
- const Int_t pdgElectron = 11;
+ const Int_t kPdgElectron = 11;
// Set the maximum step size to a very large number for all
// neutral particles and those outside the driftvolume
gMC->TrackMomentum(mom);
pTot = mom.Rho();
iPdg = TMath::Abs(gMC->TrackPid());
- if ( (iPdg != pdgElectron) ||
- ((iPdg == pdgElectron) && (pTot < kPTotMax))) {
+ if ( (iPdg != kPdgElectron) ||
+ ((iPdg == kPdgElectron) && (pTot < kPTotMax))) {
aMass = gMC->TrackMass();
betaGamma = pTot / aMass;
pp = kPrim * BetheBloch(betaGamma);
Int_t pos1, pos2;
- const Int_t nV = 31;
+ const Int_t kNv = 31;
- Float_t vxe[nV] = { 2.3026, 2.9957, 3.4012, 3.6889, 3.9120
- , 4.0943, 4.2485, 4.3820, 4.4998, 4.6052
- , 4.7005, 5.0752, 5.2983, 5.7038, 5.9915
- , 6.2146, 6.5221, 6.9078, 7.3132, 7.6009
- , 8.0064, 8.5172, 8.6995, 8.9872, 9.2103
- , 9.4727, 9.9035,10.3735,10.5966,10.8198
- ,11.5129 };
+ Float_t vxe[kNv] = { 2.3026, 2.9957, 3.4012, 3.6889, 3.9120
+ , 4.0943, 4.2485, 4.3820, 4.4998, 4.6052
+ , 4.7005, 5.0752, 5.2983, 5.7038, 5.9915
+ , 6.2146, 6.5221, 6.9078, 7.3132, 7.6009
+ , 8.0064, 8.5172, 8.6995, 8.9872, 9.2103
+ , 9.4727, 9.9035,10.3735,10.5966,10.8198
+ ,11.5129 };
- Float_t vye[nV] = { 80.0 , 31.0 , 23.3 , 21.1 , 21.0
- , 20.9 , 20.8 , 20.0 , 16.0 , 11.0
- , 8.0 , 6.0 , 5.2 , 4.6 , 4.0
- , 3.5 , 3.0 , 1.4 , 0.67 , 0.44
- , 0.3 , 0.18 , 0.12 , 0.08 , 0.056
- , 0.04 , 0.023, 0.015, 0.011, 0.01
- , 0.004 };
+ Float_t vye[kNv] = { 80.0 , 31.0 , 23.3 , 21.1 , 21.0
+ , 20.9 , 20.8 , 20.0 , 16.0 , 11.0
+ , 8.0 , 6.0 , 5.2 , 4.6 , 4.0
+ , 3.5 , 3.0 , 1.4 , 0.67 , 0.44
+ , 0.3 , 0.18 , 0.12 , 0.08 , 0.056
+ , 0.04 , 0.023, 0.015, 0.011, 0.01
+ , 0.004 };
energy = x[0];
}
while (dpos > 0);
pos2--;
- if (pos2 > nV) pos2 = nV;
+ if (pos2 > kNv) pos2 = kNv;
pos1 = pos2 - 1;
// Differentiate between the sampling points
-#ifndef TRDv1_H
-#define TRDv1_H
+#ifndef ALITRDV1_H
+#define ALITRDV1_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
public:
- AliTRDv1() {};
+ AliTRDv1();
AliTRDv1(const char *name, const char *title);
- ~AliTRDv1();
+ AliTRDv1(AliTRDv1 &trd);
+ virtual ~AliTRDv1();
+
+ virtual void Copy(AliTRDv1 &trd);
virtual void CreateGeometry();
virtual void CreateMaterials();
- virtual Int_t IsVersion() const { return 1; };
+ virtual Int_t IsVersion() const { return 1; };
virtual void StepManager();
virtual void Init();
void SetSensSector(Int_t isector);
void SetSensSector(Int_t isector, Int_t nsector);
- Int_t GetSensPlane() { return fSensPlane; };
- Int_t GetSensChamber() { return fSensChamber; };
- Int_t GetSensSector() { return fSensSector; };
+ Int_t GetSensPlane() { return fSensPlane; };
+ Int_t GetSensChamber() { return fSensChamber; };
+ Int_t GetSensSector() { return fSensSector; };
Int_t GetSensSectorRange() { return fSensSectorRange; };
+ inline AliTRDv1 &operator=(AliTRDv1 &trd);
+
protected:
Int_t fIdSens; // Sensitive volume identifier
Int_t fIdChamber1; // Driftchamber volume identifier
- Int_t fIdChamber2; //
- Int_t fIdChamber3; //
+ Int_t fIdChamber2; // Driftchamber volume identifier
+ Int_t fIdChamber3; // Driftchamber volume identifier
Int_t fSensSelect; // Switch to select only parts of the detector
Int_t fSensPlane; // Sensitive detector plane
};
+//_____________________________________________________________________________
+AliTRDv1 &AliTRDv1::operator=(AliTRDv1 &trd)
+{
+ //
+ // Assignment operator
+ //
+
+ if (this != &trd) trd.Copy(*this);
+ return *this;
+
+}
+
#endif