예제 #1
0
void Svtx_Reco(int verbosity = 0)
{
  // reconstructs the Svtx with ITS innner detector (7 layers)

  // requires Svtx setup and Svtx cell routines
  // prefers calorimeter reconstruction prior (once projections are working)

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

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

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

  Fun4AllServer *se = Fun4AllServer::instance();

  //----------------------------------
  // Digitize the cell energy into ADC
  //----------------------------------
  // defaults to 8-bit ADC with MIP at 0.25% dynamic range
  PHG4SvtxDigitizer* digi = new PHG4SvtxDigitizer();
  digi->Verbosity(verbosity);
  digi->set_adc_scale(0, 255, 1.0e-6); // 1.0 keV / bit
  digi->set_adc_scale(1, 255, 1.0e-6); // 1.0 keV / bit
  digi->set_adc_scale(2, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(3, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(4, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(5, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(6, 255, 1.6e-6); // 1.6 keV / bit
  se->registerSubsystem( digi );
  
  //------------------------------------------
  // Apply Live Area Inefficiency to Hit Cells
  //------------------------------------------
  // defaults to 1.0 (fully active)
  PHG4SvtxDeadArea* deadarea = new PHG4SvtxDeadArea();
  deadarea->Verbosity(verbosity);
  deadarea->set_hit_efficiency(0,0.99); // Leo says use 1% inefficiency
  deadarea->set_hit_efficiency(1,0.99);
  deadarea->set_hit_efficiency(2,0.99);
  deadarea->set_hit_efficiency(3,0.99);
  deadarea->set_hit_efficiency(4,0.99);
  deadarea->set_hit_efficiency(5,0.99);
  deadarea->set_hit_efficiency(6,0.99);
  se->registerSubsystem( deadarea );
  
  //----------------------------------
  // Apply MIP thresholds to Hit Cells
  //----------------------------------
  PHG4SvtxThresholds* thresholds = new PHG4SvtxThresholds();
  thresholds->Verbosity(verbosity);
  thresholds->set_threshold(0,0.25);
  thresholds->set_threshold(1,0.25);
  thresholds->set_threshold(2,0.25);
  thresholds->set_threshold(3,0.25);
  thresholds->set_threshold(4,0.25);
  thresholds->set_threshold(5,0.25);
  thresholds->set_threshold(6,0.25);
  //thresholds->set_use_thickness_mip(0, true);
  se->registerSubsystem( thresholds );

  //---------------------
  // Make SVTX clusters
  //---------------------
  PHG4SvtxClusterizer* clusterizer = new PHG4SvtxClusterizer();
  clusterizer->Verbosity(verbosity);
  clusterizer->set_threshold(0.33);
  se->registerSubsystem( clusterizer );

  //---------------------
  // Track reconstruction
  //---------------------
  PHG4HoughTransform* hough = new PHG4HoughTransform(7,7);
  hough->set_mag_field(1.4);
  hough->Verbosity(verbosity);
  // ALICE ITS upgrade values for total thickness in X_0
  hough->set_material(0, 0.003);
  hough->set_material(1, 0.003);
  hough->set_material(2, 0.003);
  hough->set_material(3, 0.008);
  hough->set_material(4, 0.008);
  hough->set_material(5, 0.008);
  hough->set_material(6, 0.008);
  hough->setPtRescaleFactor(0.9972/1.00117);
  hough->set_chi2_cut_init(5.0);
  //hough->set_chi2_cut_fast(60.0,0.0,100.0); // 10.0, 50.0, 75.0
  hough->set_chi2_cut_fast(10.0,50.0,75.0); // 10.0, 50.0, 75.0
  hough->set_chi2_cut_full(5.0);
  hough->set_ca_chi2_cut(5.0);
  //hough->setMaxClusterError(3.0);
  hough->setRejectGhosts(false);
  hough->setRemoveHits(false);
  hough->setCutOnDCA(true);
  se->registerSubsystem( hough );

  //---------------------
  // Ghost rejection
  //---------------------
  PHG4TrackGhostRejection* rejection = new PHG4TrackGhostRejection(7);
  rejection->Verbosity(verbosity);
  rejection->set_max_shared_hits(3);
  se->registerSubsystem( rejection );

  //------------------
  // Track Projections
  //------------------
  PHG4SvtxTrackProjection* projection = new PHG4SvtxTrackProjection();
  projection->Verbosity(verbosity);
  se->registerSubsystem( projection );

  //----------------------
  // Beam Spot Calculation
  //----------------------
  PHG4SvtxBeamSpotReco* beamspot = new PHG4SvtxBeamSpotReco();
  beamspot->Verbosity(verbosity);
  se->registerSubsystem( beamspot );

  return;
}
예제 #2
0
파일: G4_Svtx.C 프로젝트: HaiwangYu/macros
void Svtx_Reco(int verbosity = 0)
{
  // reconstructs the MIE Svtx v2 detector (7 layers)

  // requires Svtx setup and Svtx cell routines
  // prefers calorimeter reconstruction prior (once projections are working)

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

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

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

  Fun4AllServer *se = Fun4AllServer::instance();

  //----------------------------------
  // Digitize the cell energy into ADC
  //----------------------------------
  // defaults to 8-bit ADC with MIP at 0.25% dynamic range
  PHG4SvtxDigitizer* digi = new PHG4SvtxDigitizer();
  digi->Verbosity(verbosity);
  digi->set_adc_scale(0, 255, 1.0e-6); // 1.0 keV / bit
  digi->set_adc_scale(1, 255, 1.0e-6); // 1.0 keV / bit
  digi->set_adc_scale(2, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(3, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(4, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(5, 255, 1.6e-6); // 1.6 keV / bit
  digi->set_adc_scale(6, 255, 1.6e-6); // 1.6 keV / bit
  se->registerSubsystem( digi );
  
  //-------------------------------------
  // Apply Live Area Inefficiency to Hits
  //-------------------------------------
  // defaults to 1.0 (fully active)
  PHG4SvtxDeadArea* deadarea = new PHG4SvtxDeadArea();
  deadarea->Verbosity(verbosity);
  // deadarea->set_hit_efficiency(0,0.90);
  // deadarea->set_hit_efficiency(1,0.90);
  // deadarea->set_hit_efficiency(2,0.98);
  // deadarea->set_hit_efficiency(3,0.98);
  // deadarea->set_hit_efficiency(4,0.98);
  // deadarea->set_hit_efficiency(5,0.98);
  // deadarea->set_hit_efficiency(6,0.98);
  se->registerSubsystem( deadarea );

  //-----------------------------
  // Apply MIP thresholds to Hits
  //-----------------------------
  PHG4SvtxThresholds* thresholds = new PHG4SvtxThresholds();
  thresholds->Verbosity(verbosity);
  thresholds->set_threshold(0,0.33);
  thresholds->set_threshold(1,0.33);
  thresholds->set_threshold(2,0.33);
  thresholds->set_threshold(3,0.33);
  thresholds->set_threshold(4,0.33);
  thresholds->set_threshold(5,0.33);
  thresholds->set_threshold(6,0.33);
  thresholds->set_use_thickness_mip(0, true);
  se->registerSubsystem( thresholds );

  //-------------
  // Cluster Hits
  //-------------
  // needs to have clusters hold hit ids not cell ids
  // will require changes to evaluation
  PHG4SvtxClusterizer* clusterizer = new PHG4SvtxClusterizer();
  clusterizer->Verbosity(verbosity);
  clusterizer->set_threshold(0.33);
  clusterizer->set_z_clustering(2, false);
  clusterizer->set_z_clustering(3, false);
  clusterizer->set_z_clustering(4, false);
  clusterizer->set_z_clustering(5, false);
  clusterizer->set_z_clustering(6, false);
  // clusterizer->set_energy_weighting(2, true);
  // clusterizer->set_energy_weighting(3, true);
  // clusterizer->set_energy_weighting(4, true);
  // clusterizer->set_energy_weighting(5, true);
  // clusterizer->set_energy_weighting(6, true);
  se->registerSubsystem( clusterizer );

  //---------------------
  // Track reconstruction
  //---------------------
  PHG4HoughTransform* hough = new PHG4HoughTransform(7,7);
  hough->Verbosity(verbosity);
  hough->set_mag_field(1.4);
  hough->set_material(0, 0.013);
  hough->set_material(1, 0.013);
  hough->set_material(2, 0.013);
  hough->set_material(3, 0.013);
  hough->set_material(4, 0.010);
  hough->set_material(5, 0.010);
  hough->set_material(6, 0.020);
  hough->setPtRescaleFactor(0.9972);
  hough->set_chi2_cut_init(3.0);
  hough->set_chi2_cut_full(3.0);
  hough->set_ca_chi2_cut(3.0);
  hough->setCutOnDCA(true);
  hough->setDCACut(0.1);
  hough->setDCAZCut(0.1);
  hough->setRejectGhosts(false);
  hough->setRemoveHits(false);
  se->registerSubsystem( hough );

  //---------------------
  // Ghost rejection
  //---------------------
  // needs updates to merge split tracks when possible
  PHG4TrackGhostRejection* rejection = new PHG4TrackGhostRejection(7); 
  rejection->Verbosity(verbosity);
  rejection->set_max_shared_hits(3);
  se->registerSubsystem( rejection );

  //------------------------
  // Final Track Refitting
  //------------------------
  // PHG4TrackKalmanFitter *kalman = new PHG4TrackKalmanFitter
  // we need a module to redo the Kalman fit with G4 material and real mag field
  // to update the track container

  //------------------------
  // Primary Track Refitting
  //------------------------
  // PHG4TrackKalmanFitter *kalman = new PHG4TrackKalmanFitter
  // we need a module to redo the Kalman fit including the vertex position
  // and create a separate stream of output tracks
  
  //------------------
  // Track Projections
  //------------------
  PHG4SvtxTrackProjection* projection = new PHG4SvtxTrackProjection();
  projection->Verbosity(verbosity);
  se->registerSubsystem( projection );

  //----------------------
  // Beam Spot Calculation
  //----------------------
  PHG4SvtxBeamSpotReco* beamspot = new PHG4SvtxBeamSpotReco();
  beamspot->Verbosity(verbosity);
  se->registerSubsystem( beamspot );

  return;
}
예제 #3
0
void Svtx_Reco(int verbosity = 0)
{
  //---------------
  // Load libraries
  //---------------

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

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

  Fun4AllServer *se = Fun4AllServer::instance();

  //----------------------------------
  // Digitize the cell energy into ADC
  //----------------------------------
  PHG4SvtxDigitizer* digi = new PHG4SvtxDigitizer();
  digi->Verbosity(0);
  for (int i=0;i<n_svx_layer;++i) {
    digi->set_adc_scale(i, 255, 1.0e-6);
  }
  for (int i=n_svx_layer;i<63;++i) {
    digi->set_adc_scale(i, 10000, 1.0e-1);
  }
  se->registerSubsystem( digi );
  
  //-------------------------------------
  // Apply Live Area Inefficiency to Hits
  //-------------------------------------
  // defaults to 1.0 (fully active)
  
  PHG4SvtxDeadArea* deadarea = new PHG4SvtxDeadArea();
  deadarea->Verbosity(verbosity);
  deadarea->set_hit_efficiency(0,0.998);
  deadarea->set_hit_efficiency(1,0.998);
  deadarea->set_hit_efficiency(2,0.998);
  se->registerSubsystem( deadarea );

  //-----------------------------
  // Apply MIP thresholds to Hits
  //-----------------------------

  PHG4SvtxThresholds* thresholds = new PHG4SvtxThresholds();
  thresholds->Verbosity(verbosity);
  thresholds->set_threshold(0,0.33);
  thresholds->set_threshold(1,0.33);
  thresholds->set_threshold(2,0.33);
  thresholds->set_use_thickness_mip(0, true);
  se->registerSubsystem( thresholds );

  //-------------
  // Cluster Hits
  //------------- 
  PHG4TPCClusterizer* clusterizer = new PHG4TPCClusterizer("PHG4SvtxClusterizer",4,1);;
  se->registerSubsystem( clusterizer );

  //---------------------
  // Track reconstruction
  //---------------------
  PHG4HoughTransformTPC* hough = new PHG4HoughTransformTPC(63,56);
  hough->set_mag_field(1.4);
  hough->set_use_vertex(true);
  hough->setRemoveHits(true);
  hough->setRejectGhosts(true);
  hough->set_min_pT(0.2);
  hough->set_chi2_cut_full( 3.0 );
  hough->set_chi2_cut_init( 3.0 );

  hough->setBinScale(1.0);
  hough->setZBinScale(1.0);

  hough->Verbosity(0);
  double mat_scale = 1.0;
  hough->set_material(0, mat_scale*0.003);
  hough->set_material(1, mat_scale*0.003);
  hough->set_material(2, mat_scale*0.003);
  for (int i=3;i<63;++i) {
    hough->set_material(i, mat_scale*0.06/60.);
  }
  hough->setUseCellSize(false);
  
  for (int i=3;i<63;++i) {
    hough->setFitErrorScale(i, 1./sqrt(12.));
  }
  for (int i=3;i<63;++i) {
    hough->setVoteErrorScale(i, 0.2);
  }
  
  se->registerSubsystem( hough );
 
  //------------------
  // Track Projections
  //------------------
  PHG4SvtxTrackProjection* projection = new PHG4SvtxTrackProjection();
  projection->Verbosity(verbosity);
  se->registerSubsystem( projection );

  //----------------------
  // Beam Spot Calculation
  //----------------------
  PHG4SvtxBeamSpotReco* beamspot = new PHG4SvtxBeamSpotReco();
  beamspot->Verbosity(verbosity);
  se->registerSubsystem( beamspot );

  return;
}
예제 #4
0
void Svtx_Reco(int verbosity = 0)
{
  // reconstructs the MIE Svtx v2 detector (7 layers)

  // requires Svtx setup and Svtx cell routines
  // prefers calorimeter reconstruction prior (once projections are working)

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

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

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

  Fun4AllServer *se = Fun4AllServer::instance();

  //----------------------------------
  // Digitize the cell energy into ADC
  //----------------------------------
  // defaults to 8-bit ADC with MIP at 0.25% dynamic range
  PHG4SvtxDigitizer* digi = new PHG4SvtxDigitizer();
  digi->Verbosity(verbosity);
  // digi->set_adc_scale(0,   1, 6.40e-6); // 6.4 keV / bit
  // digi->set_adc_scale(1,   1, 6.40e-6); // 6.4 keV / bit
  // digi->set_adc_scale(2, 255, 0.36e-6); // 0.36 keV / bit
  // digi->set_adc_scale(3, 255, 1.45e-6); // 1.45 keV / bit
  // digi->set_adc_scale(4, 255, 0.36e-6); // 0.36 keV / bit
  // digi->set_adc_scale(5, 255, 1.45e-6); // 1.45 keV / bit
  // digi->set_adc_scale(6, 255, 0.36e-6); // 0.36 keV / bit
  se->registerSubsystem( digi );
  
  //-------------------------------------
  // Apply Live Area Inefficiency to Hits
  //-------------------------------------
  // defaults to 1.0 (fully active)
  PHG4SvtxDeadArea* deadarea = new PHG4SvtxDeadArea();
  deadarea->Verbosity(verbosity);
  // deadarea->set_hit_efficiency(0,0.995);
  // deadarea->set_hit_efficiency(1,0.995);
  // deadarea->set_hit_efficiency(2,0.995);
  // deadarea->set_hit_efficiency(3,0.995);
  // deadarea->set_hit_efficiency(4,0.995);
  // deadarea->set_hit_efficiency(5,0.995);
  // deadarea->set_hit_efficiency(6,0.995);
  se->registerSubsystem( deadarea );

  //-----------------------------
  // Apply MIP thresholds to Hits
  //-----------------------------
  PHG4SvtxThresholds* thresholds = new PHG4SvtxThresholds();
  thresholds->Verbosity(verbosity);
  thresholds->set_threshold(0,0.25);
  thresholds->set_threshold(1,0.25);
  thresholds->set_threshold(2,0.25);
  thresholds->set_threshold(3,0.25);
  thresholds->set_threshold(4,0.25);
  thresholds->set_threshold(5,0.25);
  thresholds->set_threshold(6,0.25);
  se->registerSubsystem( thresholds );
 
  //---------------------
  // Make SVTX clusters
  //---------------------
  PHG4SvtxClusterizer* clusterizer = new PHG4SvtxClusterizer();
  clusterizer->Verbosity(verbosity);
  clusterizer->set_threshold(0.25);
  clusterizer->set_z_clustering(2, false);
  clusterizer->set_z_clustering(3, false);
  clusterizer->set_z_clustering(4, false);
  clusterizer->set_z_clustering(5, false);
  clusterizer->set_z_clustering(6, false);
  se->registerSubsystem( clusterizer );
 
  //---------------------
  // Track reconstruction
  //---------------------
  PHG4HoughTransform* hough = new PHG4HoughTransform(7,7);
  hough->set_mag_field(1.4);
  hough->Verbosity(verbosity);
  hough->set_material(0, 0.013);
  hough->set_material(1, 0.013);
  hough->set_material(2, 0.013);
  hough->set_material(3, 0.013);
  hough->set_material(4, 0.010);
  hough->set_material(5, 0.010);
  hough->set_material(6, 0.020);
  hough->setPtRescaleFactor(0.9972);
  hough->set_chi2_cut_init(3.0);
  hough->set_chi2_cut_full(3.0);
  hough->set_ca_chi2_cut(3.0);
  hough->setCutOnDCA(true);
  hough->setDCACut(0.1);
  hough->setDCAZCut(0.1);
  hough->setRejectGhosts(false);
  hough->setRemoveHits(false);
  se->registerSubsystem( hough );

  //---------------------
  // Ghost rejection
  //---------------------
  PHG4TrackGhostRejection* rejection = new PHG4TrackGhostRejection(7);
  rejection->Verbosity(verbosity);
  rejection->set_max_shared_hits(3);
  se->registerSubsystem( rejection );

  //------------------
  // Track Projections
  //------------------
  PHG4SvtxTrackProjection* projection = new PHG4SvtxTrackProjection();
  projection->Verbosity(verbosity);
  se->registerSubsystem( projection );

  //----------------------
  // Beam Spot Calculation
  //----------------------
  PHG4SvtxBeamSpotReco* beamspot = new PHG4SvtxBeamSpotReco();
  beamspot->Verbosity(verbosity);
  se->registerSubsystem( beamspot );

  return;
}