Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:47:39

0001 #ifndef SiStripLorentzAngle_h
0002 #define SiStripLorentzAngle_h
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 
0006 #include <vector>
0007 #include <map>
0008 #include <iostream>
0009 // #include "CondFormats/SiStripObjects/interface/SiStripBaseObject.h"
0010 #include "CondFormats/SiStripObjects/interface/SiStripDetSummary.h"
0011 #include <cstdint>
0012 
0013 /**
0014  * Stores the lorentz angle value for all DetIds. <br>
0015  * The values are saved internally in a std::map<detid, lorentzAngle>. <br>
0016  * It can be filled either by the complete map (putLorentzAngles) or passing
0017  * a single detIds and lorentzAngles (putLorentzAngle). <br>
0018  * In the same way getLorentzAngles returns the complete map, while getLorentzAngle
0019  * the value corresponding to a given DetId. <br>
0020  * The printDebug method prints LorentzAngles for all detIds. <br>
0021  * The printSummary mehtod uses the SiStripDetSummary class to produce a summary
0022  * of LorentzAngle values divided by subdetector and layer/disk.
0023  */
0024 
0025 // class SiStripLorentzAngle : public SiStripBaseObject
0026 class SiStripLorentzAngle {
0027 public:
0028   SiStripLorentzAngle(){};
0029   ~SiStripLorentzAngle(){};
0030 
0031   inline void putLorentsAngles(std::map<unsigned int, float>& LA) { m_LA = LA; }
0032   inline const std::map<unsigned int, float>& getLorentzAngles() const { return m_LA; }
0033 
0034   bool putLorentzAngle(const uint32_t&, float);
0035   float getLorentzAngle(const uint32_t&) const;
0036 
0037   /// Prints LorentzAngles for all detIds.
0038   void printDebug(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
0039   /// Prints the mean value of the LorentzAngle divided by subdetector, layer and mono/stereo.
0040   void printSummary(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
0041 
0042 private:
0043   std::map<unsigned int, float> m_LA;
0044 
0045   COND_SERIALIZABLE;
0046 };
0047 
0048 #endif