All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
include/N3AnaBase/measurements/tof_eMgN_measurement.h
00001 #ifndef __N3AnaBase__tof_eMgN_measurement_h
00002 #define __N3AnaBase__tof_eMgN_measurement_h 1
00003 
00004 #include <string>
00005 #include <sstream>
00006 #include <map>
00007 
00008 #include <datatools/utils/properties.h>
00009 
00010 #include <N3AnaBase/event/ana_event.h>
00011 
00012 // include common utilities:
00013 #include <N3AnaBase/measurements/tof_tools.h>
00014 
00015 namespace nemo3 {
00016 
00017   using namespace std;
00019 
00071   class tof_eMgN_measurement : public ana_event::i_measurement
00072     {
00073     public:
00074       static const string VALIDITY_PROPERTY_GLOBAL_NAME;          
00075       static const string VALIDITY_PROPERTY_NAME_BEGIN;           
00076       static const string VALIDITY_PROPERTY_NAME_END;             
00077       static const string INTERNAL_PROBABILITY_PROPERTY_NAME_END; 
00078       static const string EXTERNAL_PROBABILITY_PROPERTY_NAME_END; 
00079 
00080 
00081     private:
00082       bool        __debug;               
00083       bool        __properties;          
00084       string      __tracking_name;       
00085       string      __required_channel;    
00086       ana_event * __event;               
00087       tof_tools   __tof_tools;           
00088 
00090     public:
00091 
00092       tof_eMgN_measurement (); 
00093       tof_eMgN_measurement (bool debug_); 
00094 
00095       virtual ~tof_eMgN_measurement (); //the default destructor
00096 
00097     public:
00098       void set_debug   ( bool debug_ );                      
00099       void set_ECorr   ( bool energy_loss_ );                
00100       void set_TimeErr ( bool timeerr_ );                    
00101       void set_LTFluct ( bool fluct_ );                      
00102       void set_properties (bool prop_) {__properties=prop_;} 
00103 
00104       tof_tools& get_tof_tools() {return __tof_tools;}       
00105 
00106       void Set_Simulation(bool simu_)
00107       { __tof_tools.set_simulation(simu_); }
00109       bool is_simulation()
00110       { return __tof_tools.get_simulation(); }
00111 
00112       // ana_event::i_measurement interface:
00113       void do_measurement (ana_event &);      
00114 
00117       // datatools::utils::i_propinit interface:
00118       void init_from (const datatools::utils::properties &); //<! set properties for configuration
00119 
00120       static std::map<int,list<pair<int,double> > > get_internals (const ana_event& ev_, bool eg_, double Pint_, double Pext_); //<! to get information from properties. No more used
00121 
00122       static std::map<int,list<pair<int,double> > > get_externals (const ana_event& ev_, bool eg_, double Pint_, double Pext_); //<! to get information from properties. No more used
00123 
00124     protected:
00125 
00126       void _compute_tof_properties (); 
00127 
00128     };
00129 
00130 } // end of namespace nemo3
00131 
00132 #endif // __N3AnaBase__tof_eMgN_measurement_h
00133 
00134 // end of tof_eMgN_measurement.h