]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDNaiiveAlgorithm.cxx
Adding missing include
[u/mrichter/AliRoot.git] / FMD / AliFMDNaiiveAlgorithm.cxx
CommitLineData
e802be3e 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//____________________________________________________________________
19//
20// Base class for FMD naiive algorithms.
21//
22// Derived classes will implement various ways of reconstructing the
23// charge particle multiplicity in the FMD.
24//
25#include "AliFMDNaiiveAlgorithm.h" // ALIFMDNAIIVEALGORITHM_H
26#include "AliFMDDigit.h" // ALIFMDDIGIT_H
27
28//____________________________________________________________________
29ClassImp(AliFMDNaiiveAlgorithm);
30
31//____________________________________________________________________
32AliFMDNaiiveAlgorithm::AliFMDNaiiveAlgorithm()
33 : AliFMDReconstructionAlgorithm("Naiive", "Naiive")
34{}
35
36
37//____________________________________________________________________
38void
39AliFMDNaiiveAlgorithm::Reset()
40{
41 // Reset internal data
42 fTotal = 0;
43 fEdep.Clear(0);
44 fMultiplicity.Clear(0);
45}
46
47//____________________________________________________________________
48void
49AliFMDNaiiveAlgorithm::ProcessDigit(AliFMDDigit* digit,
50 Float_t eta,
51 Float_t phi,
52 UShort_t count)
53{
54 // Process one digit.
55 //
56 // Parameters:
57 //
58 // digit Digit to process
59 // eta Pseudo-rapidity of digit
60 // phi Azimuthal angle of digit
61 // count ADC (corrected for the pedestal)
62 //
63 // This calculates the energy deposited and the number of MIPs that
64 // this energy deposition corresponds to
65 //
66 // EnergyDeposited = cos(theta) * gain * count
67 // Multiplicity = EnergyDeposited / EnergyDepositedPerMIP
68 //
69 // where gain is a conversion factor from number of counts to an
70 // energy:
71 // Pre_Amp_MIP_Range 1
72 // gain = ----------------- * ---------------------
73 // ADC_channel_size EnergyDepositedPerMip
74 //
75 // and theta is the particles incident angle on the strip, given by
76 //
77 // theta = 2 * atan * exp(-eta)
78 //
79 // The cos(theta) factor corrects for the fact that the particle may
80 // traverse the strip at an angle, and therefor have a longer flight
81 // length, leading to a larger energy deposition.
82 //
83 if (!digit) return;
84 Double_t theta = 2 * TMath::Tan(TMath::Exp(- eta));
85 Double_t edep = TMath::Cos(theta) * fGain * count;
86 Double_t mult = edep / fEdepMip;
87 fEdep(digit->Detector() - 1, digit->Ring(),
88 digit->Setctor(), digit->Strip()) = edep;
89 fMultiplicity(digit->Detector() - 1, digit->Ring(),
90 digit->Setctor(), digit->Strip()) = mult;
91}
92
93
94//____________________________________________________________________
95//
96// EOF
97//