Implementation of the correction factor for ring angular resolution as a function...
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Jul 2012 14:41:43 +0000 (14:41 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Jul 2012 14:41:43 +0000 (14:41 +0000)
HMPID/AliHMPIDParam.h
HMPID/AliHMPIDPid.cxx

index 7e6d36a..6aa31a7 100644 (file)
@@ -139,10 +139,11 @@ public:
   void     SetThreshold   (Int_t thres                                         ) {fgThreshold = thres;}                 //set sigma cut        
   void     SetInstanceType(Bool_t inst                                         ) {fgInstanceType = inst;}             //kTRUE if from geomatry kFALSE if from ideal geometry
   //For PID
-  Double_t SigLoc      (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh,Double_t beta);//error due to cathode segmetation
-  Double_t SigGeom     (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh,Double_t beta);//error due to unknown photon origin
-  Double_t SigCrom     (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh,Double_t beta);//error due to unknonw photon energy
-  Double_t Sigma2      (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh              );//photon candidate sigma^2
+  Double_t SigLoc         (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh,Double_t beta);//error due to cathode segmetation
+  Double_t SigGeom        (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh,Double_t beta);//error due to unknown photon origin
+  Double_t SigCrom        (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh,Double_t beta);//error due to unknonw photon energy
+  Double_t Sigma2         (Double_t trkTheta,Double_t trkPhi,Double_t ckovTh,Double_t ckovPh              );//photon candidate sigma^2
+  static Double_t SigmaCorrFact  (Double_t occupancy                                                             ) {return 0.109*occupancy + 1.15;}//correction facotor for theoretical resolution
 
   //Mathieson Getters
   
index 88c2055..4a66750 100644 (file)
@@ -101,9 +101,14 @@ Double_t AliHMPIDPid::Resolution(Double_t thetaCerTh, AliESDtrack *pTrk)
   AliHMPIDParam *pParam = AliHMPIDParam::Instance();
       
   AliHMPIDRecon rec;
-  Float_t xRa,yRa,thRa,phRa;
-  pTrk->GetHMPIDtrk(xRa,yRa,thRa,phRa);
+  Float_t xPc,yPc,thRa,phRa;
+  pTrk->GetHMPIDtrk(xPc,yPc,thRa,phRa);
+  
+  Double_t xRa = xPc - (pParam->RadThick()+pParam->WinThick()+pParam->GapThick())*TMath::Cos(phRa)*TMath::Tan(thRa); //just linear extrapolation back to RAD
+  Double_t yRa = yPc - (pParam->RadThick()+pParam->WinThick()+pParam->GapThick())*TMath::Sin(phRa)*TMath::Tan(thRa); //just linear extrapolation back to RAD
   rec.SetTrack(xRa,yRa,thRa,phRa);
+  
+  Double_t occupancy = pTrk->GetHMPIDoccupancy();
   Double_t thetaMax = TMath::ACos(1./pParam->MeanIdxRad());
   Int_t nPhots = (Int_t)(21.*TMath::Sin(thetaCerTh)*TMath::Sin(thetaCerTh)/(TMath::Sin(thetaMax)*TMath::Sin(thetaMax))+0.01);
 
@@ -125,5 +130,5 @@ Double_t AliHMPIDPid::Resolution(Double_t thetaCerTh, AliESDtrack *pTrk)
     }      
     if(invSigma!=0) sigmatot += 1./TMath::Sqrt(invSigma);  
   }
-  return sigmatot/nTrks;
+  return (sigmatot/nTrks)*pParam->SigmaCorrFact(occupancy);
 }