void llbar_ana_task(int nevts=0) { // *** the files coming from the simulation TString pre = "dpm"; bool signal = false; TString inPidFile = pre+"_pid.root"; // this file contains the PndPidCandidates and McTruth TString inRecoFile = pre+"_reco.root"; TString inSimFile = pre+"_sim.root"; // this file contains the MC truth TString inParFile = pre+"_par.root"; // *** the output file TString OutFile="output_"+pre+"_ana_task.root"; // *** PID table with selection thresholds; can be modified by the user TString pidParFile = TString(gSystem->Getenv("VMCWORKDIR"))+"/macro/params/all.par"; // *** initialization FairLogger::GetLogger()->SetLogToFile(kFALSE); FairRunAna* fRun = new FairRunAna(); FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); fRun->SetInputFile(inPidFile); // *** setup parameter database FairParRootFileIo* parIO = new FairParRootFileIo(); parIO->open(inParFile); FairParAsciiFileIo* parIOPid = new FairParAsciiFileIo(); parIOPid->open(pidParFile.Data(),"in"); rtdb->setFirstInput(parIO); rtdb->setSecondInput(parIOPid); rtdb->setOutput(parIO); fRun->SetOutputFile(OutFile); // *** HERE OUR TASK GOES! PndLLbarAnaTask *anaTask = new PndLLbarAnaTask(); //PndLLbarAnaTask_DecayTreeFit *anaTask = new PndLLbarAnaTask_DecayTreeFit(); anaTask->SetBeamMom(1.642); anaTask->SetIsSig(signal); fRun->AddTask(anaTask); // *** and run analysis fRun->Init(); fRun->Run(0,nevts); if (gROOT->GetVersionInt() >= 60602) { gGeoManager->GetListOfVolumes()->Delete(); gGeoManager->GetListOfShapes()->Delete(); delete gGeoManager; } }