void runVertexingOnly_batch_standalone(TString filename, TString outpath, TString method, bool useBeamspot, unsigned int nEvents = 0) { // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 1; TStopwatch timer; timer.Start(); // Load basic libraries in rootlogon gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C"); rootlogon(); TString basedir = gSystem->Getenv("VMCWORKDIR"); FairRunAna* fRun = new FairRunAna(); //FairRunSim* fSim = new FairRunSim(); TString jobdir = outpath; std::string jobname(filename.Data()); int last = jobname.rfind("/"); if(last>0) jobname = jobname.substr(last+1,jobname.size()+1); TString outName(jobname); outName.ReplaceAll(".reco.root",".vertexing."); outName.ReplaceAll(".reco2.root",".2.vertexing."); outName.ReplaceAll(".reco3.root",".3.vertexing."); outName.ReplaceAll(".reco4.root",".4.vertexing."); outName.ReplaceAll(".reco5.root",".5.vertexing."); outName.ReplaceAll(".reco6.root",".6.vertexing."); outName += method; if (useBeamspot) outName += ".Beamspot"; outName += ".root"; outName.ReplaceAll(":","."); TString outFile = outpath+"/"; outFile += outName; cout<<"Set Input File: "<SetInputFile(filename); cout<<"Set Output File: "<SetOutputFile(outFile); FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParAsciiFileIo* parInput1 = new FairParAsciiFileIo(); TString tpcDigiFile = basedir; tpcDigiFile += "/tpc/TestBench/tpc.TBtestChamber.par"; parInput1->open(tpcDigiFile.Data(),"in"); rtdb->setFirstInput(parInput1); rtdb->Print(); TString geoFile = basedir; geoFile+="/tpc/TestBench/FOPIGeo.root"; fRun->SetGeomFile(geoFile); PndConstField *fMagField=new PndConstField(); fMagField->SetField(0., 0. , 6. ); // values are in kG // values are in cm fMagField->SetFieldRegion(-50, 50,-50, 50, -2000, 2000); fRun->SetField(fMagField); GFFieldManager::getInstance()->init(new PndFieldAdaptor(fMagField)); //--------------------SET UP TASKS ------------------------------ TpcVertexingTask* vertexer = new TpcVertexingTask(); vertexer->SetPersistence(); vertexer->SetTrackBranchName("TpcCdcPreFit"); //vertexer->SetVerbose(2); //vertexer->SetUseVacuumPropagator(); // use the rave::Vacuum propagator instead of GFRavePropagator //vertexer->SetMethod("kalman-smoothing:1"); //vertexer->SetMethod("mvf-ini:(finder:avr)-smoothing:1"); vertexer->SetMethod(method); if (useBeamspot) vertexer->SetBeamspot(TVector3(0,0,20),2.5); fRun->AddTask(vertexer); // ----- Intialise and run -------------------------------------------- fRun->Init(); fRun->Run(0,nEvents); timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime); std::cout<<"OutputFile: "<