ddl index is added to DDlData method
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Nov 2006 16:24:37 +0000 (16:24 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Nov 2006 16:24:37 +0000 (16:24 +0000)
PMD/AliPMDCalibrator.cxx
PMD/AliPMDClusterFinder.cxx
PMD/AliPMDDigitizer.cxx
PMD/AliPMDtracker.cxx

index 106076a..9db7ec3 100644 (file)
@@ -229,7 +229,7 @@ void AliPMDCalibrator::CalculateIsoCell()
       for (Int_t iddl = 0; iddl < kDDL; iddl++)
        {
          reader.Select("PMD", iddl, iddl);
-         stream.DdlData(&pmdddlcont);
+         stream.DdlData(iddl,&pmdddlcont);
          
          Int_t ientries = pmdddlcont.GetEntries();
          for (Int_t ient = 0; ient < ientries; ient++)
index 439ed43..cfea1a9 100644 (file)
@@ -43,6 +43,7 @@
 #include "AliPMDCalibData.h"
 #include "AliPMDddldata.h"
 
+#include "AliDAQ.h"
 #include "AliCDBManager.h"
 #include "AliCDBEntry.h"
 
@@ -88,8 +89,20 @@ AliPMDClusterFinder::AliPMDClusterFinder(AliRunLoader* runLoader):
 //
 }
 // ------------------------------------------------------------------------- //
-AliPMDClusterFinder::AliPMDClusterFinder(const AliPMDClusterFinder & /*finder*/):
-  TObject(/*finder*/)
+AliPMDClusterFinder::AliPMDClusterFinder(const AliPMDClusterFinder & finder):
+  TObject(finder),
+  fRunLoader(0),
+  fPMDLoader(0),
+  fCalibData(GetCalibData()),
+  fTreeD(0),
+  fTreeR(0),
+  fDigits(NULL),
+  fRecpoints(NULL),
+  fRechits(NULL),
+  fNpoint(0),
+  fNhit(0),
+  fDetNo(0),
+  fEcut(0.)
 {
   // copy constructor
   AliError("Copy constructor not allowed");
@@ -131,6 +144,7 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt)
   // Converts digits to recpoints after running clustering
   // algorithm on CPV plane and PREshower plane
   //
+
   Int_t    det = 0,smn = 0;
   Int_t    xpos,ypos;
   Float_t  adc;
@@ -188,11 +202,10 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt)
          
          // CALIBRATION
          Float_t gain = fCalibData->GetGainFact(det,smn,xpos,ypos);
-        // printf("adc = %d gain = %f\n",adc,gain);
+         // printf("adc = %d gain = %f\n",adc,gain);
          
          adc = adc*gain;
 
-
          //Int_t trno   = pmddigit->GetTrackNumber();
          fCellADC[xpos][ypos] = (Double_t) adc;
        }
@@ -253,6 +266,8 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
   // Converts RAW data to recpoints after running clustering
   // algorithm on CPV and PREshower plane
   //
+  // This method is called at the time of reconstruction
+
 
   Float_t  clusdata[6];
   TObjArray pmdddlcont;
@@ -269,12 +284,13 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
 
   TBranch * branch2 = clustersTree->Branch("PMDRechit", &fRechits, bufsize); 
 
-  const Int_t kDDL = 6;
+  const Int_t kDDL = AliDAQ::NumberOfDdls("PMD");
   const Int_t kRow = 48;
   const Int_t kCol = 96;
 
   Int_t idet = 0;
   Int_t iSMN = 0;
+
   
   for (Int_t indexDDL = 0; indexDDL < kDDL; indexDDL++)
     {
@@ -306,8 +322,11 @@ void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
       ResetCellADC();
       rawReader->Reset();
       AliPMDRawStream pmdinput(rawReader);
+
       rawReader->Select("PMD", indexDDL, indexDDL);
-      pmdinput.DdlData(&pmdddlcont);
+
+      pmdinput.DdlData(indexDDL,&pmdddlcont);
+
       Int_t indexsmn = 0;
       Int_t ientries = pmdddlcont.GetEntries();
       for (Int_t ient = 0; ient < ientries; ient++)
@@ -495,7 +514,7 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt, AliRawReader *rawReader)
   TBranch *branch1 = fTreeR->Branch("PMDRecpoint", &fRecpoints, bufsize); 
   TBranch *branch2 = fTreeR->Branch("PMDRechit", &fRechits, bufsize); 
 
-  const Int_t kDDL = 6;
+  const Int_t kDDL = AliDAQ::NumberOfDdls("PMD");
   const Int_t kRow = 48;
   const Int_t kCol = 96;
 
@@ -531,10 +550,10 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt, AliRawReader *rawReader)
        }
       ResetCellADC();
       rawReader->Reset();
-      AliPMDRawStream pmdinput(rawReader);
       rawReader->Select("PMD", indexDDL, indexDDL);
-      
-      pmdinput.DdlData(&pmdddlcont);
+
+      AliPMDRawStream pmdinput(rawReader);
+      pmdinput.DdlData(indexDDL,&pmdddlcont);
     
       Int_t indexsmn = 0;
       Int_t ientries = pmdddlcont.GetEntries();
@@ -552,7 +571,9 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt, AliRawReader *rawReader)
 
          Float_t sig1 = (Float_t) sig;
          // CALIBRATION
-         Float_t gain = fCalibData->GetGainFact(det,smn,row,col);
+         //Float_t gain = fCalibData->GetGainFact(det,smn,row,col);
+         Float_t gain = 1.0;
+
          //printf("sig = %d gain = %f\n",sig,gain);
          sig = (Int_t) (sig1*gain);
 
index 7d76dbc..e17b0a2 100644 (file)
@@ -63,13 +63,14 @@ AliPMDDigitizer::AliPMDDigitizer() :
   fPMDHit(0),
   fPMD(0),
   fPMDLoader(0),
+  fCalibData(GetCalibData()),
   fSDigits(0),
   fDigits(0),
   fCell(0),
   fNsdigit(0),
   fNdigit(0),
   fDetNo(0),
-  fZPos(361.5)// in units of cm, This is the default position of PMD
+  fZPos(361.5)   // in units of cm, default position of PMD
 {
   // Default Constructor
   //
@@ -87,12 +88,24 @@ AliPMDDigitizer::AliPMDDigitizer() :
            }
        }
     }
-  fCalibData = GetCalibData();
+
 
 }
 //____________________________________________________________________________
-AliPMDDigitizer::AliPMDDigitizer(const AliPMDDigitizer& /*digitizer*/):
-  AliDigitizer(/* digitizer */)
+AliPMDDigitizer::AliPMDDigitizer(const AliPMDDigitizer& digitizer):
+  AliDigitizer(digitizer),
+  fRunLoader(0),
+  fPMDHit(0),
+  fPMD(0),
+  fPMDLoader(0),
+  fCalibData(GetCalibData()),
+  fSDigits(0),
+  fDigits(0),
+  fCell(0),
+  fNsdigit(0),
+  fNdigit(0),
+  fDetNo(0),
+  fZPos(361.5)   // in units of cm, default position of PMD
 {
   // copy constructor
   AliError("Copy constructor not allowed ");
@@ -108,12 +121,13 @@ AliPMDDigitizer & AliPMDDigitizer::operator=(const AliPMDDigitizer& /*digitizer*
   return *this;
 }
 //____________________________________________________________________________
-AliPMDDigitizer::AliPMDDigitizer(AliRunDigitizer* manager) 
-  :AliDigitizer(manager),
+AliPMDDigitizer::AliPMDDigitizer(AliRunDigitizer* manager):
+  AliDigitizer(manager),
   fRunLoader(0),
   fPMDHit(0),
   fPMD(0),
   fPMDLoader(0),
+  fCalibData(GetCalibData()),
   fSDigits(new TClonesArray("AliPMDsdigit", 1000)),
   fDigits(new TClonesArray("AliPMDdigit", 1000)),
   fCell(0),
@@ -124,7 +138,6 @@ AliPMDDigitizer::AliPMDDigitizer(AliRunDigitizer* manager)
 {
   // ctor which should be used
 
-  fCalibData = GetCalibData();
 
   for (Int_t i = 0; i < fgkTotUM; i++)
     {
@@ -141,6 +154,7 @@ AliPMDDigitizer::AliPMDDigitizer(AliRunDigitizer* manager)
        }
     }
 }
+
 //____________________________________________________________________________
 AliPMDDigitizer::~AliPMDDigitizer()
 {
index 2c8ee7b..1437645 100644 (file)
@@ -71,7 +71,21 @@ AliPMDtracker::AliPMDtracker():
 }
 //--------------------------------------------------------------------//
 AliPMDtracker:: AliPMDtracker(const AliPMDtracker & /* tracker */):
-  TObject(/* tracker */)
+  TObject(/* tracker */),
+  fTreeR(0),
+  fRecpoints(NULL),
+  fPMDcontin(NULL),
+  fPMDcontout(NULL),
+  fPMDutil(NULL),
+  fPMDrecpoint(0),
+  fPMDclin(0),
+  fPMDclout(0),
+  fXvertex(0.),
+  fYvertex(0.),
+  fZvertex(0.),
+  fSigmaX(0.),
+  fSigmaY(0.),
+  fSigmaZ(0.)
 {
   // copy constructor
   AliError("Copy constructor not allowed");