]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALFast.cxx
Clusterizer introduced
[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 /*
18 $Log$
19 */
20
21
22 //*-- Author: Andreas Morsch (CERN)
23
24 #include "AliEMCALFast.h"
25 #include <TRandom.h>
26
27
28 ClassImp(AliEMCALFast)
29
30 //____________________________________________________________________________
31
32
33 Float_t AliEMCALFast::SmearMomentum(Int_t ind, Float_t p)
34 {
35 //
36 //  The relative momentum error, i.e. 
37 //  (delta p)/p = sqrt (a**2 + (b*p)**2) * 10**-2,
38 //  where typically a = 0.75 and b = 0.16 - 0.24 depending on multiplicity
39 //  (the lower value is for dn/d(eta) about 2000, and the higher one for 8000)
40 //
41     Float_t pSmeared;
42     Float_t a = 0.75;
43     Float_t b = 0.24;
44     if (ind == 2) b = 0.16;
45     
46     Float_t sigma = p*TMath::Sqrt(a*a+b*b*p*p)*0.01;
47     pSmeared = p + gRandom->Gaus(0., sigma);
48     return pSmeared;
49 }
50
51
52 Float_t AliEMCALFast::Efficiency(Int_t ind, Float_t p)
53 {
54 // Tracking efficiency:
55 // above pt 0.5 GeV practically constant, between 90 and 95 % (again,
56 // depending on multplicity)
57 // below 0.5 GeV goes down to about 70% at 0.2 GeV.
58 // On top of that there is 90% geometrical acceptance for tracking due
59 // to TPC (dead zones between readout chambers).  
60     Float_t eff = 0.;
61 // Tracking 
62     if (p > 0.5) {
63         eff = 0.9;
64         if (ind == 2) eff = 0.95;
65     } else {
66         eff = eff-(0.5-p)*0.2/0.3;
67     }
68     eff *= 0.9;
69 // Acceptance    
70     return eff;
71 }
72
73 Bool_t AliEMCALFast::EmcalAcceptance(Float_t eta, Float_t phi)
74 {
75 //
76 // EMCAL eta-phi acceptance
77     Bool_t acc = kFALSE;
78     if (TMath::Abs(eta) < 0.7 &&
79         phi > 0. &&
80         phi < 120.*TMath::Pi()/180.)
81         acc = kTRUE;
82     return acc;
83 }
84
85
86 Bool_t AliEMCALFast::RandomReject(Float_t eff)
87 {
88 //
89 // Random rejection 
90     Bool_t rej = kFALSE;
91     Float_t ran = gRandom->Rndm();
92     if (ran > eff) rej = kTRUE;
93     return rej;
94 }
95
96
97
98
99
100
101