#include #include #include #include #include #include using namespace RAT; using namespace RAT::PMTSelectors; #include #include using namespace std; void ZCut::Initialise( const std::string& ) { // Default values fLowCut = -8000.0; fHighCut = 0.0; } void ZCut::SetD( const std::string& param, double value ) { if( param == string( "lowLimit" ) ) fLowCut = value; else if( param == string( "highLimit" ) ) fHighCut = value; else throw Processor::ParamUnknown( param ); } vector ZCut::GetSelectedPMTs( const std::vector& data, const DS::FitVertex& ) { const DU::PMTInfo& pmtInfo = DU::Utility::Get()->GetPMTInfo(); vector selectedPMTs; for( vector::const_iterator iPMT = data.begin(); iPMT != data.end(); ++iPMT ) { double zPosition = pmtInfo.GetPosition( iPMT->GetID() ).Z(); if( zPosition > fLowCut && zPosition < fHighCut ) selectedPMTs.push_back( *iPMT ); } return selectedPMTs; }