]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Method to calculate the acceptance of ring from external added
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 May 2010 08:38:59 +0000 (08:38 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 May 2010 08:38:59 +0000 (08:38 +0000)
HMPID/AliHMPIDRecon.cxx
HMPID/AliHMPIDRecon.h

index 0e832ebba7efb30e7bef5bbaf514f9e3941aeaed..630716a58d99862692b45e1b390c9619cfb19932 100644 (file)
@@ -474,3 +474,25 @@ Double_t AliHMPIDRecon::HoughResponse()
   return (Double_t)(locMax*fDTheta+0.5*fDTheta); //final most probable track theta ckov   
 }//HoughResponse()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  Double_t AliHMPIDRecon::FindRingExt(Double_t ckov,Double_t xPc,Double_t yPc,Double_t thRa,Double_t phRa)
+{
+// To find the acceptance of the ring even from external inputs. 
+//    
+//       
+  Double_t xRa = xPc - (fParam->RadThick()+fParam->WinThick()+fParam->GapThick())*TMath::Cos(phRa)*TMath::Tan(thRa); //just linear extrapolation back to RAD
+  Double_t yRa = yPc - (fParam->RadThick()+fParam->WinThick()+fParam->GapThick())*TMath::Sin(phRa)*TMath::Tan(thRa);
+  
+  Int_t nStep = 500;
+  Int_t nPhi = 0;  
+  
+  if(ckov>0){
+    SetTrack(xRa,yRa,thRa,phRa);
+    for(Int_t j=0;j<nStep;j++){
+      TVector2 pos; pos=TracePhot(ckov,j*TMath::TwoPi()/(Double_t)(nStep-1));
+      if(fParam->IsInDead(pos.X(),pos.Y())) continue;
+      nPhi++;
+    }//point loop
+  return ((Double_t)nPhi/(Double_t)nStep); 
+  }//if
+  return -1;
+}  
index 986507a2181c3a5fc7380fe14df3630006bfaad1..050109c07519e5f6f72268392e92657d674b1c07 100644 (file)
@@ -47,6 +47,7 @@ public :
                         {return fRingArea;}                                                        //area of the current ring in cm^2 
   Double_t GetRingAcc   (                                                                   )const
                         {return fRingAcc;}                                                         //portion of the ring ([0,1]) accepted by geometry.To scale n. of photons 
+  Double_t FindRingExt  (Double_t ckov,Double_t xPc,Double_t yPc,Double_t thRa,Double_t phRa);     //find ring acceptance by external parameters
   void     SetTrack     (Double_t xRad,Double_t yRad,Double_t theta,Double_t phi            )
                                 {fTrkDir.SetMagThetaPhi(1,theta,phi);  fTrkPos.Set(xRad,yRad);}    //set track parameter at RAD
   void     SetImpPC     (Double_t xPc,Double_t yPc                                          )