本文整理汇总了C++中Fun4AllServer类的典型用法代码示例。如果您正苦于以下问题:C++ Fun4AllServer类的具体用法?C++ Fun4AllServer怎么用?C++ Fun4AllServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Fun4AllServer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: G4Cmd
void
G4Cmd(const char * cmd)
{
Fun4AllServer *se = Fun4AllServer::instance();
PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco("PHG4RECO");
g4->ApplyCommand(cmd);
}
示例2: Svtx_Eval
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;
}
示例3: HCALInner_Clusters
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;
}
示例4: G4DSTreader_EICIR
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);
}
示例5: Svtx_Eval
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;
}
示例6: Run_PerformTestMB
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);
}
示例7: FHCAL_Towers
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 );
}
示例8: CEMC_Towers
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;
}
示例9: DisplayOn
// 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;
}
示例10: ShowerCompress
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;
}
示例11: FEMC_Cells
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;
}
示例12: CEMC_Eval
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;
}
示例13: Svtx_Cells
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;
}
示例14: Svtx_Eval
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;
}
示例15: MaterialScan
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");
}