CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CondFormats/DTObjects/interface/DTPerformance.h

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