The ALEPH parameterization of the Bethe-Bloch formula is now a function of STEER...
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Dec 2008 16:56:50 +0000 (16:56 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Dec 2008 16:56:50 +0000 (16:56 +0000)
PWG1/AliGenInfoMaker.h
PWG1/AliMCInfo.cxx
PWG1/AliMCInfo.h
STEER/AliGenInfo.C
STEER/AliGenInfo.h
STEER/AliMathBase.cxx
STEER/AliMathBase.h

index ff0d950..2325e2e 100644 (file)
@@ -71,7 +71,6 @@ protected:
   Float_t TR2LocalX(AliTrackReference *trackRef,
                    AliTPCParam *paramTPC) const;
   AliTPCParam * GetTPCParam();
-  Float_t TPCBetheBloch(Float_t bg);
   //
   TObjArray *fGenTracksArray;  //clones array with filtered particles
   TObjArray *fGenKinkArray;    //clones array with filtered Kinks
index 986305b..bf55a38 100644 (file)
@@ -48,6 +48,7 @@ IMPORTANT FOR PROOF FAST PROTOTYPING ANALYSIS
 //ALIROOT includes
 #include "AliTrackReference.h"
 #include "AliMCInfo.h" 
+#include "AliMathBase.h" 
 #endif
 
 //
@@ -214,7 +215,7 @@ void AliMCInfo::Update()
                              fTrackRef.Pz()*fTrackRef.Pz());    
       if (p>0.001){
        Float_t betagama = p /fMass;
-       fPrim = TPCBetheBloch(betagama);
+       fPrim = AliMathBase::BetheBlochAleph(betagama);
       }else fPrim=0;
     }
   }else{
@@ -317,32 +318,6 @@ Int_t AliTPCdigitRow::First() const
   return -1;
 }
 
-
-//_____________________________________________________________________________
-Float_t AliMCInfo::TPCBetheBloch(Float_t bg)
-{
-  //
-  // Bethe-Bloch energy loss formula
-  //
-  const Double_t kp1=0.76176e-1;
-  const Double_t kp2=10.632;
-  const Double_t kp3=0.13279e-4;
-  const Double_t kp4=1.8631;
-  const Double_t kp5=1.9479;
-
-  Double_t dbg = (Double_t) bg;
-
-  Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
-
-  Double_t aa = TMath::Power(beta,kp4);
-  Double_t bb = TMath::Power(1./dbg,kp5);
-
-  bb=TMath::Log(kp3+bb);
-  
-  return ((Float_t)((kp2-aa-bb)*kp1/aa));
-}
-
-
 void AliMCInfo::CalcTPCrows(TClonesArray * runArrayTR){
   //
   // Calculates the numebr of the track references for detectors
index 32f5b57..ba0030d 100644 (file)
@@ -67,7 +67,6 @@ public:
   const AliTrackReference&  GetTrackRefOut() const {return fTrackRefOut;}
   const AliTrackReference&  GetTRdecay() const {return fTRdecay;} 
   TParticle& GetParticle()   {return fParticle;}
-  Float_t TPCBetheBloch(Float_t bg);
   //
   Int_t     GetPrimPart() const  {return fPrimPart;}
   Float_t   GetMass()   const    {return fMass;}                  
index bd8813e..358474b 100644 (file)
@@ -67,6 +67,7 @@ t->Exec();
 #include "AliMagF.h"
 #include "AliHelix.h"
 #include "AliPoints.h"
+#include "AliMathBase.h"
 
 #endif
 #include "AliGenInfo.h" 
@@ -79,31 +80,6 @@ AliTPCParam * GetTPCParam(){
   return par;
 }
 
-
-//_____________________________________________________________________________
-Float_t TPCBetheBloch(Float_t bg)
-{
-  //
-  // Bethe-Bloch energy loss formula
-  //
-  const Double_t kp1=0.76176e-1;
-  const Double_t kp2=10.632;
-  const Double_t kp3=0.13279e-4;
-  const Double_t kp4=1.8631;
-  const Double_t kp5=1.9479;
-
-  Double_t dbg = (Double_t) bg;
-
-  Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
-
-  Double_t aa = TMath::Power(beta,kp4);
-  Double_t bb = TMath::Power(1./dbg,kp5);
-
-  bb=TMath::Log(kp3+bb);
-  
-  return ((Float_t)((kp2-aa-bb)*kp1/aa));
-}
-
 AliPointsMI::AliPointsMI(){
   fN=0;
   fX=0;
@@ -289,7 +265,7 @@ void AliMCInfo::Update()
                              fTrackRef.Pz()*fTrackRef.Pz());    
       if (p>0.001){
        Float_t betagama = p /fMass;
-       fPrim = TPCBetheBloch(betagama);
+       fPrim = AliMathBase::BetheBlochAleph(betagama);
       }else fPrim=0;
     }
   }else{
index 0974ea0..8682699 100644 (file)
@@ -276,4 +276,4 @@ ClassImp(AliPointsMI)
 
 
 AliTPCParam * GetTPCParam();
-Float_t TPCBetheBloch(Float_t bg);
+
index cb9fd41..2509074 100644 (file)
@@ -751,3 +751,23 @@ Double_t AliMathBase::TruncatedGaus(Double_t mean, Double_t sigma, Double_t left
   }while((value-mean)<-leftCut || (value-mean)>rightCut);
   return value;
 }
+
+Double_t AliMathBase::BetheBlochAleph(Double_t bg,
+         Double_t kp1,
+         Double_t kp2,
+         Double_t kp3,
+         Double_t kp4,
+         Double_t kp5) {
+  //
+  // This is the ALEPH parameterisation of the Bethe-Bloch formula
+  //
+
+  Double_t beta = bg/TMath::Sqrt(1.+ bg*bg);
+
+  Double_t aa = TMath::Power(beta,kp4);
+  Double_t bb = TMath::Power(1./bg,kp5);
+
+  bb=TMath::Log(kp3+bb);
+  
+  return (kp2-aa-bb)*kp1/aa;
+}
index 8716bb8..3b16daa 100644 (file)
@@ -39,6 +39,17 @@ class AliMathBase : public TObject
   // TestFunctions:
   //
  static  void TestGausFit(Int_t nhistos=5000);
+
+  //
+  // Bethe-Bloch formula parameterizations
+  //
+  static Double_t BetheBlochAleph(Double_t bg,
+                                  Double_t kp1=0.76176e-1,
+                                  Double_t kp2=10.632,
+                                  Double_t kp3=0.13279e-4,
+                                  Double_t kp4=1.8631,
+                                  Double_t kp5=1.9479
+                                 );
     
  ClassDef(AliMathBase,0) // Various mathematical tools for physics analysis - which are not included in ROOT TMath