Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:41

0001 #ifndef SiStripBackPlaneCorrection_h
0002 #define SiStripBackPlaneCorrection_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  * Author: Loic Quertenmont.  THis class is adapted from SiStripLorentzAngle
0015  * Stores the lorentz angle value for all DetIds. <br>
0016  * The values are saved internally in a std::map<detid, float backPlaneCorrection>. <br>
0017  * It can be filled either by the complete map (putBackPlaneCorrections) or passing
0018  * a single detIds and lorentzAngles (putBackPlaneCorrection). <br>
0019  * In the same way getBackPlaneCorrections returns the complete map, while getBackPlaneCorrection
0020  * the value corresponding to a given DetId. <br>
0021  * The printDebug method prints BackPlaneCorrections for all detIds. <br>
0022  * The printSummary mehtod uses the SiStripDetSummary class to produce a summary
0023  * of BackPlaneCorrection values divided by subdetector and layer/disk.
0024  */
0025 
0026 // class SiStripBackPlaneCorrection : public SiStripBaseObject
0027 class SiStripBackPlaneCorrection {
0028 public:
0029   SiStripBackPlaneCorrection() {}
0030   ~SiStripBackPlaneCorrection() {}
0031 
0032   inline void putLorentsAngles(std::map<unsigned int, float>& BPC) { m_BPC = BPC; }
0033   inline const std::map<unsigned int, float>& getBackPlaneCorrections() const { return m_BPC; }
0034 
0035   bool putBackPlaneCorrection(const uint32_t&, float);
0036   float getBackPlaneCorrection(const uint32_t&) const;
0037 
0038   /// Prints BackPlaneCorrections for all detIds.
0039   void printDebug(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
0040   /// Prints the mean value of the BackPlaneCorrection divided by subdetector, layer and mono/stereo.
0041   void printSummary(std::stringstream& ss, const TrackerTopology* trackerTopo) const;
0042 
0043 private:
0044   std::map<unsigned int, float> m_BPC;
0045 
0046   COND_SERIALIZABLE;
0047 };
0048 
0049 #endif