]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/Hdisp.C
Evaluation of xRa and yRa to draw rings done.
[u/mrichter/AliRoot.git] / HMPID / Hdisp.C
index e4fb07ec024dd9304addbd5ab45047e833300195..c706ba64323313970f04506507f2c2b53612e6e3 100644 (file)
@@ -144,8 +144,19 @@ void PrintSdis()
 void PrintDigs()
 {//prints a list of HMPID digits
   Printf("List of HMPID digits for event %i",fEvt);  
-  fDigLst->Print();
-  Int_t iTot=0;  for(Int_t i=0;i<7;i++) {iTot+=((TClonesArray*)fDigLst->At(i))->GetEntries();}
+//  fDigLst->Print();
+  
+  Int_t iTot=0;  
+  for(Int_t iCh=0;iCh<7;iCh++) {
+    iTot+=((TClonesArray*)fDigLst->At(iCh))->GetEntries();
+
+    TClonesArray *pDigCham=(TClonesArray*)fDigLst->At(iCh);         //get digs list for this chamber
+    for(Int_t iDig=0;iDig<pDigCham->GetEntries();iDig++){            //digs loop
+      AliHMPIDDigit *pDig = (AliHMPIDDigit*)pDigCham->At(iDig);
+      pDig->Print();
+    }//Digit loop
+  }//chamber loop 
+    
   Printf("totally %i digits for event %i",iTot,fEvt);
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -153,8 +164,16 @@ void PrintClus()
 {//prints a list of HMPID clusters  for a given event
   Printf("List of HMPID clusters for event %i",fEvt);
   
-  fCluLst->Print();
-  Int_t iTot=0; for(Int_t iCh=0;iCh<7;iCh++) iTot+=((TClonesArray*)fCluLst->At(iCh))->GetEntries();
+//  fCluLst->Print();
+  
+  Int_t iTot=0; for(Int_t iCh=0;iCh<7;iCh++) {
+    iTot+=((TClonesArray*)fCluLst->At(iCh))->GetEntries();
+    TClonesArray *pClusCham=(TClonesArray*)fCluLst->At(iCh);         //get clusters list for this chamber
+    for(Int_t iClu=0;iClu<pClusCham->GetEntries();iClu++){           //clusters loop
+      AliHMPIDCluster *pClu = (AliHMPIDCluster*)pClusCham->At(iClu); //get current cluster        
+      pClu->Print();
+    }
+  }
   
   Printf("totally %i clusters for event %i",iTot,fEvt);
 }
@@ -171,14 +190,18 @@ void PrintEsd()
     Double_t pMomOut = TMath::Sqrt(pout[0]*pout[0]+pout[1]*pout[1]+pout[2]*pout[2]);
     
     Float_t x,y;Int_t q,nacc;   pTrk->GetHMPIDmip(x,y,q,nacc);
+    Float_t xra,yra,th,ph; pTrk->GetHMPIDtrk(xra,yra,th,ph);
+//    Printf("xra %f yra %f th %f phi %f",xra,yra,th,ph);
     Int_t ch,idx,size;
     Int_t word = pTrk->GetHMPIDcluIdx();
     ch = word/1000000;
     word = word%1000000;
     size = word/1000;
     idx = word%1000;
-    Printf("Track %02i Ch. %2i with pOuter %7.2f with ThetaCer %7.3f with %3i photons with MIP Q %4i size %2i (idx %3i)",iTrk,ch,pMomOut,
-        pTrk->GetHMPIDsignal(),nacc,q,size,idx);
+    Double_t rout[3]; pTrk->GetOuterXYZ(rout);
+    vol = gGeoManager->FindNode(rout[0],rout[1],rout[2]);
+    Printf("Trk %02i Ch.%2i (%5.2f,%5.2f) pOut %7.2f ThCer %7.3f phots %3i QMip %4i size %2i (idx %3i) in vol. %s",iTrk,ch,
+        xra,yra,pMomOut,pTrk->GetHMPIDsignal(),nacc,q,size,idx,vol->GetName());
   }  
 }//PrintEsd()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -348,7 +371,11 @@ void RenderEsd(AliESDEvent *pEsd)
     AliESDtrack *pTrk=pEsd->GetTrack(iTrk);    Int_t ch=pTrk->GetHMPIDcluIdx(); //get track and chamber intersected by it
     ch/=1000000;
     Float_t xPc,yPc,xRa,yRa,thRa,phRa; 
-    pTrk->GetHMPIDtrk(xRa,yRa,thRa,phRa);;
+    pTrk->GetHMPIDtrk(xPc,yPc,thRa,phRa);;
+    
+    xRa = xPc - (fParam->RadThick()+fParam->WinThick()+fParam->GapThick())*TMath::Cos(phRa)*TMath::Tan(thRa); //just linear extrapolation back to RAD
+    yRa = yPc - (fParam->RadThick()+fParam->WinThick()+fParam->GapThick())*TMath::Sin(phRa)*TMath::Tan(thRa);
+    
     if(ch<AliHMPIDParam::AliHMPIDParam::kMinCh||ch>AliHMPIDParam::kMaxCh) continue;//this track does not intersect any chamber
     Int_t npTrk = fRenTxC[ch]->SetNextPoint(xRa,yRa);                           //add this intersection point
     Float_t ckov=pTrk->GetHMPIDsignal();                                        //get ckov angle stored for this track