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 //_________________________________________________________________________
19 // Implementation version v0 of PHOS Manager class
20 // Layout EMC + PPSD has name GPS2
21 // The main goal of this version of AliPHOS is to calculte the
22 // induced charged in the PIN diode, taking into account light
23 // tracking in the PbWO4 crystal, induced signal in the
24 // PIN due to MIPS particle and electronic noise.
25 // This is done in the StepManager
27 //*-- Author: Odd Harald Oddland & Gines Martinez (SUBATECH)
30 // --- ROOT system ---
33 // --- Standard library ---
38 #include <strstream.h>
40 // --- AliRoot header files ---
42 #include "AliPHOSv3.h"
43 #include "AliPHOSHit.h"
44 #include "AliPHOSDigit.h"
50 //____________________________________________________________________________
51 AliPHOSv3::AliPHOSv3(const char *name, const char *title):
56 // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using
58 // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency *
59 // exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
60 // RecalibrationFactor ;
61 // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
62 // PINEfficiency is 0.1875 from Odd Harald Odland work
63 // k_0 is 0.0045 from Valery Antonenko
65 fLightYieldMean = 700000. ;
66 fIntrinsicPINEfficiency = 0.1875 ;
67 fLightYieldAttenuation = 0.0045 ;
68 fRecalibrationFactor = 6.2 / fLightYieldMean ;
69 fElectronsPerGeV = 2.77e+8 ;
72 //____________________________________________________________________________
73 AliPHOSv3::AliPHOSv3(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
74 AliPHOSv1(Reconstructioner,name,title)
78 // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using
80 // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency *
81 // exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
82 // RecalibrationFactor ;
83 // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
84 // PINEfficiency is 0.1875 from Odd Harald Odland work
85 // k_0 is 0.0045 from Valery Antonenko
87 fLightYieldMean = 700000.;
88 fIntrinsicPINEfficiency = 0.1875 ;
89 fLightYieldAttenuation = 0.0045 ;
90 fRecalibrationFactor = 6.2 / fLightYieldMean ;
91 fElectronsPerGeV = 2.77e+8 ;
94 //____________________________________________________________________________
95 void AliPHOSv3::StepManager(void)
97 // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
98 // Adds the energy deposited in the PIN diode
100 Int_t relid[4] ; // (box, layer, row, column) indices
101 Float_t xyze[4] ; // position wrt MRS and energy deposited
104 Float_t lightyield ; // Light Yield per GeV
105 Float_t nElectrons ; // Number of electrons in the PIN diode
106 TString name = fGeom->GetName() ;
111 Int_t tracknumber = gAlice->CurrentTrack() ;
112 Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
114 if ( name == "GPS2" ) { // the CPV is a PPSD
115 if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") ) // We are inside a gas cell
117 gMC->TrackPosition(pos) ;
121 xyze[3] = gMC->Edep() ;
124 if ( xyze[3] != 0 ) { // there is deposited energy
125 gMC->CurrentVolOffID(5, relid[0]) ; // get the PHOS Module number
126 gMC->CurrentVolOffID(3, relid[1]) ; // get the Micromegas Module number
127 // 1-> Geom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() upper
128 // > fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() lower
129 gMC->CurrentVolOffID(1, relid[2]) ; // get the row number of the cell
130 gMC->CurrentVolID(relid[3]) ; // get the column number
132 // get the absolute Id number
135 fGeom->RelToAbsNumbering(relid,absid) ;
138 AddHit(fIshunt, primary, tracknumber, absid, xyze);
140 } // there is deposited energy
141 } // We are inside the gas of the CPV
142 } // GPS2 configuration
144 if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") )// We are inside a PBWO crystal
146 gMC->TrackPosition(pos) ;
150 lostenergy = gMC->Edep() ;
151 xyze[3] = gMC->Edep() ;
157 if ( xyze[3] != 0 ) {
158 gMC->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ;
159 relid[1] = 0 ; // means PW04
160 gMC->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module
161 gMC->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module
163 // get the absolute Id number
166 fGeom->RelToAbsNumbering(relid,absid) ;
167 gMC->Gmtod(global, local, 1) ;
169 // calculating number of electrons in the PIN diode asociated to this hit
170 lightyield = gRandom->Poisson(fLightYieldMean) ;
171 nElectrons = lostenergy * lightyield * fIntrinsicPINEfficiency *
172 exp(-fLightYieldAttenuation * (local[1]+fGeom->GetCrystalSize(1)/2.0 ) ) ;
174 xyze[3] = nElectrons * fRecalibrationFactor ;
175 // add current hit to the hit list
176 AddHit(fIshunt, primary, tracknumber, absid, xyze);
178 } // there is deposited energy
179 } // we are inside a PHOS Xtal
181 if(gMC->CurrentVolID(copy) == gMC->VolId("PPIN") ) // We are inside de PIN diode
183 gMC->TrackPosition(pos) ;
187 lostenergy = gMC->Edep() ;
188 xyze[3] = gMC->Edep() ;
190 if ( xyze[3] != 0 ) {
191 gMC->CurrentVolOffID(11, relid[0]) ; // get the PHOS module number ;
192 relid[1] = 0 ; // means PW04 and PIN
193 gMC->CurrentVolOffID(5, relid[2]) ; // get the row number inside the module
194 gMC->CurrentVolOffID(4, relid[3]) ; // get the cell number inside the module
196 // get the absolute Id number
199 fGeom->RelToAbsNumbering(relid,absid) ;
201 // calculating number of electrons in the PIN diode asociated to this hit
202 nElectrons = lostenergy * fElectronsPerGeV ;
203 xyze[3] = nElectrons * fRecalibrationFactor ;
205 // add current hit to the hit list
206 AddHit(fIshunt, primary, tracknumber, absid, xyze);
207 //printf("PIN volume is %d, %d, %d, %d \n",relid[0],relid[1],relid[2],relid[3]);
208 //printf("Lost energy in the PIN is %f \n",lostenergy) ;
209 } // there is deposited energy
210 } // we are inside a PHOS XtalPHOS PIN diode