//void PairSelection_(Int_t indexPos,Int_t indexNeg){ void PairSelectionSE(Int_t indexPos=1,Int_t indexNeg=1){ // Convert index to the string char strIndexPos[4]; sprintf(strIndexPos, "%4d", indexPos); for(Int_t i = 0; i < 4; i++) { if(' ' == strIndexPos[i]) strIndexPos[i] = '0'; } // Convert index to the string char strIndexNeg[4]; sprintf(strIndexNeg, "%4d", indexNeg); for(Int_t i = 0; i < 4; i++) { if(' ' == strIndexNeg[i]) strIndexNeg[i] = '0'; } gDebug=0; gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libCLHEP"); gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); gSystem->Load("libCbmBase"); gSystem->Load("libCbmData"); gSystem->Load("libField"); gSystem->Load("libGen"); gSystem->Load("libPassive"); gSystem->Load("libMvd"); gSystem->Load("libSts"); gSystem->Load("libRich"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libGlobal"); gSystem->Load("libEcal"); gSystem->Load("libKF"); gSystem->Load("libL1"); gSystem->Load("libOpencharm"); // Input files TString workDir = gSystem->Getenv("VMCWORKDIR"); // ------------------------------------------------------------ TString mcFile = "_auau.25gev.centr.v11b4.mc.root"; TString parFile = "_auau.25gev.centr.v11b4.params.root"; TString rcFile = "_auau.25gev.centr.v11b4.rec.root"; TString D0File = "_auau.25gev.centr.v11b4.tracks.root"; TString outFile = "_auau.25gev.centr.v11b4.pairs.root"; //TString NegativeD0File = "/lustre/cbm/user/cdritsa/Yuri_output/TRACKS/tracks.100.urqmdD0."+TString(strIndexNeg)+".root"; TString NegativeD0File = D0File; cout << endl << " mcFile : " << mcFile << endl << " rcFile : " << rcFile << endl << " D0File : " << D0File << endl << " NegD0File : " << NegativeD0File << endl << " outFile : " << outFile << endl; Int_t nEvents = 2; FairRunAna *fRun = new FairRunAna(); fRun->SetInputFile(mcFile.Data()); fRun->AddFriend(D0File.Data()); fRun->AddFriend(rcFile.Data()); fRun->SetOutputFile(outFile); //TString digiFile = "sts_standard.digi.par"; TString digiFile = "sts_v11a.digi.par"; // ----- Parameter database -------------------------------------------- TString stsDigiFile = gSystem->Getenv("VMCWORKDIR"); stsDigiFile += "/parameters/sts/"; stsDigiFile += digiFile; FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parIo1 = new FairParRootFileIo(); FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo(); parIo1->open(parFile.Data()); parIo2->open(stsDigiFile.Data(),"in"); rtdb->setFirstInput(parIo1); rtdb->setSecondInput(parIo2); rtdb->setOutput(parIo1); rtdb->saveOutput(); CbmKF* KF = new CbmKF(); //char* name, Int_t iVerbose, Bool_t SuperEventMode, Double_t cutIPD0max, Double_t cutSVZmin, Double_t cutSVZmax //CbmD0Candidates* D0cand = new CbmD0Candidates("d0cand", 1, 0.08, 0.01 ); //CbmD0Candidates* D0cand = new CbmD0Candidates("d0cand", 1, 10.0, -1.0 );//open cuts //CbmD0CandidatesSE* D0cand = new CbmD0CandidatesSE("d0candSE", 1,kFALSE, 50.0, -1.0, 5000);//from Yuri //char* name, Int_t iVerbose, Bool_t SuperEventMode, cutIPD0max, cutSVZmin, cutSVZmax //CbmD0CandidatesSE* D0cand = new CbmD0CandidatesSE("d0cand", 1, kTRUE, 0.5, 0.0, 1 ); CbmD0CandidatesSE* D0cand = new CbmD0CandidatesSE("d0cand", 1, kFALSE, 50, 0.0, 10 ); D0cand->SetNegativeFileName(NegativeD0File); //D0cand->SetKFParticle(kTRUE); fRun->AddTask(KF); fRun->AddTask(D0cand); fRun->Init(); TStopwatch timer; timer.Start(); fRun->Run(0,nEvents); timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); printf("\nRealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime); cout << "output file is : " << outFile << endl; //- Close the file //gFile->Close(); exit(0); }