00001 #ifndef CAFUTIL_ELECTRONSELECTOR_HPP__ 00002 #define CAFUTIL_ELECTRONSELECTOR_HPP__ 00003 00004 #include <iostream> 00005 #include <string> 00006 #include <TString.h> 00007 00008 #include "cafe/Event.hpp" 00009 #include "cafe/Stat.hpp" 00010 #include "cafe/SelectUserObjects.hpp" 00011 #include "emid_cuts/emid_cuts.hpp" 00012 #include "tmb_tree/TMBEMCluster.hpp" 00013 00014 00015 namespace caf_util { 00016 00017 class TRefFinder ; 00018 00055 class ElectronSelector : public cafe::SelectUserObjects<TMBEMCluster> 00056 { 00057 public: 00058 ElectronSelector(const char *name); 00059 ~ElectronSelector() {}; 00060 bool processEvent(cafe::Event &event) ; 00061 bool selectObject(const TMBEMCluster &electron); 00062 void finish(); 00063 private: 00064 void before(cafe::Collection<TMBEMCluster>& from) ; 00065 std::string FindFile(std::string path); 00066 private: 00067 std::string _quality; //< electron quality 00068 std::string _emidfilepath; //< path to the file with emid criteria 00069 int _nelectrons ; //< minimal number of electrons to be selected 00070 int _nelectronsmax ; //< maximal number of electrons to be selected 00071 int _nselected ; //< number of selected objects 00072 int _ver ; //< selection version 00073 int _lorun ; //< the minimal run number for this selection 00074 int _hirun; //< the maximal run number for this selection 00075 emID *_id; //< emid object (see package emid_cuts) 00076 bool _sort; 00077 cafe::StatPointer _stat ; 00078 00079 cafe::Event* _event ; 00080 TRefFinder* _finder ; //< workaround for the TRef problem 00081 00082 ClassDef(ElectronSelector,0) ; 00083 }; 00084 00085 } 00086 #endif // CAFUTIL_ELECTRONSELECTOR_HPP__
1.3.4