void run_digi_tpccombi( Int_t nEvents = 10){ // ======================================================================== // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 0; // Input file (MC events) TString inFile = "data/points_tpccombi.root"; // Parameter file TString parFile = "data/params_tpccombi.root"; // Output file TString outFile = "data/digi_tpccombi.root"; // ---- Load libraries ------------------------------------------------- gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C"); gSystem->Load("libGem"); TString sysFile = gSystem->Getenv("VMCWORKDIR"); // ------------------------------------------------------------------------ // --- Now choose concrete engines for the different tasks ------------- // ------------------------------------------------------------------------ // In general, the following parts need not be touched // ======================================================================== // ----- Timer -------------------------------------------------------- TStopwatch timer; timer.Start(); // ------------------------------------------------------------------------ // ----- Digitization run ------------------------------------------- FairRunAna *fRun= new FairRunAna(); fRun->SetInputFile(inFile); fRun->SetOutputFile(outFile); // ------------------------------------------------------------------------ // ----- Parameter database -------------------------------------------- TString allDigiFile = sysFile+"/macro/params/all.par"; FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(); parInput1->open(parFile.Data()); FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo(); parIo1->open(allDigiFile.Data(),"in"); rtdb->setFirstInput(parInput1); rtdb->setSecondInput(parIo1); fRun->LoadGeometry(); // ------------------------------------------------------------------------ // -------- MVD digtizer & clusterfinder ---------- PndMvdDigiTask* mvddigi = new PndMvdDigiTask(); mvddigi->SetVerbose(iVerbose); fRun->AddTask(mvddigi); Double_t chargecut = 5000., pixelrad=1.8; PndMvdClusterTask* mvdmccls = new PndMvdClusterTask(pixelrad,chargecut,inFile); mvdmccls->SetVerbose(iVerbose); fRun->AddTask(mvdmccls); // ----- TPC digi producers --------------------------------- PndTpcClusterizerTask* tpcClusterizer = new PndTpcClusterizerTask(); //tpcClusterizer->SetPersistence(); fRun->AddTask(tpcClusterizer); PndTpcDriftTask* tpcDrifter = new PndTpcDriftTask(); // tpcDrifter->SetPersistence(); tpcDrifter->SetDistort(false); fRun->AddTask(tpcDrifter); PndTpcGemTask* tpcGem = new PndTpcGemTask(); //tpcGem->SetPersistence(); fRun->AddTask(tpcGem); PndTpcPadResponseTask* tpcPadResponse = new PndTpcPadResponseTask(); tpcPadResponse->SetPersistence(); fRun->AddTask(tpcPadResponse); PndTpcElectronicsTask* tpcElec = new PndTpcElectronicsTask(); tpcElec->SetPersistence(); fRun->AddTask(tpcElec); PndTpcClusterFinderTask* tpcCF = new PndTpcClusterFinderTask(); tpcCF->SetPersistence(); tpcCF->timeslice(20); // = 4 sample times = 100ns @ 40MHz fRun->AddTask(tpcCF); // ----- EMC hit producers --------------------------------- PndEmcHitProducer* emcHitProd = new PndEmcHitProducer(); fRun->AddTask(emcHitProd); // hit production //PndEmcMakeDigi* emcMakeDigi=new PndEmcMakeDigi(); //fRun->AddTask(emcMakeDigi); // fast digitization PndEmcHitsToWaveform* emcHitsToWaveform= new PndEmcHitsToWaveform(iVerbose); PndEmcWaveformToDigi* emcWaveformToDigi=new PndEmcWaveformToDigi(iVerbose); fRun->AddTask(emcHitsToWaveform); // full digitization fRun->AddTask(emcWaveformToDigi); // full digitization PndEmcMakeCluster* emcMakeCluster= new PndEmcMakeCluster(iVerbose); fRun->AddTask(emcMakeCluster); PndEmcMakeBump* emcMakeBump= new PndEmcMakeBump(); fRun->AddTask(emcMakeBump); PndEmcHdrFiller* emcHdrFiller = new PndEmcHdrFiller(); fRun->AddTask(emcHdrFiller); // ECM header // ----- GEM hit producers --------------------------------- PndGemDigitize* gemDigitize = new PndGemDigitize("GEM Digitizer", iVerbose); fRun->AddTask(gemDigitize); PndGemFindHits* gemFindHits = new PndGemFindHits("GEM Hit Finder", iVerbose); fRun->AddTask(gemFindHits); // ----- TOF hit producers --------------------------------- // // PndTofHitProducerIdeal* tofhit = new PndTofHitProducerIdeal(); // tofhit->SetVerbose(iVerbose); // fRun->AddTask(tofhit); // ----- MDT hit producers --------------------------------- PndMdtHitProducerIdeal* mdtHitProd = new PndMdtHitProducerIdeal(); mdtHitProd->SetPositionSmearing(0.2); // position smearing [cm] fRun->AddTask(mdtHitProd); PndMdtTrkProducerIdeal* mdtTrkProd = new PndMdtTrkProducerIdeal(); fRun->AddTask(mdtTrkProd); // // ----- DRC hit producers --------------------------------- // PndDrcHitProducerIdeal* drchit = new PndDrcHitProducerIdeal(); // drchit->SetVerbose(iVerbose); // fRun->AddTask(drchit); // ----- Intialise and run -------------------------------------------- fRun->Init(); fRun->Run(0, nEvents); 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; // ------------------------------------------------------------------------ }