//////////////////////////////////////////////////////////////////// // Outputs slot occupancy, crate occupancy, channel // occupancy, flagged events vs nhits, and time difference // between like-flagged events. // // Author: Kevin Nuckolls // // REVISION HISTORY: // 13 July 2015 : Kevin Nuckolls - first version // // This processor identifies the position of PMTs // within electronic and physical space and plots these // qualities. This processor also analyzes the NHits and // time distribution of flagged events and plots these qualities. //////////////////////////////////////////////////////////////////// #ifndef __RAT_DCAProc__ #define __RAT_DCAProc__ #include #include #include // ROOT #include #include #include #include #include #include "TStyle.h" #include #include #include #include "TGaxis.h" #include "TStyle.h" // RAT #include #include #include #include #include #include #include #include #include class TFile; class TTree; namespace RAT { class DCAProc : public Processor { public: DCAProc(); virtual Processor::Result DSEvent(DS::Run& run, DS::Entry& ds); virtual ~DCAProc(); // @param[in] param should be type // @param[in] value should be the name of the analysis type // @throws ParamUnknown if param is not type virtual void SetI( const std::string& param, const int value ); // @param[in] param should be outname // @param[in] value should be the name of output file // @throws ParamUnknown if the param is not outname virtual void SetS( const std::string& param, const std::string& value ); TVector2 TransformCoord( const TVector3& V1, const TVector3& V2, const TVector3& V3, const TVector2& A1, const TVector2& A2, const TVector2& A3, const TVector3& P ); virtual void SphereToIcosahedron( TVector3& pointOnSphere, // The spherical Position TVector2& resultPosition, // The returned position const double totalLength, // Total size of the 2d grid (default to 1) const double rotation); // Rotation: 0 for "Phil" style, 2.12 for "SNO" style virtual void BeginOfRun( DS::Run& run ); virtual void EndOfRun( DS::Run& ) { }; protected: int fPMTCount; int fNumberOfEvents; std::vector fMaxNhits; std::vector fMaxTimeDiff; std::vector< std::vector > fSNHITS; std::vector< std::vector > fCRNHITS; std::vector< std::vector > fCHNHITS; std::vector fTOTALCOSINE; std::vector fTOTALPHI; std::vector< std::vector > fNHITSCut; std::vector fTotalCutCount; std::vector< std::vector > fCutMatrix; std::vector fCutsPerEvent; std::vector< std::vector > fTIMECut; std::vector fLastEventTime; std::vector fFlag_Vector; unsigned short fFlag; std::string fFilename; BitManip *fBits; TFile* fCreateFile; // The file to write to TTree* fDSTree; // The dsTree to write DS::Entry instances to TTree* fRunTree; // The runTree to write DS::Run instances to DS::Entry* fDSBranch; // The branch in the dsTree DS::Run* fRunBranch; // The branch in the runTree }; } // namespace RAT #endif