CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Attributes | Private Member Functions | Friends
EcalMustacheSCParameters Class Reference

#include <EcalMustacheSCParameters.h>

Classes

struct  ParabolaParameters
 

Public Member Functions

 EcalMustacheSCParameters ()
 
const ParabolaParametersparabolaParameters (float log10ClustE, float absSeedEta) const
 
void print (std::ostream &) const
 
float sqrtLogClustETuning () const
 
virtual ~EcalMustacheSCParameters ()=default
 

Protected Attributes

std::vector< ParabolaParametersparabolaParametersCollection_
 
float sqrtLogClustETuning_
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
std::ostream & operator<< (std::ostream &out, const EcalMustacheSCParameters &params)
 
class reco::MustacheSCParametersHelper
 

Detailed Description

Definition at line 13 of file EcalMustacheSCParameters.h.

Constructor & Destructor Documentation

◆ EcalMustacheSCParameters()

EcalMustacheSCParameters::EcalMustacheSCParameters ( )
inline

Definition at line 15 of file EcalMustacheSCParameters.h.

15 {};

◆ ~EcalMustacheSCParameters()

virtual EcalMustacheSCParameters::~EcalMustacheSCParameters ( )
virtualdefault

Member Function Documentation

◆ parabolaParameters()

const EcalMustacheSCParameters::ParabolaParameters * EcalMustacheSCParameters::parabolaParameters ( float  log10ClustE,
float  absSeedEta 
) const

Definition at line 5 of file EcalMustacheSCParameters.cc.

6  {
7  // assume the collection is lexicographically sorted in ascending ParabolaParameters.log10EMin and ascending ParabolaParameters.etaMin
8  // find the matching log10EMin value
11  log10ClustE,
13  return params.log10EMin < var;
14  });
15  if (it1 != parabolaParametersCollection_.begin()) {
16  --it1;
17  }
18 
19  // find the matching log10EMin and etaMin entry going only up to the sets matching for log10ClustE
20  const auto vars = std::make_pair(it1->log10EMin, absSeedEta);
21  auto it2 = std::lower_bound(
23  it1 + 1,
24  vars,
25  [](const EcalMustacheSCParameters::ParabolaParameters& params, const std::pair<double, double> vars) {
26  return params.log10EMin < vars.first || params.etaMin < vars.second;
27  });
28 
29  return (it2 != parabolaParametersCollection_.begin()) ? &*(it2 - 1) : nullptr;
30 }

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, parabolaParametersCollection_, CalibrationSummaryClient_cfi::params, and trigObjTnPSource_cfi::var.

◆ print()

void EcalMustacheSCParameters::print ( std::ostream &  out) const

Definition at line 32 of file EcalMustacheSCParameters.cc.

32  {
33  out << "Mustache SC parameters:" << std::endl;
34  out << " sqrtLogClustETuning: " << sqrtLogClustETuning_ << std::endl;
35  out << " Parabola parameters are binned in " << parabolaParametersCollection_.size() << " (log10(E), |eta|) regions."
36  << std::endl;
37  for (const auto& params : parabolaParametersCollection_) {
38  out << " Parameters for log10(E_min)=" << params.log10EMin << " and |eta_min|=" << params.etaMin << ":"
39  << std::endl;
40 
41  out << " pUp:" << std::endl;
42  for (size_t i = 0; i < params.pUp.size(); ++i) {
43  out << " [" << i << "]: " << params.pUp[i] << std::endl;
44  }
45 
46  out << " pLow:" << std::endl;
47  for (size_t i = 0; i < params.pLow.size(); ++i) {
48  out << " [" << i << "]: " << params.pLow[i] << std::endl;
49  }
50 
51  out << " w0Up:" << std::endl;
52  for (size_t i = 0; i < params.w0Up.size(); ++i) {
53  out << " [" << i << "]: " << params.w0Up[i] << std::endl;
54  }
55 
56  out << " w1Up:" << std::endl;
57  for (size_t i = 0; i < params.w1Up.size(); ++i) {
58  out << " [" << i << "]: " << params.w1Up[i] << std::endl;
59  }
60 
61  out << " w0Low:" << std::endl;
62  for (size_t i = 0; i < params.w0Low.size(); ++i) {
63  out << " [" << i << "]: " << params.w0Low[i] << std::endl;
64  }
65 
66  out << " w1Low:" << std::endl;
67  for (size_t i = 0; i < params.w1Low.size(); ++i) {
68  out << " [" << i << "]: " << params.w1Low[i] << std::endl;
69  }
70  }
71 }

References mps_fire::i, MillePedeFileConverter_cfg::out, parabolaParametersCollection_, CalibrationSummaryClient_cfi::params, and sqrtLogClustETuning_.

◆ serialize()

template<class Archive >
void EcalMustacheSCParameters::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ sqrtLogClustETuning()

float EcalMustacheSCParameters::sqrtLogClustETuning ( ) const

Definition at line 3 of file EcalMustacheSCParameters.cc.

3 { return sqrtLogClustETuning_; }

References sqrtLogClustETuning_.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 51 of file EcalMustacheSCParameters.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 51 of file EcalMustacheSCParameters.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const EcalMustacheSCParameters params 
)
friend

Definition at line 40 of file EcalMustacheSCParameters.h.

40  {
41  params.print(out);
42  return out;
43  }

◆ reco::MustacheSCParametersHelper

friend class reco::MustacheSCParametersHelper
friend

Definition at line 36 of file EcalMustacheSCParameters.h.

Member Data Documentation

◆ parabolaParametersCollection_

std::vector<ParabolaParameters> EcalMustacheSCParameters::parabolaParametersCollection_
protected

◆ sqrtLogClustETuning_

float EcalMustacheSCParameters::sqrtLogClustETuning_
protected
mps_fire.i
i
Definition: mps_fire.py:428
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
vars
vars
Definition: DeepTauId.cc:159
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
EcalMustacheSCParameters::sqrtLogClustETuning_
float sqrtLogClustETuning_
Definition: EcalMustacheSCParameters.h:46
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
EcalMustacheSCParameters::parabolaParametersCollection_
std::vector< ParabolaParameters > parabolaParametersCollection_
Definition: EcalMustacheSCParameters.h:49
EcalMustacheSCParameters::ParabolaParameters
Definition: EcalMustacheSCParameters.h:18