]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New ALIPHOSv1: includes the light transport in the Xtal
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Feb 2000 23:30:50 +0000 (23:30 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Feb 2000 23:30:50 +0000 (23:30 +0000)
PHOS/AliPHOSv1.cxx [new file with mode: 0644]
PHOS/AliPHOSv1.h [new file with mode: 0644]

diff --git a/PHOS/AliPHOSv1.cxx b/PHOS/AliPHOSv1.cxx
new file mode 100644 (file)
index 0000000..67a9990
--- /dev/null
@@ -0,0 +1,168 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//_________________________________________________________________________
+// Manager class for PHOS version SUBATECH
+//*-- Author : Odd Harald Oddland & Gines Martinez  Feb-2000 
+// The main goal of this version of AliPHOS is to calculted the 
+// induced charged in the PIN diode, taking into account light
+// tracking in the PbWO4 crystal, induced signal in the 
+// PIN due to MIPS particle and electronic noise.
+// In this respect, this class derived from AliPHOSv0 and 
+// only the StepManager function has been "surcharged"
+//////////////////////////////////////////////////////////////////////////////
+
+// --- ROOT system ---
+#include "TRandom.h"
+
+// --- Standard library ---
+
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include <strstream>
+#include <cassert>
+
+// --- AliRoot header files ---
+
+#include "AliPHOSv1.h"
+#include "AliPHOSHit.h"
+#include "AliPHOSDigit.h"
+#include "AliRun.h"
+#include "AliConst.h"
+
+ClassImp(AliPHOSv1)
+
+//____________________________________________________________________________
+  AliPHOSv1::AliPHOSv1() :
+    AliPHOSv0()
+{ 
+}
+
+//____________________________________________________________________________
+AliPHOSv1::AliPHOSv1(const char *name, const char *title):
+  AliPHOSv0(name,title)
+{
+  fLightYieldMean = 700000. ;
+  fIntrinsicPINEfficiency = 0.1875 ;
+  fLightYieldAttenuation = 0.0045 ;
+  fRecalibrationFactor = 6.2 / fLightYieldMean ;
+}
+//____________________________________________________________________________
+AliPHOSv1::AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
+  AliPHOSv0(Reconstructioner,name,title)
+{ 
+  fLightYieldMean = 700000.;
+  fIntrinsicPINEfficiency = 0.1875 ;
+  fLightYieldAttenuation = 0.0045 ;
+  fRecalibrationFactor = 6.2 / fLightYieldMean ;
+}
+
+//____________________________________________________________________________
+AliPHOSv1::~AliPHOSv1() 
+{ 
+}
+
+//____________________________________________________________________________
+
+
+
+
+
+
+//____________________________________________________________________________
+void AliPHOSv1::StepManager(void)
+{
+  Int_t          relid[4] ;      // (box, layer, row, column) indices
+  Float_t        xyze[4] ;       // position wrt MRS and energy deposited
+  TLorentzVector pos ;
+  Int_t copy;
+  Float_t        lightyield ;  // Light Yield per GeV
+  Float_t        nElectrons ; // Number of electrons in the PIN diode
+  TString name = fGeom->GetName() ; 
+  Float_t        global[3] ;
+  Float_t        local[3] ;
+  Float_t        lostenergy ;
+
+  if ( name == "GPS2" ) { // the CPV is a PPSD
+    if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") )
+    //     if( strcmp ( gMC->CurrentVolName(), "GCEL" ) == 0 )  // We are inside a gas cell 
+    {
+      gMC->TrackPosition(pos) ;
+      xyze[0] = pos[0] ;
+      xyze[1] = pos[1] ;
+      xyze[2] = pos[2] ;
+      xyze[3] = gMC->Edep() ;
+
+
+      if ( xyze[3] != 0 ) { // there is deposited energy 
+               gMC->CurrentVolOffID(5, relid[0]) ;  // get the PHOS Module number
+               gMC->CurrentVolOffID(3, relid[1]) ;  // get the Micromegas Module number 
+      // 1-> Geom->GetNumberOfModulesPhi() *  fGeom->GetNumberOfModulesZ() upper                         
+      //  >  fGeom->GetNumberOfModulesPhi()  *  fGeom->GetNumberOfModulesZ() lower
+               gMC->CurrentVolOffID(1, relid[2]) ;  // get the row number of the cell
+        gMC->CurrentVolID(relid[3]) ;        // get the column number 
+
+       // get the absolute Id number
+
+       Int_t absid ; 
+               fGeom->RelToAbsNumbering(relid,absid) ; 
+       
+
+       AddHit(gAlice->CurrentTrack(), absid, xyze );
+
+      } // there is deposited energy 
+     } // We are inside the gas of the CPV  
+   } // GPS2 configuration
+  
+   if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") ) 
+  //      if( strcmp ( gMC->CurrentVolName(), "PXTL" ) == 0 ) { //  We are inside a PWO crystal
+     {
+       gMC->TrackPosition(pos) ;
+       xyze[0] = pos[0] ;
+       xyze[1] = pos[1] ;
+       xyze[2] = pos[2] ;
+       lostenergy = gMC->Edep() ; 
+
+       global[0] = pos[0] ;
+       global[1] = pos[1] ;
+       global[2] = pos[2] ;
+
+       if ( xyze[3] != 0 ) {
+          gMC->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ;
+          relid[1] = 0   ;                    // means PW04
+          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
+
+          Int_t absid ; 
+          fGeom->RelToAbsNumbering(relid,absid) ; 
+         gMC->Gmtod(global, local, 1) ;
+         
+         // calculating number of electrons in the PIN diode asociated to this hit
+         lightyield = gRandom->Poisson(fLightYieldMean) ;
+         nElectrons = lostenergy * lightyield * fIntrinsicPINEfficiency *
+           exp(-fLightYieldAttenuation * (local[1]+fGeom->GetCrystalSize(1)/2.0 ) ) ;
+
+         xyze[3] = nElectrons * fRecalibrationFactor ;
+         // add current hit to the hit list
+          AddHit(gAlice->CurrentTrack(), absid, xyze);
+    
+       } // there is deposited energy
+    } // we are inside a PHOS Xtal
+}
+
diff --git a/PHOS/AliPHOSv1.h b/PHOS/AliPHOSv1.h
new file mode 100644 (file)
index 0000000..83464e8
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef ALIPHOSV1_H
+#define ALIPHOSV1_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+////////////////////////////////////////////////
+//  Manager class  for PHOS                   //
+//  Version SUBATECH
+//  Author : Odd Harald Oddland & 
+//           Gines Martinez        Feb-2000 
+// The main goal of this version of AliPHOS is to calculted the 
+// induced charged in the PIN diode, taking into account light
+// tracking in the PbWO4 crystal, induced signal in the 
+// PIN due to MIPS particle and electronic noise.
+// In this respect, this class derived from AliPHOSv0 and 
+// only the StepManager function has been "surcharged"
+////////////////////////////////////////////////////////////////////            
+
+// --- ROOT system ---
+
+
+// --- AliRoot header files ---
+#include "AliPHOSv0.h"
+
+
+class AliPHOSv1 : public AliPHOSv0 {
+
+public:
+
+  AliPHOSv1(void) ;
+  AliPHOSv1(const char *name, const char *title="") ;
+  AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title="") ;
+  virtual ~AliPHOSv1(void) ;
+                            
+  virtual void   StepManager(void) ;                                // does the tracking through PHOS and a preliminary digitalization
+  
+private:
+  //
+  // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using 
+  // following formula
+  // 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
+  // k_0 is 0.0045 from Valery Antonenko 
+  //
+  Float_t fLightYieldMean ;   // Mean of the Poisson distribution which is the mean lightyield in the PbOW4 xtal per GeV
+  Float_t fIntrinsicPINEfficiency ;    
+  Float_t fLightYieldAttenuation ; 
+  Float_t fRecalibrationFactor ;
+
+  ClassDef(AliPHOSv1,1)  // PHOS v1 main class , version subatech with light transportation, MIPS in PIN and electronic noise
+
+};
+
+#endif // AliPHOSV1_H