//////////////////////////////////////////////////////////////////// /// \file insoc.cc /// /// \brief Loads standard information from a soc file /// /// \author P G Jones /// /// REVISION HISTORY:\n /// 2014-05-29 : P G Jones - Added header information.\n /// /// \details The standard information is checked to ensure the insoc /// producer works correctly. /// //////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include void make_plots( RAT::DU::SOCReader* socReader, TFile *out_file ) { TH1D* hTimeCentroid = new TH1D( "hTimeCentroid", "Peak finding time centroid", 40, 200.0, 400.0 ); hTimeCentroid->SetXTitle( "Fitted Time Centroid [ns]" ); hTimeCentroid->SetYTitle( "Count per 5 ns bin." ); const TVector3 mcPosition( 1000.0, 0.0, 0.0 ); // Should load this for( size_t isoc = 0; isoc < socReader->GetSOCCount(); isoc++ ) { const RAT::DS::SOC& rSoc = socReader->GetSOC( isoc ); std::vector pmtIDs = rSoc.GetSOCPMTIDs(); for( size_t ipmt = 0; ipmt < pmtIDs.size(); ipmt++ ) if( rSoc.GetSOCPMT( pmtIDs[ipmt] ).GetPeakFindOK() == 0 ) hTimeCentroid->Fill( rSoc.GetSOCPMT( pmtIDs[ipmt] ).GetTimeCentroid() ); } out_file->cd(); hTimeCentroid->Write(); }