/// Class to get a decent gas analysis measurements /// at a particular time. Uses averaging over /// several measurements to help reduce any /// noise effects. /// Blair Jamieson (C) 2009, 2010 #ifndef TTPCGasSmooth_hxx__ #define TTPCGasSmooth_hxx__ #include "ITPCGas.hxx" #include "IAvgRMSPlot.hxx" #include #include /// Class to get a decent gas analysis measurement /// at a particular time. Uses averaging over /// several measurements to help reduce any /// noise effects. /// Blair Jamieson (C) 2009, 2010 class ITPCGasSmooth { public: ITPCGasSmooth( long autmin, long autmax, int dtaverage = 3600 ); ITPCGasSmooth( int ayearmin, int amonthmin, int adaymin, int ahourmin, int aminmin, int asecmin, int ayearmax, int amonthmax, int adaymax, int ahourmax, int aminmax, int asecmax, int dtaverage = 3600); /// Get the averaged temperature at atime for itpc float T( long atime ){ if ( atime > fTimeMin && atime < fTimeMax ){ for (unsigned int i=0; i atime ) return fTAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::TTPC> time or tpc outside of range"< fTimeMin && atime < fTimeMax ){ for (unsigned int i=0; i atime ) { return fPAvg[i].fmean; } } } std::cout<<"ITPCGasSmooth::P> time outside of range"< fTimeMin && atime < fTimeMax ){ for (unsigned int i=0; i atime ) { return fDensAvg[i].fmean; } } } std::cout<<"ITPCGasSmooth::Density> time outside of range"< atime ) { return fH2OAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::H2O> time outside of range"< atime ) { return fO2Avg[i].fmean; } } std::cout<<"ITPCGasSmooth::O2> time outside of range"< atime ) { return fIbuMonAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::IbuMon> time outside of range"< atime ) { return fCO2Avg[i].fmean; } } std::cout<<"ITPCGasSmooth::CO2> time outside of range"< atime ) { return fCF4Avg[i].fmean; } } std::cout<<"ITPCGasSmooth::CF4> time outside of range"< atime ) { return fVdInAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::VdIn> time outside of range"< atime ) { return fVdOutAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::VdOut> time outside of range"< atime ) { return fGainInAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::GainIn> time outside of range"< atime ) { return fGainOutAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::GainOut> time outside of range"< atime ) { return fArFracAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::ArFrac> time outside of range"< atime ) { return fCF4FracAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::CF4Frac> time outside of range"< atime ) { return fIbuFracAvg[i].fmean; } } std::cout<<"ITPCGasSmooth::IbuFrac> time outside of range"< fTimes; std::vector< IAvgRMSPlot > fTAvg ; ///< O2 Analyzer temperature std::vector< IAvgRMSPlot > fPAvg ; ///< Atmospheric pressure std::vector< IAvgRMSPlot > fDensAvg ; ///< Density (mbar/K) std::vector< IAvgRMSPlot > fH2OAvg ; ///< H2O in ~ppm std::vector< IAvgRMSPlot > fO2Avg ; ///< Inner volume O2 in ppm std::vector< IAvgRMSPlot > fIbuMonAvg ; ///< Isobutane % from safety monitor std::vector< IAvgRMSPlot > fCO2Avg ; ///< CO2 ppm from MGA3000 (crap) std::vector< IAvgRMSPlot > fCF4Avg ; ///< CF4 % from MGA3000 (fine but offset) std::vector< IAvgRMSPlot > fVdInAvg ; ///< Drift speed of input gas ( cm / microseconds ) std::vector< IAvgRMSPlot > fVdOutAvg ; ///< Drift speed of return gas ( cm / microseconds ) std::vector< IAvgRMSPlot > fGainInAvg ; ///< Gain of input gas std::vector< IAvgRMSPlot > fGainOutAvg ; ///< Drift speed of return gas std::vector< IAvgRMSPlot > fArFracAvg ; ///< Argon flow () std::vector< IAvgRMSPlot > fCF4FracAvg ; ///< CF4 flow () std::vector< IAvgRMSPlot > fIbuFracAvg ; ///< isobutane flow () // Initialize values for later lookup void Init(); // Make some plots of the averaged quantities during initialization IAvgRMSPlot fT ; ///< Tpc temperature (degC) IAvgRMSPlot fP ; ///< Pressure of inner volume (mbar) IAvgRMSPlot fDens; ///< Density (mbar/K) IAvgRMSPlot fH2O ; ///< H2O in ~ppm IAvgRMSPlot fO2 ; ///< Inner volume O2 in ppm IAvgRMSPlot fIbuMon ; ///< Isobutane % from safety monitor IAvgRMSPlot fCO2 ; ///< CO2 ppm from MGA3000 (crap) IAvgRMSPlot fCF4 ; ///< CF4 % from MGA3000 (fine but offset) IAvgRMSPlot fVdIn ; ///< Drift speed of input gas ( cm / microseconds ) IAvgRMSPlot fVdOut ; ///< Drift speed of return gas ( cm / microseconds ) IAvgRMSPlot fGainIn ; ///< Gain of input gas IAvgRMSPlot fGainOut; ///< Drift speed of return gas IAvgRMSPlot fArFrac ; ///< Argon flow () IAvgRMSPlot fCF4Frac; ///< CF4 flow () IAvgRMSPlot fIbuFrac; ///< isobutane flow () }; #endif