StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
event_track.C
1 //usr/bin/env root4star -l -b -q $0; exit $?
2 // that is a valid shebang to run script as executable
3 
4 void event_track( int n = 5000,
5  const char *inFile = "/gpfs01/star/pwg_tasks/FwdCalib//PROD/out/st_physics_23072003_raw_0000003.event.root",
6  std::string configFile = "StRoot/StFwdTrackMaker/macro/event/event_track.xml",
7  const char *geom = "dev2022") {
8  TString _chain;
9  gSystem->Load( "libStarRoot.so" );
10 
11  // Simplest chain with fst, fcs, ftt and fwdTracker
12  _chain = Form("in, %s, MakeEvent, fwdTrack", geom);
13 
14  // needed in this wonky spack environment
15  gROOT->SetMacroPath(".:/star-sw/StRoot/macros:./StRoot/macros:./StRoot/macros/graphics:./StRoot/macros/analysis:./StRoot/macros/test:./StRoot/macros/examples:./StRoot/macros/html:./StRoot/macros/qa:./StRoot/macros/calib:./StRoot/macros/mudst:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/graphics:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/analysis:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/test:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/examples:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/html:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/qa:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/calib:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/mudst:/afs/rhic.bnl.gov/star/ROOT/36/5.34.38/.sl73_x8664_gcc485/rootdeb/macros:/afs/rhic.bnl.gov/star/ROOT/36/5.34.38/.sl73_x8664_gcc485/rootdeb/tutorials");
16 
17  gROOT->LoadMacro("bfc.C");
18  bfc(-1, _chain, inFile);
19 
20  // Extra configuration for the Forward Tracking
21  StFwdTrackMaker *fwdTrack = (StFwdTrackMaker*) chain->GetMaker("fwdTrack");
22  if ( fwdTrack ){ //if it is in the chain
23  fwdTrack->SetConfigFile( configFile );
24  // write debug histograms and ttree?
25  fwdTrack->SetGenerateTree( true );
26  fwdTrack->SetGenerateHistograms( true );
27  // write out wavefront OBJ files
28  fwdTrack->SetVisualize( false );
29  }
30 
31  // Initialize the chain
32  chain->Init();
33 
34  //_____________________________________________________________________________
35  //
36  // MAIN EVENT LOOP
37  //_____________________________________________________________________________
38  for (int i = 0; i < n; i++) {
39  chain->Clear();
40  if (kStOK != chain->Make())
41  break;
42  }
43 }
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StChain.cxx:77
virtual Int_t Make()
Definition: StChain.cxx:110
Definition: Stypes.h:40