Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondFormats_EcalObjects_EcalMustacheSCParameters_h
0002 #define CondFormats_EcalObjects_EcalMustacheSCParameters_h
0003 
0004 #include <iostream>
0005 #include <vector>
0006 
0007 #include "CondFormats/Serialization/interface/Serializable.h"
0008 
0009 namespace reco {
0010   class MustacheSCParametersHelper;
0011 }  // namespace reco
0012 
0013 class EcalMustacheSCParameters {
0014 public:
0015   EcalMustacheSCParameters(){};
0016   virtual ~EcalMustacheSCParameters() = default;
0017 
0018   struct ParabolaParameters {
0019     double log10EMin;
0020     double etaMin;
0021     std::vector<double> pUp;
0022     std::vector<double> pLow;
0023     std::vector<double> w0Up;
0024     std::vector<double> w1Up;
0025     std::vector<double> w0Low;
0026     std::vector<double> w1Low;
0027 
0028     COND_SERIALIZABLE;
0029   };
0030 
0031   float sqrtLogClustETuning() const;
0032 
0033   const ParabolaParameters* parabolaParameters(float log10ClustE, float absSeedEta) const;
0034 
0035   // helper class to set parameters
0036   friend class reco::MustacheSCParametersHelper;
0037 
0038   // print parameters to stream:
0039   void print(std::ostream&) const;
0040   friend std::ostream& operator<<(std::ostream& out, const EcalMustacheSCParameters& params) {
0041     params.print(out);
0042     return out;
0043   }
0044 
0045 protected:
0046   float sqrtLogClustETuning_;
0047 
0048   // collection is expected to be sorted in ascending ParabolaParameters.log10EMin and ascending ParabolaParameters.etaMax
0049   std::vector<ParabolaParameters> parabolaParametersCollection_;
0050 
0051   COND_SERIALIZABLE;
0052 };
0053 
0054 #endif