X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HMPID%2FAliHMPIDHit.cxx;h=54888d4b4f3fd0ee072eb600694d44b047c1d6fa;hb=5b531552bece945625c4ef74046ec25abdf19f9c;hp=6b289fad1b2b4ca15e31754697986e1db6180671;hpb=d1bf51e18ff2a958bda57c0e6462358a55d29dd0;p=u%2Fmrichter%2FAliRoot.git diff --git a/HMPID/AliHMPIDHit.cxx b/HMPID/AliHMPIDHit.cxx index 6b289fad1b2..54888d4b4f3 100644 --- a/HMPID/AliHMPIDHit.cxx +++ b/HMPID/AliHMPIDHit.cxx @@ -14,24 +14,46 @@ // ************************************************************************** #include "AliHMPIDHit.h" //class header -#include "AliHMPIDDigit.h" -#include -#include - +#include //Draw() Print() +#include //Draw() +#include //Hit2Sdi() +#include "AliHMPIDParam.h" ClassImp(AliHMPIDHit) //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDHit::Draw(Option_t*) { +// Draw option of the hits in the display Int_t iMark; switch(Pid()){ case 50000050: iMark=4; break; case 50000051: iMark=27; break; default: iMark=26; break; } - TMarker *pMark=new TMarker(LorsX(),LorsY(),iMark); pMark->SetMarkerColor(kRed); pMark->Draw(); -} + TMarker *pMark=new TMarker(fLx,fLy,iMark); pMark->SetMarkerColor(kRed); pMark->Draw(); +}//Draw //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -void AliHMPIDHit::Print(Option_t*)const +void AliHMPIDHit::Hit2Sdi(TClonesArray *pSdiLst,Int_t iHow)const +{ +// Adds sdigits of this hit to the list +// Arguments: pSdiLst- sigits list where to add new sdgits +// iHow- how many pads to check +// Returns: none + Int_t pc,px,py; + AliHMPIDParam::Lors2Pad(fLx,fLy,pc,px,py); if(py<0) return; //check if the hit in dead zone. Should never happen during trasport! + + AliHMPIDDigit dig; + Int_t iSdiCnt=pSdiLst->GetEntries(); //list of sdigits contains sdigits from previous ivocations of Hit2Sdi, do not override them + + for(Int_t i=-iHow;i<=iHow;i++){ //horizontal loop + for(Int_t j=-iHow;j<=iHow;j++){ //vertical loop + if(dig.Set(fCh,pc,px+i,py+j,fTrack)) continue; + dig.SetQ(fQ*dig.IntMathieson(fLx,fLy)); + new((*pSdiLst)[iSdiCnt++]) AliHMPIDDigit(dig); + } + } +}//Hit2Sdi +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +void AliHMPIDHit::Print(Option_t *opt)const { //Print hit char *sPart=Form("pid=%i",Pid()); @@ -50,8 +72,8 @@ void AliHMPIDHit::Print(Option_t*)const case 50000051: sPart="feed";break; } - Printf("HIT:(%7.3f,%7.3f) Q=%8.3f ch=%i TID= %5i, MARS=(%7.2f,%7.2f,%7.2f) %s %s", - LorsX(),LorsY(), Q(), Ch(), Tid(), X(), Y(), Z(), sPart, - (AliHMPIDDigit::IsInDead(LorsX(),LorsY()))? "IN DEAD ZONE":""); -} + Printf("%sHIT: ch=%i (%7.6f,%7.6f) Q=%8.3f TID= %5i, MARS=(%7.2f,%7.2f,%7.2f) %s %s", + opt, Ch(), fLx,fLy, fQ, fTrack, X(), Y(), Z(), sPart, + (AliHMPIDParam::IsInDead(LorsX(),LorsY()))? "IN DEAD ZONE":""); +}//Print //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++