CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( )
inline

Definition at line 15 of file EcalMustacheSCParameters.h.

15 {};
virtual EcalMustacheSCParameters::~EcalMustacheSCParameters ( )
virtualdefault

Member Function Documentation

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

Definition at line 6 of file EcalMustacheSCParameters.cc.

References cuda_std::lower_bound(), parabolaParametersCollection_, submitPVValidationJobs::params, and isotrackApplyRegressor::var.

Referenced by reco::MustacheKernel::inMustache().

7  {
8  // assume the collection is lexicographically sorted in ascending ParabolaParameters.log10EMin and ascending ParabolaParameters.etaMin
9  // find the matching log10EMin value
12  log10ClustE,
14  return params.log10EMin < var;
15  });
16  if (it1 != parabolaParametersCollection_.begin()) {
17  --it1;
18  }
19 
20  // find the matching log10EMin and etaMin entry going only up to the sets matching for log10ClustE
21  const auto vars = std::make_pair(it1->log10EMin, absSeedEta);
22  auto it2 = std::lower_bound(
24  it1 + 1,
25  vars,
26  [](const EcalMustacheSCParameters::ParabolaParameters& params, const std::pair<double, double> vars) {
27  return params.log10EMin < vars.first || params.etaMin < vars.second;
28  });
29 
30  return (it2 != parabolaParametersCollection_.begin()) ? &*(it2 - 1) : nullptr;
31 }
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
std::vector< ParabolaParameters > parabolaParametersCollection_
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
vars
Definition: DeepTauId.cc:164
void EcalMustacheSCParameters::print ( std::ostream &  out) const

Definition at line 33 of file EcalMustacheSCParameters.cc.

References mps_fire::i, parabolaParametersCollection_, submitPVValidationJobs::params, and sqrtLogClustETuning_.

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 51 of file EcalMustacheSCParameters.h.

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

Definition at line 51 of file EcalMustacheSCParameters.h.

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  }
void print(std::ostream &) const
friend class reco::MustacheSCParametersHelper
friend

Definition at line 36 of file EcalMustacheSCParameters.h.

Member Data Documentation

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