// $Id$ // // File: DCustomAction_ParticleStudies.h // Created: Thu May 1 21:18:23 EDT 2014 // Creator: pmatt (on Darwin pmattLaptop 10.8.0 i386) // #ifndef _DCustomAction_ParticleStudies_ #define _DCustomAction_ParticleStudies_ #include #include #include "JANA/JEventLoop.h" #include "JANA/JApplication.h" #include "ANALYSIS/DAnalysisAction.h" #include "ANALYSIS/DReaction.h" #include "ANALYSIS/DParticleCombo.h" #include "ANALYSIS/DAnalysisUtilities.h" using namespace std; using namespace jana; class DCustomAction_ParticleStudies : public DAnalysisAction { public: //user can call any of these three constructors DCustomAction_ParticleStudies(const DReaction* locReaction, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Custom_ParticleStudies", false, locActionUniqueString), dNumParticles(40) { dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton); dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus); } DCustomAction_ParticleStudies(string locActionUniqueString) : DAnalysisAction(NULL, "Custom_ParticleStudies", false, locActionUniqueString), dNumParticles(40) { dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton); dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus); } DCustomAction_ParticleStudies(void) : DAnalysisAction(NULL, "Custom_ParticleStudies", false, ""), dNumParticles(40) { dFinalStatePIDs.push_back(PiPlus); dFinalStatePIDs.push_back(KPlus); dFinalStatePIDs.push_back(Proton); dFinalStatePIDs.push_back(PiMinus); dFinalStatePIDs.push_back(KMinus); } void Initialize(JEventLoop* locEventLoop); unsigned int dNumParticles; vector dFinalStatePIDs; private: bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo = NULL); bool Cut_PID(const DNeutralParticleHypothesis* locNeutralParticleHypothesis, double locMinimumConfidenceLevel); bool Cut_PID(const DChargedTrackHypothesis* locChargedTrackHypothesis, double locMinimumConfidenceLevel); // Optional: Useful utility functions. // const DAnalysisUtilities* dAnalysisUtilities; //Store any histograms as member variables here TH1D* dHist_NumThrownQTracks; TH1D* dHist_NumReconTrueQTracks; TH2D* dHist_NumDCHitsVsTheta_True; TH1D* dHist_NumReconTrueQTracks_Tracking5Sigma; TH1D* dHist_NumReconTrueQTracks_Tracking3Sigma; TH1D* dHist_NumReconTrueQTracks_HasDetectorHit; TH1D* dHist_NumReconQTracks; TH2D* dHist_NumDCHitsVsTheta; TH1D* dHist_NumReconQTracks_Tracking5Sigma; TH1D* dHist_NumReconQTracks_Tracking3Sigma; TH1D* dHist_NumReconQTracks_HasDetectorHit; map dHistMap_NumTracksByPID_Thrown; map dHistMap_NumTracksByPID_TrueRecon; map dHistMap_NumTracksByPID_TruePID5Sigma; map dHistMap_NumTracksByPID_TrueTracking5Sigma; //includes previous cuts map dHistMap_NumTracksByPID_TrueTracking3Sigma; //includes previous cuts map dHistMap_NumTracksByPID_TrueHasDetectorHit; //includes previous cuts map dHistMap_NumTracksByPID_TruePID3Sigma; //includes previous cuts map dHistMap_NumTracksByPID_AllPID5Sigma; map dHistMap_NumTracksByPID_AllTracking5Sigma; //includes previous cuts map dHistMap_NumTracksByPID_AllTracking3Sigma; //includes previous cuts map dHistMap_NumTracksByPID_AllHasDetectorHit; //includes previous cuts map dHistMap_NumTracksByPID_AllPID3Sigma; //includes previous cuts TH1D* dHist_NumThrownNeutralShowers; TH1D* dHist_NumNeutralShowers; TH1D* dHist_NumNeutralShowers_True; TH1D* dHist_NeutralShowerTime_All; TH1D* dHist_NeutralShowerTime_True; TH1D* dHist_NumNeutralShowers_TruePID5Sigma; TH1D* dHist_NumNeutralShowers_AllPID5Sigma; TH1D* dHist_NeutralShowerEnergy_True; TH1D* dHist_NeutralShowerEnergy_All; TH1D* dHist_NeutralShowerEnergy_True_BCAL; TH1D* dHist_NeutralShowerEnergy_All_BCAL; TH1D* dHist_NeutralShowerEnergy_True_FCAL; TH1D* dHist_NeutralShowerEnergy_All_FCAL; TH1D* dHist_DistanceToNearestTrack_All_BCAL; TH2D* dHist_DistanceToNearestTrackVsTheta_All_BCAL; TH1D* dHist_DistanceToNearestTrack_All_FCAL; TH1D* dHist_DistanceToNearestTrack_True_BCAL; TH2D* dHist_DistanceToNearestTrackVsTheta_True_BCAL; TH1D* dHist_DistanceToNearestTrack_True_FCAL; TH2D* dHist_NumQTracks2D; TH2D* dHist_NumTrueQTracks2D; }; #endif // _DCustomAction_ParticleStudies_