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

In This Package:

QsumEnergyTool.h
Go to the documentation of this file.
00001 
00008 #ifndef QSUMENERGYTOOL_H
00009 #define QSUMENERGYTOOL_H 1
00010 
00011 
00012 #include "ReconAlg/IReconTool.h"
00013 #include "GaudiAlg/GaudiTool.h"
00014 
00015 #include <cmath>
00016 #include <cstdio>
00017 #include "TFile.h"
00018 #include "TH2D.h"
00019 #include "TF1.h"
00020 
00021 
00022 namespace DayaBay{
00023   class CalibReadout;
00024   class RecTrigger;
00025 }
00026 
00027 class ICableSvc;
00028 class IDetCalibSvc;
00029 
00030 
00031 class Corrector {
00032  public:
00033   Corrector(const char* fname);
00034   ~Corrector();
00035   double get_corr(int site, int detid, double x, double y, double z);
00036  private:
00037   TFile* infile;
00038   TH2D* resp_r2z[8];
00039   TF1* resp_phi[8];
00040   int get_ad(int site, int detid);
00041 };
00042 
00043 
00044 
00045 class QsumEnergyTool : public GaudiTool , virtual public IReconTool
00046 {
00047 public:  
00048   
00049     QsumEnergyTool(const std::string& type,
00050                    const std::string& name,
00051                    const IInterface* parent);
00052                  
00053     virtual ~QsumEnergyTool();
00054     
00055     virtual StatusCode reconstruct(const DayaBay::CalibReadout& readout,
00056                                    DayaBay::RecTrigger& recTrigger);
00057     virtual StatusCode initialize();
00058     virtual StatusCode finalize();
00059 
00060  private:
00061 
00062     // Property CableSvcName - Name of the cable service
00063     std::string m_cableSvcName;
00064 
00065     // CableSvc
00066     ICableSvc* m_cableSvc;
00067    
00068     //Name of Det calib service name
00069     std::string m_recDataSvcName;
00070 
00071     // Energy calibration data Service
00072     IDetCalibSvc* m_recDataSvc;
00073 
00074     //Position dependent correction
00075     //    double uniformCorr(double reco_x, double reco_y, double reco_z);
00076 
00077     //Position dependent correction
00078     //    double uniformCorrMC(double reco_x, double reco_y, double reco_z);
00079 
00080     //Uniformity correction
00081     bool m_useUniformityCorrection;
00082 
00083     //Task (use 0 for Co60 and 1 for Spallation Neutrons)
00084     int m_task_es;
00085 
00086     //Number of printout messages
00087     int nodb_count;
00088 
00089     std::string m_calibStatsLocation;
00090 
00091     std::string m_chargeLeaveName;
00092 
00093     std::string m_uniformityCorrFileName;
00094 
00095     std::string m_uniformityCorrFileNameMC;
00096 
00097     Corrector * m_corrector;
00098 
00099     Corrector * m_corrector_mc;
00100 
00101     
00102 };
00103 
00104 
00105 #endif // QSUMENERGYTOOL_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:13:18 for QsumEnergy by doxygen 1.7.4