#ifndef DSelector_p2g_h #define DSelector_p2g_h #include #include "DSelector/DSelector.h" #include "DSelector/DHistogramActions.h" #include "DSelector/DCutActions.h" #include "TH1I.h" #include "TH2I.h" #include "TH1D.h" #include "TH2D.h" #include "TH3D.h" #include "TF1.h" #include "TRandom3.h" class DSelector_p2g : public DSelector { public: DSelector_p2g(TTree* locTree = NULL) : DSelector(locTree){} virtual ~DSelector_p2g(){} void Init(TTree *tree); Bool_t Process(Long64_t entry); private: void Get_ComboWrappers(void); void Finalize(void); //CREATE REACTION-SPECIFIC PARTICLE ARRAYS //Step 0 DParticleComboStep* dStep0Wrapper; DBeamParticle* dComboBeamWrapper; DNeutralParticleHypothesis* dPhoton1Wrapper; DNeutralParticleHypothesis* dPhoton2Wrapper; DChargedTrackHypothesis* dProtonWrapper; // DEFINE YOUR HISTOGRAM ACTIONS HERE // EXAMPLE HISTOGRAM ACTIONS: DHistogramAction_ParticleComboKinematics* dHistComboKinematics; DHistogramAction_ParticleID* dHistComboPID; // EXAMPLE CUT ACTIONS: DCutAction_PIDDeltaT* dCutPIDDeltaT; // DEFINE YOUR HISTOGRAMS HERE // EXAMPLES: TH1I* dHist_MissingMassSquared; TH1I* dHist_BeamEnergy; int globEvent; TH1I* dHist_True_Signal; int ncuts; int ncutsall; /**********************for histograms before preselection************************/ TH1D* p_Proton_pre; TH1D* z_vertex_pre; TH1D* r_vertex_pre; TH2D* z_vs_r_vertex; /****************for systematic study for preSelection**************************/ int ncuts_pre; int ncutsRg_pre; int nsysSc; int ncutsRg; int nPS; TH1D* Phi_Proton_pre[6][3][2]; TH1D* Acci_Phi_Proton_pre[6][3][2]; TH1D* S_IM_2gamma_pre[6][3][2]; TH2D* Phi_Proton_vs_IM2g_cutBE_pre[6][3]; TH2D* Acci_Phi_Proton_vs_IM2g_cutBE_pre[6][3]; TH2D* Phi_Proton_vs_t_pre[6][3][2]; TH2D* Acci_Phi_Proton_vs_t_pre[6][3][2]; /********************for systematic study**************************/ TH1D* Phi_Proton[9][3][2]; TH1D* Acci_Phi_Proton[9][3][2]; TH1D* S_IM_2gamma_sys[9][3][2]; TH2D* Phi_Proton_vs_IM2g_cutBE_sys[9][3]; TH2D* Acci_Phi_Proton_vs_IM2g_cutBE_sys[9][3]; TH2D* Phi_Proton_vs_t_sys[9][3][2]; TH2D* Acci_Phi_Proton_vs_t_sys[9][3][2]; /*****************************************************************/ // histogram of topologies vector locReactionLabels; TH2F* hMass2gamma_Reaction; TH1D* DeltaTBeamRF; TH1D* DeltaTBeamRF_pi0_cut6; TH1D* DeltaTBeamRF_pi0_cutBE; TH1D* DeltaTBeamRF_eta_cut6; TH1D* DeltaTBeamRF_eta_cutBE; TH1D* S_Delta_phi[2]; TH1D* S_MMsq[2]; TH1D* S_ME[2]; TH1D* S_MMXp[2]; TH1D* S_IM_2gamma[2]; TH1D* T_Delta_phi[2][7]; TH1D* T_MMsq[2][7]; TH1D* T_ME[2][7]; TH1D* T_MMXp[2][7]; TH1D* T_IM_2gamma[2][7]; TH1D* DPSB_Delta_phi_pi0; TH1D* DPSB_t_pi0; TH1D* DPSB_Phi_Proton_pi0; TH2D* DPSB_Phi_Proton_vs_t_pi0; TH1D* DPSB_Delta_phi_eta; TH1D* DPSB_t_eta; TH1D* DPSB_Phi_Proton_eta; TH2D* DPSB_Phi_Proton_vs_t_eta; TH1D* NU_Unused_Energy_pi0; TH1D* NU_Unused_Energy_1_pi0; TH1D* NU_Unused_Energy_eta; TH1D* NU_Unused_Energy_1_eta; TH1D* NM_MMXp_pi0; TH1D* NM_MMXp_eta; TH2D* Phi_Proton_vs_BE_cut6; TH2D* Acci_Phi_Proton_vs_BE_cut6; TH2D* Phi_Proton_vs_IM2g_cutBE; TH2D* Acci_Phi_Proton_vs_IM2g_cutBE; TF1 *fMinProton_dEdx; TH1D* ME[13]; TH1D* IM_2gamma[13]; TH1D* MMsq[13]; TH1D* MMXp[13]; TH1D* UE[13]; TH1D* BE[13]; TH1D* Delta_phi[13]; TH1D* IM_2gamma_eta_cut6; TH1D* IM_2gamma_eta_cutBE; TH1D* Acci_IM_2gamma_eta_cut6; TH1D* Acci_IM_2gamma_eta_cutBE; TH2D* dEdx_vs_p_Proton[13]; TH3D* dEdx_vs_p_Proton_vs_Phi_Proton[13]; TH1D* Acci_ME[13]; TH1D* Acci_IM_2gamma[13]; TH1D* Acci_MMsq[13]; TH1D* Acci_MMXp[13]; TH1D* Acci_UE[13]; TH1D* Acci_BE[13]; TH1D* Acci_Delta_phi[13]; TH2D* Acci_dEdx_vs_p_Proton[13]; TH3D* Acci_dEdx_vs_p_Proton_vs_Phi_Proton[13]; TH2D* ME_vs_Phi_Proton_cut6; TH2D* Acci_ME_vs_Phi_Proton_cut6; TH2D* ME_vs_theta_Photon_min_cut6; TH2D* ME_vs_theta_Photon_min_20_cut6; TH2D* ME_vs_theta_Photon_min_all_cut6; TH2D* Acci_ME_vs_theta_Photon_min_cut6; TH2D* Acci_ME_vs_theta_Photon_min_20_cut6; TH2D* Acci_ME_vs_theta_Photon_min_all_cut6; TH2D* X_Y_FCAL_g1; TH2D* X_Y_FCAL_g2; TH2D* E_g1_vs_E_g2; TH2D* Acci_X_Y_FCAL_g1; TH2D* Acci_X_Y_FCAL_g2; TH2D* Acci_E_g1_vs_E_g2; TH1D* t_pi0; TH1D* t_eta; TH1D* Phi_Proton_pi0; TH1D* Phi_Proton_eta; TH1D* Acci_t_pi0; TH1D* Acci_t_eta; TH1D* Acci_Phi_Proton_pi0; TH1D* Acci_Phi_Proton_eta; TH2D* theta_Photon1_vs_phi_Photon1[6]; TH2D* theta_Photon2_vs_phi_Photon2[6]; TH2D* theta_Proton_vs_phi_Proton[6]; TH2D* Phi_Proton_vs_t[6]; TH2D* Phi_Proton_vs_t_5[6]; TH2D* Phi_Proton_vs_t_15[6]; TH2D* Acci_theta_Photon1_vs_phi_Photon1[6]; TH2D* Acci_theta_Photon2_vs_phi_Photon2[6]; TH2D* Acci_theta_Proton_vs_phi_Proton[6]; TH2D* Acci_Phi_Proton_vs_t[6]; TH2D* Acci_Phi_Proton_vs_t_5[6]; TH2D* Acci_Phi_Proton_vs_t_15[6]; // DEFINE CUT PARAMETERS HERE double dMinKinFitCL, dMinBeamEnergy, dMaxBeamEnergy, dMinPi0Mass, dMaxPi0Mass; ClassDef(DSelector_p2g, 0); }; void DSelector_p2g::Get_ComboWrappers(void) { //Step 0 dStep0Wrapper = dComboWrapper->Get_ParticleComboStep(0); dComboBeamWrapper = static_cast(dStep0Wrapper->Get_InitialParticle()); dPhoton1Wrapper = static_cast(dStep0Wrapper->Get_FinalParticle(0)); dPhoton2Wrapper = static_cast(dStep0Wrapper->Get_FinalParticle(1)); dProtonWrapper = static_cast(dStep0Wrapper->Get_FinalParticle(2)); } #endif // DSelector_p2g_h