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
00048 int EventNumber;
00049 double Time;
00050 int Channel;
00051 double Energy;
00052 bool UseForCoincidence;
00053 int Multiplicity;
00054 int OrderInMultiple;
00055 int FirstEventInMultiple;
00056 double TotalEnergy;
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;
00083 bool fOrderMultipletByEnergy;
00084 int fEventIndex;
00085 int fnEvents;
00086 std::string fPrefix;
00087
00088
00089
00090
00091
00092 };
00093
00094 #endif
00095