]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixed error of Geant3 parameters initialisation
authorpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 24 Feb 2007 20:42:35 +0000 (20:42 +0000)
committerpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 24 Feb 2007 20:42:35 +0000 (20:42 +0000)
EMCAL/AliEMCAL.cxx
EMCAL/AliEMCAL.h

index 87c647600df3ca94b1fd472bf45d2a835cc11d8f..b3cd21d11eb5f45e800f3676cd6805e7ea7f8afe 100644 (file)
@@ -17,6 +17,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.50  2007/02/05 10:43:25  hristov
+ * Changes for correct initialization of Geant4 (Mihaela)
+ *
  * Revision 1.49  2007/01/22 17:29:12  pavlinov
  * EMCAL geometry can be created independently form anything now
  *
@@ -89,7 +92,6 @@ AliEMCAL::AliEMCAL()
   // Default ctor 
   fName = "EMCAL" ;
   InitConstants();
-
 }
 
 //____________________________________________________________________________
@@ -129,9 +131,11 @@ void AliEMCAL::InitConstants()
 }
 
 //____________________________________________________________________________
-void AliEMCAL::Init()
+void AliEMCAL::DefineMediumParameters()
 {
-  //EMCAL cuts
+  //
+  // EMCAL cuts (Geant3) 
+  // 
   Int_t * idtmed = fIdtmed->GetArray() - 1599 ; 
 // --- Set decent energy thresholds for gamma and electron tracking
 
@@ -259,7 +263,7 @@ void AliEMCAL::CreateMaterials()
             isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ;
 
  // The scintillator of the CPV made of Polystyrene scintillator                   -> idtmed[1601]
-  float deemax = 0.1; // maximum fractional energy loss in one step (0 < DEEMAX â\89¤ 1);i
+  float deemax = 0.1; // maximum fractional energy loss in one step (0 < DEEMAX â?¤ 1);i
   AliMedium(2, "Scintillator$", 2, 1,
             isxfld, sxmgmx, 10.0, 0.001, deemax, 0.001, 0.001, 0, 0) ;
 
@@ -277,6 +281,8 @@ void AliEMCAL::CreateMaterials()
   fBirkC1 =  0.013/dP;
   fBirkC2 =  9.6e-6/(dP * dP);
 
+  // Call just in case of Geant3; What to do in case of Geant4 ?
+  if(gMC->InheritsFrom("TGeant3")) DefineMediumParameters(); // Feb 20, 2007
 }
  //____________________________________________________________________________
 void AliEMCAL::Digits2Raw()
index 0d253b9a712b61d499dfa28ef3f8d5e622b70bc3..5e0203ba7d87852f7ae4cb1029aa98ca2b1f5bde 100644 (file)
@@ -7,6 +7,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.41  2007/02/05 10:43:25  hristov
+ * Changes for correct initialization of Geant4 (Mihaela)
+ *
  * Revision 1.40  2006/12/05 17:19:26  gustavo
  * Updated AliEMCAL::Digits2Raw, reads first provisional RCU mapping files to make Raw data with new AliCaloAltroMapping and AliCaloRawStream
  *
@@ -47,7 +50,6 @@ class AliEMCAL : public AliDetector {
   }
   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
   virtual void  CreateMaterials() ;   
-  //  virtual void  
   virtual void  Digits2Raw();
   
   using AliDetector::Raw2Digits;
@@ -57,7 +59,7 @@ class AliEMCAL : public AliDetector {
   virtual AliEMCALGeometry * GetGeometry() const 
     {return AliEMCALGeometry::GetInstance(GetTitle(),"") ;  }   
   virtual void    Hits2SDigits();
-  virtual void    Init(); 
+  //  virtual void    Init(); 
   virtual Int_t   IsVersion(void) const = 0 ;   
   
   virtual AliTriggerDetector* CreateTriggerDetector() const 
@@ -90,6 +92,7 @@ protected:
   void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) ;
 
   void InitConstants();  //initializes some params
+  void DefineMediumParameters();  // define tracking medium parameters 
 
   Int_t fBirkC0;    // constants for Birk's Law implementation
   Double_t fBirkC1; // constants for Birk's Law implementation