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