Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:59:39

0001 #ifndef TkCommonMode_H
0002 #define TkCommonMode_H
0003 
0004 #include "CalibTracker/SiStripAPVAnalysis/interface/ApvAnalysis.h"
0005 #include "CalibTracker/SiStripAPVAnalysis/interface/TkCommonModeTopology.h"
0006 
0007 #include <vector>
0008 /**
0009  * A common mode class which can work with any common mode topology,
0010  * where the topology refers to the number of strips for which a
0011  * common mode value is calculed (128 or less). Currently quite slow....
0012  */
0013 class TkCommonMode {
0014 public:
0015   virtual ~TkCommonMode() {}
0016 
0017   virtual TkCommonModeTopology& topology() { return *myTkCommonModeTopology; }
0018   virtual void setTopology(TkCommonModeTopology* in) { myTkCommonModeTopology = in; }
0019 
0020   /** Set the independent CM values in the APV */
0021   void setCommonMode(const std::vector<float>& in) { theCommonMode = in; }
0022   /** Return vector containing all the independent CM values in the APV. */
0023   std::vector<float> returnAsVector() const { return theCommonMode; }
0024   /** Return vector of dimension 128, with CM value on each strip */
0025   std::vector<float> toVector() const;  // This return a full vector, with duplicates...
0026 private:
0027   TkCommonModeTopology* myTkCommonModeTopology;
0028   std::vector<float> theCommonMode;
0029 };
0030 
0031 #endif