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.
27 #include "AliFMD.h" // ALIFMD_H
28 #include "AliFMDMultNaiive.h" // ALIFMDMULTNAIIVE_H
29 #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
30 #include "AliFMDMultStrip.h" // ALIFMDMULTNAIIVE_H
31 #include "AliFMDDigit.h" // ALIFMDDIGIT_H
32 #include <TClonesArray.h> // ROOT_TClonesArray
33 #include <TTree.h> // ROOT_TTree
35 //____________________________________________________________________
36 ClassImp(AliFMDMultNaiive)
38 ; // This is here to keep Emacs for indenting the next line
41 //____________________________________________________________________
42 AliFMDMultNaiive::AliFMDMultNaiive()
43 : AliFMDMultAlgorithm("Naiive", "Naiive")
46 fMult = new TClonesArray("AliFMDMultStrip", 1000);
49 //____________________________________________________________________
51 AliFMDMultNaiive::PreRun(AliFMD* fmd)
53 // Initialise before a run
54 AliFMDMultAlgorithm::PreRun(fmd);
55 AliFMDParameters* pars = AliFMDParameters::Instance();
56 fEdepMip = pars->GetEdepMip();
57 fGain = (Float_t(pars->GetVA1MipRange()) / pars->GetAltroChannelSize()
61 //____________________________________________________________________
63 AliFMDMultNaiive::PreEvent(TTree* treeR, Float_t ipZ)
65 // Reset internal data
66 AliFMDMultAlgorithm::PreEvent(treeR, ipZ);
67 fTreeR->Branch("FMDNaiive", &fMult);
70 //____________________________________________________________________
72 AliFMDMultNaiive::ProcessDigit(AliFMDDigit* digit,
81 // digit Digit to process
82 // eta Pseudo-rapidity of digit
83 // phi Azimuthal angle of digit
84 // count ADC (corrected for the pedestal)
86 // This calculates the energy deposited and the number of MIPs that
87 // this energy deposition corresponds to
89 // EnergyDeposited = cos(theta) * gain * count
90 // Multiplicity = EnergyDeposited / EnergyDepositedPerMIP
92 // where gain is a conversion factor from number of counts to an
94 // Pre_Amp_MIP_Range 1
95 // gain = ----------------- * ---------------------
96 // ADC_channel_size EnergyDepositedPerMip
98 // and theta is the particles incident angle on the strip, given by
100 // theta = 2 * atan(exp(-eta))
102 // The cos(theta) factor corrects for the fact that the particle may
103 // traverse the strip at an angle, and therefor have a longer flight
104 // length, leading to a larger energy deposition.
107 Double_t edep = Adc2Energy(digit, eta, count);
108 Double_t mult = Energy2Multiplicity(digit, edep);
111 new ((*fMult)[fNMult]) AliFMDMultStrip(digit->Detector(),
117 AliFMDMult::kNaiive);
121 //____________________________________________________________________
123 AliFMDMultNaiive::Adc2Energy(AliFMDDigit* /* digit */,
127 // Converts number of ADC counts to energy deposited.
128 // Note, that this member function can be overloaded by derived
129 // classes to do strip-specific look-ups in databases or the like,
130 // to find the proper gain for a strip.
132 // In this simple version, we calculate the energy deposited as
134 // EnergyDeposited = cos(theta) * gain * count
139 // gain = ----------------- * Energy_deposited_per_MIP
142 // is constant and the same for all strips.
143 Double_t theta = 2 * TMath::Tan(TMath::Exp(-eta));
144 Double_t edep = TMath::Cos(theta) * fGain * count;
148 //____________________________________________________________________
150 AliFMDMultNaiive::Energy2Multiplicity(AliFMDDigit* /* digit */,
153 // Converts an energy signal to number of particles.
154 // Note, that this member function can be overloaded by derived
155 // classes to do strip-specific look-ups in databases or the like,
156 // to find the proper gain for a strip.
158 // In this simple version, we calculate the multiplicity as
160 // multiplicity = Energy_deposited / Energy_deposited_per_MIP
164 // Energy_deposited_per_MIP = 1.664 * SI_density * SI_thickness
166 // is constant and the same for all strips
167 return edep / fEdepMip;
172 //____________________________________________________________________