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