]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Try to remove compiler warnings on Sun and HP
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jun 2000 16:27:32 +0000 (16:27 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Jun 2000 16:27:32 +0000 (16:27 +0000)
22 files changed:
TRD/AliTRD.cxx
TRD/AliTRD.h
TRD/AliTRDclusterizerV0.cxx
TRD/AliTRDclusterizerV1.cxx
TRD/AliTRDdataArray.cxx
TRD/AliTRDdataArray.h
TRD/AliTRDdigit.cxx
TRD/AliTRDdigit.h
TRD/AliTRDdigitizer.cxx
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDdigitsManager.h
TRD/AliTRDgeometry.cxx
TRD/AliTRDhit.cxx
TRD/AliTRDhit.h
TRD/AliTRDrecPoint.h
TRD/AliTRDsegmentArray.h
TRD/AliTRDsegmentArrayBase.cxx
TRD/AliTRDsegmentArrayBase.h
TRD/AliTRDv0.cxx
TRD/AliTRDv0.h
TRD/AliTRDv1.cxx
TRD/AliTRDv1.h

index fcc367568ae39c690f6e9144baaa1c2c9735d18c..21a0ed58d3890db4281dfbdb7304de2ebcc69d9d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.18  2000/05/08 16:17:27  cblume
+Merge TRD-develop
+
 Revision 1.17.2.1  2000/05/08 14:28:59  cblume
 Introduced SetPHOShole() and SetRICHhole(). AliTRDrecPoint container is now a TObjArray
 
@@ -175,19 +178,19 @@ void AliTRD::AddRecPoint(Float_t *pos, Int_t *digits, Int_t det, Float_t amp)
 }
 
 //_____________________________________________________________________________
-void AliTRD::AddDigit(Int_t *digits)
+void AliTRD::AddDigit(Int_t *digits, Int_t *amp)
 {
   //
   // Add a digit for the TRD
   //
 
   TClonesArray &ldigits = *fDigits;
-  new(ldigits[fNdigits++]) AliTRDdigit(kFALSE,digits);
+  new(ldigits[fNdigits++]) AliTRDdigit(kFALSE,digits,amp);
 
 }
 
 //_____________________________________________________________________________
-void AliTRD::AddHit(Int_t track, Int_t det, Float_t *hits)
+void AliTRD::AddHit(Int_t track, Int_t* det, Float_t *hits)
 {
   //
   // Add a hit for the TRD
index 67805277a966dab01bc5b72b1679b006e923d455..08cd9bf2f44841089f8db0c8792be94340a2a2ee 100644 (file)
@@ -25,8 +25,8 @@ class AliTRD : public AliDetector {
   AliTRD();
   AliTRD(const char *name, const char *title);
   virtual           ~AliTRD();
-  virtual void       AddHit(Int_t, Int_t, Float_t*);
-  virtual void       AddDigit(Int_t*);    
+  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       BuildGeometry();
   virtual void       CreateGeometry();
@@ -42,20 +42,22 @@ class AliTRD : public AliDetector {
   virtual void       SetTreeAddress();
 
   virtual void       SetGasMix(Int_t imix = 0);
-  virtual void       SetHits(Int_t ihit = 1) {};
+  virtual void       SetHits()             {};
   virtual void       SetPHOShole()         { fGeometry->SetPHOShole(); };
   virtual void       SetRICHhole()         { fGeometry->SetRICHhole(); };
 
   AliTRDgeometry    *GetGeometry()         { return fGeometry; };
 
-  virtual void       SetSensChamber(Int_t ichamber) = 0;
-  virtual void       SetSensPlane(Int_t iplane)     = 0;
-  virtual void       SetSensSector(Int_t isector)   = 0;
+  virtual void       SetSensChamber(Int_t ichamber)              = 0;
+  virtual void       SetSensPlane(Int_t iplane)                  = 0;
+  virtual void       SetSensSector(Int_t isector)                = 0;
+  virtual void       SetSensSector(Int_t isector, Int_t nsector) = 0;
+
+  virtual Int_t      GetSensChamber()     = 0;
+  virtual Int_t      GetSensPlane()       = 0;
+  virtual Int_t      GetSensSector()      = 0;
+  virtual Int_t      GetSensSectorRange() = 0; 
 
-  virtual Int_t      GetSensChamber() = 0;
-  virtual Int_t      GetSensPlane()   = 0;
-  virtual Int_t      GetSensSector()  = 0;
  protected:
 
   Int_t              fGasMix;            //  Gas mixture. 0: Xe/Isobutane 1: Xe/CO2
index 3b14832b6b1a925cdc3f3848ebfe700a9a4f52b1..812f500fdb87de1418911854ed8b45af4e55e2e5 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:41  cblume
 Replace AliTRDcluster by AliTRDrecPoint
 
@@ -199,8 +202,8 @@ Bool_t AliTRDclusterizerV0::MakeCluster()
           Int_t idxSave[nSave];
           Int_t iSave = 0;
 
-          const Int_t nTrack = 3;
-          Int_t tracks[nTrack];
+          const Int_t nSaveTrack = 3;
+          Int_t tracks[nSaveTrack];
           tracks[0] = RecPoint1->GetDigit(0);
 
           // Check the other cluster to see, whether there are close ones
@@ -220,7 +223,7 @@ Bool_t AliTRDclusterizerV0::MakeCluster()
               else {                              
                 idxSave[iSave]  = iClus2;
                 iSave++;
-                if (iSave < nTrack) tracks[iSave] = RecPoint2->GetDigit(0);
+                if (iSave < nSaveTrack) tracks[iSave] = RecPoint2->GetDigit(0);
              }
            }
          }
index 72ba361286aceea7d0b440a24e81da653838699b..d1645e5e0bb3c84970994ad5b4e7c9e16b4096e4 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/05/08 16:17:27  cblume
+Merge TRD-develop
+
 Revision 1.1.4.1  2000/05/08 15:09:01  cblume
 Introduce AliTRDdigitsManager
 
@@ -145,28 +148,34 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
 
   Int_t chamBeg = 0;
   Int_t chamEnd = kNcham;
-  if (TRD->GetSensChamber() >= 0) {
+  if (TRD->GetSensChamber()  >= 0) {
     chamBeg = TRD->GetSensChamber();
     chamEnd = chamBeg + 1;
   }
   Int_t planBeg = 0;
   Int_t planEnd = kNplan;
-  if (TRD->GetSensPlane()   >= 0) {
+  if (TRD->GetSensPlane()    >= 0) {
     planBeg = TRD->GetSensPlane();
     planEnd = planBeg + 1;
   }
   Int_t sectBeg = 0;
   Int_t sectEnd = kNsect;
-  if (TRD->GetSensSector()  >= 0) {
-    sectBeg = TRD->GetSensSector();
-    sectEnd = sectBeg + 1;
-  }
 
   // *** Start clustering *** in every chamber
   for (Int_t icham = chamBeg; icham < chamEnd; icham++) {
     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();
+          sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
+          if (sens1 < sens2) 
+            if ((isect < sens1) || (isect >= sens2)) continue;
+          else
+            if ((isect < sens1) && (isect >= sens2)) continue;
+       }
+
         Int_t idet = Geo->GetDetector(iplan,icham,isect);
 
         Int_t nClusters = 0;
@@ -249,7 +258,8 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
                 // Cluster digit info
                 Int_t   clusterDigit[nClus]  = {0};
 
-                for (Int_t iPad = 0; iPad < nClus; iPad++) {
+                Int_t iPad;
+                for (iPad = 0; iPad < nClus; iPad++) {
                   clusterSignal[iPad] = digitMatrix->GetSignal(row,col-1+iPad,time);
                   clusterDigit[iPad]  = digitMatrix->GetTrack(row,col-1+iPad,time,0);
                 }
@@ -258,7 +268,7 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
                 if (col < nColMax - 2) {
                   if (maximaMatrix->GetSignal(row,col + 2,time) > 0) {
 
-                    for (Int_t iPad = 0; iPad < 5; iPad++) {
+                    for (iPad = 0; iPad < 5; iPad++) {
                       padSignal[iPad] = digitMatrix->GetSignal(row,col-1+iPad,time);
                     }
 
index d1a12a860c0cdb9f9ee883dd2758b9e455117530..e50ea729ee48633e43b894472a13a56f608e1f3b 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/05/18 07:56:44  cblume
+Added #include <stdlib.h>
+
 Revision 1.2  2000/05/08 16:17:27  cblume
 Merge TRD-develop
 
@@ -154,4 +157,46 @@ void AliTRDdataArray::Reset()
 
 }
 
+//_____________________________________________________________________________
+Int_t AliTRDdataArray::GetIdx1(Int_t row, Int_t col)
+{
+  //
+  // Maps the two-dimensional row/column plane into an one-dimensional array.
+  //
+
+  if (row >= fNrow) {
+    TObject::Error("GetIdx1"
+                  ,"row %d out of bounds (size: %d, this: 0x%08x)"
+                  ,row,fNrow,this);
+    return -1;
+  }  
+
+  if (col >= fNcol) {
+    TObject::Error("GetIdx1"
+                  ,"col %d out of bounds (size: %d, this: 0x%08x)"
+                  ,col,fNcol,this);
+    return -1;
+  }  
+
+  return row + col * fNrow;
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDdataArray::GetIndex(Int_t row, Int_t col, Int_t time)
+{
+  //
+  // Maps the row/column/time into one number
+  // 
+
+  if (time > fNtime) {
+    TObject::Error("GetIdx1"
+                  ,"time %d out of bounds (size: %d, this: 0x%08x)"
+                  ,time,fNtime,this);
+    return -1;
+  }  
+  
+  return time * fNrow*fNcol + GetIdx1(row,col);
+
+}
  
index 81f556df47633ea014d99cb0fd43bb0a80e6ba3a..4f7733c95c2a8bc3fc6f5bce39197f6bb3de52ae 100644 (file)
@@ -30,11 +30,11 @@ class AliTRDdataArray : public AliTRDsegmentID {
   virtual Int_t  GetNCol()                     { return fNcol;       };
   virtual Int_t  GetNtime()                    { return fNtime;      };
 
-  inline  Int_t  GetIndex(Int_t row, Int_t col, Int_t time);
+          Int_t  GetIndex(Int_t row, Int_t col, Int_t time);
 
  protected:
 
-  inline  Int_t  GetIdx1(Int_t row, Int_t col);
+          Int_t  GetIdx1(Int_t row, Int_t col);
   inline  Bool_t CheckBounds(const char *where, Int_t idx1, Int_t idx2);
   inline  Bool_t OutOfBoundsError(const char *where, Int_t idx1, Int_t idx2);
  
@@ -56,49 +56,6 @@ class AliTRDdataArray : public AliTRDsegmentID {
 
 };
  
-//_____________________________________________________________________________
-inline Int_t AliTRDdataArray::GetIndex(Int_t row, Int_t col, Int_t time)
-{
-  //
-  // Maps the row/column/time into one number
-  // 
-
-  if (time > fNtime) {
-    TObject::Error("GetIdx1"
-                  ,"time %d out of bounds (size: %d, this: 0x%08x)"
-                  ,time,fNtime,this);
-    return -1;
-  }  
-  
-  return time * fNrow*fNcol + GetIdx1(row,col);
-
-}
-
-//_____________________________________________________________________________
-inline Int_t AliTRDdataArray::GetIdx1(Int_t row, Int_t col)
-{
-  //
-  // Maps the two-dimensional row/column plane into an one-dimensional array.
-  //
-
-  if (row >= fNrow) {
-    TObject::Error("GetIdx1"
-                  ,"row %d out of bounds (size: %d, this: 0x%08x)"
-                  ,row,fNrow,this);
-    return -1;
-  }  
-
-  if (col >= fNcol) {
-    TObject::Error("GetIdx1"
-                  ,"col %d out of bounds (size: %d, this: 0x%08x)"
-                  ,col,fNcol,this);
-    return -1;
-  }  
-
-  return row + col * fNrow;
-
-}
-
 //_____________________________________________________________________________
 inline Bool_t AliTRDdataArray::CheckBounds(const char *where
                                           , Int_t idx1, Int_t idx2) 
index c7777fd92a0bdf82d8e21a4f05dae560aeb03857..3cc623e3ef9822ffad2256f1f73650e6978edcaa 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:40:29  cblume
 Introduce raw digit bit flag and DecodeAmp()
 
@@ -44,7 +47,7 @@ AliTRDdigit::AliTRDdigit():AliDigitNew()
 }
 
 //_____________________________________________________________________________
-AliTRDdigit::AliTRDdigit(Bool_t isRaw, Int_t *digits):AliDigitNew()
+AliTRDdigit::AliTRDdigit(Bool_t isRaw, Int_t *digits, Int_t *amp):AliDigitNew()
 {
   //
   // Create a TRD digit
@@ -59,7 +62,7 @@ AliTRDdigit::AliTRDdigit(Bool_t isRaw, Int_t *digits):AliDigitNew()
   fTime = digits[3];
 
   // Store the signal amplitude
-  fAmp  = digits[4];
+  fAmp  = amp[0];
 
   if (isRaw) SetBit(kRawDigit);
 
index 0fb30cc72f9fb88b4b54be5e3893e7822d7aa000..87d7995e2938e4c372b5670e15c09f66406bc97d 100644 (file)
@@ -15,19 +15,19 @@ class AliTRDdigit : public AliDigitNew {
  public:
 
   AliTRDdigit();
-  AliTRDdigit(Bool_t isRaw, Int_t *digits);
+  AliTRDdigit(Bool_t isRaw, Int_t *digits, Int_t *amp);
   ~AliTRDdigit() {};
 
-          Int_t GetAmp()      { if (TestBit(kRawDigit))
-                                  return DecodeAmp();
-                                else
-                                  return fAmp; };
-          Int_t GetDetector() { return fId;   };
-          Int_t GetRow()      { return fRow;  };
-          Int_t GetCol()      { return fCol;  };
-          Int_t GetTime()     { return fTime; };
+          Int_t GetAmp() const    { if (TestBit(kRawDigit))
+                                      return DecodeAmp();
+                                    else
+                                      return fAmp; };
+          Int_t GetDetector()     { return fId;   };
+          Int_t GetRow()          { return fRow;  };
+          Int_t GetCol()          { return fCol;  };
+          Int_t GetTime()         { return fTime; };
 
-          Int_t DecodeAmp()   { return 0;     };
+          Int_t DecodeAmp() const { return 0;     };
 
  protected:
 
index 8caaf1faac6ffc0608d0a364d2e45c90aef2b27e..21db329bc82615bb7e2dc2c2c29180c2d9b65040 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.5  2000/05/09 16:38:57  cblume
+Removed PadResponse(). Merge problem
+
 Revision 1.4  2000/05/08 15:53:45  cblume
 Resolved merge conflict
 
@@ -305,22 +308,18 @@ Bool_t AliTRDdigitizer::MakeDigits()
 
   Int_t chamBeg = 0;
   Int_t chamEnd = kNcham;
-  if (fTRD->GetSensChamber() >= 0) {
+  if (fTRD->GetSensChamber()  >= 0) {
     chamBeg = fTRD->GetSensChamber();
     chamEnd = chamBeg + 1;
   }
   Int_t planBeg = 0;
   Int_t planEnd = kNplan;
-  if (fTRD->GetSensPlane()   >= 0) {
+  if (fTRD->GetSensPlane()    >= 0) {
     planBeg = fTRD->GetSensPlane();
     planEnd = planBeg + 1;
   }
   Int_t sectBeg = 0;
   Int_t sectEnd = kNsect;
-  if (fTRD->GetSensSector()  >= 0) {
-    sectBeg = fTRD->GetSensSector();
-    sectEnd = sectBeg + 1;
-  }
 
   Int_t count_hits = 0;
 
@@ -329,6 +328,16 @@ Bool_t AliTRDdigitizer::MakeDigits()
     for (Int_t iPlan = planBeg; iPlan < planEnd; iPlan++) {
       for (Int_t iSect = sectBeg; iSect < sectEnd; iSect++) {
 
+        if (fTRD->GetSensSector() >= 0) {
+          Int_t sens1 = fTRD->GetSensSector();
+          Int_t sens2 = sens1 + fTRD->GetSensSectorRange();
+          sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
+          if (sens1 < sens2) 
+            if ((iSect < sens1) || (iSect >= sens2)) continue;
+          else
+            if ((iSect < sens1) && (iSect >= sens2)) continue;
+       }
+
         Int_t nDigits = 0;
 
         printf("AliTRDdigitizer::MakeDigits -- ");
index ff96b315b67dae3ea08069b957ca99c8aa08fdf5..8f6de99329c40a3c0568fc27146d16df116752e2 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:44:01  cblume
 Add new class AliTRDdigitsManager
 
@@ -196,3 +199,47 @@ Bool_t AliTRDdigitsManager::WriteDigits()
   return kTRUE;
 
 }
+
+//_____________________________________________________________________________
+AliTRDdigit *AliTRDdigitsManager::GetDigit(Int_t row, Int_t col
+                                         , Int_t time, Int_t det)
+{
+  // 
+  // Creates a single digit object 
+  //
+
+  Int_t digits[4];
+  Int_t amp[1];
+
+  digits[0] = det;
+  digits[1] = row;
+  digits[2] = col;
+  digits[3] = time;
+
+  amp[0]    = GetDigits(det)->GetData(row,col,time);
+  
+  return (new AliTRDdigit(fIsRaw,digits,amp));
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDdigitsManager::GetTrack(Int_t track
+                                  , Int_t row, Int_t col, Int_t time
+                                  , Int_t det)
+{
+  // 
+  // Returns the MC-track numbers from the dictionary.
+  //
+
+  if ((track < 0) || (track >= kNDict)) {
+    TObject::Error("GetTracks"
+                  ,"track %d out of bounds (size: %d, this: 0x%08x)"
+                  ,track,kNDict,this);
+    return -1;
+  }
+
+  // Array contains index+1 to allow data compression
+  return (GetDictionary(det,track)->GetData(row,col,time) - 1);
+
+}
+
index 98aedb193bfcc464f3a0fe4abd129331f72fc9b9..da5d8664476bc2f5f38f79869ecea1138c759748 100644 (file)
@@ -35,10 +35,11 @@ class AliTRDdigitsManager : public TObject {
   virtual AliTRDsegmentArray *GetDigits()            { return fDigits;        };
   virtual AliTRDsegmentArray *GetDictionary(Int_t i) { return fDictionary[i]; };
 
+          AliTRDdigit        *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det);
+          Int_t               GetTrack(Int_t track, Int_t row, Int_t col, Int_t time, Int_t det);
+
   inline  AliTRDdataArrayI   *GetDigits(Int_t det);
   inline  AliTRDdataArrayI   *GetDictionary(Int_t det, Int_t i);
-  inline  AliTRDdigit        *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det);
-  inline  Int_t               GetTrack(Int_t track, Int_t row, Int_t col, Int_t time, Int_t det);
   inline  Int_t               GetTrack(Int_t track, AliTRDdigit *Digit);
 
  protected:
@@ -63,7 +64,6 @@ inline AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det)
 
 }
 
-
 //_____________________________________________________________________________
 inline AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i) 
 {
@@ -75,47 +75,6 @@ inline AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i)
 
 }
 
-//_____________________________________________________________________________
-inline AliTRDdigit *AliTRDdigitsManager::GetDigit(Int_t row, Int_t col
-                                                , Int_t time, Int_t det)
-{
-  // 
-  // Creates a single digit object 
-  //
-
-  Int_t digits[5];
-
-  digits[0] = det;
-  digits[1] = row;
-  digits[2] = col;
-  digits[3] = time;
-  digits[4] = GetDigits(det)->GetData(row,col,time);
-  
-  return (new AliTRDdigit(fIsRaw,digits));
-
-}
-
-//_____________________________________________________________________________
-inline Int_t AliTRDdigitsManager::GetTrack(Int_t track
-                                         , Int_t row, Int_t col, Int_t time
-                                         , Int_t det)
-{
-  // 
-  // Returns the MC-track numbers from the dictionary.
-  //
-
-  if ((track < 0) || (track >= kNDict)) {
-    TObject::Error("GetTracks"
-                  ,"track %d out of bounds (size: %d, this: 0x%08x)"
-                  ,track,kNDict,this);
-    return -1;
-  }
-
-  // Array contains index+1 to allow data compression
-  return (GetDictionary(det,track)->GetData(row,col,time) - 1);
-
-}
-
 //_____________________________________________________________________________
 inline Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
 {
index a16e99aae7008fa3bf2cc4765a49d04c0608a32f..6d35d2ff5341a3b63045516bd9fb962ab2b7acf5 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:45:55  cblume
 Bug fix in RotateBack(). Geometry update
 
@@ -421,6 +424,7 @@ void AliTRDgeometry::GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat
   //
 
   GetGlobal(p,pos);
+  mat.Zero();
 
 }
 
index b26fccddcac96d643455c0dab9b5378b00c27169..eba1aec833bb09b7575b84a4f50740d703186c4b 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:48:31  cblume
 AliTRDhit class now in separate files
 
@@ -31,7 +34,7 @@ AliTRDhit class now in separate files
 ClassImp(AliTRDhit)
  
 //_____________________________________________________________________________
-AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t det, Float_t *hits)
+AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t *det, Float_t *hits)
           :AliHit(shunt, track)
 {
   //
@@ -39,7 +42,7 @@ AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t det, Float_t *hits)
   //
 
   // Store volume hierarchy
-  fDetector = det;
+  fDetector = det[0];
 
   // Store position and charge
   fX        = hits[0];
index 2003167605c8efe12d41d10a80c5c2ed94610f62..d594630aacc2dcfcf96e57e7243f85d4114004c0 100644 (file)
@@ -22,7 +22,7 @@ class AliTRDhit : public AliHit {
  public:
 
   AliTRDhit() {}
-  AliTRDhit(Int_t shunt, Int_t track, Int_t det, Float_t *hits);
+  AliTRDhit(Int_t shunt, Int_t track, Int_t *det, Float_t *hits);
   virtual ~AliTRDhit() {};
  
   ClassDef(AliTRDhit,2)     // Hit for the Transition Radiation Detector
index 4937e75b9090d44720249ed1058154a652c55b6f..943294b88fa5454a308783839fcb6c5c8ee60217 100644 (file)
@@ -13,8 +13,9 @@ class AliTRDrecPoint : public AliRecPoint {
 
   AliTRDrecPoint();
   ~AliTRDrecPoint() {};
-  virtual void    Print(Option_t * opt = "void") {};
+  virtual void    Print(Option_t) {};
   virtual void    AddDigit(Int_t digit);
+  virtual void    AddDigit(AliDigitNew &digit) {};
 
   virtual void    SetEnergy(Float_t amp)          { fAmp      = amp; };
   virtual void    SetDetector(Int_t det)          { fDetector = det; };
index 304b8c4a35e057bc91549356f52c2d17eb0e2210..fc9d632308c8974b208a4b51a2232ad522330c48 100644 (file)
@@ -22,6 +22,7 @@ class AliTRDsegmentArray : public AliTRDsegmentArrayBase {
   ~AliTRDsegmentArray() { };
 
   virtual void             Delete();
+  virtual void             Delete(const char *) { Delete(); };
 
   virtual Bool_t           LoadArray(const Char_t *branchname);
   virtual Bool_t           StoreArray(const Char_t *branchname);
index b0e4564b92e874ea58212b2d627d2b65abcf499c..010c52b15dbb0703016e7ddd3c2c21fbd0ed33ac 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
 
@@ -341,3 +344,23 @@ Bool_t  AliTRDsegmentArrayBase::MakeDictionary(Int_t size)
   }
   return kTRUE;
 }
+
+//_____________________________________________________________________________
+const AliTRDsegmentID*  AliTRDsegmentArrayBase::operator[](Int_t i)
+{
+  //
+  //return segment with given index
+  //
+  if ( (i<0) || (i>=fNSegment)) return 0; 
+  return (AliTRDsegmentID *)fSegment->At(i);
+}
+
+//_____________________________________________________________________________
+const AliTRDsegmentID*  AliTRDsegmentArrayBase::At(Int_t i)
+{
+  //
+  //return segment with given index
+  //
+  if ( (i<0) || (i>=fNSegment)) return 0; 
+  return (AliTRDsegmentID *)((*fSegment)[i]);
+}
index cd6ceae1ebb152869a8f40b6f694960bdd70c729..97ee8ba20a6b44a5dca8a0bbb8696864cbd59cce 100644 (file)
@@ -28,8 +28,8 @@ public:
   AliTRDsegmentArrayBase(Text_t *classname, Int_t n);  //
   Bool_t  SetClass(Text_t *classname);  //set class of stored object
   ~AliTRDsegmentArrayBase();
-  inline const AliTRDsegmentID * At(Int_t i); //return pointer to segment with index i 
-  inline const AliTRDsegmentID * operator[](Int_t i); //return pointer to segment with index i
+  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
@@ -57,23 +57,4 @@ private:
   ClassDef(AliTRDsegmentArrayBase,1) 
 };
 
-
-
-const AliTRDsegmentID*  AliTRDsegmentArrayBase::operator[](Int_t i)
-{
-  //
-  //return segment with given index
-  //
-  if ( (i<0) || (i>=fNSegment)) return 0; 
-  return (AliTRDsegmentID *)fSegment->At(i);
-}
-const AliTRDsegmentID*  AliTRDsegmentArrayBase::At(Int_t i)
-{
-  //
-  //return segment with given index
-  //
-  if ( (i<0) || (i>=fNSegment)) return 0; 
-  return (AliTRDsegmentID *)((*fSegment)[i]);
-}
-
 #endif //ALISEGARRAY_H
index 833446cd40c3d11d0f8c15b2880132e24e39f436..1c114e31c42c8badc2e17738bc7b7b4199f5c4d4 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.14  2000/02/28 19:10:26  cblume
+Include the new TRD classes
+
 Revision 1.13.4.1  2000/02/28 18:01:53  cblume
 Change to new hit version and introduce geometry class
 
@@ -142,6 +145,7 @@ void AliTRDv0::StepManager()
   Int_t   iIdChamber, icChamber;
 
   Float_t hits[4];
+  Int_t   det[1];
 
   TLorentzVector p;
   TClonesArray  &lhits = *fHits;
@@ -188,9 +192,10 @@ void AliTRDv0::StepManager()
       // The plane number (0 - 5)
       pla = icChamber - TMath::Nint((Float_t) (icChamber / 7)) * 6 - 1;
 
+      det[0] = fGeometry->GetDetector(pla,cha,sec);
       new(lhits[fNhits++]) AliTRDhit(fIshunt
                                     ,gAlice->CurrentTrack()
-                                    ,fGeometry->GetDetector(pla,cha,sec)
+                                    ,det
                                     ,hits);
 
     }
index 8f7782a59b663c7a1308c176d38f21ef290453a1..e64a1dcc67b4472ca0d008ff300c5d0bd290a8d4 100644 (file)
@@ -21,19 +21,21 @@ class AliTRDv0 : public AliTRD {
   ~AliTRDv0() {};
   virtual void    CreateGeometry();
   virtual void    CreateMaterials();
-  virtual Int_t   IsVersion() const { return 0; };
+  virtual Int_t   IsVersion() const       { return 0; };
   virtual void    StepManager();
   virtual void    Init();
 
-  virtual void    SetHits(Int_t ihit = 1) { fHitsOn = ihit; };
+  virtual void    SetHits()               { fHitsOn = 1; };
 
-          void    SetSensChamber(Int_t ichamber) { };
-          void    SetSensPlane(Int_t iplane)     { };
-          void    SetSensSector(Int_t isector)   { };
+          void    SetSensChamber(Int_t )      { };
+          void    SetSensPlane(Int_t )        { };
+          void    SetSensSector(Int_t )       { };
+          void    SetSensSector(Int_t ,Int_t) { };
 
-          Int_t   GetSensChamber() { return 0; };
-          Int_t   GetSensPlane()   { return 0; };
-          Int_t   GetSensSector()  { return 0; };
+          Int_t   GetSensChamber()        { return 0; };
+          Int_t   GetSensPlane()          { return 0; };
+          Int_t   GetSensSector()         { return 0; };
+          Int_t   GetSensSectorRange()    { return 0; };
 
  protected:
 
index 38ee115a6c8b0190667b0fcba85f97855a3c6280..8bd51ccbd8fed434309d2d0a9f56559a1321a781 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.18  2000/05/08 16:17:27  cblume
+Merge TRD-develop
+
 Revision 1.17.2.1  2000/05/08 14:59:16  cblume
 Made inline function non-virtual. Bug fix in setting sensitive chamber
 
@@ -82,18 +85,19 @@ AliTRDv1::AliTRDv1(const char *name, const char *title)
   // Standard constructor for Transition Radiation Detector version 1
   //
 
-  fIdSens        =  0;
+  fIdSens          =  0;
 
-  fIdChamber1    =  0;
-  fIdChamber2    =  0;
-  fIdChamber3    =  0;
+  fIdChamber1      =  0;
+  fIdChamber2      =  0;
+  fIdChamber3      =  0;
 
-  fSensSelect    =  0;
-  fSensPlane     = -1;
-  fSensChamber   = -1;
-  fSensSector    = -1;
+  fSensSelect      =  0;
+  fSensPlane       = -1;
+  fSensChamber     = -1;
+  fSensSector      = -1;
+  fSensSectorRange = 0;
 
-  fDeltaE        = NULL;
+  fDeltaE          = NULL;
 
   SetBufferSize(128000);
 
@@ -150,8 +154,12 @@ void AliTRDv1::Init()
       printf("          Only plane %d is sensitive\n",fSensPlane);
     if (fSensChamber >= 0)   
       printf("          Only chamber %d is sensitive\n",fSensChamber);
-    if (fSensSector  >= 0)
-      printf("          Only sector %d is sensitive\n",fSensSector);
+    if (fSensSector  >= 0) {
+      Int_t sens1  = fSensSector;
+      Int_t sens2  = fSensSector + fSensSectorRange;
+            sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
+      printf("          Only sectors %d - %d are sensitive\n",sens1,sens2-1);
+    }
   }
   printf("\n");
 
@@ -224,16 +232,40 @@ void AliTRDv1::SetSensSector(Int_t isector)
   // Defines the hit-sensitive sector (0-17)
   //
 
+  SetSensSector(isector,1);
+
+}
+
+//_____________________________________________________________________________
+void AliTRDv1::SetSensSector(Int_t isector, Int_t nsector)
+{
+  //
+  // Defines a range of hit-sensitive sectors. The range is defined by
+  // <isector> (0-17) as the starting point and <nsector> as the number 
+  // of sectors to be included.
+  //
+
   if ((isector < 0) || (isector > 17)) {
-    printf("Wrong input value: %d\n",isector);
+    printf("Wrong input value <isector>: %d\n",isector);
     printf("Use standard setting\n");
-    fSensSector = -1;
-    fSensSelect =  0;
+    fSensSector      = -1;
+    fSensSectorRange =  0;
+    fSensSelect      =  0;
     return;
   }
 
-  fSensSelect = 1;
-  fSensSector = isector;
+  if ((nsector < 1) || (nsector > 18)) {
+    printf("Wrong input value <nsector>: %d\n",nsector);
+    printf("Use standard setting\n");
+    fSensSector      = -1;
+    fSensSectorRange =  0;
+    fSensSelect      =  0;
+    return;
+  }
+
+  fSensSelect      = 1;
+  fSensSector      = isector;
+  fSensSectorRange = nsector;
 
 }
 
@@ -255,6 +287,8 @@ void AliTRDv1::StepManager()
   Int_t    sec = 0;
   Int_t    iPdg;
 
+  Int_t    det[1];
+
   Float_t  hits[4];
   Float_t  random[1];
   Float_t  charge;
@@ -348,15 +382,26 @@ void AliTRDv1::StepManager()
       if (fSensSelect) {
         if ((fSensPlane   >= 0) && (pla != fSensPlane  )) addthishit = 0;
         if ((fSensChamber >= 0) && (cha != fSensChamber)) addthishit = 0;
-        if ((fSensSector  >= 0) && (sec != fSensSector )) addthishit = 0;
+        if (fSensSector  >= 0) {
+          Int_t sens1  = fSensSector;
+          Int_t sens2  = fSensSector + fSensSectorRange;
+                sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
+          if (sens1 < sens2) {
+            if ((sec < sens1) || (sec >= sens2)) addthishit = 0;
+         }
+          else {
+            if ((sec < sens1) && (sec >= sens2)) addthishit = 0;
+         }
+       }
       }
 
       // Add this hit
       if (addthishit) {
 
+        det[0] = fGeometry->GetDetector(pla,cha,sec);
         new(lhits[fNhits++]) AliTRDhit(fIshunt
                                       ,gAlice->CurrentTrack()
-                                      ,fGeometry->GetDetector(pla,cha,sec)
+                                      ,det
                                       ,hits);
 
         // The energy loss according to Bethe Bloch
index d14fb00d03edd6ac499533c9a5c0d1fe8e4feec5..ffbeb81a88ccbba72556ed4c8aeac9805a2dfb7c 100644 (file)
@@ -32,11 +32,13 @@ class AliTRDv1 : public AliTRD {
 
           void    SetSensPlane(Int_t iplane = 0);
           void    SetSensChamber(Int_t ichamber = 0);
-          void    SetSensSector(Int_t isector = 0);
+          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; };
 
  protected:
 
@@ -49,7 +51,8 @@ class AliTRDv1 : public AliTRD {
   Int_t        fSensSelect;             // Switch to select only parts of the detector
   Int_t        fSensPlane;              // Sensitive detector plane
   Int_t        fSensChamber;            // Sensitive detector chamber
-  Int_t        fSensSector;             // Sensitive detector sector
+  Int_t        fSensSector;             // Sensitive detector sector 
+  Int_t        fSensSectorRange;        // Sensitive detector range
 
  private: