// // event selection // // 07/20/99 T.Hojo // #include "event/BelleEvent.h" #include "tuple/BelleTupleManager.h" #include "basf/module.h" #include "basf/module_descr.h" #include "panther/panther.h" //#include BELLETDF_H #include HEPEVT_H // Module class class Selpsi : public Module { // lists of Particles public: Selpsi(void){}; ~Selpsi(void){}; void event(BelleEvent*, int*); void init(int * status){}; void disp_stat(const char *){}; void begin_run(class BelleEvent *, int *){}; void end_run(class BelleEvent *, int *){}; void term ( void ){}; void hist_def ( void ){}; void other ( int*, BelleEvent*, int* ){}; public: }; extern "C" Module_descr *mdcl_selpsi() { Selpsi *module = new Selpsi; Module_descr *dscr = new Module_descr ("selpsi", module); return dscr; } void Selpsi::event(BelleEvent* evptr, int* status) { Gen_hepevt_Manager &GenMgr = Gen_hepevt_Manager::get_manager(); int npsi(0); for( vector::iterator it = GenMgr.begin(), it_end = GenMgr.end(); it!=it_end; ++it ){ Gen_hepevt &gen( *it ); if( gen.idhep() == 443 && GenMgr[(int)gen.get_ID()].idhep() == 310 && ( ( abs(GenMgr[(int)gen.daFirst()-1].idhep())==11 && abs(GenMgr[(int)gen.daFirst()].idhep())==11 ) || ( abs(GenMgr[(int)gen.daFirst()-1].idhep())==13 && abs(GenMgr[(int)gen.daFirst()].idhep())==13 ) ) ){ npsi++; } } if( npsi != 0 ){ // set *status >= 0, if you need this event. *status = 1; if( npsi != 1 ){ cout<<"Selpsi : wrong of Ks decays!!!\n"; } }else{ // set *status < 0, if you want to throw this event away. *status = -1; } }