introduced the response of the APD
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 23:10:28 +0000 (23:10 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 23:10:28 +0000 (23:10 +0000)
PHOS/AliPHOS.cxx
PHOS/AliPHOSEMCAGeometry.cxx
PHOS/AliPHOSv3.cxx

index ac9a7dceec373d883a00e3dd5668e0491679cb0b..ded47ea6890dc516b2b40d8882a50924083f9e25 100644 (file)
@@ -244,7 +244,7 @@ void AliPHOS::CreateMaterials()
 
   // 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,
@@ -303,8 +303,21 @@ void AliPHOS::CreateMaterials()
   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) ;
index 23e9c30b435d45b5c99b442836983ab44bbe1846..fc8ccfaaf8d7f65060166d71b181c55ba4b18178 100644 (file)
@@ -59,10 +59,16 @@ AliPHOSEMCAGeometry::AliPHOSEMCAGeometry()
   fIPtoOuterCoverDistance = 447.0 ;      
   fIPtoCrystalSurface     = 460.0 ;  
   
-  fPinDiodeSize[0] = 1.71 ;   //Values given by Odd Harald feb 2000  
-  fPinDiodeSize[1] = 0.0280 ; // 0.0280 is the depth of active layer in the silicon     
-  fPinDiodeSize[2] = 1.61 ;    
-  
+  //fPinDiodeSize[0] = 1.71 ;   //Values of ame PIN diode  
+  //fPinDiodeSize[1] = 0.0280 ; // 0.0280 is the depth of active layer
+  //fPinDiodeSize[2] = 1.61 ;    
+  fPinDiodeSize[0] = 0.5000 ;    // APD 5 mm side
+  //fPinDiodeSize[1] = 0.0200 ;  // APD bulk thickness
+  fPinDiodeSize[1] = 0.0100 ;    // APD bulk thickness
+  //According to Y. M. (cms) is it 50 micrometer I use 100 micrometers
+  fPinDiodeSize[2] = 0.5000 ;    // APD 5 mm side 
   fUpperCoolingPlateThickness   = 0.06 ; 
   fSupportPlateThickness        = 10.0 ;
   fLowerThermoPlateThickness    =  3.0 ; 
index a3743e6b1cc3e10491ee932d80f01a587fa084c1..b54351a007bd1d9e12d2099b8b780d11184b005f 100644 (file)
@@ -24,7 +24,7 @@
 //  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 ---
@@ -60,15 +60,17 @@ AliPHOSv1(name,title)
   // 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 ; 
 }
 
@@ -84,13 +86,14 @@ AliPHOSv1(name,title)
 //   //                     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 ;
 // }
 //____________________________________________________________________________
@@ -109,10 +112,16 @@ void AliPHOSv3::StepManager(void)
   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
@@ -247,15 +256,19 @@ void AliPHOSv3::StepManager(void)
   } // 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 ;
 
@@ -263,26 +276,45 @@ void AliPHOSv3::StepManager(void)
        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 ) {
@@ -295,13 +327,21 @@ void AliPHOSv3::StepManager(void)
        
        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