// The Silicon of the pin diode to read out the calorimeter crystal -> idtmed[705]
AliMedium(6, "Si PIN $", 6, 0,
- isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.01, 0.01, 0, 0) ;
+ isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.01, 0.00001, 0, 0) ;
// The thermo insulating material of the box which contains the calorimeter module -> idtmed[706]
AliMedium(7, "Thermo Insul.$", 7, 0,
gMC->Gstpar(idtmed[701], "LOSS",3.) ;
gMC->Gstpar(idtmed[701], "DRAY",1.) ;
// --- and in PIN diode
+ //setting local cuts to 10 keV OHO 20.04.2001
gMC->Gstpar(idtmed[705], "LOSS",3) ;
gMC->Gstpar(idtmed[705], "DRAY",1) ;
+ gMC->Gstpar(idtmed[705], "STRA",1.);
+ gMC->Gstpar(idtmed[705], "CUTGAM",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "CUTELE",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "CUTNEU",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "CUTHAD",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "CUTMUO",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "BCUTE",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "BCUTM",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "DCUTE",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "DCUTM",1.E-5) ;
+ gMC->Gstpar(idtmed[705], "PPCUTM",1.E-5) ;
+ //
// --- and in the passive convertor
gMC->Gstpar(idtmed[712], "LOSS",3) ;
gMC->Gstpar(idtmed[712], "DRAY",1) ;
// PIN due to MIPS particle and electronic noise.
// This is done in the StepManager
//
-//*-- Author: Odd Harald Oddland & Gines Martinez (SUBATECH)
+//*-- Author: Odd Harald Odland & Gines Martinez (SUBATECH)
// --- ROOT system ---
// NumberOfElectrons = EnergyLost * LightYield * PINEfficiency *
// exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
// RecalibrationFactor ;
- // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
- // PINEfficiency is 0.1875 from Odd Harald Odland work
+ // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV from Valery Antonenko
+ // PINEfficiency is 0.1875
// k_0 is 0.0045 from Valery Antonenko
fLightYieldMean = 700000. ;
fIntrinsicPINEfficiency = 0.1875 ;
+ //fIntrinsicPINEfficiency = 0.02655 ; //APD= 0.1875/0.1271 * 0.018 (PIN)
fLightYieldAttenuation = 0.0045 ;
- fRecalibrationFactor = 6.2 / fLightYieldMean ;
+ //fRecalibrationFactor = 6.2 / fLightYieldMean ;
+ fRecalibrationFactor = 5.67/ fLightYieldMean ; //25.04.2001 OHO
fElectronsPerGeV = 2.77e+8 ;
}
// // exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
// // RecalibrationFactor ;
// // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
-// // PINEfficiency is 0.1875 from Odd Harald Odland work
+// // PINEfficiency is 0.1875
// // k_0 is 0.0045 from Valery Antonenko
// fLightYieldMean = 700000.;
// fIntrinsicPINEfficiency = 0.1875 ;
// fLightYieldAttenuation = 0.0045 ;
// fRecalibrationFactor = 6.2 / fLightYieldMean ;
+// fRecalibrationFactor = 5.67 /fLightYieldMean ;//25.04.2001 OHO
// fElectronsPerGeV = 2.77e+8 ;
// }
//____________________________________________________________________________
Float_t xyze[4]={0,0,0,0} ; // position wrt MRS and energy deposited
TLorentzVector pos ; // Lorentz vector of the track current position
Int_t copy ;
-
+ Float_t lightyield ; // Light Yield per GeV
+ Float_t apdgain ; // Poisson calculated gain around 300.
+ Float_t nElectrons ; // Number of electrons in the PIN diode
+
Int_t tracknumber = gAlice->CurrentTrack() ;
Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
TString name = fGeom->GetName() ;
+ Float_t lostenergy ;
+ Float_t global[3] ;
+ Float_t local[3] ;
if ( name == "GPS2" || name == "MIXT" ) { // ======> CPV is a GPS' PPSD
} // end of IHEP configuration
- if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") ) { // We are inside a PBWO crystal
+if(gMC->CurrentVolID(copy)==gMC->VolId("PXTL")){// We are inside a PBWO4 crystal
gMC->TrackPosition(pos) ;
xyze[0] = pos[0] ;
xyze[1] = pos[1] ;
xyze[2] = pos[2] ;
+ global[0] = pos[0] ;
+ global[1] = pos[1] ;
+ global[2] = pos[2] ;
+ lostenergy = gMC->Edep();
xyze[3] = gMC->Edep() ;
- if ( (xyze[3] != 0) ) { // Track is inside the crystal and deposits some energy
+ if ( (xyze[3] != 0) ){//Track is inside the crystal and deposits some energy
gMC->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ;
relid[0] += fGeom->GetNModules() - fGeom->GetNPPSDModules();
relid[1] = 0 ; // means PBW04
- gMC->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module
- gMC->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module
+ gMC->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module
+ gMC->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module
// get the absolute Id number
+
fGeom->RelToAbsNumbering(relid, absid) ;
+ gMC->Gmtod(global, local, 1) ;
+
+ lightyield = gRandom->Poisson(fLightYieldMean) ;
+
+ apdgain = gRandom->Poisson(300.) ;
+
+ //calculate the number of electrons produced in the PIN due to this energy
+
+ nElectrons = apdgain * lostenergy * lightyield * fIntrinsicPINEfficiency *exp(-fLightYieldAttenuation * (local[1]+fGeom->GetCrystalSize(1)/2.0 ) ) ;
+
+ //nElectrons = lostenergy * lightyield * fIntrinsicPINEfficiency *exp(-fLightYieldAttenuation * (local[1]+fGeom->GetCrystalSize(1)/2.0 ) ) ;
+
+ xyze[3] = nElectrons * fRecalibrationFactor/100. ;
+
// add current hit to the hit list
- AddHit(fIshunt, primary,tracknumber, absid, xyze);
+
+ AddHit(fIshunt, primary,tracknumber, absid, xyze);
} // there is deposited energy
} // we are inside a PHOS Xtal
- if(gMC->CurrentVolID(copy) == gMC->VolId("PPIN") ) // We are inside de PIN diode
+ if(gMC->CurrentVolID(copy) == gMC->VolId("PPIN"))//We are inside the PIN diode
{
gMC->TrackPosition(pos) ;
+ global[0] = pos[0] ;
+ global[1] = pos[1] ;
+ global[2] = pos[2] ;
xyze[0] = pos[0] ;
xyze[1] = pos[1] ;
xyze[2] = pos[2] ;
- Float_t lostenergy = gMC->Edep() ;
+ lostenergy = gMC->Edep() ;
xyze[3] = gMC->Edep() ;
if ( xyze[3] != 0 ) {
Int_t absid ;
fGeom->RelToAbsNumbering(relid,absid) ;
-
- // calculating number of electrons in the PIN diode asociated to this hit
- Float_t nElectrons = lostenergy * fElectronsPerGeV ;
- xyze[3] = nElectrons * fRecalibrationFactor ;
+ gMC->Gmtod(global, local, 1) ;
+
+// calculating number of electrons in the PIN diode asociated to this hit
+
+ nElectrons = lostenergy * fElectronsPerGeV ;
+ // xyze[3] = nElectrons * fRecalibrationFactor ;
+ apdgain = gRandom->Poisson(300.) ;
+ if(local[1]<-0.0045) xyze[3] = apdgain * nElectrons * fRecalibrationFactor/100.;
+ if((local[1]>-0.0045)&&(gMC->TrackPid()==-11)) xyze[3] = apdgain * nElectrons * fRecalibrationFactor/100.;
+ if(local[1]>-0.0045) xyze[3] = nElectrons *fRecalibrationFactor/100.;
// add current hit to the hit list
+
AddHit(fIshunt, primary, tracknumber, absid, xyze);
+
//printf("PIN volume is %d, %d, %d, %d \n",relid[0],relid[1],relid[2],relid[3]);
//printf("Lost energy in the PIN is %f \n",lostenergy) ;
} // there is deposited energy