MMultiplicity.hh

Go to the documentation of this file.
00001 #ifndef _M_MULTIPLICITY_HH_
00002 #define _M_MULTIPLICITY_HH_
00003 
00039 #include "QModule.hh"
00040 #include <vector>
00041 #include <string>
00042 
00043 class event 
00044 {
00045         public:
00046                 event(const QEvent *ev);
00047 //                               bool operator<( const event& rhs ) const; // energy comparison operator
00048                 int EventNumber;
00049                 double Time;
00050                 int Channel;
00051                 double Energy; // keV
00052                 bool UseForCoincidence; // Does the event pass cuts?
00053                 int Multiplicity;
00054                 int OrderInMultiple;
00055                 int FirstEventInMultiple;
00056                 double TotalEnergy; // Total energy of multiplet
00057 };
00058 
00059 inline bool EnergyComparison (event* e1, event* e2) { return (e1->Energy > e2->Energy); }
00060 
00061 
00062 class MMultiplicity : public QModule {
00063 
00064     public:
00066         MMultiplicity(QSequence* s);
00067 
00069         ~MMultiplicity();
00070 
00072         void Init();
00073 
00075         QEvent* Do(QEvent* ev);
00076 
00078         void Done();
00079     private:
00080                  
00081                  std::vector<event> fEvents;
00082                  double fCoincidenceWindow; // coincidence window in seconds
00083                  bool fOrderMultipletByEnergy; // order by energy or time
00084                  int fEventIndex;
00085                  int fnEvents;
00086                  std::string fPrefix;
00087                  
00088 //               bool TimeComparison (event e1,event e2) { return (e1.Time < e2.Time); }
00089                 
00090 
00091 
00092 };
00093 
00094 #endif
00095 

Generated on Tue Nov 16 10:49:57 2010 for CUORE Software by  doxygen 1.5.6