All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
include/N3AnaBase/cuts/track_scin_association_cut.h
00001 // track_scin_association_cut.h
00002 
00003 #ifndef __N3AnaBase__track_scin_association_cut_h
00004 #define __N3AnaBase__track_scin_association_cut_h 1
00005 
00006 #include <cstdlib>
00007 #include <iostream>
00008 #include <limits>
00009 #include <string>
00010 #include <sstream>
00011 #include <stdexcept>
00012 
00013 #include <boost/numeric/interval.hpp>
00014 
00015 #include <N3AnaBase/cuts/i_ana_event_cut.h>
00016 
00017 using namespace std;
00018 
00019 namespace nemo3 {
00020 
00021   class track_scin_association_cut : public nemo3::i_ana_event_cut
00022     {
00023     public:
00024       enum mode_t
00025         {
00026           MODE_EACH      = 0,
00027           MODE_MULTIPLE  = 1,
00028           MODE_MORE_THAN = 2,
00029           MODE_LESS_THAN = 3,
00030           MODE_INVALID   = -1
00031         };
00032 
00033       static int get_mode_from_label (const std::string & label_);
00034 
00035       static std::string get_label_from_mode (int mode_);
00036 
00037       static bool is_mode_valid (int mode_);
00038 
00039 
00040     private:
00041       bool    __debug;
00042       int     __mode;
00043       int     __number_of_tracks;
00044       string  __tracking_name;
00045 
00046     public:
00047       
00048       bool is_mode_each () const;
00049 
00050       bool is_mode_multiple () const;
00051    
00052       bool is_mode_more_than () const;
00053 
00054       bool is_mode_less_than () const;
00055 
00056       track_scin_association_cut (bool debug_ = false); // default ctor
00057 
00058       virtual ~track_scin_association_cut (); // dtor
00059 
00060       void set (int mode_, int nb_track_, const string & tracking_name_ = "");
00061 
00062  
00063    public:
00064 
00065       bool is_debug () const;
00066 
00067       void set_debug (bool);
00068 
00069       void dump (std::ostream & out_ = std::clog) const;
00070 
00071     public:
00072       bool accept (); 
00073 
00074     protected:
00075       virtual void __prepare_cut ();
00076 
00077 
00078     // used by the cuts' factory stuff:
00079     private:
00080       static creator_registration<track_scin_association_cut> __CR;
00081 
00082     public:
00083 
00084       static const std::string CUT_ID;
00085 
00086       virtual std::string cut_id () const;
00087 
00088       virtual cut_creator_t cut_creator () const;
00089 
00090       static nemo3::i_ana_event_cut * create (const nemocuts::ICutFactory::cut_properties_t & cut_properties_);
00091 
00092     };
00093 
00094 } // end of namespace nemo3 
00095 
00096 #endif /* __N3AnaBase_energy__cut_h */