/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

QMLFTool.h
Go to the documentation of this file.
00001 
00017 #ifndef QMLFTOOL_H
00018 #define QMLFTOOL_H 1
00019 
00020 #include "OpPara.h"
00021 #include "GeomPara.h"
00022 #include "Context/ServiceMode.h"
00023 #include "GaudiAlg/GaudiTool.h"
00024 #include "ReconAlg/IReconTool.h"
00025 
00026 namespace DayaBay {
00027     class CalibReadoutPmtCrate;
00028     class PmtCalibData;
00029 }
00030 
00031 class IPmtGeomInfoSvc;
00032 class ICalibDataSvc;
00033 
00034 class QMLFTool : public GaudiTool, virtual public IReconTool
00035 {
00036     private :
00037 
00038         static QMLFTool* current_instance;
00039         static void NCLL_FCN(int& npar, double* grad, double& fval, double* xval, int iflag);
00040 
00041     public :
00042 
00043         QMLFTool(const std::string& type,
00044                  const std::string& name,
00045                  const IInterface* parent);
00046 
00047         virtual ~QMLFTool();
00048 
00049         virtual StatusCode initialize();
00050         virtual StatusCode finalize();
00051 
00052         virtual StatusCode reconstruct(const DayaBay::CalibReadout&,
00053                                        DayaBay::RecTrigger&);
00054 
00055     private :
00056 
00057         void ncll_fcn(int& npar, double* grad, double& fval, double* xval, int iflag);
00058 
00059         void getOpPara();
00060         void getGeomPara();
00061         void getPmtEff();
00062 
00063         void printPara();
00064 
00065         template<typename MType>
00066         double meanOpticalPara(const std::string& location, const std::string& type);
00067 
00068     private :
00069 
00070         // different recon mode
00071         // 1 : not consider charge smearing
00072         // others : take charge smearing (S.P.E spectrum) into account
00073         int           m_LLFMode;
00074 
00075         // A flag that whether to add time likelihood or not
00076         // if false: not to add; if true: add. Default is false.
00077         bool          m_addTimeLLF;
00078 
00079         // If add time likelihood, the charge cut for PMTs selection criteria
00080         // It is useful when m_addTimeLLF=1
00081         double        m_pmtChgCut;
00082 
00083         // Limits of the TDC cut to get rid of noise
00084         float         m_timeCutLow;
00085         float         m_timeCutHigh;
00086 
00087         // Pmt Geometry Information Service
00088         IPmtGeomInfoSvc* m_pmtGeomSvc;
00089         // Pmt CalibData Information Service
00090         ICalibDataSvc*   m_pmtCalibDataSvc;
00091 
00092         // Optional response curve, optical and geometry parameters for reconstruction
00093         OpPara        m_opPara;
00094         GeomPara      m_geomPara;
00095 
00096         // Local variables
00097         const DayaBay::CalibReadoutPmtCrate* m_calibCrate;
00098 
00099         const DayaBay::PmtCalibData*  m_vPmtData[192];
00100         unsigned int  m_chgLLFUsedPMTs[192];
00101         double        m_obsq[192];
00102         double        m_pmtEff[8][192];  //TODO: can be optimized
00103         int           m_ADNo;
00104 
00105         double        m_fixR[192];
00106 
00107         ServiceMode   m_svcMode;
00108 
00109         std::string   m_opLocation;
00110         std::string   m_geomLocation;
00111         std::string   m_src;
00112 
00113         // Property PmtGeomSvcName - Name of the PmtGeom service
00114         std::string   m_pmtGeomSvcName;
00115         // Property CalibDataSvcName - Name of the CalibData service
00116         std::string   m_pmtCalibDataSvcName;
00117 
00118         std::string   m_fixf;
00119 };
00120 
00121 #endif // QMLFTOOL_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:13:25 for AdRec by doxygen 1.7.4