Esempio n. 1
0
void G4Init(bool do_svtx = true,
	    bool do_preshower = false,
	    bool do_cemc = true,
	    bool do_hcalin = true,
	    bool do_magnet = true,
	    bool do_hcalout = true,
	    bool do_pipe = true,
	    bool do_bbc = true,
	    bool do_global = true,
	    bool do_FEMC = true,
	    bool do_FHCAL = true) {

  gROOT->LoadMacro("G4_Bbc.C");
  if (do_bbc) BbcInit();
  
  gROOT->LoadMacro("G4_Pipe.C");
  if (do_pipe) PipeInit();
  
  // load detector macros and execute Init() function
  gROOT->LoadMacro("G4_Svtx.C");           // default
  //gROOT->LoadMacro("G4_Svtx_ladders.C"); // testing
  //gROOT->LoadMacro("G4_Svtx_ITS.C");     // testing
  if (do_svtx) SvtxInit();

  if (do_preshower) {
    gROOT->LoadMacro("G4_PreShower.C");   // testing
    PreShowerInit();
  }

  gROOT->LoadMacro("G4_CEmc_Spacal.C");    //
  if (do_cemc) CEmcInit(72); // make it 2*2*2*3*3 so we can try other combinations
  
  //gROOT->LoadMacro("G4_Hcal_ref.C");     // deprecated
  //gROOT->LoadMacro("G4_Hcal_cross.C");   // deprecated

  gROOT->LoadMacro("G4_HcalIn_ref.C");       // default 
  if (do_hcalin) HCalInnerInit();

  gROOT->LoadMacro("G4_Magnet.C");
  if (do_magnet) MagnetInit();

  gROOT->LoadMacro("G4_HcalOut_ref.C");       // default 
  if (do_hcalout) HCalOuterInit();

  gROOT->LoadMacro("G4_Global.C");
  
  gROOT->LoadMacro("G4_Jets.C");

  gROOT->LoadMacro("G4_FwdJets.C");

  gROOT->LoadMacro("G4_FEMC.C");
  if ( do_FEMC ) FEMCInit();

  gROOT->LoadMacro("G4_FHCAL.C");
  if ( do_FHCAL ) FHCALInit();

}
Esempio n. 2
0
void G4Init(bool do_svtx = true,
	    bool do_preshower = false,
	    bool do_cemc = true,
	    bool do_hcalin = true,
	    bool do_magnet = true,
	    bool do_hcalout = true,
	    bool do_pipe = true,
	    bool do_FEMC = true,
	    bool do_FHCAL = true) {

  // load detector/material macros and execute Init() function

  if (do_pipe)
    {
      gROOT->LoadMacro("G4_Pipe.C");
      PipeInit();
    }
  if (do_svtx)
    {
      gROOT->LoadMacro("G4_Svtx.C");
      //gROOT->LoadMacro("G4_Svtx_ladders.C"); // testing
      //gROOT->LoadMacro("G4_Svtx_ITS.C");     // testing
      SvtxInit();
    }

  if (do_preshower) 
    {
      gROOT->LoadMacro("G4_PreShower.C");
      PreShowerInit();
    }

  if (do_cemc)
    {
      gROOT->LoadMacro("G4_CEmc_Spacal.C");
      CEmcInit(72); // make it 2*2*2*3*3 so we can try other combinations
    }  

  if (do_hcalin) 
    {
      gROOT->LoadMacro("G4_HcalIn_ref.C");
      HCalInnerInit();
    }

  if (do_magnet)
    {
      gROOT->LoadMacro("G4_Magnet.C");
      MagnetInit();
    }
  if (do_hcalout)
    {
      gROOT->LoadMacro("G4_HcalOut_ref.C");
      HCalOuterInit();
    }

  if (do_FEMC)
    {
      gROOT->LoadMacro("G4_FEMC.C");
      FEMCInit();
    }

  if (do_FHCAL) 
    {
      gROOT->LoadMacro("G4_FHCAL.C");
      FHCALInit();
    }
}