]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 dcd296592d391327d629a1f89884eefda4670015..66f4e9611104a0d84bbd2598f128a5279e0b5f91 100644 (file)
@@ -610,6 +610,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 cf169c25c7c0e441333f938a03f1a4e9fdf65b7d..dc6dd999730bf05e0b2c0ce5b080e7c258930e22 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 3f8307212bfa39787e5c59585738a7353a80eb47..bef947b92960f8019e07279c962a0d5408b53706 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 c27a402afdef755adf0dcdc684fc1baa632129df..84a11d02838f8c31a1c494823f21073efa585233 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 584dac756a122cefab99b704aecb3f97315173ee..ac95778fec74c26507b87ad766a973b9000f8875 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 ba769a1823b3abe8da74bf12132762728e961231..c2689f63b62e9a2b25f98ffe585f27366d19cad9 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 66f8fc145ad20d15db83626594e5089f05313843..cd29bea6daf6c874abb4ddb7415da7387cf28bd6 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++) {