AliEMCALHadronicCorrection added
[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
16/* $Id$ */
17
18//*-- Author: Andreas Morsch (CERN)
19
20#include "AliEMCALFast.h"
21#include <TRandom.h>
22
23
24ClassImp(AliEMCALFast)
25
26//____________________________________________________________________________
27
28
29Float_t AliEMCALFast::SmearMomentum(Int_t ind, Float_t p)
30{
31//
32// The relative momentum error, i.e. (delta p)/p = sqrt (a**2 + (b*p)**2) *
33// 10**-2,
34// where typically a = 0.75 and b = 0.16 - 0.24 depending on multiplicity
35// (the lower value is for dn/d(eta) about 2000, and the higher one for 8000)
36//
37 Float_t pSmeared;
38 Float_t a = 0.75;
39 Float_t b = 0.24;
40 if (ind == 2) b = 0.16;
41
42 Float_t sigma = p*TMath::Sqrt(a*a+b*b*p*p)*0.01;
43 pSmeared = p + gRandom->Gaus(0., sigma);
44 return pSmeared;
45}
46
47
48Float_t AliEMCALFast::Efficiency(Int_t ind, Float_t p)
49{
50// Tracking efficiency:
51// above pt 0.5 GeV practically constant, between 90 and 95 % (agian,
52// depending on multplicity)
53// below 0.5 GeV goes down to about 70% at 0.2 GeV.
54// On top of that there is 90% geometrical acceptance for tracking due
55// to TPC (dead zones between readout chambers).
56 Float_t eff = 0.;
57// Tracking
58 if (p > 0.5) {
59 eff = 0.9;
60 if (ind == 2) eff = 0.95;
61 } else {
62 eff = eff-(0.5-p)*0.2/0.3;
63 }
64 eff*= 0.9;
65// Acceptance
66 return eff;
67}
68
69
70
71
72
73
74
75