]>
Commit | Line | Data |
---|---|---|
f3c4a6df | 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 | ||
155f1576 | 16 | |
17 | /* | |
18 | $Log$ | |
88cb7938 | 19 | Revision 1.3.4.1 2003/07/07 14:13:31 schutz |
20 | NewIO | |
21 | ||
22 | Revision 1.4 2002/12/18 08:25:31 morsch | |
23 | Correction in efficiency for p < 0.5. | |
24 | ||
b03ac336 | 25 | Revision 1.3 2002/02/05 11:32:15 morsch |
26 | Smearing parameters with TRD included added. | |
27 | ||
33e0ecee | 28 | Revision 1.2 2002/01/18 03:27:12 morsch |
29 | Acceptance and random rejection added. | |
30 | ||
155f1576 | 31 | */ |
32 | ||
f3c4a6df | 33 | |
34 | //*-- Author: Andreas Morsch (CERN) | |
35 | ||
36 | #include "AliEMCALFast.h" | |
37 | #include <TRandom.h> | |
38 | ||
39 | ||
40 | ClassImp(AliEMCALFast) | |
41 | ||
42 | //____________________________________________________________________________ | |
43 | ||
44 | ||
45 | Float_t AliEMCALFast::SmearMomentum(Int_t ind, Float_t p) | |
46 | { | |
47 | // | |
155f1576 | 48 | // The relative momentum error, i.e. |
49 | // (delta p)/p = sqrt (a**2 + (b*p)**2) * 10**-2, | |
f3c4a6df | 50 | // where typically a = 0.75 and b = 0.16 - 0.24 depending on multiplicity |
51 | // (the lower value is for dn/d(eta) about 2000, and the higher one for 8000) | |
52 | // | |
33e0ecee | 53 | // If we include information from TRD b will be by a factor 2/3 smaller. |
54 | // | |
55 | // ind = 1: high multiplicity | |
56 | // ind = 2: low multiplicity | |
57 | // ind = 3: high multiplicity + TRD | |
58 | // ind = 4: low multiplicity + TRD | |
59 | ||
f3c4a6df | 60 | Float_t pSmeared; |
61 | Float_t a = 0.75; | |
62 | Float_t b = 0.24; | |
33e0ecee | 63 | |
64 | if (ind == 1) b = 0.24; | |
f3c4a6df | 65 | if (ind == 2) b = 0.16; |
33e0ecee | 66 | if (ind == 3) b = 0.16; |
67 | if (ind == 4) b = 0.11; | |
f3c4a6df | 68 | |
69 | Float_t sigma = p*TMath::Sqrt(a*a+b*b*p*p)*0.01; | |
70 | pSmeared = p + gRandom->Gaus(0., sigma); | |
71 | return pSmeared; | |
72 | } | |
73 | ||
74 | ||
75 | Float_t AliEMCALFast::Efficiency(Int_t ind, Float_t p) | |
76 | { | |
77 | // Tracking efficiency: | |
155f1576 | 78 | // above pt 0.5 GeV practically constant, between 90 and 95 % (again, |
f3c4a6df | 79 | // depending on multplicity) |
80 | // below 0.5 GeV goes down to about 70% at 0.2 GeV. | |
81 | // On top of that there is 90% geometrical acceptance for tracking due | |
82 | // to TPC (dead zones between readout chambers). | |
f3c4a6df | 83 | // Tracking |
b03ac336 | 84 | // |
85 | Float_t eff = 0.9; | |
86 | if (ind == 2) eff = 0.95; | |
87 | if (p < 0.5) eff -= (0.5-p)*0.2/0.3; | |
88 | // Geometry | |
155f1576 | 89 | eff *= 0.9; |
f3c4a6df | 90 | // Acceptance |
91 | return eff; | |
92 | } | |
93 | ||
155f1576 | 94 | Bool_t AliEMCALFast::EmcalAcceptance(Float_t eta, Float_t phi) |
95 | { | |
96 | // | |
97 | // EMCAL eta-phi acceptance | |
98 | Bool_t acc = kFALSE; | |
99 | if (TMath::Abs(eta) < 0.7 && | |
100 | phi > 0. && | |
101 | phi < 120.*TMath::Pi()/180.) | |
102 | acc = kTRUE; | |
103 | return acc; | |
104 | } | |
105 | ||
106 | ||
107 | Bool_t AliEMCALFast::RandomReject(Float_t eff) | |
108 | { | |
109 | // | |
110 | // Random rejection | |
111 | Bool_t rej = kFALSE; | |
112 | Float_t ran = gRandom->Rndm(); | |
113 | if (ran > eff) rej = kTRUE; | |
114 | return rej; | |
115 | } | |
f3c4a6df | 116 | |
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 |