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 // Base class for FMD naiive algorithms.
22 // Derived classes will implement various ways of reconstructing the
23 // charge particle multiplicity in the FMD.
25 #include "AliFMD.h" // ALIFMD_H
26 #include "AliFMDMultNaiive.h" // ALIFMDMULTNAIIVE_H
27 #include "AliFMDMultStrip.h" // ALIFMDMULTNAIIVE_H
28 #include "AliFMDDigit.h" // ALIFMDDIGIT_H
29 #include <TClonesArray.h> // ROOT_TClonesArray
30 #include <TTree.h> // ROOT_TTree
32 //____________________________________________________________________
33 ClassImp(AliFMDMultNaiive);
35 //____________________________________________________________________
36 AliFMDMultNaiive::AliFMDMultNaiive()
37 : AliFMDMultAlgorithm("Naiive", "Naiive")
40 fMult = new TClonesArray("AliFMDMultStrip", 1000);
43 //____________________________________________________________________
45 AliFMDMultNaiive::PreRun(AliFMD* fmd)
47 // Initialise before a run
48 AliFMDMultAlgorithm::PreRun(fmd);
49 fEdepMip = fmd->GetEdepMip();
50 fGain = (fmd->GetVA1MipRange() / fmd->GetAltroChannelSize()
54 //____________________________________________________________________
56 AliFMDMultNaiive::PreEvent(TTree* treeR, Float_t ipZ)
58 // Reset internal data
59 AliFMDMultAlgorithm::PreEvent(treeR, ipZ);
60 fTreeR->Branch("FMDNaiive", &fMult);
63 //____________________________________________________________________
65 AliFMDMultNaiive::ProcessDigit(AliFMDDigit* digit,
74 // digit Digit to process
75 // eta Pseudo-rapidity of digit
76 // phi Azimuthal angle of digit
77 // count ADC (corrected for the pedestal)
79 // This calculates the energy deposited and the number of MIPs that
80 // this energy deposition corresponds to
82 // EnergyDeposited = cos(theta) * gain * count
83 // Multiplicity = EnergyDeposited / EnergyDepositedPerMIP
85 // where gain is a conversion factor from number of counts to an
87 // Pre_Amp_MIP_Range 1
88 // gain = ----------------- * ---------------------
89 // ADC_channel_size EnergyDepositedPerMip
91 // and theta is the particles incident angle on the strip, given by
93 // theta = 2 * atan(exp(-eta))
95 // The cos(theta) factor corrects for the fact that the particle may
96 // traverse the strip at an angle, and therefor have a longer flight
97 // length, leading to a larger energy deposition.
100 Double_t edep = Adc2Energy(digit, eta, count);
101 Double_t mult = Energy2Multiplicity(digit, edep);
103 new ((*fMult)[fNMult]) AliFMDMultStrip(digit->Detector(),
109 AliFMDMult::kNaiive);
112 //____________________________________________________________________
114 AliFMDMultNaiive::Adc2Energy(AliFMDDigit* /* digit */,
118 // Converts number of ADC counts to energy deposited.
119 // Note, that this member function can be overloaded by derived
120 // classes to do strip-specific look-ups in databases or the like,
121 // to find the proper gain for a strip.
123 // In this simple version, we calculate the energy deposited as
125 // EnergyDeposited = cos(theta) * gain * count
130 // gain = ----------------- * Energy_deposited_per_MIP
133 // is constant and the same for all strips.
134 Double_t theta = 2 * TMath::Tan(TMath::Exp(-eta));
135 Double_t edep = TMath::Cos(theta) * fGain * count;
139 //____________________________________________________________________
141 AliFMDMultNaiive::Energy2Multiplicity(AliFMDDigit* /* digit */,
144 // Converts an energy signal to number of particles.
145 // Note, that this member function can be overloaded by derived
146 // classes to do strip-specific look-ups in databases or the like,
147 // to find the proper gain for a strip.
149 // In this simple version, we calculate the multiplicity as
151 // multiplicity = Energy_deposited / Energy_deposited_per_MIP
155 // Energy_deposited_per_MIP = 1.664 * SI_density * SI_thickness
157 // is constant and the same for all strips
158 return edep / fEdepMip;
163 //____________________________________________________________________