#include #include using namespace RAT; using namespace RAT::Classifiers; #include using namespace ROOT; #include using namespace std; DS::ClassifierResult MeanTimeUnseeded::GetClassification() { fClassifierResult.Reset(); if( fPMTData.empty() ) return fClassifierResult; // First produce a histogram of the hit times with 5ns bins const int nBins = 100; const double startBin = 0.0; const double endBin = 500.0; TH1D timeHist( "time", "time", nBins, startBin, endBin ); timeHist.SetDirectory(0); // Memory manage myself for( vector::const_iterator iPMT = fPMTData.begin(); iPMT != fPMTData.end(); ++iPMT ) timeHist.Fill( iPMT->GetTime() ); fClassifierResult.SetClassification( "meanTime", timeHist.GetMean() ); fClassifierResult.SetClassification( "modeTime", timeHist.GetBinLowEdge( timeHist.GetMaximumBin() )); fClassifierResult.SetValid( true ); return fClassifierResult; }