Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:06

0001 #ifndef CondFormats_DTObjects_DTRecoUncertainties_H
0002 #define CondFormats_DTObjects_DTRecoUncertainties_H
0003 
0004 /** \class DTRecoUncertainties
0005  *  DB object for storing DT hit uncertatinties.
0006  *
0007  *  \author G. Cerminara - CERN
0008  */
0009 
0010 #include "CondFormats/Serialization/interface/Serializable.h"
0011 
0012 #include <map>
0013 #include <vector>
0014 #include <string>
0015 #include <cstdint>
0016 
0017 class DTWireId;
0018 
0019 class DTRecoUncertainties {
0020 public:
0021   /// Constructor
0022   DTRecoUncertainties();
0023 
0024   /// Destructor
0025   virtual ~DTRecoUncertainties();
0026 
0027   void setVersion(int version) { theVersion = version; }
0028 
0029   /// Label specifying the structure of the payload; currently supported:
0030   /// "uniformPerStep" (uniform uncertainties per SL and step; index 0-3 = uncertainties for steps 1-4 in cm)
0031   int version() const { return theVersion; }
0032 
0033   /// get the uncertainties for the SL correspoding to the given WireId and for the correct step as defined by the algorithm
0034   float get(const DTWireId& wireid, unsigned int index) const;
0035 
0036   /// fills the map
0037   void set(const DTWireId& wireid, const std::vector<float>& values);
0038 
0039   /// Access methods to data
0040   typedef std::map<uint32_t, std::vector<float> >::const_iterator const_iterator;
0041   const_iterator begin() const;
0042   const_iterator end() const;
0043 
0044 private:
0045   // map of uncertainties per SL Id. The position in the vector depends on
0046   // version() as it depends on the Reco algorithm being used.
0047   std::map<uint32_t, std::vector<float> > payload;
0048 
0049   int theVersion;
0050 
0051   COND_SERIALIZABLE;
0052 };
0053 #endif