// ReactorNuOscProc.cc // Contact person: Stefan-Alexandru Nae // See ReactorNuOscProc.hh for more details. //---------------------------------------------// #include #include // istringstream #include #include // INT_MAX #include // std::locale, std::tolower #include // HepUniformRand() #include #include #include // GetMetaInfo(), ... #include namespace RAT { ReactorNuOscProc::ReactorNuOscProc() : Processor("ReactorNuOscProc") { } ReactorNuOscProc::~ReactorNuOscProc() { } void ReactorNuOscProc::BeginOfRun(DS::Run &) { fReactorNuOsc = DU::Utility::Get()->GetReactorNuOsc(); } Processor::Result ReactorNuOscProc::DSEvent(DS::Run &, DS::Entry &ds) { // Get antineutrino info for generated event const RAT::DS::MC &mc = ds.GetMC(); const RAT::DS::MCParticle &mcParticle = mc.GetMCParent(0); const double nuKE = mcParticle.GetKineticEnergy(); std::string coreData(mcParticle.GetMetaInfo()); bool sample = fReactorNuOsc.ReactorOsc(nuKE, coreData); if(sample == true) return Processor::OKTRUE; else return Processor::OKFALSE; } } // namespace RAT