/* $Id: CbmRichHitsProd.C,v 1.8 2006/09/15 12:50:52 turany Exp $ */ /* History of cvs commits: * * $Log: CbmRichHitsProd.C,v $ * Revision 1.8 2006/09/15 12:50:52 turany * load the base before the field * * Revision 1.7 2006/07/17 11:27:17 hoehne * numbering for DetType updated * * Revision 1.6 2006/06/22 07:18:07 hoehne * libraries adopted to recent changes * * Revision 1.5 2006/02/17 23:41:48 sgorboun * the order of loading of libraries changed * * Revision 1.4 2006/02/09 16:36:29 hoehne * moise added for HitProducer * * Revision 1.3 2006/01/18 16:27:38 hoehne * verbosity levels added * * Revision 1.2 2006/01/11 12:51:41 hoehne * update for new CbmRichHitProducer, set necessary parameters via macro * * Revision 1.1 2005/06/24 14:40:42 kharlov * First adaptation of RICH scripts for cbmroot2 * */ { // this macro read an input Tree structure // from simulation and generate an output // tree containing collections of RichHits // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug) Int_t iVerbose = 1; TStopwatch timer; timer.Start(); gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); gSystem->Load("libField"); gSystem->Load("libGen"); gSystem->Load("libPassive"); gSystem->Load("libSts"); gSystem->Load("libRich"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libEcal"); gSystem->Load("libGlobal"); gSystem->Load("libKF"); gSystem->Load("libL1"); CbmRunAna *fRun = new CbmRunAna(); CbmRuntimeDb *rtdb = fRun->GetRuntimeDb(); CbmParRootFileIo *io1 = new CbmParRootFileIo(); //io1->open("../run/parfiles/params_activeMagnet_25_co2.root"); io1->open("../run/params.root"); rtdb->setFirstInput(io1); //fRun->SetInputFile("/d/cbm02/hoehne/data/urqmd/auau.25gev.centr.mc_notrd_co2.root"); //fRun->SetOutputFile("/d/cbm02/hoehne/data/urqmd/hits/auau.25gev.centr.mc_notrd_co2_hits_protvino.root"); fRun->SetInputFile("../run/test.mc.100ev.root"); fRun->SetOutputFile("test.mc.rich-hits-Hamamatsu-03.root"); // ------- Parameters for photodetector ------------------------- Double_t pmt_rad = 0.4; // PMT radius (cm) Double_t pmt_dist = 0.; // distance between PMTs (cm) Int_t det_type = 4; // detector type (choose: 1=Protvino, 2=Hamamatsu, 3=CsI) Int_t noise = 220; // number of noise points to be added // (note: excluding geom. eff. (~0.9)) CbmRichHitProducer *hp= new CbmRichHitProducer(pmt_rad,pmt_dist,det_type,noise,iVerbose); fRun->AddTask(hp); fRun->Init(); fRun->Run(); timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime); }