Additional data member to AliCluster requested by Raphaelle
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 May 2007 09:11:15 +0000 (09:11 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 May 2007 09:11:15 +0000 (09:11 +0000)
TRD/AliTRDcalibDB.cxx
TRD/AliTRDcalibDB.h
TRD/AliTRDcluster.cxx
TRD/AliTRDcluster.h
TRD/AliTRDclusterizer.cxx
TRD/AliTRDclusterizer.h
TRD/AliTRDclusterizerV1.cxx

index dcd2965..66f4e96 100644 (file)
@@ -611,6 +611,30 @@ Float_t AliTRDcalibDB::GetGainFactorAverage(Int_t det)
 }
 
 //_____________________________________________________________________________
+AliTRDCalROC *AliTRDcalibDB::GetPRFROC(Int_t det)
+{
+  //
+  // Returns the PRF calibration object for a given ROC
+  // containing one number per pad 
+  //
+  
+  const AliTRDCalPad     *calPad     = dynamic_cast<const AliTRDCalPad *> 
+                                       (GetCachedCDBObject(kIDPRFWidth));
+  if (!calPad) {
+    return 0;
+  }
+
+  AliTRDCalROC           *roc        = calPad->GetCalROC(det);
+  if (!roc) {
+    return 0;
+  }
+  else {
+    return roc;
+  }
+
+}
+
+//_____________________________________________________________________________
 Float_t AliTRDcalibDB::GetPRFWidth(Int_t det, Int_t col, Int_t row)
 {
   //
index cf169c2..dc6dd99 100644 (file)
@@ -50,6 +50,7 @@ class AliTRDcalibDB : public TObject {
         AliTRDCalROC        *GetGainFactorROC(Int_t det);
   const AliTRDCalDet        *GetGainFactorDet();
 
+        AliTRDCalROC        *GetPRFROC(Int_t det);
   Float_t                    GetPRFWidth(Int_t det, Int_t col, Int_t row);
 
   Int_t                      GetNumberOfTimeBins();
index 3f83072..bef947b 100644 (file)
@@ -31,11 +31,11 @@ ClassImp(AliTRDcluster)
 AliTRDcluster::AliTRDcluster() 
   :AliCluster() 
   ,fDetector(0)
-  ,fX(0)
   ,fTimeBin(0)
   ,fQ(0)
   ,fNPads(0)
   ,fCenter(0)
+  ,fPad(0)
 { 
   //
   // Default constructor
@@ -51,11 +51,11 @@ AliTRDcluster::AliTRDcluster()
 AliTRDcluster::AliTRDcluster(const AliTRDrecPoint &p)
   :AliCluster()
   ,fDetector(p.GetDetector())
-  ,fX(0)
   ,fTimeBin(p.GetLocalTimeBin())
   ,fQ(p.GetEnergy())
   ,fNPads(0)
   ,fCenter(0)
+  ,fPad(0)
 {
   //
   // Constructor from AliTRDrecPoint
@@ -79,11 +79,11 @@ AliTRDcluster::AliTRDcluster(const AliTRDrecPoint &p)
 AliTRDcluster::AliTRDcluster(const AliTRDcluster &c)
   :AliCluster()
   ,fDetector(c.fDetector)
-  ,fX(c.fX)
   ,fTimeBin(c.fTimeBin)
   ,fQ(c.fQ)
   ,fNPads(c.fNPads)
   ,fCenter(c.fCenter)
+  ,fPad(c.fPad)
 {
   //
   // Copy constructor 
index c27a402..84a11d0 100644 (file)
@@ -38,8 +38,8 @@ class AliTRDcluster : public AliCluster {
   virtual void     SetDetector(Int_t d)         { fDetector = d;    } 
           void     SetLocalTimeBin(Int_t t)     { fTimeBin  = t;    }
           void     SetQ(Float_t q)              { fQ        = q;    }
-  virtual void     SetX(Float_t x)              { fX        = x;    }
           void     SetCenter(Float_t c)         { fCenter   = c;    }
+         void     SetPad(UChar_t pad)          { fPad      = pad;  }
           void     SetSignals(Short_t *signals);
           void     Set2pad()                    { SetBit(k2pad);  fNPads = 2; }
           void     Set3pad()                    { SetBit(k3pad);  fNPads = 3; }
@@ -50,9 +50,9 @@ class AliTRDcluster : public AliCluster {
   virtual Int_t    GetDetector() const          { return fDetector; }
           Int_t    GetLocalTimeBin() const      { return fTimeBin;  }
           Float_t  GetQ() const                 { return fQ;        }
-  virtual Float_t  GetX() const                 { return fX;        }
           Int_t    GetNPads() const             { return fNPads;    }
           Float_t  GetCenter() const            { return fCenter;   }
+         Int_t    GetPad() const               { return fPad;      }
           Short_t *GetSignals()                 { return fSignals;  }
           Float_t  GetSumS() const;
 
@@ -67,14 +67,14 @@ class AliTRDcluster : public AliCluster {
           };
   
           Int_t   fDetector;       //  TRD detector number
-          Float_t fX;              //  Local x position (first order proportional to time bin)
           Char_t  fTimeBin;        //  Time bin number within the detector
           Float_t fQ;              //  Amplitude 
           Char_t  fNPads;          //  Number of pads in cluster
           Float_t fCenter;         //  Center of the cluster relative to the pad 
+         UChar_t fPad;            //  Central pad number
           Short_t fSignals[7];     //  Signals in the cluster
   
-  ClassDef(AliTRDcluster,3)        //  Cluster for the TRD
+  ClassDef(AliTRDcluster,4)        //  Cluster for the TRD
  
 };
 
index 584dac7..ac95778 100644 (file)
@@ -273,7 +273,8 @@ Bool_t AliTRDclusterizer::WriteClusters(Int_t det)
 AliTRDcluster* AliTRDclusterizer::AddCluster(Double_t *pos, Int_t timebin
                                            , Int_t det, Double_t amp
                                           , Int_t *tracks, Double_t *sig
-                                           , Int_t iType, Float_t center)
+                                           , Int_t iType, Int_t col
+                                           , Float_t center)
 {
   //
   // Add a cluster for the TRD
@@ -290,6 +291,7 @@ AliTRDcluster* AliTRDclusterizer::AddCluster(Double_t *pos, Int_t timebin
   c->SetSigmaZ2(sig[1]);
   c->SetLocalTimeBin(timebin);
   c->SetCenter(center);
+  c->SetPad(col);
 
   if (tracks) {
     c->AddTrackIndex(tracks);
index ba769a1..c2689f6 100644 (file)
@@ -44,7 +44,8 @@ class AliTRDclusterizer : public TNamed {
           TObjArray     *RecPoints();
   virtual AliTRDcluster *AddCluster(Double_t *pos, Int_t timebin, Int_t det
                                   , Double_t amp, Int_t *tracks
-                                 , Double_t *sig, Int_t iType, Float_t center = 0);
+                                 , Double_t *sig, Int_t iType
+                                  , Int_t col, Float_t center = 0);
 
  protected:
 
index 66f8fc1..cd29bea 100644 (file)
@@ -516,8 +516,9 @@ Bool_t AliTRDclusterizerV1::MakeClusters()
                                                   ,dummy
                                                   ,clusterSig
                                                   ,iType
-                                                   ,clusterPads[1]);
-
+                                                   ,col
+                                                  ,clusterPads[1]);
+               
                // Store the amplitudes of the pads in the cluster for later analysis
                Short_t signals[7] = { 0, 0, 0, 0, 0, 0, 0 };
                for (Int_t jPad = col-3; jPad <= col+3; jPad++) {