]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDRecpointRead.C
possiblity to read ESD friends (Jacek)
[u/mrichter/AliRoot.git] / PMD / AliPMDRecpointRead.C
index 87406862eaff91cf4e1e1bf940b9bc1f9d97cb96..8d93a02a39e25f52ad8d3877861fb1063209ecbb 100644 (file)
@@ -15,7 +15,7 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
 {
   if (gAlice)
     { 
-      delete gAlice->GetRunLoader();
+      delete AliRunLoader::Instance();
       delete gAlice;//if everything was OK here it is already NULL
       gAlice = 0x0;
     }
@@ -54,12 +54,11 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
        }
 
       AliPMDrecpoint1  *pmdrecpoint;
-      TBranch *branch = treeR->GetBranch("PMDRecpoint");
-      branch->SetAddress(&fRecpoints);
+      TBranch *branch1 = treeR->GetBranch("PMDRecpoint");
+      branch1->SetAddress(&fRecpoints);
       /**********************************************************************
        *    det   : Detector, 0: PRE & 1:CPV                                *
-       *    smn   : Serial Module Number from which Super Module Number     *
-       *            and Unit Module Numbers are extracted                   *
+       *    smn   : Serial Module Number from 0 to 23 for both detector     *
        *    xpos  : x-position of the cluster                               *
        *    ypos  : y-position of the cluster                               *
        *            THESE xpos & ypos are not the true xpos and ypos        *
@@ -67,21 +66,19 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
        *    adc   : ADC contained in the cluster                            *
        *    ncell : Number of cells contained in the cluster                *
        *    rad   : radius of the cluster (1d fit)                          *
-       *    ism   : Supermodule number extracted from smn                   *
-       *    ium   : Unit module number extracted from smn                   *
        *    xpad  : TRUE x-position of the cluster                          *
        *    ypad  : TRUE y-position of the cluster                          *
        **********************************************************************/
-      Int_t   ism, ium;
+
       Int_t   det,smn;
       Float_t xpos,ypos, xpad, ypad;
-      Float_t adc, ncell, rad;
+      Float_t adc, ncell, sigx, sigy;
       Float_t xx, yy;
-      Int_t   nmodules = treeR->GetEntries();
+      Int_t   nmodules = branch1->GetEntries();
       cout << " nmodules = " << nmodules << endl;
       for (Int_t imodule = 0; imodule < nmodules; imodule++)
        {
-         treeR->GetEntry(imodule); 
+         branch1->GetEntry(imodule); 
          Int_t nentries = fRecpoints->GetLast();
          for(Int_t ient = 0; ient < nentries+1; ient++)
            {
@@ -92,43 +89,24 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
              ypos  = pmdrecpoint->GetClusY();
              adc   = pmdrecpoint->GetClusADC();
              ncell = pmdrecpoint->GetClusCells();
-             rad   = pmdrecpoint->GetClusRadius();
-             //
-             // Now change the xpos and ypos to its original values
-             // for the unit modules which are earlier changed.
-             // xpad and ypad are the real positions.
-             //
-             if(det == 0 || det == 1)
-               {
-                 if(smn < 12)
-                   {
-                     ism  = smn/6;
-                     ium  = smn - ism*6;
-                     xpad = ypos;
-                     ypad = xpos;
-                   }
-                 else if( smn >= 12 && smn < 24)
-                   {
-                     ism  = smn/6;
-                     ium  = smn - ism*6;
-                     xpad = xpos;
-                     ypad = ypos;
-                   }
-               }
+             sigx  = pmdrecpoint->GetClusSigmaX();
+             sigy  = pmdrecpoint->GetClusSigmaY();
+
              //
              // User has to plug in his analysis code here
              //
 
-             fprintf(fpw,"%d %d %d %d %f %f %f %f %f\n",
-                     det,smn,ism,ium,xpad,ypad,adc,ncell,rad);
+             fprintf(fpw,"%d %d %d %d\n",
+                     det,smn,xpos,ypos);
              //
              // Plot the cluster centroid to see the PMD geometry
              // using the PMD Utility class
              //
-             if (det == 1)
+             if (det == 0)
                {
                  // Draw only for PRE plane
-                 cc->RectGeomCellPos(ism,ium,xpad,ypad,xx,yy);
+                 //cc->RectGeomCellPos(ism,xpad,ypad,xx,yy);
+                 cc->RectGeomCellPos(smn,xpos,ypos,xx,yy);
                  h2->Fill(xx,yy);
                }