From 67a1c24c110493b7f9fafa2ffba3cd7f11936acc Mon Sep 17 00:00:00 2001 From: dibari Date: Mon, 2 Apr 2007 12:26:33 +0000 Subject: [PATCH] Right LRS for photon cerenkov angle reconstruction --- HMPID/AliHMPIDRecon.cxx | 45 +++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/HMPID/AliHMPIDRecon.cxx b/HMPID/AliHMPIDRecon.cxx index 9db34ee4e65..7287f3e2b93 100644 --- a/HMPID/AliHMPIDRecon.cxx +++ b/HMPID/AliHMPIDRecon.cxx @@ -68,8 +68,7 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n Float_t xRa,yRa,th,ph; pTrk->GetHMPIDtrk(xRa,yRa,th,ph); //initialize this track: th and ph angles at middle of RAD - - th=TMath::Pi()- th; // right XYZ local orientation +// ph-=TMath::Pi(); // right XYZ local orientation SetTrack(xRa,yRa,th,ph); fRadNmean=nmean; @@ -112,24 +111,21 @@ Bool_t AliHMPIDRecon::FindPhotCkov(Double_t cluX,Double_t cluY,Double_t &thetaCe TVector3 dirCkov; - Double_t zRad= 0.5*AliHMPIDRecon::fgkRadThick - +AliHMPIDRecon::fgkWinThick - +AliHMPIDRecon::fgkGapThick; //z position of middle of RAD - - TVector3 rad(fTrkPos.X(),fTrkPos.Y(),zRad); //impact point at middle of RAD - TVector3 pc(cluX,cluY,0); //mip at PC: z=0 @ PC + Double_t zRad= -0.5*fgkRadThick-0.5*fgkWinThick; //z position of middle of RAD + TVector3 rad(fTrkPos.X(),fTrkPos.Y(),zRad); //impact point at middle of RAD + TVector3 pc(cluX,cluY,0.5*fgkWinThick+fgkGapIdx); //mip at PC Double_t cluR = TMath::Sqrt((cluX-fTrkPos.X())*(cluX-fTrkPos.X())+ (cluY-fTrkPos.Y())*(cluY-fTrkPos.Y()));//ref. distance impact RAD-CLUSTER - Double_t phi=(pc-rad).Phi(); //phi of photon + Double_t phi=(pc-rad).Phi(); //phi of photon Double_t ckov1=0; - Double_t ckov2=TMath::Pi()-fTrkDir.Theta()+0.75; //start to find theta cerenkov in DRS + Double_t ckov2=0.75+fTrkDir.Theta(); //start to find theta cerenkov in DRS const Double_t kTol=0.01; Int_t iIterCnt = 0; while(1){ if(iIterCnt>=50) return kFALSE; Double_t ckov=0.5*(ckov1+ckov2); - dirCkov.SetMagThetaPhi(1,TMath::Pi()-ckov,phi); + dirCkov.SetMagThetaPhi(1,ckov,phi); TVector2 posC=TraceForward(dirCkov); //trace photon with actual angles Double_t dist=cluR-(posC-fTrkPos).Mod(); //get distance between trial point and cluster position if(posC.X()==-999) dist = - 999; //total reflection problem @@ -139,7 +135,6 @@ Bool_t AliHMPIDRecon::FindPhotCkov(Double_t cluX,Double_t cluY,Double_t &thetaCe else{ //precision achived: ckov in DRS found dirCkov.SetMagThetaPhi(1,ckov,phi); // RecPhot(dirCkov,thetaCer,phiCer); //find ckov (in TRS:the effective Cherenkov angle!) - thetaCer = TMath::Pi() - thetaCer; return kTRUE; } } @@ -151,17 +146,15 @@ TVector2 AliHMPIDRecon::TraceForward(TVector3 dirCkov)const // Arguments: dirCkov photon vector in LORS // Returns: pos of traced photon at PC TVector2 pos(-999,-999); - Double_t thetaCer = TMath::Pi()-dirCkov.Theta(); - if(thetaCer > TMath::ASin(1./fRadNmean)) return pos; //total refraction on WIN-GAP boundary - Double_t zRad= 0.5*AliHMPIDRecon::fgkRadThick - +AliHMPIDRecon::fgkWinThick - +AliHMPIDRecon::fgkGapThick; //z position of middle of RAD - TVector3 posCkov(fTrkPos.X(),fTrkPos.Y(),zRad); //RAD: photon position is track position @ middle of RAD - Propagate(dirCkov,posCkov,fgkWinThick+fgkGapThick); //go to RAD-WIN boundary - Refract (dirCkov, fRadNmean,fgkWinIdx ); //RAD-WIN refraction - Propagate(dirCkov,posCkov, fgkGapThick); //go to WIN-GAP boundary - Refract (dirCkov, fgkWinIdx,fgkGapIdx ); //WIN-GAP refraction - Propagate(dirCkov,posCkov, 0); //go to PC + Double_t thetaCer = dirCkov.Theta(); + if(thetaCer > TMath::ASin(1./fRadNmean)) return pos; //total refraction on WIN-GAP boundary + Double_t zRad= -0.5*fgkRadThick-0.5*fgkWinThick; //z position of middle of RAD + TVector3 posCkov(fTrkPos.X(),fTrkPos.Y(),zRad); //RAD: photon position is track position @ middle of RAD + Propagate(dirCkov,posCkov, -0.5*fgkWinThick); //go to RAD-WIN boundary + Refract (dirCkov, fRadNmean,fgkWinIdx); //RAD-WIN refraction + Propagate(dirCkov,posCkov, 0.5*fgkWinThick); //go to WIN-GAP boundary + Refract (dirCkov, fgkWinIdx,fgkGapIdx); //WIN-GAP refraction + Propagate(dirCkov,posCkov,0.5*fgkWinThick+fgkGapThick); //go to PC pos.Set(posCkov.X(),posCkov.Y()); return pos; }//TraceForward() @@ -268,8 +261,6 @@ TVector2 AliHMPIDRecon::TracePhot(Double_t ckovThe,Double_t ckovPhi)const TRotation mrot=mphi*mtheta; TVector3 dirCkov,dirCkovTors; - ckovThe = TMath::Pi()-ckovThe; - dirCkovTors.SetMagThetaPhi(1,ckovThe,ckovPhi); //initially photon is directed according to requested ckov angle dirCkov=mrot*dirCkovTors; //now we know photon direction in LORS return TraceForward(dirCkov); @@ -298,9 +289,9 @@ void AliHMPIDRecon::Refract(TVector3 &dir,Double_t n1,Double_t n2)const // n2 - ref idx of second substance // Returns: none // On exit: dir is new direction - Double_t sinref=(n1/n2)*TMath::Sin(TMath::Pi()-dir.Theta()); + Double_t sinref=(n1/n2)*TMath::Sin(dir.Theta()); if(sinref>1.) dir.SetXYZ(-999,-999,-999); - else dir.SetTheta(TMath::Pi()-TMath::ASin(sinref)); + else dir.SetTheta(TMath::ASin(sinref)); }//Refract() //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Double_t AliHMPIDRecon::HoughResponse() -- 2.43.0