////////////////////////////////////////////////////////////////////////// // // Left arm detector replay script // ////////////////////////////////////////////////////////////////////////// // // Author : Vincent A. Sulkosky & Jin Huang // last update: I. Korover // ////////////////////////////////////////////////////////////////////////// #include "def.h" using namespace std; void replay_L(Int_t runnumber=0,Int_t all=0,Int_t fstEvt=0,Bool_t QuietRun = kFALSE) { ///////////////////////////////////// /// Beams //////////////////////////////////// cout<<"replay: Adding Idea Beam"<< endl; THaApparatus* B = new THaIdealBeam("B","Idea Beam, for Test Only"); gHaApps->Add( B ); cout<<"replay: Adding UnRastered and Rastered Beam ..."<Add(new THaUnRasteredBeam("urb","Unrastered beam")); gHaApps->Add(new THaRasteredBeam("rb","Rastered Beam")); ////////////////////////////////////////// /// Other Modules /////////////////////////////////////////// cout<<"replay: Adding Decoder Data ..."<Add(new THaDecData("DL","Misc. Decoder Data")); //////////////////////////////////////////// /// LHRS /////////////////////////////////////////// cout<<"replay: Adding HRS-L ..."<Add( HRSL ); // add detectors that are not in the default config HRSL->AddDetector( new THaCherenkov("cer", "Gas Cherenkov counter" )); HRSL->AddDetector( new THaCherenkov("a1", "A1 Cherenkov counter" )); HRSL->AddDetector( new THaShower("prl1", "Pre-shower pion rej." )); HRSL->AddDetector( new THaShower("prl2", "Show pion rej." )); cout<<"replay: adding LHRS track(physics) modules ..."<Add( new THaGoldenTrack("L.gold","Golden track for LHRS", "L") ); THaPhysicsModule *Rpt_l = new THaReactionPoint("ReactPt_L","Reaction vertex for Left","L","B"); gHaPhysics->Add( Rpt_l ); // Correct for using an Extended target // This needs information about the Point of interaction (hence a THaVertexModule) THaPhysicsModule* TgC_l = new THaExtTarCor("ExTgtCor_L","Corrected for extended target, HRS-L","L","ReactPt_L"); gHaPhysics->Add( TgC_l ); //////////////////////////////////////// // Do replay //////////////////////////////////////// THaAnalyzer* analyzer = THaAnalyzer::GetInstance(); if( !analyzer ) { analyzer = new THaAnalyzer; } analyzer->EnableBenchmarks(); analyzer->EnableHelicity(); analyzer->EnableScalers(); ReplayCore( runnumber, //run # all, //-1=replay all;0=ask for a number 100000, //defaut replay event num "%s/e05102_L_%d.root", //output file format "replay_L.odef", //out define "replay_L.cdef", //empty cut define kTRUE, //replay scalar? fstEvt, //First Event To Replay QuietRun //whether ask user for inputs ); }