Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:46:53

0001 #ifndef CondFormats_EcalObjects_EcalWeightSet_HH
0002 #define CondFormats_EcalObjects_EcalWeightSet_HH
0003 /**
0004  * Author: Shahram Rahatlou, University of Rome & INFN
0005  * Container persistent object
0006  *  all weight objects needed to compute the pulse shape 
0007  *  with the weight method should go in this container
0008  *
0009  **/
0010 
0011 #include "CondFormats/Serialization/interface/Serializable.h"
0012 
0013 #include "CondFormats/EcalObjects/interface/EcalWeight.h"
0014 #include "DataFormats/Math/interface/Matrix.h"
0015 #include <iostream>
0016 
0017 class EcalWeightSet {
0018 public:
0019   typedef math::Matrix<3, 10>::type EcalWeightMatrix;
0020   typedef math::Matrix<10, 10>::type EcalChi2WeightMatrix;
0021 
0022   EcalWeightSet();
0023   EcalWeightSet(const EcalWeightSet& aset);
0024   ~EcalWeightSet();
0025 
0026   EcalWeightMatrix& getWeightsBeforeGainSwitch() { return wgtBeforeSwitch_; }
0027   EcalWeightMatrix& getWeightsAfterGainSwitch() { return wgtAfterSwitch_; }
0028   EcalChi2WeightMatrix& getChi2WeightsBeforeGainSwitch() { return wgtChi2BeforeSwitch_; }
0029   EcalChi2WeightMatrix& getChi2WeightsAfterGainSwitch() { return wgtChi2AfterSwitch_; }
0030 
0031   const EcalWeightMatrix& getWeightsBeforeGainSwitch() const { return wgtBeforeSwitch_; }
0032   const EcalWeightMatrix& getWeightsAfterGainSwitch() const { return wgtAfterSwitch_; }
0033   const EcalChi2WeightMatrix& getChi2WeightsBeforeGainSwitch() const { return wgtChi2BeforeSwitch_; }
0034   const EcalChi2WeightMatrix& getChi2WeightsAfterGainSwitch() const { return wgtChi2AfterSwitch_; }
0035 
0036   EcalWeightSet& operator=(const EcalWeightSet& rhs);
0037 
0038   void print(std::ostream& o) const {
0039     using namespace std;
0040     o << "wgtBeforeSwitch_.: " << wgtBeforeSwitch_ << " wgtAfterSwitch_.: " << wgtAfterSwitch_
0041       << " wgtChi2BeforeSwitch_.: " << wgtChi2BeforeSwitch_ << " wgtChi2AfterSwitch_.: " << wgtChi2AfterSwitch_ << endl;
0042   }
0043 
0044 private:
0045   EcalWeightMatrix wgtBeforeSwitch_;
0046   EcalWeightMatrix wgtAfterSwitch_;
0047   EcalChi2WeightMatrix wgtChi2BeforeSwitch_;
0048   EcalChi2WeightMatrix wgtChi2AfterSwitch_;
0049 
0050   COND_SERIALIZABLE;
0051 };
0052 
0053 #endif