1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //____________________________________________________________________
20 // Reconstruct charged particle multiplicity in the FMD
22 // [See also the AliFMDReconstructor class]
24 // This class reconstructs the multiplicity based on the assumption
25 // that all particles are minimum ionizing.
26 // Hence, the name `naiive'
28 #include "AliFMD.h" // ALIFMD_H
29 #include "AliFMDMultNaiive.h" // ALIFMDMULTNAIIVE_H
30 #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
31 #include "AliFMDMultStrip.h" // ALIFMDMULTNAIIVE_H
32 #include "AliFMDDigit.h" // ALIFMDDIGIT_H
33 #include <TClonesArray.h> // ROOT_TClonesArray
34 #include <TTree.h> // ROOT_TTree
36 //____________________________________________________________________
37 ClassImp(AliFMDMultNaiive)
39 ; // This is here to keep Emacs for indenting the next line
42 //____________________________________________________________________
43 AliFMDMultNaiive::AliFMDMultNaiive()
44 : AliFMDMultAlgorithm("Naiive", "Naiive")
47 fMult = new TClonesArray("AliFMDMultStrip", 1000);
50 //____________________________________________________________________
52 AliFMDMultNaiive::PreRun(AliFMD* fmd)
54 // Initialise before a run
55 AliFMDMultAlgorithm::PreRun(fmd);
56 AliFMDParameters* pars = AliFMDParameters::Instance();
57 fEdepMip = pars->GetEdepMip();
58 fGain = (Float_t(pars->GetVA1MipRange()) / pars->GetAltroChannelSize()
62 //____________________________________________________________________
64 AliFMDMultNaiive::PreEvent(TTree* treeR, Float_t ipZ)
66 // Reset internal data
67 AliFMDMultAlgorithm::PreEvent(treeR, ipZ);
68 fTreeR->Branch("FMDNaiive", &fMult);
71 //____________________________________________________________________
73 AliFMDMultNaiive::ProcessDigit(AliFMDDigit* digit,
82 // digit Digit to process
83 // eta Pseudo-rapidity of digit
84 // phi Azimuthal angle of digit
85 // count ADC (corrected for the pedestal)
87 // This calculates the energy deposited and the number of MIPs that
88 // this energy deposition corresponds to
90 // EnergyDeposited = cos(theta) * gain * count
91 // Multiplicity = EnergyDeposited / EnergyDepositedPerMIP
93 // where gain is a conversion factor from number of counts to an
95 // Pre_Amp_MIP_Range 1
96 // gain = ----------------- * ---------------------
97 // ADC_channel_size EnergyDepositedPerMip
99 // and theta is the particles incident angle on the strip, given by
101 // theta = 2 * atan(exp(-eta))
103 // The cos(theta) factor corrects for the fact that the particle may
104 // traverse the strip at an angle, and therefor have a longer flight
105 // length, leading to a larger energy deposition.
108 Double_t edep = Adc2Energy(digit, eta, count);
109 Double_t mult = Energy2Multiplicity(digit, edep);
112 new ((*fMult)[fNMult]) AliFMDMultStrip(digit->Detector(),
118 AliFMDMult::kNaiive);
122 //____________________________________________________________________
124 AliFMDMultNaiive::Adc2Energy(AliFMDDigit* /* digit */,
128 // Converts number of ADC counts to energy deposited.
129 // Note, that this member function can be overloaded by derived
130 // classes to do strip-specific look-ups in databases or the like,
131 // to find the proper gain for a strip.
133 // In this simple version, we calculate the energy deposited as
135 // EnergyDeposited = cos(theta) * gain * count
140 // gain = ----------------- * Energy_deposited_per_MIP
143 // is constant and the same for all strips.
144 Double_t theta = 2 * TMath::ATan(TMath::Exp(-eta));
145 Double_t edep = TMath::Abs(TMath::Cos(theta)) * fGain * count;
149 //____________________________________________________________________
151 AliFMDMultNaiive::Energy2Multiplicity(AliFMDDigit* /* digit */,
154 // Converts an energy signal to number of particles.
155 // Note, that this member function can be overloaded by derived
156 // classes to do strip-specific look-ups in databases or the like,
157 // to find the proper gain for a strip.
159 // In this simple version, we calculate the multiplicity as
161 // multiplicity = Energy_deposited / Energy_deposited_per_MIP
165 // Energy_deposited_per_MIP = 1.664 * SI_density * SI_thickness
167 // is constant and the same for all strips
168 return edep / fEdepMip;
173 //____________________________________________________________________