// $Id$ // // File: JEventProcessor_cpp_pythia.h // Created: Wed Aug 22 10:25:39 EDT 2012 // Creator: davidl (on Linux ifarm1102 2.6.18-274.3.1.el5 x86_64) // #ifndef _JEventProcessor_cpp_pythia_ #define _JEventProcessor_cpp_pythia_ #include #include #include #include #include using namespace std; class JEventProcessor_cpp_pythia:public jana::JEventProcessor{ public: JEventProcessor_cpp_pythia(); ~JEventProcessor_cpp_pythia(); const char* className(void){return "JEventProcessor_cpp_pythia";} TH1D *Wplus_minus; // W with perfect PID TH1D *Eplus_minus; // E with perfect PID TH1D *Wplus_minus_coherent; // same as above, but with cut on total energy being in coherent peak TH1D *Wpipi; // W where we assume both particles are pions TH1D *Epipi; // E where we assume both particles are pions TH1D *Wpipi_coherent; // same as above, but with cut on total energy being in coherent peak TH1D *Wplus_minusKK; // W with perfect PID for K+K- events TH1D *WpipiKK; // W assuming both are pions for K+K- events TH1D *Wplus_minusKK_coherent; // cut on coherent peak TH1D *WpipiKK_coherent; // cut on coherent peak TH1D *Wplus_minusPiPi_exclusive; // W for pi+pi- exclusive events TH1D *Wplus_minusPiPi_inclusive; // W for pi+pi- inclusive events TH1D *t_all; // t for all events TH1D *t_KK; // t for K+K- events TH1D *t_PiPi; // t for pi+pi- events TH1D *t_coherent; // t for all events cut on coherent peak TH1D *t_KK_coherent; // t for K+K- events cut on coherent peak TH1D *t_PiPi_coherent; // t for pi+pi- events cut on coherent peak TTree *kininfo_tree; class topology_t{ public: int Nparts[50]; // count of number particles where index is GEANT particle type void Clear(void){for(int i=0; i<50; i++)Nparts[i] = 0;} bool operator==(const topology_t &top) const { for(int i=1; i<50; i++){ if(Nparts[i]!=top.Nparts[i]){ return false; } } return true; } }; string MakeTopologyString(topology_t &top); map topologies; private: jerror_t init(void); ///< Called once at program start. jerror_t brun(jana::JEventLoop *eventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(jana::JEventLoop *eventLoop, int eventnumber); ///< Called every event. jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called. jerror_t fini(void); ///< Called after last event of last event source has been processed. }; #endif // _JEventProcessor_cpp_pythia_