//////////////////////////////////////////////////////////////////// /// \file pcaproctw.cc /// /// \brief Extracts PCA information /// /// \author F Descamps, /// /// REVISION HISTORY:\n /// 2014-05-29 : P G Jones - Added header information.\n /// /// \details /// //////////////////////////////////////////////////////////////////// #include #include #include #include void make_plots( RAT::DU::DSReader* dsReader, TFile *out_file ) { TH2D *hPCATW=new TH2D("hPCATW","hPCATW;QHS [cap];ECA time [ns]",400,0,400,600,0,600); for( size_t iEntry = 0; iEntry < dsReader->GetEntryCount(); iEntry++ ) { const RAT::DS::Entry& rDS = dsReader->GetEntry( iEntry ); for( size_t iEV = 0; iEV < rDS.GetEVCount(); iEV++ ) { const RAT::DS::EV& rEV = rDS.GetEV( iEV ); for( size_t ipmt = 0; ipmt < rEV.GetCalPMTs().GetAllCount(); ipmt++ ) { const RAT::DS::PMTCal& pmtCal = rEV.GetCalPMTs().GetAllPMT( ipmt ); const unsigned int id = pmtCal.GetID(); if( id == 8990 ) // This pmt will have the most hits in for this laserball position hPCATW->Fill( pmtCal.GetQHS(), pmtCal.GetTime() ); } } } out_file->cd(); hPCATW->Write(); }