Make code compliant to coding conventions
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Jun 2000 18:33:06 +0000 (18:33 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Jun 2000 18:33:06 +0000 (18:33 +0000)
48 files changed:
TRD/AliTRD.cxx
TRD/AliTRD.h
TRD/AliTRDarrayF.cxx
TRD/AliTRDarrayF.h
TRD/AliTRDarrayI.cxx
TRD/AliTRDarrayI.h
TRD/AliTRDclusterizer.cxx
TRD/AliTRDclusterizer.h
TRD/AliTRDclusterizerV0.cxx
TRD/AliTRDclusterizerV0.h
TRD/AliTRDclusterizerV1.cxx
TRD/AliTRDclusterizerV1.h
TRD/AliTRDdataArray.cxx
TRD/AliTRDdataArray.h
TRD/AliTRDdataArrayF.cxx
TRD/AliTRDdataArrayF.h
TRD/AliTRDdataArrayI.cxx
TRD/AliTRDdataArrayI.h
TRD/AliTRDdigit.cxx
TRD/AliTRDdigit.h
TRD/AliTRDdigitizer.cxx
TRD/AliTRDdigitizer.h
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDdigitsManager.h
TRD/AliTRDgeometry.cxx
TRD/AliTRDgeometry.h
TRD/AliTRDgeometryFull.cxx
TRD/AliTRDgeometryFull.h
TRD/AliTRDgeometryHole.cxx
TRD/AliTRDgeometryHole.h
TRD/AliTRDhit.cxx
TRD/AliTRDhit.h
TRD/AliTRDmatrix.cxx
TRD/AliTRDmatrix.h
TRD/AliTRDpixel.cxx
TRD/AliTRDpixel.h
TRD/AliTRDrecPoint.cxx
TRD/AliTRDrecPoint.h
TRD/AliTRDsegmentArray.cxx
TRD/AliTRDsegmentArray.h
TRD/AliTRDsegmentArrayBase.cxx
TRD/AliTRDsegmentArrayBase.h
TRD/AliTRDsegmentID.cxx
TRD/AliTRDsegmentID.h
TRD/AliTRDv0.cxx
TRD/AliTRDv0.h
TRD/AliTRDv1.cxx
TRD/AliTRDv1.h

index 21a0ed58d3890db4281dfbdb7304de2ebcc69d9d..9c176e2133ec7a29773eb58f360dbe33b459d0eb 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -104,18 +107,18 @@ AliTRD::AliTRD(const char *name, const char *title)
 
   // 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();
   }
@@ -142,6 +145,17 @@ AliTRD::AliTRD(const char *name, const char *title)
 
 }
 
+//_____________________________________________________________________________
+AliTRD::AliTRD(AliTRD &trd)
+{
+  //
+  // Copy constructor
+  //
+
+  trd.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRD::~AliTRD()
 {
@@ -164,16 +178,16 @@ void AliTRD::AddRecPoint(Float_t *pos, Int_t *digits, Int_t det, Float_t amp)
   // 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);
 
 }
 
@@ -190,7 +204,7 @@ void AliTRD::AddDigit(Int_t *digits, Int_t *amp)
 }
 
 //_____________________________________________________________________________
-void AliTRD::AddHit(Int_t track, Int_tdet, Float_t *hits)
+void AliTRD::AddHit(Int_t track, Int_t *det, Float_t *hits)
 {
   //
   // Add a hit for the TRD
@@ -208,12 +222,12 @@ void AliTRD::BuildGeometry()
   // 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);
@@ -223,13 +237,29 @@ void AliTRD::BuildGeometry()
   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()
 {
@@ -238,8 +268,8 @@ 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;
   }
@@ -256,8 +286,8 @@ void AliTRD::CreateMaterials()
   // 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. };
@@ -353,53 +383,53 @@ void AliTRD::CreateMaterials()
   //////////////////////////////////////////////////////////////////////////
 
   // 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);
 
 }
@@ -521,9 +551,9 @@ void AliTRD::MakeBranch(Option_t* option)
 
   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);
index 08cd9bf2f44841089f8db0c8792be94340a2a2ee..ceab60cbcb25959951697378d1681ce511a57faa 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -24,11 +24,14 @@ class AliTRD : public AliDetector {
 
   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();
@@ -58,6 +61,8 @@ class AliTRD : public AliDetector {
   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
@@ -71,4 +76,16 @@ class AliTRD : public AliDetector {
 
 };
 
+//_____________________________________________________________________________
+AliTRD &AliTRD::operator=(AliTRD &trd)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &trd) trd.Copy(*this);
+  return *this;
+
+}
+
 #endif
index c9673677af50faea6e5715737ca3891e50cabcc8..223375dabf88660fbba0144ae0f5e3e2924cefc6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -44,6 +47,18 @@ AliTRDarrayF::~AliTRDarrayF()
 
 }
 
+//_____________________________________________________________________________
+void AliTRDarrayF::Copy(AliTRDarrayF &a)
+{
+  //
+  // Copy function
+  //
+
+  TObject::Copy(a);
+  TArrayF::Copy(a);
+
+}
+
 //_____________________________________________________________________________
 void AliTRDarrayF::Expand(Int_t n)
 {
index e580d550fd9b254105e69dd06b516fb524659522..15bc52ef9e6cd254bb2deab1a9122e98dd7e9f10 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -13,6 +13,7 @@ class AliTRDarrayF: public TObject ,public TArrayF {
 public:
 
   ~AliTRDarrayF();
+  void Copy(AliTRDarrayF &a);
   void Expand(Int_t n);  
 
   ClassDef(AliTRDarrayF,1)  
index 5293c057977b58ec04e0f94556e32b816f7ee273..ace0b347684b75e1f74a48029c240024a65860f6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -47,6 +50,19 @@ AliTRDarrayI::~AliTRDarrayI()
 
 }
 
+//_____________________________________________________________________________
+void AliTRDarrayI::Copy(AliTRDarrayI &a)
+{
+  //
+  // Copy function
+  //
+
+  TObject::Copy(a);
+  TArrayI::Copy(a);
+
+}
+
+
 //_____________________________________________________________________________
 void AliTRDarrayI::Expand(Int_t n)
 {
index fdae3ec1d4a9860b958d6ec556f88681185a46e9..be1a2e1bd618ffb76cd06256fd8c1a4db64e9ad5 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -13,6 +13,7 @@ class AliTRDarrayI: public TObject ,public TArrayI {
 public:
 
   ~AliTRDarrayI();
+  void Copy(AliTRDarrayI &a);
   void Expand(Int_t n);  
 
   ClassDef(AliTRDarrayI,1)  
index 2bc4b35c6076011e134153d021209ede64008401..b51dd38ee63abecd88a680a7e1fc8daf2dd153f6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -63,9 +66,23 @@ AliTRDclusterizer::AliTRDclusterizer(const Text_t* name, const Text_t* title)
 
 }
 
+//_____________________________________________________________________________
+AliTRDclusterizer::AliTRDclusterizer(AliTRDclusterizer &c)
+{
+  //
+  // AliTRDclusterizer copy constructor
+  //
+
+  c.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDclusterizer::~AliTRDclusterizer()
 {
+  //
+  // AliTRDclusterizer destructor
+  //
 
   if (fInputFile) {
     fInputFile->Close();
@@ -74,6 +91,18 @@ AliTRDclusterizer::~AliTRDclusterizer()
 
 }
 
+//_____________________________________________________________________________
+void AliTRDclusterizer::Copy(AliTRDclusterizer &c)
+{
+  //
+  // Copy function
+  //
+
+  c.fInputFile = NULL;
+  c.fEvent     = 0;  
+
+}
+
 //_____________________________________________________________________________
 void AliTRDclusterizer::Init()
 {
index 8e0778dbe34ed9d97a0fec9825e86715f03e38e7..ab3089c96c5337bc965c002f50599aa402b8c395 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -18,8 +18,11 @@ class AliTRDclusterizer : public TNamed {
 
   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;
@@ -35,4 +38,16 @@ class AliTRDclusterizer : public TNamed {
 
 };
 
+//_____________________________________________________________________________
+AliTRDclusterizer &AliTRDclusterizer::operator=(AliTRDclusterizer &c)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &c) c.Copy(*this);
+  return *this;
+
+}
+
 #endif
index 812f500fdb87de1418911854ed8b45af4e55e2e5..789ebd613289bd5f91701eeec4b62f85779006f1 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -73,6 +76,9 @@ AliTRDclusterizerV0::AliTRDclusterizerV0(const Text_t* name, const Text_t* title
 //_____________________________________________________________________________
 AliTRDclusterizerV0::~AliTRDclusterizerV0()
 {
+  //
+  // AliTRDclusterizerV0 destructor
+  //
 
 }
 
@@ -98,72 +104,72 @@ Bool_t AliTRDclusterizerV0::MakeCluster()
   //
 
   // 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) ||
@@ -172,58 +178,60 @@ Bool_t AliTRDclusterizerV0::MakeCluster()
 
             // 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);
              }
            }
          }
@@ -233,11 +241,11 @@ Bool_t AliTRDclusterizerV0::MakeCluster()
           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);
@@ -265,24 +273,24 @@ Bool_t AliTRDclusterizerV0::MakeCluster()
           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;
 
index b5d84e7590125318f01786be98dfe54dd751c0ec..c3297d75a0f5f3b1897c107ed75b07d64d549a08 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -18,7 +18,7 @@ class AliTRDclusterizerV0 : public AliTRDclusterizer {
 
   AliTRDclusterizerV0();
   AliTRDclusterizerV0(const Text_t* name, const Text_t* title);
-  ~AliTRDclusterizerV0();
+  virtual ~AliTRDclusterizerV0();
 
   virtual void    Init();
   virtual Bool_t  MakeCluster();
index d1645e5e0bb3c84970994ad5b4e7c9e16b4096e4..8d515119274525963de03fbe136c72a28760eb61 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -68,9 +71,23 @@ AliTRDclusterizerV1::AliTRDclusterizerV1(const Text_t* name, const Text_t* title
 
 }
 
+//_____________________________________________________________________________
+AliTRDclusterizerV1::AliTRDclusterizerV1(AliTRDclusterizerV1 &c)
+{
+  //
+  // AliTRDclusterizerV1 copy constructor
+  //
+
+  c.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDclusterizerV1::~AliTRDclusterizerV1()
 {
+  //
+  // AliTRDclusterizerV1 destructor
+  //
 
   if (fDigitsManager) {
     delete fDigitsManager;
@@ -78,6 +95,22 @@ AliTRDclusterizerV1::~AliTRDclusterizerV1()
 
 }
 
+//_____________________________________________________________________________
+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()
 {
@@ -120,20 +153,20 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
   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
@@ -141,21 +174,21 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
   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;
@@ -166,9 +199,9 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
     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;
@@ -176,16 +209,16 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
             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
@@ -195,15 +228,15 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
                                                      ,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) {
@@ -248,18 +281,18 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
                   && (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);
                 }
@@ -273,7 +306,7 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
                     }
 
                     // unfold:
-                    ratio = Unfold(epsilon, padSignal);
+                    ratio = Unfold(kEpsilon, padSignal);
 
                     // set signal on overlapping pad to ratio
                     clusterSignal[2] *= ratio;
@@ -319,7 +352,7 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
                                         + clusterSignal[2];
 
                 // Add the cluster to the output array 
-                TRD->AddRecPoint(clusterPads,clusterDigit,idet,clusterCharge);
+                trd->AddRecPoint(clusterPads,clusterDigit,idet,clusterCharge);
 
               }
             }  // time
@@ -338,15 +371,15 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
 
   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");
 
@@ -416,12 +449,12 @@ Float_t AliTRDclusterizerV1::PadResponse(Float_t x)
   //
 
   // 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);
 
index a43edc8a190a8ef64bd35f12e34712877243cadb..614cca7c4ed11a45547ff844f98aaad953bca772 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -19,8 +19,10 @@ class AliTRDclusterizerV1 : public AliTRDclusterizer {
 
   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();
@@ -33,6 +35,8 @@ class AliTRDclusterizerV1 : public AliTRDclusterizer {
   virtual Float_t GetClusSigThresh()                        { return fClusSigThresh; };
   virtual Int_t   GetClusMethod()                           { return fClusMethod;    };
 
+  inline  AliTRDclusterizerV1 &operator=(AliTRDclusterizerV1 &c);
+
  protected:
 
   AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
@@ -50,4 +54,16 @@ class AliTRDclusterizerV1 : public AliTRDclusterizer {
 
 };
 
+//_____________________________________________________________________________
+AliTRDclusterizerV1 &AliTRDclusterizerV1::operator=(AliTRDclusterizerV1 &c)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &c) c.Copy(*this);
+  return *this;
+
+}
+
 #endif
index e50ea729ee48633e43b894472a13a56f608e1f3b..759014a488c34520369c5d9ef3b7cc47d7b9690d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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>
 
@@ -79,17 +82,53 @@ AliTRDdataArray::AliTRDdataArray(Int_t nrow, Int_t ncol, Int_t ntime)
 
 }
 
+//_____________________________________________________________________________
+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)
 {
index 4f7733c95c2a8bc3fc6f5bce39197f6bb3de52ae..81069cec371e347dc04c6de11a0bfe7b006b5707 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
@@ -21,8 +21,10 @@ class AliTRDdataArray : public AliTRDsegmentID {
 
   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();
 
@@ -31,6 +33,7 @@ class AliTRDdataArray : public AliTRDsegmentID {
   virtual Int_t  GetNtime()                    { return fNtime;      };
 
           Int_t  GetIndex(Int_t row, Int_t col, Int_t time);
+  inline  AliTRDdataArray &operator=(AliTRDdataArray &d);
 
  protected:
 
@@ -57,8 +60,7 @@ class AliTRDdataArray : public AliTRDsegmentID {
 };
  
 //_____________________________________________________________________________
-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
@@ -76,8 +78,7 @@ inline Bool_t AliTRDdataArray::CheckBounds(const char *where
 }
 
 //_____________________________________________________________________________
-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.
@@ -90,5 +91,17 @@ inline Bool_t AliTRDdataArray::OutOfBoundsError(const char *where
 
 }
 
+//_____________________________________________________________________________
+AliTRDdataArray &AliTRDdataArray::operator=(AliTRDdataArray &d)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &d) d.Copy(*this);
+  return *this;
+
+}
+
 #endif
 
index 0f1c6060442e23229d58e529e7f2a92afd6db78b..aa1eb0ebcaba63a04b9aa106a32fc9ce7a6f5ff3 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -55,6 +58,17 @@ AliTRDdataArrayF::AliTRDdataArrayF(Int_t nrow, Int_t ncol, Int_t ntime)
   
 }
 
+//_____________________________________________________________________________
+AliTRDdataArrayF::AliTRDdataArrayF(AliTRDdataArrayF &a)
+{
+  //
+  // AliTRDdataArrayF copy constructor
+  //
+
+  a.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDdataArrayF::~AliTRDdataArrayF()
 {
@@ -84,6 +98,21 @@ void AliTRDdataArrayF::Allocate(Int_t nrow, Int_t ncol, Int_t ntime)
 
 }
 
+//_____________________________________________________________________________
+void AliTRDdataArrayF::Copy(AliTRDdataArrayF &a)
+{
+  //
+  // Copy function
+  //
+
+  fElements->Copy(*a.fElements);
+
+  a.fThreshold = fThreshold;
+
+  AliTRDdataArray::Copy(a);
+
+}
+
 //_____________________________________________________________________________
 void AliTRDdataArrayF::Reset() 
 { 
@@ -288,9 +317,9 @@ void AliTRDdataArrayF::Expand1()
 
   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) {
@@ -392,8 +421,8 @@ void AliTRDdataArrayF::Expand2()
 
   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); 
@@ -421,6 +450,9 @@ void AliTRDdataArrayF::Expand2()
 //_____________________________________________________________________________
 void AliTRDdataArrayF::Compress2()
 {
+  //
+  // Compress a buffer of type 2 - not implemented!
+  //
 
 }
 
index a2a4f13044ea2a56ec12908571bc36ad4be11236..93740e7090ce985a174f926c8cab14b2b713fcef 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
@@ -22,9 +22,11 @@ class AliTRDdataArrayF : public AliTRDdataArray {
 
   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();
@@ -42,6 +44,8 @@ class AliTRDdataArrayF : public AliTRDdataArray {
   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); 
@@ -64,9 +68,8 @@ class AliTRDdataArrayF : public AliTRDdataArray {
 
 };
  
-
-//_____________________________________________________________________________
-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
@@ -77,8 +80,7 @@ inline Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
 }
 
 //_____________________________________________________________________________
-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
@@ -102,7 +104,7 @@ inline void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time
 }
 
 //_____________________________________________________________________________
-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
@@ -119,5 +121,17 @@ inline void  AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value
 
 }
 
+//_____________________________________________________________________________
+AliTRDdataArrayF &AliTRDdataArrayF::operator=(AliTRDdataArrayF &a)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &a) a.Copy(*this);
+  return *this;
+
+}
+
 #endif
 
index b6dff588eb2ca3dcd0274dc4f7bdf2bd1958423d..4d5dc91ca9f5de04724d5a935c74691634e60804 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -55,6 +58,17 @@ AliTRDdataArrayI::AliTRDdataArrayI(Int_t nrow, Int_t ncol, Int_t ntime)
   
 }
 
+//_____________________________________________________________________________
+AliTRDdataArrayI::AliTRDdataArrayI(AliTRDdataArrayI &a)
+{
+  //
+  // AliTRDdataArrayI copy constructor
+  //
+
+  a.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDdataArrayI::~AliTRDdataArrayI()
 {
@@ -83,6 +97,21 @@ void AliTRDdataArrayI::Allocate(Int_t nrow, Int_t ncol, Int_t ntime)
 
 }
 
+//_____________________________________________________________________________
+void AliTRDdataArrayI::Copy(AliTRDdataArrayI &a)
+{
+  //
+  // Copy function
+  //
+
+  fElements->Copy(*a.fElements);
+
+  a.fThreshold = fThreshold;
+
+  AliTRDdataArray::Copy(a);
+
+}
+
 //_____________________________________________________________________________
 void AliTRDdataArrayI::Reset() 
 { 
@@ -287,9 +316,9 @@ void AliTRDdataArrayI::Expand1()
 
   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) {
@@ -391,8 +420,8 @@ void AliTRDdataArrayI::Expand2()
 
   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); 
@@ -420,6 +449,9 @@ void AliTRDdataArrayI::Expand2()
 //_____________________________________________________________________________
 void AliTRDdataArrayI::Compress2()
 {
+  //
+  // Compress a buffer of type 2 - not implemented!
+  //
 
 }
 
index 88ae230c506152a500832c0a6bb8855bc6fc25e6..d189b26af1b5bba42c09a51e8f97c4164384c64c 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
@@ -22,9 +22,11 @@ class AliTRDdataArrayI : public AliTRDdataArray {
 
   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();
@@ -42,6 +44,8 @@ class AliTRDdataArrayI : public AliTRDdataArray {
   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); 
@@ -66,7 +70,7 @@ class AliTRDdataArrayI : public AliTRDdataArray {
  
 
 //_____________________________________________________________________________
-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
@@ -77,8 +81,7 @@ inline Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
 }
 
 //_____________________________________________________________________________
-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
@@ -102,7 +105,7 @@ inline void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time
 }
 
 //_____________________________________________________________________________
-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
@@ -119,5 +122,17 @@ inline void  AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
 
 }
 
+//_____________________________________________________________________________
+AliTRDdataArrayI &AliTRDdataArrayI::operator=(AliTRDdataArrayI &a)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &a) a.Copy(*this);
+  return *this;
+
+}
+
 #endif
 
index 3cc623e3ef9822ffad2256f1f73650e6978edcaa..fb79d86f8cf2cb4ee91fa4400017064aabe4f219 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -67,3 +70,12 @@ AliTRDdigit::AliTRDdigit(Bool_t isRaw, Int_t *digits, Int_t *amp):AliDigitNew()
   if (isRaw) SetBit(kRawDigit);
 
 }
+
+//_____________________________________________________________________________
+AliTRDdigit::~AliTRDdigit()
+{
+  //
+  // AliTRDdigit destructor
+  //
+
+}
index 87d7995e2938e4c372b5670e15c09f66406bc97d..de3fc903dca0d19992aa418c1d53f9f0b280c0b8 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -16,7 +16,7 @@ class AliTRDdigit : public AliDigitNew {
 
   AliTRDdigit();
   AliTRDdigit(Bool_t isRaw, Int_t *digits, Int_t *amp);
-  ~AliTRDdigit() {};
+  virtual ~AliTRDdigit();
 
           Int_t GetAmp() const    { if (TestBit(kRawDigit))
                                       return DecodeAmp();
@@ -31,11 +31,11 @@ class AliTRDdigit : public AliDigitNew {
 
  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
 
 };
 
index 21db329bc82615bb7e2dc2c2c29180c2d9b65040..93d69600cccfccc2a102c06252e4f70a2c8f9358 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -114,9 +117,23 @@ AliTRDdigitizer::AliTRDdigitizer(const Text_t *name, const Text_t *title)
 
 }
 
+//_____________________________________________________________________________
+AliTRDdigitizer::AliTRDdigitizer(AliTRDdigitizer &d)
+{
+  //
+  // AliTRDdigitizer copy constructor
+  //
+
+  d.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDdigitizer::~AliTRDdigitizer()
 {
+  //
+  // AliTRDdigitizer destructor
+  //
 
   if (fInputFile) {
     fInputFile->Close();
@@ -131,6 +148,39 @@ AliTRDdigitizer::~AliTRDdigitizer()
 
 }
 
+//_____________________________________________________________________________
+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)
 {
@@ -256,7 +306,7 @@ Bool_t AliTRDdigitizer::MakeDigits()
   ///////////////////////////////////////////////////////////////
 
   // Converts number of electrons to fC
-  const Float_t el2fC  = 1.602E-19 * 1.0E15; 
+  const Float_t kEl2fC  = 1.602E-19 * 1.0E15; 
 
   ///////////////////////////////////////////////////////////////
 
@@ -269,8 +319,8 @@ Bool_t AliTRDdigitizer::MakeDigits()
   Int_t   totalSizeDict1  = 0;
   Int_t   totalSizeDict2  = 0;
 
-  AliTRDdataArrayI *Digits;
-  AliTRDdataArrayI *Dictionary[kNDict];
+  AliTRDdataArrayI *digits;
+  AliTRDdataArrayI *dictionary[kNDict];
 
   if (!fGeo) {
     printf("AliTRDdigitizer::MakeDigits -- ");
@@ -282,18 +332,18 @@ Bool_t 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");
@@ -321,7 +371,7 @@ Bool_t AliTRDdigitizer::MakeDigits()
   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++) {
@@ -356,16 +406,16 @@ Bool_t AliTRDdigitizer::MakeDigits()
         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();
@@ -373,16 +423,16 @@ Bool_t AliTRDdigitizer::MakeDigits()
           // 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);
@@ -406,13 +456,13 @@ Bool_t AliTRDdigitizer::MakeDigits()
 
             // 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;
                }
              }
@@ -470,23 +520,23 @@ Bool_t AliTRDdigitizer::MakeDigits()
 
               // 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;
@@ -496,13 +546,13 @@ Bool_t AliTRDdigitizer::MakeDigits()
             }
 
             // 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;
@@ -510,16 +560,16 @@ Bool_t AliTRDdigitizer::MakeDigits()
                   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;
                       }
                     }
@@ -538,14 +588,14 @@ Bool_t AliTRDdigitizer::MakeDigits()
        }
 
         // 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
@@ -553,13 +603,13 @@ Bool_t AliTRDdigitizer::MakeDigits()
           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
@@ -570,13 +620,13 @@ Bool_t AliTRDdigitizer::MakeDigits()
                 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));
                }
 
              }
@@ -586,23 +636,23 @@ Bool_t AliTRDdigitizer::MakeDigits()
        }
 
         // 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();
        }
 
       }
@@ -610,7 +660,7 @@ Bool_t AliTRDdigitizer::MakeDigits()
   }
 
   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
index 9823b830ca11f27c7a8bf9f34a79f80412d52db0..7a61af33fe73e8623489f275ac5e5d81901fb571 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -26,8 +26,10 @@ class AliTRDdigitizer : public TNamed {
 
   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();
@@ -39,12 +41,12 @@ class AliTRDdigitizer : public TNamed {
   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;      };
@@ -63,6 +65,8 @@ class AliTRDdigitizer : public TNamed {
   virtual Float_t      GetLorentzAngle()               { return fLorentzAngle;  };
   virtual TF1         *GetPadResponse()                { return fPRF;           };
 
+  inline  AliTRDdigitizer &operator=(AliTRDdigitizer &d);
+
  protected:
 
   TFile               *fInputFile;       //! ALIROOT-filename
@@ -97,4 +101,16 @@ class AliTRDdigitizer : public TNamed {
 
 };
 
+//_____________________________________________________________________________
+AliTRDdigitizer &AliTRDdigitizer::operator=(AliTRDdigitizer &d)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &d) d.Copy(*this);
+  return *this;
+
+}
+
 #endif
index 8f6de99329c40a3c0568fc27146d16df116752e2..bbe81721d23b295a3de4ca45744d3918927dd7bd 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -54,9 +57,23 @@ AliTRDdigitsManager::AliTRDdigitsManager():TObject()
 
 }
 
+//_____________________________________________________________________________
+AliTRDdigitsManager::AliTRDdigitsManager(AliTRDdigitsManager &m)
+{
+  //
+  // AliTRDdigitsManager copy constructor
+  //
+
+  m.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDdigitsManager::~AliTRDdigitsManager()
 {
+  //
+  // AliTRDdigitsManager destructor
+  //
 
   if (fDigits) {
     fDigits->Delete();
@@ -70,6 +87,19 @@ AliTRDdigitsManager::~AliTRDdigitsManager()
 
 }
 
+//_____________________________________________________________________________
+void AliTRDdigitsManager::Copy(AliTRDdigitsManager &m)
+{
+  //
+  // Copy function
+  //
+
+  m.fIsRaw = fIsRaw;
+
+  TObject::Copy(m);
+
+}
+
 //_____________________________________________________________________________
 void AliTRDdigitsManager::SetRaw()
 {
@@ -95,11 +125,11 @@ Bool_t AliTRDdigitsManager::MakeBranch()
 
     // 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");
       }
@@ -117,11 +147,11 @@ Bool_t AliTRDdigitsManager::MakeBranch()
       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);
        }
@@ -146,6 +176,9 @@ Bool_t AliTRDdigitsManager::MakeBranch()
 //_____________________________________________________________________________
 Bool_t AliTRDdigitsManager::ReadDigits()
 {
+  //
+  // Reads the digit information from the input file
+  //
 
   Bool_t status = kTRUE;
 
index da5d8664476bc2f5f38f79869ecea1138c759748..94e7d38839809058848d9188c62f5c73ceee0ba4 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
@@ -23,8 +23,10 @@ class AliTRDdigitsManager : public TObject {
  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();
@@ -42,6 +44,8 @@ class AliTRDdigitsManager : public TObject {
   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
@@ -54,7 +58,7 @@ class AliTRDdigitsManager : public TObject {
 };
 
 //_____________________________________________________________________________
-inline AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det) 
+AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det) 
 {
   //
   // Returns the digits array for one detector
@@ -65,7 +69,7 @@ inline AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det)
 }
 
 //_____________________________________________________________________________
-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
@@ -76,7 +80,7 @@ inline AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i)
 }
 
 //_____________________________________________________________________________
-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
@@ -91,4 +95,16 @@ inline Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
 
 }
 
+//_____________________________________________________________________________
+AliTRDdigitsManager &AliTRDdigitsManager::operator=(AliTRDdigitsManager &m)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &m) m.Copy(*this);
+  return *this;
+
+}
+
 #endif
index 6d35d2ff5341a3b63045516bd9fb962ab2b7acf5..b044a80c84121bdb0d614dccdec13b64c08a0ab2 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -51,6 +54,9 @@ AliTRDgeometry::AliTRDgeometry():AliGeometry()
 //_____________________________________________________________________________
 AliTRDgeometry::~AliTRDgeometry()
 {
+  //
+  // AliTRDgeometry destructor
+  //
 
 }
 
@@ -145,82 +151,82 @@ void AliTRDgeometry::CreateGeometry(Int_t *idtmed)
   //    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;
index 240aa61253f746d95fe89b3f99d69e85053029cd..fb91195c97739c10679ff829d197a84508b0b0cf 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -18,9 +18,9 @@ class AliTRDgeometry : public AliGeometry {
  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);
@@ -55,8 +55,8 @@ class AliTRDgeometry : public AliGeometry {
   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:
 
index 5e9fabef890bab2b8b8d9004fe097f922aa372fd..5e4a5303d69265eb916784affaa02f5079aa8d7a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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()
 
@@ -50,6 +53,9 @@ AliTRDgeometryFull::AliTRDgeometryFull():AliTRDgeometry()
 //_____________________________________________________________________________
 AliTRDgeometryFull::~AliTRDgeometryFull()
 {
+  //
+  // AliTRDgeometryFull destructor
+  //
 
 }
 
@@ -178,31 +184,31 @@ void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
 
   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
@@ -214,243 +220,243 @@ void AliTRDgeometryFull::CreateGeometry(Int_t *idtmed)
     // 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);
     }
 
   }
index 892f4f299059562171dd0bb2cfdd51e655bf6011..298a2e57ffa11e888492f9f2ae3950ebee573b6f 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -14,7 +14,7 @@ class AliTRDgeometryFull : public AliTRDgeometry {
   AliTRDgeometryFull();
   ~AliTRDgeometryFull();
 
-          void    CreateGeometry(Int_t *);
+          void    CreateGeometry(Int_t *idtmed);
           Int_t   IsVersion() const { return 1; };
           void    Init();
 
@@ -31,10 +31,10 @@ class AliTRDgeometryFull : public AliTRDgeometry {
 
   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
 
index 464bd08afbd7e83d6270765382949fe0eddd29a9..73a34d88ae6a9cf1a513547e7fdde605425b2d4a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  2000/02/28 19:01:42  cblume
+Add new TRD classes
+
 */
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -41,6 +44,9 @@ AliTRDgeometryHole::AliTRDgeometryHole():AliTRDgeometry()
 //_____________________________________________________________________________
 AliTRDgeometryHole::~AliTRDgeometryHole()
 {
+  //
+  // AliTRDgeometryHole destructor
+  //
 
 }
 
@@ -166,36 +172,36 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
 
   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++) {
@@ -203,208 +209,208 @@ void AliTRDgeometryHole::CreateGeometry(Int_t *idtmed)
     // 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);
 
   }
 
index 0aa6854bdf6242565c23f300bcf1f80724bfb735..c2ecadae48ef807dbfe81fb1d1cc92b1a133c7a4 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -12,9 +12,9 @@ class AliTRDgeometryHole : public AliTRDgeometry {
  public:
 
   AliTRDgeometryHole();
-  ~AliTRDgeometryHole();
+  virtual ~AliTRDgeometryHole();
 
-          void    CreateGeometry(Int_t *); 
+          void    CreateGeometry(Int_t *idtmed); 
           Int_t   IsVersion() const { return 0; };
           void    Init();
 
@@ -28,10 +28,10 @@ class AliTRDgeometryHole : public AliTRDgeometry {
 
   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
 
index eba1aec833bb09b7575b84a4f50740d703186c4b..f1f77eaca2817c53c336a5daa6ed7b42488624d6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -32,7 +35,16 @@ AliTRDhit class now in separate files
 #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)
@@ -51,3 +63,12 @@ AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t *det, Float_t *hits)
   fQ        = hits[3];
 
 }
+
+//_____________________________________________________________________________
+AliTRDhit::~AliTRDhit()
+{
+  //
+  // AliTRDhit destructor
+  //
+
+}
index d594630aacc2dcfcf96e57e7243f85d4114004c0..05aea9a6c2a91eaaeea924aeeef48d194ee7f629 100644 (file)
@@ -1,5 +1,5 @@
-#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
 
index 63dc4fffa98cf855c459e57bcdd4c406146da076..5147d10427775008558c63cd65c267fb5ce71f7b 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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()
 
@@ -87,9 +90,23 @@ AliTRDmatrix::AliTRDmatrix(Int_t nRow, Int_t nCol, Int_t nTime
 
 }
 
+//_____________________________________________________________________________
+AliTRDmatrix::AliTRDmatrix(AliTRDmatrix &m)
+{
+  //
+  // AliTRDmatrix copy constructor
+  //
+
+  m.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDmatrix::~AliTRDmatrix()
 {
+  //
+  // AliTRDmatrix destructor
+  //
 
   if (fPixelArray) {
     fPixelArray->Delete();
@@ -113,6 +130,25 @@ void AliTRDmatrix::AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal
 
 }
 
+//_____________________________________________________________________________
+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 *)
 {
index bd74d49a15ad33188207d07ece0eb94e7c5da64d..dafe1fcb56e73119b2ebc5e32b2a6eee493cd5a4 100644 (file)
@@ -1,5 +1,5 @@
-#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);
@@ -62,8 +50,36 @@ public:
   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
index 03a35c35851deda3f50fd27c78e9d543e27d4722..59adab3d189c24f391056fb2dd41c74c8dee9010 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -46,3 +49,26 @@ AliTRDpixel::AliTRDpixel():TObject()
   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];
+  }
+
+}
index 16ddd245ed84a37b0ce4d0fea143c49c8633bd25..43636b325182af64f4a1c6456a336e9dd1a28ab4 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -15,13 +15,12 @@ const Int_t kTrackPixel = 3;
 
 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;  };
@@ -29,6 +28,11 @@ public:
   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   
 
 };
index 58173cf07a6e426a9e6b67d89c47c412ee86a5fb..9633603e8d16eae75b9ddb656ac70d782583e49e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  2000/02/28 19:02:07  cblume
+Add new TRD classes
+
 */
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -38,10 +41,10 @@ AliTRDrecPoint::AliTRDrecPoint():AliRecPoint()
 
   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;
@@ -49,6 +52,15 @@ AliTRDrecPoint::AliTRDrecPoint():AliRecPoint()
 
 }
 
+//_____________________________________________________________________________
+AliTRDrecPoint::~AliTRDrecPoint()
+{
+  //
+  // AliTRDrecPoint destructor
+  //
+
+}
+
 //_____________________________________________________________________________
 void AliTRDrecPoint::AddDigit(Int_t digit)
 {
@@ -87,7 +99,7 @@ void AliTRDrecPoint::SetLocalPosition(TVector3 &pos)
   // system.
   //
 
-  const Float_t sq12 = 3.464101615;
+  const Float_t kSq12 = 3.464101615;
 
   // Set the position
   fLocPos = pos;
@@ -97,9 +109,9 @@ void AliTRDrecPoint::SetLocalPosition(TVector3 &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;
 
 }
index 943294b88fa5454a308783839fcb6c5c8ee60217..54d99b110570e46c2709befad6fa6e4a8ec098ab 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -12,7 +12,8 @@ class AliTRDrecPoint : public AliRecPoint {
  public:
 
   AliTRDrecPoint();
-  ~AliTRDrecPoint() {};
+  virtual ~AliTRDrecPoint();
+
   virtual void    Print(Option_t* ) {};
   virtual void    AddDigit(Int_t digit);
   virtual void    AddDigit(AliDigitNew &digit) {};
index ce6d710b03e6304255ca45943b32649e1da313e9..f2d8d999f36a7e6aec2ccc27d703f0d106011332 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -25,6 +28,8 @@ Add new TRD classes
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
+//  Alice segment manager class                                              //
+//                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliTRD.h"
@@ -50,14 +55,44 @@ AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
   // 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()
 {
@@ -90,12 +125,12 @@ Bool_t AliTRDsegmentArray::LoadArray(const Char_t *branchname)
   // 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);
   }
 
@@ -122,13 +157,13 @@ Bool_t AliTRDsegmentArray::StoreArray(const Char_t *branchname)
   // 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();
   }
 
@@ -156,8 +191,8 @@ AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t pla, Int_t cha, Int_t se
 
   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);
 
   }
index fc9d632308c8974b208a4b51a2232ad522330c48..5d290441fa6d00d07dd0a84df1d4db959895069f 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -19,8 +19,10 @@ class AliTRDsegmentArray : public AliTRDsegmentArrayBase {
 
   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(); };
 
index 010c52b15dbb0703016e7ddd3c2c21fbd0ed33ac..76c6d26ee93fe82555de796b331aa47ae5916c90 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -28,12 +31,7 @@ Add new TRD classes
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
-//  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                                         //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -51,10 +49,10 @@ Add new TRD classes
 ClassImp(AliTRDsegmentArrayBase)
   
 //_____________________________________________________________________________
-AliTRDsegmentArrayBase::AliTRDsegmentArrayBase()
+AliTRDsegmentArrayBase::AliTRDsegmentArrayBase():TNamed()
 {
   //
-  //
+  // AliTRDsegmentArrayBase default constructor
   //
 
   fNSegment  = 0;
@@ -69,298 +67,382 @@ AliTRDsegmentArrayBase::AliTRDsegmentArrayBase()
 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]);
+
 }
index 97ee8ba20a6b44a5dca8a0bbb8696864cbd59cce..b5d71881b10a4fb0bb443a2af09476a51e243b5c 100644 (file)
@@ -1,60 +1,80 @@
-#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 
index d13a98289fecca4c4c2589f0bcfdc29ae13388b9..dcf7c45104fbbaf59a3b8690be38bb5357869b51 100644 (file)
 
 /*
 $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
+  //
+
 }
index 6a98df341295e5b96575a91b7483ab2b6b3dc519..65e28a8621775176c39b5ff17dd0b0aba4249ff1 100644 (file)
@@ -7,23 +7,31 @@
 /* $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 
 
index 1c114e31c42c8badc2e17738bc7b7b4199f5c4d4..8e36f0a2745ef3fe2fb860053b9137e93f393770 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -60,7 +63,23 @@ Introduction of the Copyright and cvs Log
 #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) 
@@ -78,6 +97,15 @@ AliTRDv0::AliTRDv0(const char *name, const char *title)
 
 }
 
+//_____________________________________________________________________________
+AliTRDv0::~AliTRDv0()
+{
+  //
+  // AliTRDv0 destructor
+  //
+
+}
+
 //_____________________________________________________________________________
 void AliTRDv0::CreateGeometry()
 {
@@ -87,8 +115,8 @@ 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();
index e64a1dcc67b4472ca0d008ff300c5d0bd290a8d4..02edc4eb7e73831e2784193cd2375856adb68a7b 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -16,9 +16,10 @@ class AliTRDv0 : public AliTRD {
 
  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; };
@@ -42,8 +43,8 @@ class AliTRDv0 : public AliTRD {
   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
 
index 8bd51ccbd8fed434309d2d0a9f56559a1321a781..f2cc20136c7fb5cd9b108f826fd5af410f310a24 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $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
 
@@ -77,6 +80,30 @@ Introduction of the Copyright and cvs Log
 
 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) 
@@ -95,7 +122,7 @@ AliTRDv1::AliTRDv1(const char *name, const char *title)
   fSensPlane       = -1;
   fSensChamber     = -1;
   fSensSector      = -1;
-  fSensSectorRange = 0;
+  fSensSectorRange =  0;
 
   fDeltaE          = NULL;
 
@@ -103,6 +130,17 @@ AliTRDv1::AliTRDv1(const char *name, const char *title)
 
 }
 
+//_____________________________________________________________________________
+AliTRDv1::AliTRDv1(AliTRDv1 &trd)
+{
+  //
+  // Copy constructor
+  //
+
+  trd.Copy(*this);
+
+}
+
 //_____________________________________________________________________________
 AliTRDv1::~AliTRDv1()
 {
@@ -111,6 +149,30 @@ 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()
 {
@@ -120,8 +182,8 @@ 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();
@@ -168,9 +230,9 @@ void AliTRDv1::Init()
   // 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");
@@ -319,7 +381,7 @@ void AliTRDv1::StepManager()
   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
@@ -408,8 +470,8 @@ void AliTRDv1::StepManager()
         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);
@@ -491,23 +553,23 @@ Double_t Ermilova(Double_t *x, Double_t *)
 
   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];
 
@@ -519,7 +581,7 @@ Double_t Ermilova(Double_t *x, Double_t *)
   } 
   while (dpos > 0);
   pos2--; 
-  if (pos2 > nV) pos2 = nV;
+  if (pos2 > kNv) pos2 = kNv;
   pos1 = pos2 - 1;
 
   // Differentiate between the sampling points
index ffbeb81a88ccbba72556ed4c8aeac9805a2dfb7c..ef324582300fcf175201055c5edf4cd476c331ec 100644 (file)
@@ -1,5 +1,5 @@
-#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                               */
 
@@ -21,12 +21,15 @@ class AliTRDv1 : public AliTRD {
 
  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();
 
@@ -35,18 +38,20 @@ class AliTRDv1 : public AliTRD {
           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
@@ -64,4 +69,16 @@ class AliTRDv1 : public AliTRD {
 
 };
 
+//_____________________________________________________________________________
+AliTRDv1 &AliTRDv1::operator=(AliTRDv1 &trd)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &trd) trd.Copy(*this);
+  return *this;
+
+}
+
 #endif