MCalCoefficients.hh

Go to the documentation of this file.
00001 
00048 #ifndef _Q_CAL_COEF_H_
00049 #define _Q_CAL_COEF_H_
00050 
00051 #include "QCuore.hh"
00052 #include "QModule.hh"
00053 #include "MCalCoefficients.hh"
00054 #include "QCalPeak.hh"
00055 #include "QVector.hh"
00056 #include <vector>
00057 #include <map>
00058 #include <set>
00059 
00060 class MCalCoefficients : public QModule {
00061   
00062 public:
00063   MCalCoefficients(QSequence* s);
00064   
00065   virtual ~MCalCoefficients();
00066   
00067   // Init method is called before event loop
00068   virtual void Init();
00069   
00070   // Doit method is called for each event, getting the event as argument
00071   virtual QEvent* Do( QEvent* ev);
00072   
00073   // Done method is called after event loop
00074   virtual void Done();
00075 
00076 //  virtual void StoreData(QEvent* ev);
00077 
00078 private:
00080         std::map<int, std::vector<double> > fAmplitudes;
00081 
00083         std::map<int, double> fMaxAmplitude;
00084 
00086         double fMaxEnergy;
00087         double fMinEnergy;
00088 
00090         std::set<int> fRuns;
00091         
00093         std::vector<QCalPeak*> fCalPeaks1;
00094 
00096         std::vector<QCalPeak*> fCalPeaks2;
00097         
00099         TF1* fCalFunction;
00100 
00102         double *fCalFunctionInit;
00103 
00105         std::string fTempFilename;
00106 
00108         std::map<double,double> fChisquares;
00109         std::map<double,double> fReducedChisquares;
00110         
00112         void InitCalPeaks(std::string source);
00113 
00115         bool AutoSeed(int channel, double resolution=-1, int iter=0, double binscale=1);
00116 
00118         double NearestNeighbor(double energy);
00119 };
00120 
00121 std::vector<std::vector<int> > GenerateCombinations(std::vector<int> object, unsigned int r);
00122 std::vector<int> RemoveElements(std::vector<int> objects, unsigned int i) ;
00123 
00124 #endif

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1