void runDigiFOPI_AlignmentTest(int runNumber, int nEvents=0,TString alignmentFile="", unsigned int seed=0, int jobset=0) { // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; gRandom->SetSeed(seed); // Number of events to process // Int_t nEvents = 0; gROOT->ProcessLine(".x $VMCWORKDIR/gconfig/rootlogon.C"); TString mcMode = "TGeant3"; // ---- Load libraries ------------------------------------------------- TString sysFile = gSystem->Getenv("VMCWORKDIR"); TString infile; if(jobset!=0){ infile=Form("AlignmentTest_set%i_run%i.mc.root",jobset,runNumber); }else{ infile=Form("AlignmentTest_%i.mc.root",runNumber); } cout<SetInputFile(infile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ // ----- Parameter database -------------------------------------------- TString allDigiFile = sysFile; allDigiFile+= Form("/tpc/FOPI/par/tpc.alignmentTest_sverre.par"); cout<<"DIGIFILE:"<GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(); parInput1->open(parFile.Data()); // FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo(); // parIo1->open(allDigiFile.Data(),"in"); rtdb->setFirstInput(parInput1); // rtdb->setSecondInput(parIo1); // ------------------------------------------------------------------------ // ----- TPC digi produscers --------------------------------- // TpcShieldPointAlignmentTask* shieldAlman=new TpcShieldPointAlignmentTask(); // shieldAlman->SetCopyPersistence("TpcShieldPointAl"); // fRun->AddTask(shieldAlman); TpcClusterizerTask* tpcClusterizer = new TpcClusterizerTask(); if(mcMode=="TGeant3") tpcClusterizer->SetMereChargeConversion(); // tpcClusterizer->SetPersistence(); fRun->AddTask(tpcClusterizer); TpcPCAlignmentTask* pcAl = new TpcPCAlignmentTask(); fRun->AddTask(pcAl); TpcDriftTask* tpcDrifter = new TpcDriftTask(); // tpcDrifter->SetPersistence(); tpcDrifter->SetDistort(false); fRun->AddTask(tpcDrifter); TpcGemTask* tpcGem = new TpcGemTask(); // tpcGem->SetPersistence(); fRun->AddTask(tpcGem); TpcPadResponseTask* tpcPadResponse = new TpcPadResponseTask(); // tpcPadResponse->SetPersistence(); fRun->AddTask(tpcPadResponse); TpcElectronicsTask* tpcElec = new TpcElectronicsTask(); tpcElec->SetPersistence(); //tpcElec->SetSamplePersistence(); tpcElec->SetShaper("T2K"); tpcElec->SetPSATimeCalib(2.3) fRun->AddTask(tpcElec); // ----- Intialise and run -------------------------------------------- std::cout<<"=========================================================================================="<Init(); std::cout<<"=========================================================================================="<GetRuntimeDb()->getContainer("TpcDigiPar"); std::cout<<"=========================================================================================="<init(tpcpar); std::cout<<"=========================================================================================="<forceManualDriftVel(forceDriftVel); if(alignmentFile=""){ TpcAlignmentManager::init(tpcpar->getAlignmentFile()); }else{ TpcAlignmentManager::init(alignmentFile); } fRun->Run(0,0); // rtdb->saveOutput(); rtdb->print(); // ------------------------------------------------------------------------ // ----- Finish ------------------------------------------------------- timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished succesfully." << endl; cout << "Output file is " << outFile << endl; cout << "Parameter file is " << parFile << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; // ------------------------------------------------------------------------ }