00001 #ifndef DTPerformance_H
00002 #define DTPerformance_H
00003
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "CondFormats/DTObjects/interface/DTTimeUnits.h"
00023 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
00024
00025
00026
00027
00028 #include <string>
00029 #include <vector>
00030
00031
00032
00033
00034
00035 class DTPerformanceId {
00036
00037 public:
00038
00039 DTPerformanceId();
00040 ~DTPerformanceId();
00041
00042 int wheelId;
00043 int stationId;
00044 int sectorId;
00045 int slId;
00046
00047 };
00048
00049
00050 class DTPerformanceData {
00051
00052 public:
00053
00054 DTPerformanceData();
00055 ~DTPerformanceData();
00056
00057 float meanT0;
00058 float meanTtrig;
00059 float meanMtime;
00060 float meanNoise;
00061 float meanAfterPulse;
00062 float meanResolution;
00063 float meanEfficiency;
00064
00065 };
00066
00067
00068 class DTPerformance {
00069
00070 public:
00071
00074 DTPerformance();
00075 DTPerformance( const std::string& version );
00076
00079 ~DTPerformance();
00080
00083
00084 int slPerformance( int wheelId,
00085 int stationId,
00086 int sectorId,
00087 int slId,
00088 float& meanT0,
00089 float& meanTtrig,
00090 float& meanMtime,
00091 float& meanNoise,
00092 float& meanAfterPulse,
00093 float& meanResolution,
00094 float& meanEfficiency,
00095 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00096 { return get( wheelId, stationId, sectorId, slId,
00097 meanT0, meanTtrig, meanMtime, meanNoise, meanAfterPulse,
00098 meanResolution, meanEfficiency, unit ); };
00099 int slPerformance( const DTSuperLayerId& id,
00100 float& meanT0,
00101 float& meanTtrig,
00102 float& meanMtime,
00103 float& meanNoise,
00104 float& meanAfterPulse,
00105 float& meanResolution,
00106 float& meanEfficiency,
00107 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00108 { return get( id,
00109 meanT0, meanTtrig, meanMtime, meanNoise, meanAfterPulse,
00110 meanResolution, meanEfficiency, unit ); };
00111 int get( int wheelId,
00112 int stationId,
00113 int sectorId,
00114 int slId,
00115 float& meanT0,
00116 float& meanTtrig,
00117 float& meanMtime,
00118 float& meanNoise,
00119 float& meanAfterPulse,
00120 float& meanResolution,
00121 float& meanEfficiency,
00122 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00123 int get( const DTSuperLayerId& id,
00124 float& meanT0,
00125 float& meanTtrig,
00126 float& meanMtime,
00127 float& meanNoise,
00128 float& meanAfterPulse,
00129 float& meanResolution,
00130 float& meanEfficiency,
00131 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00132 float unit() const;
00133
00135 const
00136 std::string& version() const;
00137 std::string& version();
00138
00140 void clear();
00141
00142 int setSLPerformance( int wheelId,
00143 int stationId,
00144 int sectorId,
00145 int slId,
00146 float meanT0,
00147 float meanTtrig,
00148 float meanMtime,
00149 float meanNoise,
00150 float meanAfterPulse,
00151 float meanResolution,
00152 float meanEfficiency,
00153 DTTimeUnits::type unit = DTTimeUnits::counts )
00154 { return set( wheelId, stationId, sectorId, slId,
00155 meanT0, meanTtrig, meanMtime, meanNoise, meanAfterPulse,
00156 meanResolution, meanEfficiency, unit ); };
00157 int setSLPerformance( const DTSuperLayerId& id,
00158 float meanT0,
00159 float meanTtrig,
00160 float meanMtime,
00161 float meanNoise,
00162 float meanAfterPulse,
00163 float meanResolution,
00164 float meanEfficiency,
00165 DTTimeUnits::type unit = DTTimeUnits::counts )
00166 { return set( id,
00167 meanT0, meanTtrig, meanMtime, meanNoise, meanAfterPulse,
00168 meanResolution, meanEfficiency, unit ); };
00169 int set( int wheelId,
00170 int stationId,
00171 int sectorId,
00172 int slId,
00173 float meanT0,
00174 float meanTtrig,
00175 float meanMtime,
00176 float meanNoise,
00177 float meanAfterPulse,
00178 float meanResolution,
00179 float meanEfficiency,
00180 DTTimeUnits::type unit = DTTimeUnits::counts );
00181 int set( const DTSuperLayerId& id,
00182 float meanT0,
00183 float meanTtrig,
00184 float meanMtime,
00185 float meanNoise,
00186 float meanAfterPulse,
00187 float meanResolution,
00188 float meanEfficiency,
00189 DTTimeUnits::type unit = DTTimeUnits::counts );
00190 void setUnit( float unit );
00191
00193 typedef std::vector< std::pair<DTPerformanceId,
00194 DTPerformanceData> >::const_iterator
00195 const_iterator;
00196 const_iterator begin() const;
00197 const_iterator end() const;
00198
00199 private:
00200
00201 std::string dataVersion;
00202 float nsPerCount;
00203
00204 std::vector< std::pair<DTPerformanceId,DTPerformanceData> > dataList;
00205
00207 void cacheMap() const;
00208 std::string mapName() const;
00209
00210 };
00211
00212
00213 #endif // DTPerformance_H
00214