- // Case Hit Mip
- switch(type) {
-
- case kHitMip:
- case kHitCko:
- case kHitFee:
- TString nameHit;
- Int_t iCko[7]={0,0,0,0,0,0,0};
- Int_t iFee[7]={0,0,0,0,0,0,0};
- Int_t iMip[7]={0,0,0,0,0,0,0};
- Int_t iHit;
- Int_t chHit;
- Int_t indHit=0;
-
- for(Int_t iEnt=0;iEnt<fHitTree->GetEntries();iEnt++){
- fHitTree->GetEntry(iEnt);
- for(iHit=0;iHit<fHitLst->GetEntries();iHit++) { //hits loop
- AliHMPIDHit *pHit = (AliHMPIDHit*)fHitLst->At(iHit);
- chHit = pHit->Ch();
- Int_t pid = pHit->Pid();
- if(pid==50000050) iCko[chHit]++;
- if(pid==50000051) iFee[chHit]++;
- if(pid!=50000050 && pid!=50000051) iMip[chHit]++;
-
- if(type==kHitMip && ch==chHit && index==iMip[chHit]-1) {indHit = iHit;break;}
- if(type==kHitCko && ch==chHit && index==iCko[chHit]-1) {indHit = iHit;break;}
- if(type==kHitFee && ch==chHit && index==iFee[chHit]-1) {indHit = iHit;break;}
- }
- }
-
- fHitTree->GetEntry(6-ch);
- AliHMPIDHit *pHit = (AliHMPIDHit*)fHitLst->At(indHit);
-
- Float_t x=pHit->LorsX();
- Float_t y=pHit->LorsY();
- Float_t charge = pHit->Q();
- if(fPdg->GetParticle(pHit->Pid())) nameHit = fPdg->GetParticle(pHit->Pid())->GetName();
- if(pHit->Pid()==50000050) {nameHit = " Cherenkov Photon ";}
- if(pHit->Pid()==50000051) {nameHit = " Feedback Photon ";}
- text0="";text0.Append(Form("Hit x %6.2f y %6.2f",x,y));
- text2="";text2.Append(Form("Q = %7.2f ADC",charge));
- text3="";text3="Particle: "+ nameHit;
- break;
-
- case kCluster:
- TClonesArray *pClusCham=(TClonesArray*)fCluLst->At(ch); //get clusters list for this chamber
- AliHMPIDCluster *pClu = (AliHMPIDCluster*)pClusCham->At(index); //get current cluster
- text0="";text0.Append(Form("CLUSTER: x %6.2f y %6.2f",pClu->X(),pClu->Y()));
- text2="";text2.Append(Form("charge = %i ADC",(Int_t)pClu->Q()));
- break;
-
- case kTrack:
- AliHMPIDRecon rec;
- AliESDtrack *pTrk=fEsd->GetTrack(index);
- Float_t thRa,phRa,xRa,yRa; pTrk->GetHMPIDtrk(xRa,yRa,thRa,phRa);
- Float_t xPc=0,yPc=0; AliHMPIDTracker::IntTrkCha(pTrk,xPc,yPc);
- text0="";text0.Append(Form("TRACK: x %6.2f y %6.2f at PC plane",xPc,yPc));
- text2="";text2.Append(Form("p = %7.2f GeV/c",pTrk->GetP()));
- Float_t ckov=pTrk->GetHMPIDsignal();
- if(ckov>0){
- Float_t x,y;Int_t q,nacc; pTrk->GetHMPIDmip(x,y,q,nacc);
- text3="";text3.Append(Form("Theta Cherenkov %5.3f with %i photons",pTrk->GetHMPIDsignal(),nacc));
- }
- break;
- default:
+ TString str = Stack(fEvt,tid);
+
+ Float_t x=pHit->LorsX();
+ Float_t y=pHit->LorsY();
+ Float_t charge = pHit->Q();
+
+ TVector3 v = fParam->Lors2Mars(pHit->Ch(),pHit->LorsX(),pHit->LorsY());
+ Int_t cham,sect,gap,padX,padY;
+ FindPos(v,cham,sect,gap,padX,padY);
+
+ if(pHit->Pid()==50000050) {nameHit = " Cherenkov Photon ";}
+ else if(pHit->Pid()==50000051) {nameHit = " Feedback Photon ";}
+ else if(fPdg->GetParticle(pHit->Pid())) nameHit = fPdg->GetParticle(pHit->Pid())->GetName();
+ nameHit.Append(Form(" (tid %i)",tid));
+ text0="";text0.Append(Form("Hit(%5.2f,%6.2f) LORS - Pad Volume(%i,%i) - hit %i/%i",x,y,padX,padY,indHit+1,fHitLst->GetEntries()));
+ text2="";text2.Append(Form("Q = %7.2f ADC",charge));
+ text3="";text3="Particle: "+ nameHit +" "+ str;
+ } // Hit
+ else if (symbol==kCluster) {
+ TClonesArray *pClusCham=(TClonesArray*)fCluLst->At(ch); //get clusters list for this chamber
+ AliHMPIDCluster *pClu = (AliHMPIDCluster*)pClusCham->At(index); //get current cluster
+ text0="";text0.Append(Form("CLUSTER: x %6.2f y %6.2f",pClu->X(),pClu->Y()));
+ text2="";text2.Append(Form("charge = %i ADC",(Int_t)pClu->Q()));