void
G4Cmd(const char * cmd)
{
  Fun4AllServer *se = Fun4AllServer::instance();
  PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco("PHG4RECO");
  g4->ApplyCommand(cmd);
}
Example #2
0
void Svtx_Eval(std::string outputfile, int verbosity = 0)
{
  //---------------
  // Load libraries
  //---------------

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  gSystem->Load("libg4hough.so");
  gSystem->Load("libg4eval.so");

  //---------------
  // Fun4All server
  //---------------

  Fun4AllServer *se = Fun4AllServer::instance();

  //----------------
  // SVTX evaluation
  //----------------

  // SubsysReco* eval = new SvtxEvaluator("SVTXEVALUATOR", outputfile.c_str());
  // eval->do_cluster_eval(false);
  // eval->do_g4hit_eval(false);
  // eval->do_hit_eval(false);
  // eval->do_gpoint_eval(false);
  // eval->Verbosity(verbosity);
  // se->registerSubsystem( eval );

  MomentumEvaluator* eval = new MomentumEvaluator(outputfile.c_str(),0.1,0.2,62,2,56,10.,80.);
  se->registerSubsystem( eval );
  
  return;
}
Example #3
0
void HCALInner_Clusters(int verbosity = 0) {
  gSystem->Load("libcalo_reco.so");

  Fun4AllServer *se = Fun4AllServer::instance();
  
  if (HCalIn_clusterizer == kHCalInTemplateClusterizer)
  {
    RawClusterBuilderTemplate* ClusterBuilder = new RawClusterBuilderTemplate("HcalInRawClusterBuilderTemplate");
    ClusterBuilder->Detector("HCALIN");
    ClusterBuilder->Verbosity(verbosity);
    se->registerSubsystem( ClusterBuilder );

  }
  else if (HCalIn_clusterizer == kHCalInGraphClusterizer)
  {
    RawClusterBuilderGraph* ClusterBuilder = new RawClusterBuilderGraph("HcalInRawClusterBuilderGraph");
    ClusterBuilder->Detector("HCALIN");
    ClusterBuilder->Verbosity(verbosity);
    se->registerSubsystem( ClusterBuilder );

  }
  else
  {
    cout <<"HCalIn_Clusters - unknown clusterizer setting!"<<endl;
    exit(1);
  }
  return;
}
Example #4
0
void
G4DSTreader_EICIR( const char * outputFile = "G4sPHENIXCells.root",//
		   int absorberactive = 1 )
{

  //! debug output on screen?
  const bool debug = false;

  //! save raw g4 hits
  const bool save_g4_raw = true;

  // save a comprehensive  evaluation file
  PHG4DSTReader* ana = new PHG4DSTReader(
                                         string(outputFile) + string("_DSTReader.root"));
  ana->set_save_particle(true);
  ana->set_load_all_particle(false);
  ana->set_load_active_particle(true);
  ana->set_save_vertex(true);

  if (debug)
    {
      ana->Verbosity(2);
    }

  if (save_g4_raw)
    {
      ana->AddNode("BH_FORWARD_PLUS");
      ana->AddNode("FWDDISC");
    }

  Fun4AllServer *se = Fun4AllServer::instance();
  se->registerSubsystem(ana);
}
void Svtx_Eval(std::string outputfile, int verbosity = 0)
{
  //---------------
  // Load libraries
  //---------------

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  gSystem->Load("libg4hough.so");
  gSystem->Load("libg4eval.so");

  //---------------
  // Fun4All server
  //---------------

  Fun4AllServer *se = Fun4AllServer::instance();

  //----------------
  // SVTX evaluation
  //----------------

  SubsysReco* eval = new SvtxEvaluator("SvtxEVALUATOR", outputfile.c_str());
  eval->Verbosity(verbosity);
  se->registerSubsystem( eval );

  return;
}
Example #6
0
void Run_PerformTestMB(char* output = "rpanase.root")
{
  //gSystem->Load("libPerformTestMB.so");
 gSystem->Load("/phenix/plhf/xuq/phenix/flow/PP/install/lib/libPerformTestMB.so");
 // gSystem->Load("libfvtx_subsysreco.so");
    //  gSystem->Load("libmutoo_subsysreco");
   //   gSystem->Load("libfun4allfuncs.so");
  //    gSystem->Load("libfun4allfuncs_muons");
  //    gSystem->Load("libMWGOO");
  //    gSystem->Load("libmutrg");
  //    gSystem->Load("librpc_subsysreco");
 //     gSystem->Load("librpc_muotrackreco");
  //    gSystem->Load("libcompactCNT.so");
  //    gSystem->Load("libCNT.so");
  
Fun4AllServer *se = Fun4AllServer::instance();
se->Verbosity(0);  
  recoConsts *rc = recoConsts::instance();
  rc->set_IntFlag("MPC_RECO_MODE",0x6);

  rc->set_IntFlag("MPC_GAINCORR",0);//add as new

  SubsysReco *mpc_tow = new MpcReco();
  se->registerSubsystem(mpc_tow);
  //SubsysReco *fvtx_tow = new FvtxReadbackDST();
  //se->registerSubsystem(new FvtxReadbackDST());

  SubsysReco *rpana = new PerformTestMB(output);
  se->registerSubsystem(rpana);
}
Example #7
0
void FHCAL_Towers(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();

  ostringstream mapping_fhcal;
  mapping_fhcal << getenv("CALIBRATIONROOT") <<
  	"/ForwardHcal/mapping/towerMap_FHCAL_v004.txt";
  //mapping_fhcal << "towerMap_FHCAL_latest.txt";

  RawTowerBuilderByHitIndex* tower_FHCAL = new RawTowerBuilderByHitIndex("TowerBuilder_FHCAL");
  tower_FHCAL->Detector("FHCAL");
  tower_FHCAL->set_sim_tower_node_prefix("SIM");
  tower_FHCAL->GeometryTableFile( mapping_fhcal.str() );

  se->registerSubsystem(tower_FHCAL);

  // const double FHCAL_photoelectron_per_GeV = 500;

  // RawTowerDigitizer *TowerDigitizer_FHCAL = new RawTowerDigitizer("FHCALRawTowerDigitizer");

  // TowerDigitizer_FHCAL->Detector("FHCAL");
  // TowerDigitizer_FHCAL->Verbosity(verbosity);
  // TowerDigitizer_FHCAL->set_raw_tower_node_prefix("RAW");
  // TowerDigitizer_FHCAL->set_digi_algorithm(RawTowerDigitizer::kSimple_photon_digitization);
  // TowerDigitizer_FHCAL->set_pedstal_central_ADC(0);
  // TowerDigitizer_FHCAL->set_pedstal_width_ADC(8);// eRD1 test beam setting
  // TowerDigitizer_FHCAL->set_photonelec_ADC(1);//not simulating ADC discretization error
  // TowerDigitizer_FHCAL->set_photonelec_yield_visible_GeV( FHCAL_photoelectron_per_GeV );
  // TowerDigitizer_FHCAL->set_zero_suppression_ADC(16); // eRD1 test beam setting

  // se->registerSubsystem( TowerDigitizer_FHCAL );

  // RawTowerCalibration *TowerCalibration_FHCAL = new RawTowerCalibration("FHCALRawTowerCalibration");
  // TowerCalibration_FHCAL->Detector("FHCAL");
  // TowerCalibration_FHCAL->Verbosity(verbosity);
  // TowerCalibration_FHCAL->set_calib_algorithm(RawTowerCalibration::kSimple_linear_calibration);
  // TowerCalibration_FHCAL->set_calib_const_GeV_ADC( 1. / FHCAL_photoelectron_per_GeV );
  // TowerCalibration_FHCAL->set_pedstal_ADC( 0 );

  // se->registerSubsystem( TowerCalibration_FHCAL );

  RawTowerDigitizer *TowerDigitizer = new RawTowerDigitizer("FHCALRawTowerDigitizer");
  TowerDigitizer->Detector("FHCAL");
  TowerDigitizer->Verbosity(verbosity);
  TowerDigitizer->set_digi_algorithm(RawTowerDigitizer::kNo_digitization);
  se->registerSubsystem( TowerDigitizer );

  RawTowerCalibration *TowerCalibration = new RawTowerCalibration("FHCALRawTowerCalibration");
  TowerCalibration->Detector("FHCAL");
  TowerCalibration->Verbosity(verbosity);
  TowerCalibration->set_calib_algorithm(RawTowerCalibration::kSimple_linear_calibration);
  TowerCalibration->set_calib_const_GeV_ADC(1./0.03898);  // calibrated with muons
  TowerCalibration->set_pedstal_ADC(0);
  se->registerSubsystem( TowerCalibration );


}
Example #8
0
void CEMC_Towers(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();
  
  RawTowerBuilder *TowerBuilder = new RawTowerBuilder("EmcRawTowerBuilder");
  TowerBuilder->Detector("CEMC");
  TowerBuilder->set_sim_tower_node_prefix("SIM");
  TowerBuilder->Verbosity(verbosity);
  se->registerSubsystem( TowerBuilder );


  double sampling_fraction = 1;
  if (Cemc_spacal_configuration
      == PHG4CylinderGeom_Spacalv1::k1DProjectiveSpacal)
    {
      sampling_fraction = 0.0234335; //from production:/gpfs02/phenix/prod/sPHENIX/preCDR/pro.1-beta.3/single_particle/spacal1d/zerofield/G4Hits_sPHENIX_e-_eta0_8GeV.root
    }
  else if (Cemc_spacal_configuration
      == PHG4CylinderGeom_Spacalv1::k2DProjectiveSpacal)
    {
//      sampling_fraction = 0.02244; //from production: /gpfs02/phenix/prod/sPHENIX/preCDR/pro.1-beta.3/single_particle/spacal2d/zerofield/G4Hits_sPHENIX_e-_eta0_8GeV.root
      sampling_fraction = 2.36081e-02;//from production: /gpfs02/phenix/prod/sPHENIX/preCDR/pro.1-beta.5/single_particle/spacal2d/zerofield/G4Hits_sPHENIX_e-_eta0_8GeV.root
    }
  else
    {
      std::cout
          << "G4_CEmc_Spacal.C::G4_CEmc_Spacal - Fatal Error - unrecognized SPACAL configuration #"
          << Cemc_spacal_configuration<<". Force exiting..." << std::endl;
      exit(-1);
      return ;
    }

  static const double photoelectron_per_GeV = 500;//500 photon per total GeV deposition

  RawTowerDigitizer *TowerDigitizer = new RawTowerDigitizer("EmcRawTowerDigitizer");
  TowerDigitizer->Detector("CEMC");
  TowerDigitizer->Verbosity(verbosity);
  TowerDigitizer->set_digi_algorithm(RawTowerDigitizer::kSimple_photon_digitalization);
  TowerDigitizer->set_pedstal_central_ADC(0);
  TowerDigitizer->set_pedstal_width_ADC(8);// eRD1 test beam setting
  TowerDigitizer->set_photonelec_ADC(1);//not simulating ADC discretization error
  TowerDigitizer->set_photonelec_yield_visible_GeV( photoelectron_per_GeV/sampling_fraction );
  TowerDigitizer->set_zero_suppression_ADC(16); // eRD1 test beam setting
  se->registerSubsystem( TowerDigitizer );

  RawTowerCalibration *TowerCalibration = new RawTowerCalibration("EmcRawTowerCalibration");
  TowerCalibration->Detector("CEMC");
  TowerCalibration->Verbosity(verbosity);
  TowerCalibration->set_calib_algorithm(RawTowerCalibration::kSimple_linear_calibration);
  TowerCalibration->set_calib_const_GeV_ADC(1./photoelectron_per_GeV);
  TowerCalibration->set_pedstal_ADC(0);
  se->registerSubsystem( TowerCalibration );

  return;
}
Example #9
0
// stupid macro to turn on the geant4 display
// we ask Fun4All for a pointer to PHG4Reco
// using the ApplyCommand will start up the
// G4 cmd interpreter and graphics system
// the vis.mac contains the necessary commands to
// start up the visualization, the next event will
// be displayed. Do not execute this macro
// before PHG4Reco was registered with Fun4All
PHG4Reco * DisplayOn(const char *mac = "vis_prototype3.mac")
{
  char cmd[100];
  Fun4AllServer *se = Fun4AllServer::instance();
  PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco("PHG4RECO");
  g4->InitRun(se->topNode());
  g4->ApplyDisplayAction();
  sprintf(cmd, "/control/execute %s", mac);
  g4->ApplyCommand(cmd);
  return g4;
}
Example #10
0
void ShowerCompress(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4eval.so");

  Fun4AllServer *se = Fun4AllServer::instance();
  
  PHG4DstCompressReco* compress = new PHG4DstCompressReco("PHG4DstCompressReco");
  compress->AddHitContainer("G4HIT_PIPE");
  compress->AddHitContainer("G4HIT_SVTXSUPPORT");
  compress->AddHitContainer("G4HIT_CEMC_ELECTRONICS");
  compress->AddHitContainer("G4HIT_CEMC");
  compress->AddHitContainer("G4HIT_ABSORBER_CEMC");
  compress->AddHitContainer("G4HIT_CEMC_SPT");
  compress->AddHitContainer("G4HIT_ABSORBER_HCALIN");
  compress->AddHitContainer("G4HIT_HCALIN");
  compress->AddHitContainer("G4HIT_HCALIN_SPT");
  compress->AddHitContainer("G4HIT_MAGNET");
  compress->AddHitContainer("G4HIT_ABSORBER_HCALOUT");
  compress->AddHitContainer("G4HIT_HCALOUT");
  compress->AddHitContainer("G4HIT_BH_1");
  compress->AddHitContainer("G4HIT_BH_FORWARD_PLUS");
  compress->AddHitContainer("G4HIT_BH_FORWARD_NEG");
  compress->AddCellContainer("G4CELL_CEMC");
  compress->AddCellContainer("G4CELL_HCALIN");
  compress->AddCellContainer("G4CELL_HCALOUT");
  compress->AddTowerContainer("TOWER_SIM_CEMC");
  compress->AddTowerContainer("TOWER_RAW_CEMC");
  compress->AddTowerContainer("TOWER_CALIB_CEMC");
  compress->AddTowerContainer("TOWER_SIM_HCALIN");
  compress->AddTowerContainer("TOWER_RAW_HCALIN");
  compress->AddTowerContainer("TOWER_CALIB_HCALIN");
  compress->AddTowerContainer("TOWER_SIM_HCALOUT");
  compress->AddTowerContainer("TOWER_RAW_HCALOUT");
  compress->AddTowerContainer("TOWER_CALIB_HCALOUT");

  compress->AddHitContainer("G4HIT_FEMC");
  compress->AddHitContainer("G4HIT_ABSORBER_FEMC");
  compress->AddHitContainer("G4HIT_FHCAL");
  compress->AddHitContainer("G4HIT_ABSORBER_FHCAL"); 
  compress->AddCellContainer("G4CELL_FEMC");
  compress->AddCellContainer("G4CELL_FHCAL");
  compress->AddTowerContainer("TOWER_SIM_FEMC");
  compress->AddTowerContainer("TOWER_RAW_FEMC");
  compress->AddTowerContainer("TOWER_CALIB_FEMC");
  compress->AddTowerContainer("TOWER_SIM_FHCAL");
  compress->AddTowerContainer("TOWER_RAW_FHCAL");
  compress->AddTowerContainer("TOWER_CALIB_FHCAL");
  
  se->registerSubsystem(compress);
  
  return; 
}
Example #11
0
void FEMC_Cells(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();

  PHG4ForwardCalCellReco *hc = new PHG4ForwardCalCellReco("FEMCCellReco");
  hc->Detector("FEMC");
  se->registerSubsystem(hc);

  return;
}
Example #12
0
void CEMC_Eval(std::string outputfile, int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4eval.so");
  Fun4AllServer *se = Fun4AllServer::instance();

  CaloEvaluator* eval = new CaloEvaluator("CEMCEVALUATOR", "CEMC", outputfile.c_str());
  eval->Verbosity(verbosity);
  se->registerSubsystem( eval );
      
  return;
}
Example #13
0
void Svtx_Cells(int verbosity = 0)
{
  // runs the cellularization of the energy deposits (g4hits) 
  // into detector hits (g4cells)

  //---------------
  // Load libraries
  //---------------

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

  //---------------
  // Fun4All server
  //---------------

  Fun4AllServer *se = Fun4AllServer::instance();

  //-----------
  // SVTX cells
  //-----------

  // 50 micron pixels + 60 micron strips
  double svxcellsizex[2] = {0.0028, 0.0028, 0.0028};

  // 425 micron pixels + 9.6 mm tracking strips
  double svxcellsizey[2] = {0.0028, 0.0028, 0.0028};

  double diffusion = 0.0057;
  double electrons_per_kev = 38.;
  
  // tpc_cell_x is the TPC pad size.  The actual hit resolution depends not only on this pad size but also on the diffusion in the gas and amplification step
  double tpc_cell_x = 0.12;
  // tpc_cell_y is the z "bin" size.  It is approximately the z resolution * sqrt(12)
  // eventually this will be replaced with an actual simulation of timing amplitude.
  double tpc_cell_y = 0.17;
  
  PHG4CylinderCellTPCReco *svtx_cells = new PHG4CylinderCellTPCReco();
  svtx_cells->setDiffusion(diffusion);
  svtx_cells->setElectronsPerKeV(electrons_per_kev);
  svtx_cells->Detector("SVTX");
  for (int i=0;i<n_svx_layer;++i) {
    svtx_cells->cellsize(i, svxcellsizex[i], svxcellsizey[i]);
  }
  for (int i=n_svx_layer;i<63;++i) {
    svtx_cells->cellsize(i, tpc_cell_x, tpc_cell_y);
  }
  
  se->registerSubsystem(svtx_cells);

  return;
}
void Svtx_Eval(std::string outputfile, int verbosity = 0)
{
  //---------------
  // Load libraries
  //---------------

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  gSystem->Load("libg4hough.so");
  gSystem->Load("libg4eval.so");

  //---------------
  // Fun4All server
  //---------------

  Fun4AllServer* se = Fun4AllServer::instance();

  //----------------
  // SVTX evaluation
  //----------------

  SvtxEvaluator* eval;
  //eval = new SvtxEvaluator("SVTXEVALUATOR", outputfile.c_str());
  eval = new SvtxEvaluator("SVTXEVALUATOR", outputfile.c_str(), "SvtxTrackMap", n_maps_layer, n_intt_layer, n_gas_layer);
  eval->do_cluster_eval(true);
  eval->do_g4hit_eval(true);
  eval->do_hit_eval(true);  // enable to see the hits that includes the chamber physics...
  eval->do_gpoint_eval(false);
  eval->scan_for_embedded(false);  // take all tracks if false - take only embedded tracks if true
  eval->Verbosity(verbosity);
  se->registerSubsystem(eval);

  if (use_primary_vertex)
  {
    // make a second evaluator that records tracks fitted with primary vertex included
    // good for analysis of prompt tracks, particularly if MVTX is not present
    SvtxEvaluator* evalp;
    evalp = new SvtxEvaluator("SVTXEVALUATOR", string(outputfile.c_str()) + "_primary_eval.root", "PrimaryTrackMap", n_maps_layer, n_intt_layer, n_gas_layer);
    evalp->do_cluster_eval(true);
    evalp->do_g4hit_eval(true);
    evalp->do_hit_eval(false);
    evalp->do_gpoint_eval(false);
    evalp->scan_for_embedded(true);  // take all tracks if false - take only embedded tracks if true
    evalp->Verbosity(0);
    se->registerSubsystem(evalp);
  }

  // MomentumEvaluator* eval = new MomentumEvaluator(outputfile.c_str(),0.2,0.4,Max_si_layer,2,Max_si_layer-4,10.,80.);
  // se->registerSubsystem( eval );

  return;
}
void
MaterialScan()
{

  Fun4AllServer *se = Fun4AllServer::instance();
  PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco("PHG4RECO");

  g4->ApplyCommand("/control/matScan/phi 4 -22.5 45 deg");
  g4->ApplyCommand("/control/matScan/phi 5 -22.5 45 deg");
  g4->ApplyCommand("/control/matScan/theta 90 0 180 deg");
  g4->ApplyCommand("/control/matScan/scan");

}
Example #16
0
void CEMC_Towers(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();
  
  RawTowerBuilder *TowerBuilder = new RawTowerBuilder("EmcRawTowerBuilder");
  TowerBuilder->Detector("CEMC");
  TowerBuilder->Verbosity(verbosity);
  se->registerSubsystem( TowerBuilder );
      
  return;
}
void HCALInner_Eval(std::string outputfile, int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4eval.so");
  Fun4AllServer *se = Fun4AllServer::instance();
    
  PHG4CalEvaluator* eval = new PHG4CalEvaluator("PHG4HCALINEVALUATOR", outputfile.c_str());
  eval->Verbosity(verbosity);
  eval->Detector("HCALIN");
  se->registerSubsystem( eval );
      
  return;
}
void HCALInner_Clusters(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();
  
  RawClusterBuilder* ClusterBuilder = new RawClusterBuilder("HcalInRawClusterBuilder");
  ClusterBuilder->Detector("HCALIN");
  ClusterBuilder->Verbosity(verbosity);
  se->registerSubsystem( ClusterBuilder );
  
  return;
}
Example #19
0
void Run_RidgePPcentpc1hs(char* output = "rpanase.root")
{
  //gSystem->Load("libRidgePP.so");
  gSystem->Load("liblpc.so");
  //gSystem->Load("/phenix/plhf/xuq/flow/PP/install/lib/libRidgePPcent.so");
  gSystem->Load("/phenix/plhf/xuq/flow/PP/install/lib/libRidgePPcentpc1hs.so");

  Fun4AllServer *se = Fun4AllServer::instance();


  SubsysReco *rpana = new RidgePPcentpc1hs(output);
  se->registerSubsystem(rpana);
}
Example #20
0
void FEMC_Clusters(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();

  RawClusterBuilderFwd* ClusterBuilder = new RawClusterBuilderFwd("FEMCRawClusterBuilderFwd");
  ClusterBuilder->Detector("FEMC");
  ClusterBuilder->Verbosity(verbosity);
  se->registerSubsystem( ClusterBuilder );

  return;
}
void HCALInner_Cells(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();

  PHG4SlatCellReco *hcal_slats = new PHG4SlatCellReco("HCALSLATCELLRECO");
  hcal_slats->Detector("HCALIN");
  hcal_slats->Verbosity(verbosity);
  hcal_slats->etasize_nslat(Min_hcal_in_layer, 0.1, 6);
  se->registerSubsystem(hcal_slats);
  
  return;  
}
Example #22
0
void FHCAL_Clusters(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();
  
  RawClusterBuilderFwd* ClusterBuilder = new RawClusterBuilderFwd("FHCALRawClusterBuilderFwd");
  ClusterBuilder->Detector("FHCAL");
  ClusterBuilder->Verbosity(verbosity);
  ClusterBuilder->set_threshold_energy(0.100);  
  se->registerSubsystem( ClusterBuilder );
  
  return;
}
//! Read in a Geometry file, and output DST and ROOT TGeo files
void
Fun4All_ImportGeom(const string & geom_file = "./sPHENIX.root")
{
  gSystem->Load("libphgeom.so");

  Fun4AllServer *se = Fun4AllServer::instance();
  se->Verbosity(1);
  // just if we set some flags somewhere in this macro
  recoConsts *rc = recoConsts::instance();

  PHGeomFileImport * import = new PHGeomFileImport(geom_file);
  se->registerSubsystem(import);

  // dummy input
  Fun4AllInputManager *in = new Fun4AllDummyInputManager("JADE");
  se->registerInputManager(in);

  // output in DST
  Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT",
      geom_file + "_DST.root");
  se->registerOutputManager(out);

  // run one event as example
  se->run(1);

  PHGeomUtility::ExportGeomtry(se->topNode(),geom_file + "_export.root");

  se->End();
  std::cout << "All done" << std::endl;
  delete se;
  gSystem->Exit(0);

}
Example #24
0
int G4_Lepto(string filename)
{
  cout << "G4 Lepto Loaded!!!" << endl;

  cout << "**************************************" << endl;
  Fun4AllServer *se = Fun4AllServer::instance();
  LeptoquarksReco *mcana2 = new LeptoquarksReco(filename);

  //mcana2->set_beam_energies(10,250);
  se->registerSubsystem( mcana2 );
  cout << "**************************************" << endl;

  return 0;
}
Example #25
0
void Run_RidgePPRun15(char* output = "rpanase.root")
{
  gSystem->Load("libRidgePPRun15.so");
  //gSystem->Load("libfvtx_subsysreco.so" );
  //gSystem->Load("/phenix/plhf/xuq/phenix/flow/PP/install/lib/libRidgePPRun15.so");

  Fun4AllServer *se = Fun4AllServer::instance();

 // recoConsts *rc = recoConsts::instance();
 // se->registerSubsystem(new FvtxReadbackDST());

  SubsysReco *rpana = new RidgePPRun15(output);
  se->registerSubsystem(rpana);
}
Example #26
0
void Svtx_Cells(int verbosity = 0)
{
  // runs the cellularization of the energy deposits (g4hits) 
  // into detector hits (g4cells)

  //---------------
  // Load libraries
  //---------------

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

  //---------------
  // Fun4All server
  //---------------

  Fun4AllServer *se = Fun4AllServer::instance();

  //-----------
  // SVTX cells
  //-----------

  // The pattern recognition layers (4 & 6) are set at 2 mm in Z and 240 microns 
  // pitch to make the area the same as the long strips
  // Layers 3, 5 and 7 are long strips parallel to the beam line

  // 60 micron X strips, 240 micron pattern reco strips
  double svxcellsizex[2] = {0.0050, 0.0050};

  // 8 mm tracking strips, 2 mm pattern reco strips
  double svxcellsizey[2] = {0.0425, 0.0425};
  
  PHG4CylinderCellReco *svtx_cells = new PHG4CylinderCellReco();
  svtx_cells->Detector("SVTX");
  svtx_cells->Verbosity(verbosity);
  int idx = 0;
  for (int i = Min_si_layer; i < 2; ++i) {
    svtx_cells->cellsize(i, svxcellsizex[idx], svxcellsizey[idx]);
    ++idx;
  }
  se->registerSubsystem(svtx_cells);
  
  PHG4SiliconTrackerCellReco *reco = new PHG4SiliconTrackerCellReco("SILICON_TRACKER");
  reco->Verbosity(verbosity);
  se->registerSubsystem(reco);

  return;
}
Example #27
0
void EGEM_FastSim_Reco(int verbosity = 0) {

  //---------------
  // Load libraries
  //---------------

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4hough.so");

  //---------------
  // Fun4All server
  //---------------

  Fun4AllServer *se = Fun4AllServer::instance();

  PHG4TrackFastSim* kalman = new PHG4TrackFastSim("PHG4TrackFastSim");
  kalman->Verbosity(0);

  kalman->set_use_vertex_in_fitting(true);
  kalman->set_vertex_xy_resolution(50E-4);
  kalman->set_vertex_z_resolution(50E-4);

  kalman->set_detector_type(PHG4TrackFastSim::Vertical_Plane); // Vertical_Plane, Cylinder
  kalman->set_phi_resolution(50E-4);
  kalman->set_r_resolution(1.);

  kalman->set_mag_field_file_name("/phenix/upgrades/decadal/fieldmaps/fsPHENIX.2d.root");
  kalman->set_mag_field_re_scaling_factor(1.);

  kalman->set_pat_rec_hit_finding_eff(1.);
  kalman->set_pat_rec_noise_prob(0.);

  std::string phg4hits_names[] = {"G4HIT_EGEM_0","G4HIT_EGEM_1","G4HIT_EGEM_2"};
  kalman->set_phg4hits_names(phg4hits_names, 3);
  kalman->set_sub_top_node_name("SVTX");
  kalman->set_trackmap_out_name("SvtxTrackMapNegativeEta");

  // Saved track states (projections)
  std::string state_names[] = {"EEMC"};
  kalman->set_state_names(state_names, 1);

  kalman->set_fit_alg_name("KalmanFitterRefTrack");//
  kalman->set_primary_assumption_pid(-211); // -211 = pi-
  kalman->set_do_evt_display(false);

  se->registerSubsystem(kalman);

}
Example #28
0
void CEMC_Cells(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();
  
  PHG4CylinderCellReco *cemc_cells = new PHG4CylinderCellReco("CEMCCYLCELLRECO");
  cemc_cells->Detector("CEMC");
  cemc_cells->Verbosity(verbosity);
  for (int i = Min_cemc_layer; i <= Max_cemc_layer; i++) {
    cemc_cells->etaphisize(i, 0.024, 0.024);
  }
  se->registerSubsystem(cemc_cells);

  return;
}
Example #29
0
void Jet_Eval(std::string outfilename = "g4jets_eval.root",
	      int verbosity = 0) {

  gSystem->Load("libg4eval.so");
  
  Fun4AllServer *se = Fun4AllServer::instance();

  JetEvaluator* eval = new JetEvaluator("JETEVALUATOR",
   					"AntiKt_Tower_r03",
   					"AntiKt_Truth_r03",
   					outfilename);
  eval->Verbosity(verbosity);
  se->registerSubsystem(eval);
  
  return;
}
Example #30
0
void CEMC_Cells(int verbosity = 0) {

  gSystem->Load("libfun4all.so");
  gSystem->Load("libg4detectors.so");
  Fun4AllServer *se = Fun4AllServer::instance();
  


  if (Cemc_spacal_configuration
      == PHG4CylinderGeom_Spacalv1::k1DProjectiveSpacal)
    {
      PHG4CylinderCellReco *cemc_cells = new PHG4CylinderCellReco("CEMCCYLCELLRECO");
      cemc_cells->Detector("CEMC");
      cemc_cells->Verbosity(verbosity);
      for (int i = Min_cemc_layer; i <= Max_cemc_layer; i++) {
//          cemc_cells->etaphisize(i, 0.024, 0.024);
          const double radius = 95;
          cemc_cells->cellsize(i,  2*TMath::Pi()/256. * radius, 2*TMath::Pi()/256. * radius);
      }
      cemc_cells->set_timing_window_defaults(0.0,60.0);
      se->registerSubsystem(cemc_cells);

    }
  else if (Cemc_spacal_configuration
      == PHG4CylinderGeom_Spacalv1::k2DProjectiveSpacal)
    {
      PHG4FullProjSpacalCellReco *cemc_cells = new PHG4FullProjSpacalCellReco("CEMCCYLCELLRECO");
      cemc_cells->Detector("CEMC");
      cemc_cells->Verbosity(verbosity);
      cemc_cells->set_timing_window_defaults(0.0,60.0);
      se->registerSubsystem(cemc_cells);

    }
  else
    {
      std::cout
          << "G4_CEmc_Spacal.C::CEmc - Fatal Error - unrecognized SPACAL configuration #"
          << Cemc_spacal_configuration<<". Force exiting..." << std::endl;
      exit(-1);
      return ;
    }

  return;
}