コード例 #1
0
ファイル: G4_FHCAL.C プロジェクト: HaiwangYu/macros
void
FHCALSetup(PHG4Reco* g4Reco, const int absorberactive = 0)
{

  gSystem->Load("libg4detectors.so");

  Fun4AllServer *se = Fun4AllServer::instance();

  /** Use dedicated FHCAL module */
  PHG4ForwardHcalSubsystem *hhcal = new PHG4ForwardHcalSubsystem("FHCAL");

  ostringstream mapping_hhcal;

  /* path to central copy of calibrations repositry */
  mapping_hhcal << getenv("CALIBRATIONROOT") ;
  mapping_hhcal << "/ForwardHcal/mapping/towerMap_FHCAL_v004.txt";
  cout << mapping_hhcal.str() << endl;
  //mapping_hhcal << "towerMap_FHCAL_latest.txt";

  hhcal->SetTowerMappingFile( mapping_hhcal.str() );
  hhcal->OverlapCheck(overlapcheck);

  if (absorberactive) hhcal->SetAbsorberActive();

  g4Reco->registerSubsystem( hhcal );

}
コード例 #2
0
ファイル: G4_FHcal.C プロジェクト: tkrahulik/coresoftware-eic
// Forward HCAL dedicated model
double G4_FHCal(PHG4Reco* g4Reco, const int absorberactive = 0, const char * name = "FHCAL")
{
  PHG4ForwardHcalSubsystem *hhcal = new PHG4ForwardHcalSubsystem(name);

  // automatically generate path to mapping file
  ostringstream mapping_hhcal;
  mapping_hhcal << getenv("OFFLINE_MAIN") <<
    "/share/calibrations/ForwardHcal/mapping/towerMap_FHCAL_v002.txt";
  cout << mapping_hhcal.str() << endl;

  // configure detector
  hhcal->SetTowerMappingFile( mapping_hhcal.str() );
  hhcal->OverlapCheck(overlapcheck);

  // register detector
  g4Reco->registerSubsystem( hhcal );
}