]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALFast.cxx
Small correction in SDigitization
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALFast.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16
17 /* $Id$ */
18
19 //*-- Author: Andreas Morsch (CERN)
20
21 #include "TMath.h"
22 #include <TRandom.h>
23
24 #include "AliEMCALFast.h"
25
26
27 ClassImp(AliEMCALFast)
28
29 //____________________________________________________________________________
30
31
32 Float_t AliEMCALFast::SmearMomentum(Int_t ind, Float_t p)
33 {
34 //
35 //  The relative momentum error, i.e. 
36 //  (delta p)/p = sqrt (a**2 + (b*p)**2) * 10**-2,
37 //  where typically a = 0.75 and b = 0.16 - 0.24 depending on multiplicity
38 //  (the lower value is for dn/d(eta) about 2000, and the higher one for 8000)
39 //
40 //  If we include information from TRD b will be by a factor 2/3 smaller.
41 //
42 //  ind = 1: high multiplicity
43 //  ind = 2: low  multiplicity
44 //  ind = 3: high multiplicity + TRD
45 //  ind = 4: low  multiplicity + TRD
46
47     Float_t pSmeared;
48     Float_t a = 0.75;
49     Float_t b = 0.24;
50
51     if (ind == 1) b = 0.24;
52     if (ind == 2) b = 0.16;
53     if (ind == 3) b = 0.16;    
54     if (ind == 4) b = 0.11;    
55     
56     Float_t sigma = p*TMath::Sqrt(a*a+b*b*p*p)*0.01;
57     pSmeared = p + gRandom->Gaus(0., sigma);
58     return pSmeared;
59 }
60
61
62 Float_t AliEMCALFast::Efficiency(Int_t ind, Float_t p)
63 {
64 // Tracking efficiency:
65 // above pt 0.5 GeV practically constant, between 90 and 95 % (again,
66 // depending on multplicity)
67 // below 0.5 GeV goes down to about 70% at 0.2 GeV.
68 // On top of that there is 90% geometrical acceptance for tracking due
69 // to TPC (dead zones between readout chambers).  
70 // Tracking 
71 //      
72     Float_t eff = 0.9;
73     if (ind == 2) eff  = 0.95;
74     if (p < 0.5) eff -= (0.5-p)*0.2/0.3;
75 // Geometry
76     eff *= 0.9;
77 // Acceptance    
78     return eff;
79 }
80
81 Bool_t AliEMCALFast::EmcalAcceptance(Float_t eta, Float_t phi)
82 {
83 //
84 // EMCAL eta-phi acceptance
85     Bool_t acc = kFALSE;
86     if (TMath::Abs(eta) < 0.7 &&
87         phi > 60.*TMath::Pi()/180. &&
88         phi < TMath::Pi())
89         acc = kTRUE;
90     return acc;
91 }
92
93
94 Bool_t AliEMCALFast::RandomReject(Float_t eff)
95 {
96 //
97 // Random rejection 
98     Bool_t rej = kFALSE;
99     Float_t ran = gRandom->Rndm();
100     if (ran > eff) rej = kTRUE;
101     return rej;
102 }
103
104
105
106
107
108
109