| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

ICalibDataSvc.h

Go to the documentation of this file.
00001 /*
00002  *  ICalibDataSvc.h
00003  *
00004  *  Interface for Calibration Data
00005  *
00006  *  Created by Dan Dwyer on 2008/09/26
00007  */
00008 
00009 #ifndef DATASVC_ICALIBDATASVC_H
00010 #define DATASVC_ICALIBDATASVC_H
00011 
00012 #include "GaudiKernel/IInterface.h"
00013 #include "Conventions/Detectors.h"
00014 #include "Conventions/Electronics.h"
00015 #include "Context/ServiceMode.h"
00016 #include <vector>
00017 
00018 namespace DayaBay {
00019 
00020   // Calibration Data for one PMT
00021   class PmtCalibData {
00022   public:
00023     enum Status_t {
00024       kUnknown       = 0x00,
00025       kGood          = 0x01,
00026       kBadEfficiency = 0x02,
00027       kBadTiming     = 0x04,
00028       kBadGain       = 0x08,      
00029       kBadGainWidth  = 0x10,
00030       kBadPedestal   = 0x20
00031     };
00032     PmtCalibData(){m_status=kUnknown; m_speHigh=0.; m_sigmaSpeHigh=0.; 
00033       m_speLow=0.; m_timeOffset=0.; m_timeSpread=0.; m_efficiency=0.; 
00034       m_prePulseProb=0.; m_afterPulseProb=0.; m_darkRate=0.;}
00035     ~PmtCalibData(){;}
00036   public:
00037     DayaBay::DetectorSensor m_pmtId;  // PMT Sensor ID number
00038     Status_t m_status;       // Status check on the PMT
00039     double m_speHigh;        // Single photoelectron mean ADC value (high gain)
00040     double m_sigmaSpeHigh;   // Single p.e. 1-sigma peak width (high gain)
00041     double m_speLow;         // ADC per P.E. ratio for low gain ADC channel
00042     double m_timeOffset;     // Relative transit time offset
00043     double m_timeSpread;     // Transit time spread
00044     double m_efficiency;     // Relative efficiency
00045     double m_prePulseProb;   // Probability of prepulsing
00046     double m_afterPulseProb; // Probability of afterpulsing
00047     double m_darkRate;       // Dark Rate
00048   };
00049   
00050   //  Calibration Data for one RPC strip
00051   class RpcCalibData {
00052   public:
00053     enum Status_t {
00054       kUnknown      = 0x00,
00055       kGood         = 0x01
00056     };
00057     RpcCalibData(){m_status=kUnknown; m_gain=0.; m_sigmaGain=0.; 
00058       m_timeOffset=0.; m_timeSpread=0.; m_efficiency=0.; m_noiseRate=0.;}
00059     ~RpcCalibData(){;}
00060   public:
00061     DayaBay::RpcSensor m_rpcId;      // RPC Sensor ID number
00062     Status_t m_status;      // RPC strip status
00063     double m_gain;          // Relative gain of rpc strip
00064     double m_sigmaGain;     // 1-sigma variation in pulse size
00065     double m_timeOffset;    // Relative time offset
00066     double m_timeSpread;    // Time spread
00067     double m_efficiency;    // Relative efficiency
00068     double m_noiseRate;     // Single pulse noise rate
00069   };
00070 
00071   // Calibration data for one Front-end electronics channel
00072   class FeeCalibData {
00073   public:
00074     enum Status_t {
00075       kUnknown      = 0x00,
00076       kGood         = 0x01
00077     };
00078     FeeCalibData(){m_status = kUnknown; m_adcThresholdHigh=0.; 
00079       m_adcThresholdLow=0.; m_adcBaselineHigh=0.; m_adcBaselineLow=0.;}
00080     ~FeeCalibData(){;}
00081   public:
00082     DayaBay::FeeChannelId m_channelId;  // Electronics channel ID number
00083     Status_t m_status;         // Channel status
00084     double m_adcThresholdHigh; // Channel threshold, as measured in ~ADC counts
00085     double m_adcThresholdLow;  // Channel threshold, as measured in ~ADC counts
00086     double m_adcBaselineHigh;  // Measured high-gain baseline ADC value
00087     double m_adcBaselineLow;   // Measured low-gain baseline ADC value
00088   };
00089 
00090   // Calibration data for one RPC Front-end electronics channel
00091   class FecCalibData {
00092   public:
00093     enum Status_t {
00094       kUnknown      = 0x00,
00095       kGood         = 0x01
00096     };
00097     FecCalibData(){m_status = kUnknown;}
00098     ~FecCalibData(){;}
00099   public:
00100     DayaBay::FecChannelId m_channelId;  // Electronics channel ID number
00101     Status_t m_status;         // Channel status
00102   };
00103     
00104 }
00105 
00106 // Declaration of the interface ID
00107 static const InterfaceID IID_ICalibDataSvc("ICalibDataSvc",1,0);
00108 
00109 class ICalibDataSvc : virtual public IInterface
00110 {
00111  public:
00112   // Retrieve interface ID
00113   static const InterfaceID& interfaceID(){
00114     return IID_ICalibDataSvc;
00115   }
00116 
00117   // Return the PMT Calibration data
00118   virtual const DayaBay::PmtCalibData* pmtCalibData(
00119                                            const DayaBay::DetectorSensor& pmtId,
00120                                            const ServiceMode& svcMode)= 0;
00121 
00122   // Return the RPC Calibration data
00123   virtual const DayaBay::RpcCalibData* rpcCalibData(
00124                                            const DayaBay::RpcSensor& rpcId,
00125                                            const ServiceMode& svcMode)= 0;
00126 
00127   // Return the FEE Calibration data
00128   virtual const DayaBay::FeeCalibData* feeCalibData(
00129                                          const DayaBay::FeeChannelId& channelId,
00130                                          const ServiceMode& svcMode)= 0;
00131 
00132   // Return the FEC Calibration data
00133   virtual const DayaBay::FecCalibData* fecCalibData(
00134                                          const DayaBay::FecChannelId& channelId,
00135                                          const ServiceMode& svcMode)= 0;
00136 
00137   // Return the array of Calibration data by detector
00138   virtual const std::vector<DayaBay::PmtCalibData>& pmtCalibList(
00139                                            const DayaBay::Detector& detectorId,
00140                                            const ServiceMode& svcMode)= 0;
00141 
00142   // Return the array of Calibration data by detector
00143   virtual const std::vector<DayaBay::RpcCalibData>& rpcCalibList(
00144                                            const DayaBay::Detector& detectorId,
00145                                            const ServiceMode& svcMode)= 0;
00146 
00147   // Return the array of Calibration data by detector
00148   virtual const std::vector<DayaBay::FeeCalibData>& feeCalibList(
00149                                            const DayaBay::Detector& detectorId,
00150                                            const ServiceMode& svcMode)= 0;
00151 
00152   // Return the array of Calibration data by detector
00153   virtual const std::vector<DayaBay::FecCalibData>& fecCalibList(
00154                                            const DayaBay::Detector& detectorId,
00155                                            const ServiceMode& svcMode)= 0;
00156 
00157 };
00158 
00159 #endif  // DATASVC_ICALIBDATASVC_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:21:03 2011 for DataSvc by doxygen 1.4.7