]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Acceptance and random rejection added.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Jan 2002 03:27:12 +0000 (03:27 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Jan 2002 03:27:12 +0000 (03:27 +0000)
EMCAL/AliEMCALFast.cxx
EMCAL/AliEMCALFast.h

index 40fe953f85bba5c861231317299b281539dc862f..766eaaf92706b8fa8336e52226aac55910e80c20 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
+
+/*
+$Log$
+*/
+
 
 //*-- Author: Andreas Morsch (CERN)
 
@@ -29,8 +33,8 @@ ClassImp(AliEMCALFast)
 Float_t AliEMCALFast::SmearMomentum(Int_t ind, Float_t p)
 {
 //
-//  The relative momentum error, i.e. (delta p)/p = sqrt (a**2 + (b*p)**2) *
-//  10**-2,
+//  The relative momentum error, i.e. 
+//  (delta p)/p = sqrt (a**2 + (b*p)**2) * 10**-2,
 //  where typically a = 0.75 and b = 0.16 - 0.24 depending on multiplicity
 //  (the lower value is for dn/d(eta) about 2000, and the higher one for 8000)
 //
@@ -48,7 +52,7 @@ Float_t AliEMCALFast::SmearMomentum(Int_t ind, Float_t p)
 Float_t AliEMCALFast::Efficiency(Int_t ind, Float_t p)
 {
 // Tracking efficiency:
-// above pt 0.5 GeV practically constant, between 90 and 95 % (agian,
+// above pt 0.5 GeV practically constant, between 90 and 95 % (again,
 // depending on multplicity)
 // below 0.5 GeV goes down to about 70% at 0.2 GeV.
 // On top of that there is 90% geometrical acceptance for tracking due
@@ -61,11 +65,33 @@ Float_t AliEMCALFast::Efficiency(Int_t ind, Float_t p)
     } else {
        eff = eff-(0.5-p)*0.2/0.3;
     }
-    eff*= 0.9;
+    eff *= 0.9;
 // Acceptance    
     return eff;
 }
 
+Bool_t AliEMCALFast::EmcalAcceptance(Float_t eta, Float_t phi)
+{
+//
+// EMCAL eta-phi acceptance
+    Bool_t acc = kFALSE;
+    if (TMath::Abs(eta) < 0.7 &&
+       phi > 0. &&
+       phi < 120.*TMath::Pi()/180.)
+       acc = kTRUE;
+    return acc;
+}
+
+
+Bool_t AliEMCALFast::RandomReject(Float_t eff)
+{
+//
+// Random rejection 
+    Bool_t rej = kFALSE;
+    Float_t ran = gRandom->Rndm();
+    if (ran > eff) rej = kTRUE;
+    return rej;
+}
 
 
 
index 50b49550322689c517b84d2a096f078b14237bfd..3ec0bd667a5de29e2143ab5873dd0bd79e3a0147 100644 (file)
@@ -8,13 +8,13 @@
 #include <TObject.h>
 //*-- Author: Andreas Morsch (CERN)
 
-
 class AliEMCALFast : public TObject {
  public:
     virtual ~AliEMCALFast(){;}
-    static Float_t SmearMomentum(Int_t ind, Float_t p);
-    static Float_t Efficiency   (Int_t ind, Float_t p);
-    
+    static Float_t SmearMomentum  (Int_t ind,   Float_t p);
+    static Float_t Efficiency     (Int_t ind,   Float_t p);
+    static Bool_t  EmcalAcceptance(Float_t eta, Float_t phi);
+    static Bool_t  RandomReject   (Float_t eff);    
  protected:
   ClassDef(AliEMCALFast,1) // Jet for EMCAL
 };