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