/*************************************************************************** * Author : Tiago Perez * * II Physikalisches Institut * * Universitaet Giessen * * * * Title : fillHyContExp.cc * * Project: HYDRA Event Hypothesys (HADES) * * Description: * * * * Modified : * * 2005.02.11 T. Perez Created * * * * * ***************************************************************************/ #include "fillHypContExp.h" #include "hhypreconstructor.h" using namespace std; Int_t fillHypContExp(TString inputFile, Int_t nEvents=0, Int_t startEvt=0) { //cout<<"\n------- Operation with filenames -------------------"<SetIncludePath(" $HYDRA_INCLUDES "); //cout<<"gSystem->SetIncludePath( $HYDRA_INCLUDES )"<setTreeBufferSize(8000); cout<< " Setting configuration..." << endl; TLorentzVector * beam = new TLorentzVector(0,0,2994.73,4076.54); HHypReconstructor * hyp = new HHypReconstructor(); hyp->SetBeam(beam); HHypChannel hchannel; hyp->AddAlgorithm( hchannel.Get("empty"), new HHypPPPipPimXAlg("inclusive pion selector"), hchannel.Get("pp_pip_pim_X") ); hyp->AddAlgorithm( hchannel.Get("pp_pip_pim_X"), new HHypPPPipPimPi0Alg("exclusive pion selector"), hchannel.Get("pp_pip_pim_pi0") ); hyp->AddAlgorithm( hchannel.Get("pp_pip_pim_pi0"), new HHypPPPipPimProjector("inclusive pion projector"), hchannel.Get("empty") , hfile ); //--------------- Set batch (needed for TCanvas's) ------------------ gROOT->SetBatch(); // ------------ Set input data file: ------------------ -------------- //HRootSource *source = new HRootSource(kFALSE); HRootSource *source = new HRootSource(); source->setDirectory((Text_t*)inDir.Data()); source->addFile((Text_t*)inputFileFull.Data()); gHades->setDataSource(source); //------------------------ Add PID Tasks ----------------------------- gHades->getTaskSet(context)->add(hyp); //------------------------ Initialization ---------------------------- cout<<"gHades->init()\n"; gHades->makeCounter(1000); if(!gHades->init()) cerr<<"Error\n"; //-------------------------- Set output ------------------------------ // Bool_t // setOutputFile(Text_t* name, Option_t* opt, Text_t* title, Int_t comp) gHades->setOutputFile((Text_t*)outFile.Data(),"RECREATE","Test",2); gHades->makeTree(); //-------------------------------------------------------------------- cout<<"Processing events...\n"; timer.Reset(); timer.Start(); if (nEvents<1) { evN=gHades->eventLoop(); } else { evN=gHades->eventLoop(nEvents,startEvt); } gHades->getTaskSet(context)->printTimer(); delete gHades; timer.Stop(); hfile->Close(); cout<<"------------------------------------------------------\n"; cout<<"Events processed: "<