]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDRawDataRead.C
reduce to 50 MeV cut the print and exclude too low energy clusters
[u/mrichter/AliRoot.git] / PMD / AliPMDRawDataRead.C
index dfe11ded43ed74fc135f258b7fd5bc255cee20e9..160a60db09f12b03e04edb4ded471aa365ae1a41 100644 (file)
@@ -4,18 +4,21 @@ void AliPMDRawDataRead(Int_t iEvent)
 {
   TObjArray pmdddlcont;
   
+  TH2F *h2 = new TH2F("h2"," ",100,-100.,100.,100,-100.,100.);
+  Float_t xx, yy;
+  Int_t xpad, ypad;
+
+  AliPMDUtility cc;
+
   for(Int_t ievt = 0; ievt < iEvent; ievt++)
     {
       AliRawReaderFile reader(ievt);
       AliPMDRawStream stream(&reader);
       
-      Int_t indexDDL = 0;
-      for (Int_t iddl = 0; iddl < 6; iddl++)
+      Int_t iddl = -1;
+      while ((iddl = stream.DdlData(&pmdddlcont)) >=0)
        {
-         
-         reader.Select("PMD", iddl, iddl);
-         //cout << reader.GetDataSize() << endl;
-         stream.DdlData(indexDDL,&pmdddlcont);
+           //cout << " inside the macro DDLNO = " << iddl << endl; 
          Int_t ientries = pmdddlcont.GetEntries();
          for (Int_t ient = 0; ient < ientries; ient++)
            {
@@ -28,12 +31,34 @@ void AliPMDRawDataRead(Int_t iEvent)
              Int_t row = pmdddl->GetRow();
              Int_t col = pmdddl->GetColumn();
              Int_t sig = pmdddl->GetSignal();
-             cout<<sig<<endl;
-             
+             //cout<<sig<<endl;
+             if(smn <12)
+             {
+                 xpad = col;
+                 ypad = row;
+             }
+             else if(smn >=12 && smn < 24)
+             {
+                 xpad = row;
+                 ypad = col;
+             }
+   
+             if (det == 1)
+             {
+                 // Draw only for PRE plane
+                 cc.RectGeomCellPos(smn,xpad,ypad,xx,yy);
+
+                 h2->Fill(xx,yy);
+             }
+
+
+
            }
          pmdddlcont.Clear();
          
        }
 
     }
-}
\ No newline at end of file
+
+  h2->Draw();
+}