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 **************************************************************************/
16 //_________________________________________________________________________
17 // Manager class for PHOS version SUBATECH
18 //*-- Author : Odd Harald Oddland & Gines Martinez Feb-2000
19 // The main goal of this version of AliPHOS is to calculted the
20 // induced charged in the PIN diode, taking into account light
21 // tracking in the PbWO4 crystal, induced signal in the
22 // PIN due to MIPS particle and electronic noise.
23 // In this respect, this class derived from AliPHOSv0 and
24 // only the StepManager function has been "surcharged"
25 //////////////////////////////////////////////////////////////////////////////
27 // --- ROOT system ---
30 // --- Standard library ---
38 // --- AliRoot header files ---
40 #include "AliPHOSv1.h"
41 #include "AliPHOSHit.h"
42 #include "AliPHOSDigit.h"
48 //____________________________________________________________________________
49 AliPHOSv1::AliPHOSv1() :
54 //____________________________________________________________________________
55 AliPHOSv1::AliPHOSv1(const char *name, const char *title):
58 fLightYieldMean = 700000. ;
59 fIntrinsicPINEfficiency = 0.1875 ;
60 fLightYieldAttenuation = 0.0045 ;
61 fRecalibrationFactor = 6.2 / fLightYieldMean ;
63 //____________________________________________________________________________
64 AliPHOSv1::AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
65 AliPHOSv0(Reconstructioner,name,title)
67 fLightYieldMean = 700000.;
68 fIntrinsicPINEfficiency = 0.1875 ;
69 fLightYieldAttenuation = 0.0045 ;
70 fRecalibrationFactor = 6.2 / fLightYieldMean ;
73 //____________________________________________________________________________
74 AliPHOSv1::~AliPHOSv1()
79 //____________________________________________________________________________
86 //____________________________________________________________________________
87 void AliPHOSv1::StepManager(void)
89 Int_t relid[4] ; // (box, layer, row, column) indices
90 Float_t xyze[4] ; // position wrt MRS and energy deposited
93 Float_t lightyield ; // Light Yield per GeV
94 Float_t nElectrons ; // Number of electrons in the PIN diode
95 TString name = fGeom->GetName() ;
100 if ( name == "GPS2" ) { // the CPV is a PPSD
101 if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") )
102 // if( strcmp ( gMC->CurrentVolName(), "GCEL" ) == 0 ) // We are inside a gas cell
104 gMC->TrackPosition(pos) ;
108 xyze[3] = gMC->Edep() ;
111 if ( xyze[3] != 0 ) { // there is deposited energy
112 gMC->CurrentVolOffID(5, relid[0]) ; // get the PHOS Module number
113 gMC->CurrentVolOffID(3, relid[1]) ; // get the Micromegas Module number
114 // 1-> Geom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() upper
115 // > fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() lower
116 gMC->CurrentVolOffID(1, relid[2]) ; // get the row number of the cell
117 gMC->CurrentVolID(relid[3]) ; // get the column number
119 // get the absolute Id number
122 fGeom->RelToAbsNumbering(relid,absid) ;
125 AddHit(gAlice->CurrentTrack(), absid, xyze );
127 } // there is deposited energy
128 } // We are inside the gas of the CPV
129 } // GPS2 configuration
131 if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") )
132 // if( strcmp ( gMC->CurrentVolName(), "PXTL" ) == 0 ) { // We are inside a PWO crystal
134 gMC->TrackPosition(pos) ;
138 lostenergy = gMC->Edep() ;
144 if ( xyze[3] != 0 ) {
145 gMC->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ;
146 relid[1] = 0 ; // means PW04
147 gMC->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module
148 gMC->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module
150 // get the absolute Id number
153 fGeom->RelToAbsNumbering(relid,absid) ;
154 gMC->Gmtod(global, local, 1) ;
156 // calculating number of electrons in the PIN diode asociated to this hit
157 lightyield = gRandom->Poisson(fLightYieldMean) ;
158 nElectrons = lostenergy * lightyield * fIntrinsicPINEfficiency *
159 exp(-fLightYieldAttenuation * (local[1]+fGeom->GetCrystalSize(1)/2.0 ) ) ;
161 xyze[3] = nElectrons * fRecalibrationFactor ;
162 // add current hit to the hit list
163 AddHit(gAlice->CurrentTrack(), absid, xyze);
165 } // there is deposited energy
166 } // we are inside a PHOS Xtal