Skip to Content.
Sympa Menu

sphenix-tracking-l - Re: [Sphenix-tracking-l] Tracking software meeting 10 am EDT Monday May 9

sphenix-tracking-l AT lists.bnl.gov

Subject: sPHENIX tracking discussion

List archive

Chronological Thread  
  • From: Hugo Pereira Da Costa <hugo.pereira-da-costa AT cea.fr>
  • To: sphenix-tracking-l AT lists.bnl.gov
  • Subject: Re: [Sphenix-tracking-l] Tracking software meeting 10 am EDT Monday May 9
  • Date: Mon, 9 May 2022 10:59:44 -0600

As discussed today, attached are Job0, JobA and JobC macros

As far as I can tell, they do not crash.


Few comments:

1/ Job A and Job C use an "empty" static distortion correction map, that is in one of my own directories:

"/phenix/u/hpereira/sphenix_workarea/g4simulations/distortion_maps_rec/distortion_corrections_empty.root"

It will have to be copied to $CALIBRATIONROOT

Chris ?

Tell me if you have any problem accessing the file.


2/ JobA and JobC keep writing the clusters and clusterCrossing assotiation in the output file. In principle this is not needed because they are already in the output of Job0.


3/ in both JobA and JobC, when turning on Distortion corrections (G4TPC::ENABLE_CORRECTIONS = true) I get *a lot* of warnings from the cluster mover of type:

/phenix/u/hpereira/sphenix/src/coresoftware/offline/packages/trackreco/PHTpcClusterMover.cc:216: Failed to find surface for cluster 158755189694660656
/phenix/u/hpereira/sphenix/src/coresoftware/offline/packages/trackreco/PHTpcClusterMover.cc:608: Error: TPC surface index not defined, skipping cluster!


even if the actual corrections are all zero.

I have no idea whether this affects our perfomances or not.

Tony: does that ring a bell ?


I'd suggest to run a first time with G4TPC::ENABLE_CORRECTIONS = false, to first see where we are with respect to the numbers shown by Tony at the last GM, then only turn it on.


4/ in the default G4_Tracking macro, when SC_CALIBMODE = true, there is a number of corrections and enlarged windows applied to the TPC-silicon matcher and the TPC-TPOT matcher. These are probably obsolete (especially since no distortion are applied per-se), and should be commented out. Tony ?


5/ even though the macros don't crash, I have not yet verified that the output actually make sense ... I'll do that next time I have a chance, running on a bunch of hits from upsilon, instead of Hijing.



Hugo



On 5/8/22 19:28, Anthony Frawley via sPHENIX-tracking-l wrote:
Hi All,
We will have our usual tracking software meeting at 10 am EDT Monday, May 9. The Zoom link is: https://fsu.zoom.us/j/98126117840
Cheers Tony




_______________________________________________
sPHENIX-tracking-l mailing list
sPHENIX-tracking-l AT lists.bnl.gov
https://lists.bnl.gov/mailman/listinfo/sphenix-tracking-l
#include <fun4all/SubsysReco.h>
#include <fun4all/Fun4AllServer.h>
#include <fun4all/Fun4AllDstInputManager.h>
#include <fun4all/Fun4AllDstOutputManager.h>
#include <phool/PHRandomSeed.h>
#include <phool/recoConsts.h>
#include <qa_modules/QAG4SimulationIntt.h>
#include <qa_modules/QAG4SimulationMvtx.h>
#include <qa_modules/QAG4SimulationTracking.h>
#include <qa_modules/QAHistManagerDef.h>

// local macros
#include "G4Setup_sPHENIX.C"
#include "G4_Bbc.C"
#include "G4_Global.C"
#include "G4_Tracking.C"

R__LOAD_LIBRARY(libfun4all.so)
R__LOAD_LIBRARY(libqa_modules.so)

//________________________________________________________________________________________________
int Fun4All_G4_sPHENIX_job0(
  const int nEvents = 0,
  const int nSkipEvents = 0,
  const char* inputFile = "/sphenix/sim/sim01/sphnxpro/mdc2/shijing_hepmc/fm_0_20/trkrhit/DST_TRKR_HIT_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-00000.root",
  const char* outputFile = "DST/CONDOR_hijing_micromegas/trkrcluster/DST_TRKR_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-00000_test.root"
  )
{

  // print inputs
  std::cout << "Fun4All_G4_sPHENIX_job0 - nEvents: " << nEvents << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_job0 - nSkipEvents: " << nSkipEvents << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_job0 - inputFile: " << inputFile << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_job0 - outputFile: " << outputFile << std::endl;

  // options
  Enable::PIPE = true;
  Enable::BBC = true;
  Enable::MAGNET = true;
  Enable::PLUGDOOR = false;

  // enable all absorbers
  // this is equivalent to the old "absorberactive" flag
  Enable::ABSORBER = true;

  // central tracking
  Enable::MVTX = true;
  Enable::INTT = true;
  Enable::TPC = true;
  Enable::MICROMEGAS = true;
  Enable::BLACKHOLE = true;

  // TPC
  G4TPC::ENABLE_STATIC_DISTORTIONS = false;
  G4TPC::ENABLE_TIME_ORDERED_DISTORTIONS = false;
  G4TPC::ENABLE_CORRECTIONS = false;
  G4TPC::DO_HIT_ASSOCIATION = false;

  // tracking configuration
  G4TRACKING::use_full_truth_track_seeding = false;

  // do not initialize magnetic field in ACTS
  G4TRACKING::init_acts_magfield = false;
  
  // server
  auto se = Fun4AllServer::instance();
  se->Verbosity(1);

  // make sure to printout random seeds for reproducibility
  PHRandomSeed::Verbosity(1);

  // reco const
  auto rc = recoConsts::instance();
  rc->set_IntFlag("RANDOMSEED",PHRandomSeed());
  
  // clustering
  Mvtx_Clustering();
  Intt_Clustering();
  TPC_Clustering();
  Micromegas_Clustering();

  // needed for makeActsGeometry, used in clustering
  TrackingInit();
  
  // input manager
  auto in = new Fun4AllDstInputManager("DSTin");
  in->fileopen(inputFile);
  se->registerInputManager(in);

  // output manager
  /* all the nodes from DST and RUN are saved to the output */
  auto out = new Fun4AllDstOutputManager("DSTOUT", outputFile);
  out->AddNode("TRKR_CLUSTER"); 
  out->AddNode("TRKR_CLUSTERCROSSINGASSOC");
  se->registerOutputManager(out);

  // skip events if any specified
  if( nSkipEvents > 0 )
  { se->skip( nSkipEvents ); }

  // process events
  se->run(nEvents);

  // terminate
  se->End();
  se->PrintTimer();
  std::cout << "All done" << std::endl;
  delete se;
  gSystem->Exit(0);
  return 0;
}

// This function is only used to test if we can load this as root6 macro
// without running into unresolved libraries and include files
void RunFFALoadTest() {}
#include <fun4all/SubsysReco.h>
#include <fun4all/Fun4AllServer.h>
#include <fun4all/Fun4AllDstInputManager.h>
#include <fun4all/Fun4AllDstOutputManager.h>
#include <phool/PHRandomSeed.h>
#include <phool/recoConsts.h>
#include <qa_modules/QAG4SimulationIntt.h>
#include <qa_modules/QAG4SimulationMvtx.h>
#include <qa_modules/QAG4SimulationTracking.h>
#include <qa_modules/QAHistManagerDef.h>

#include "G4_Magnet.C"
#include "G4_Tracking.C"

R__LOAD_LIBRARY(libfun4all.so)
R__LOAD_LIBRARY(libqa_modules.so)

//________________________________________________________________________________________________
int Fun4All_G4_sPHENIX_jobA(
  const int nEvents = 0,
  const int nSkipEvents = 0,
  const char* inputFile = "DST/CONDOR_hijing_micromegas/trkrcluster/DST_TRKR_CLUSTER_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-00000_test.root",
  const char* outputFile = "DST/CONDOR_hijing_micromegas/tracks/DST_TRACKSEEDS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-00000_test.root"
  )
{

  // print inputs
  std::cout << "Fun4All_G4_sPHENIX_jobA - nEvents: " << nEvents << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_jobA - nSkipEvents: " << nSkipEvents << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_jobA - inputFile: " << inputFile << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_jobA - outputFile: " << outputFile << std::endl;

  // central tracking
  Enable::MVTX = true;
  Enable::INTT = true;
  Enable::TPC = true;
  Enable::TPC_ABSORBER = true;
  Enable::MICROMEGAS = true;
 
  // TPC configuration
  /* distortions - irrelevant, only matter when running from G4Hits */
  G4TPC::ENABLE_STATIC_DISTORTIONS = false;
  G4TPC::ENABLE_TIME_ORDERED_DISTORTIONS = false;

  /* distortion corrections */
  G4TPC::ENABLE_CORRECTIONS = true;
  G4TPC::correction_filename = "/phenix/u/hpereira/sphenix_workarea/g4simulations/distortion_maps_rec/distortion_corrections_empty.root";
  
  // tracking
  /* turn on special fit with silicium and TPOT alone */
  G4TRACKING::SC_CALIBMODE = true;
  
  // server
  auto se = Fun4AllServer::instance();
  se->Verbosity(1);

  // make sure to printout random seeds for reproducibility
  PHRandomSeed::Verbosity(1);

  // reco const
  auto rc = recoConsts::instance();
  rc->set_IntFlag("RANDOMSEED",PHRandomSeed());

  MagnetFieldInit();
  TrackingInit();
  
  // tracking
  Tracking_Reco();

  // input manager
  auto in = new Fun4AllDstInputManager("DSTin");
  in->fileopen(inputFile);
  se->registerInputManager(in);

  // output manager
  /* only save clusters, tracks and vertices */
  auto out = new Fun4AllDstOutputManager("DSTOUT", outputFile);

  /* 
   * in principle one would not need to store the clusters and cluster crossing node, as they are already in the output from Job0
   * for JobC it should be enough to read the cluster file in sync with the track file 
   */
  out->AddNode("TRKR_CLUSTER");
  out->AddNode("TRKR_CLUSTERCROSSINGASSOC");
  out->AddNode("TpcSeedTrackMap");
  out->AddNode("SvtxTrackMap");
  out->AddNode("SvtxVertexMap");
  se->registerOutputManager(out);

  // skip events if any specified
  if( nSkipEvents > 0 )
  { se->skip( nSkipEvents ); }

  // process events
  se->run(nEvents);

  // terminate
  se->End();
  se->PrintTimer();
  std::cout << "All done" << std::endl;
  delete se;
  gSystem->Exit(0);
  return 0;
}

// This function is only used to test if we can load this as root6 macro
// without running into unresolved libraries and include files
void RunFFALoadTest() {}
#include <fun4all/SubsysReco.h>
#include <fun4all/Fun4AllServer.h>
#include <fun4all/Fun4AllDstInputManager.h>
#include <fun4all/Fun4AllDstOutputManager.h>
#include <phool/PHRandomSeed.h>
#include <phool/recoConsts.h>
#include <qa_modules/QAG4SimulationIntt.h>
#include <qa_modules/QAG4SimulationMvtx.h>
#include <qa_modules/QAG4SimulationTracking.h>
#include <qa_modules/QAHistManagerDef.h>

#include "G4_Magnet.C"
#include "G4_Tracking.C"

R__LOAD_LIBRARY(libfun4all.so)
R__LOAD_LIBRARY(libqa_modules.so)

//________________________________________________________________________________________________
int Fun4All_G4_sPHENIX_jobC(
  const int nEvents = 0,
  const int nSkipEvents = 0,
  const char* inputFile = "DST/CONDOR_hijing_micromegas/tracks/DST_TRACKSEEDS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-00000_test.root",
  const char* outputFile = "DST/CONDOR_hijing_micromegas/tracks/DST_TRACKS_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000004-00000_test.root"
  )
{

  // print inputs
  std::cout << "Fun4All_G4_sPHENIX_jobC - nEvents: " << nEvents << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_jobC - nSkipEvents: " << nSkipEvents << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_jobC - inputFile: " << inputFile << std::endl;
  std::cout << "Fun4All_G4_sPHENIX_jobC - outputFile: " << outputFile << std::endl;

  // central tracking
  Enable::MVTX = true;
  Enable::INTT = true;
  Enable::TPC = true;
  Enable::TPC_ABSORBER = true;
  Enable::MICROMEGAS = true;
 
  // TPC configuration
  G4TPC::ENABLE_STATIC_DISTORTIONS = false;
  G4TPC::ENABLE_TIME_ORDERED_DISTORTIONS = false;

  /* distortion corrections */
  G4TPC::ENABLE_CORRECTIONS = true;
  G4TPC::correction_filename = "/phenix/u/hpereira/sphenix_workarea/g4simulations/distortion_maps_rec/distortion_corrections_empty.root";
  
  // tracking configuration
  G4TRACKING::use_full_truth_track_seeding = false;

  // server
  auto se = Fun4AllServer::instance();
  se->Verbosity(1);

  // make sure to printout random seeds for reproducibility
  PHRandomSeed::Verbosity(1);

  // reco const
  auto rc = recoConsts::instance();
  rc->set_IntFlag("RANDOMSEED",PHRandomSeed());

  MagnetFieldInit();
  TrackingInit();
  
  // tracking
  /* we only run the track fit, starting with seed from JobA */
  Tracking_Reco_TrackFit();
  
  // input manager
  auto in = new Fun4AllDstInputManager("DSTin");
  in->fileopen(inputFile);
  se->registerInputManager(in);

  // output manager
  auto out = new Fun4AllDstOutputManager("DSTOUT", outputFile);
  /* 
   * in principle one would not need to store the clusters and cluster crossing node, as they are already in the output from Job0
   */
  out->AddNode("TRKR_CLUSTER");
  out->AddNode("TRKR_CLUSTERCROSSINGASSOC");
  out->AddNode("SvtxTrackMap");
  out->AddNode("SvtxVertexMap");
  se->registerOutputManager(out);

  // skip events if any specified
  if( nSkipEvents > 0 )
  { se->skip( nSkipEvents ); }

  // process events
  se->run(nEvents);

  // terminate
  se->End();
  se->PrintTimer();
  std::cout << "All done" << std::endl;
  delete se;
  gSystem->Exit(0);
  return 0;
}

// This function is only used to test if we can load this as root6 macro
// without running into unresolved libraries and include files
void RunFFALoadTest() {}



Archive powered by MHonArc 2.6.24.

Top of Page