CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
metsig::SignAlgoResolutions Class Reference

#include <SignAlgoResolutions.h>

Public Member Functions

void addResolutions (const edm::ParameterSet &iConfig)
 
double eval (const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
 
double eval (const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta) const
 
metsig::SigInputObj evalPF (const reco::PFCandidate *candidate) const
 
metsig::SigInputObj evalPFJet (const reco::Jet *jet) const
 
bool isFilled () const
 
 SignAlgoResolutions ()
 
 SignAlgoResolutions (const edm::ParameterSet &iConfig)
 

Private Types

typedef std::pair
< metsig::resolutionType,
metsig::resolutionFunc
functionCombo
 
typedef std::vector< double > functionPars
 

Private Member Functions

void addfunction (const resolutionType type, const resolutionFunc func, const std::vector< double > &parameters)
 
double ElectronPtResolution (const reco::PFCandidate *c) const
 
double EtFunction (const functionPars &x, const functionPars &par) const
 
double getfunc (const resolutionType &type, const resolutionFunc &func, std::vector< double > &x) const
 
void initializeJetResolutions (const edm::ParameterSet &iConfig)
 
double PFunction (const functionPars &x, const functionPars &par) const
 
double PhiConstFunction (const functionPars &x, const functionPars &par) const
 
double PhiFunction (const functionPars &x, const functionPars &par) const
 

Private Attributes

std::map< functionCombo,
functionPars
functionmap_
 
std::vector< double > jdphi [10]
 
std::vector< double > jdpt [10]
 
PFEnergyResolutionpfresol_
 
JetResolutionphiResol_
 
JetResolutionptResol_
 
double ptResolThreshold_
 

Detailed Description

Definition at line 61 of file SignAlgoResolutions.h.

Member Typedef Documentation

Definition at line 87 of file SignAlgoResolutions.h.

typedef std::vector<double> metsig::SignAlgoResolutions::functionPars
private

Definition at line 88 of file SignAlgoResolutions.h.

Constructor & Destructor Documentation

metsig::SignAlgoResolutions::SignAlgoResolutions ( )
inline

Definition at line 63 of file SignAlgoResolutions.h.

63 : functionmap_() { ; }
std::map< functionCombo, functionPars > functionmap_
metsig::SignAlgoResolutions::SignAlgoResolutions ( const edm::ParameterSet iConfig)

Definition at line 33 of file SignAlgoResolutions.cc.

References addResolutions().

34  : functionmap_(), ptResol_(nullptr), phiResol_(nullptr) {
35  addResolutions(iConfig);
36 }
std::map< functionCombo, functionPars > functionmap_
void addResolutions(const edm::ParameterSet &iConfig)

Member Function Documentation

void metsig::SignAlgoResolutions::addfunction ( const resolutionType  type,
const resolutionFunc  func,
const std::vector< double > &  parameters 
)
private

Definition at line 310 of file SignAlgoResolutions.cc.

312  {
313  functionCombo mypair(type, func);
314  functionmap_[mypair] = parameters;
315 }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
std::map< functionCombo, functionPars > functionmap_
std::pair< metsig::resolutionType, metsig::resolutionFunc > functionCombo
void metsig::SignAlgoResolutions::addResolutions ( const edm::ParameterSet iConfig)

Definition at line 151 of file SignAlgoResolutions.cc.

References metsig::caloEB, metsig::caloEE, metsig::caloHB, metsig::caloHE, metsig::caloHF, metsig::caloHO, metsig::ET, edm::ParameterSet::getParameter(), initializeJetResolutions(), metsig::PFtype1, metsig::PFtype2, metsig::PFtype3, metsig::PFtype4, metsig::PFtype5, metsig::PFtype6, metsig::PFtype7, and metsig::PHI.

Referenced by SignAlgoResolutions().

151  {
152  using namespace std;
153 
154  // Jet Resolutions - for now load from the files. Migrate to EventSetup asap.
156 
157  ptResolThreshold_ = iConfig.getParameter<double>("ptresolthreshold");
158 
159  //get temporary low pT pfjet resolutions
160  for (int ieta = 0; ieta < 10; ieta++) {
161  jdpt[ieta] = iConfig.getParameter<std::vector<double> >(Form("jdpt%d", ieta));
162  jdphi[ieta] = iConfig.getParameter<std::vector<double> >(Form("jdphi%d", ieta));
163  }
164 
165  // for now: do this by hand - this can obviously also be done via ESSource etc.
166  functionPars etparameters(3, 0);
167  functionPars phiparameters(1, 0);
168  // set the parameters per function:
169  // ECAL, BARREL:
170  std::vector<double> ebet = iConfig.getParameter<std::vector<double> >("EB_EtResPar");
171  std::vector<double> ebphi = iConfig.getParameter<std::vector<double> >("EB_PhiResPar");
172 
173  etparameters[0] = ebet[0];
174  etparameters[1] = ebet[1];
175  etparameters[2] = ebet[2];
176  phiparameters[0] = ebphi[0];
177  addfunction(caloEB, ET, etparameters);
178  addfunction(caloEB, PHI, phiparameters);
179  // ECAL, ENDCAP:
180  std::vector<double> eeet = iConfig.getParameter<std::vector<double> >("EE_EtResPar");
181  std::vector<double> eephi = iConfig.getParameter<std::vector<double> >("EE_PhiResPar");
182 
183  etparameters[0] = eeet[0];
184  etparameters[1] = eeet[1];
185  etparameters[2] = eeet[2];
186  phiparameters[0] = eephi[0];
187  addfunction(caloEE, ET, etparameters);
188  addfunction(caloEE, PHI, phiparameters);
189  // HCAL, BARREL:
190  std::vector<double> hbet = iConfig.getParameter<std::vector<double> >("HB_EtResPar");
191  std::vector<double> hbphi = iConfig.getParameter<std::vector<double> >("HB_PhiResPar");
192 
193  etparameters[0] = hbet[0];
194  etparameters[1] = hbet[1];
195  etparameters[2] = hbet[2];
196  phiparameters[0] = hbphi[0];
197  addfunction(caloHB, ET, etparameters);
198  addfunction(caloHB, PHI, phiparameters);
199  // HCAL, ENDCAP:
200  std::vector<double> heet = iConfig.getParameter<std::vector<double> >("HE_EtResPar");
201  std::vector<double> hephi = iConfig.getParameter<std::vector<double> >("HE_PhiResPar");
202 
203  etparameters[0] = heet[0];
204  etparameters[1] = heet[1];
205  etparameters[2] = heet[2];
206  phiparameters[0] = hephi[0];
207  addfunction(caloHE, ET, etparameters);
208  addfunction(caloHE, PHI, phiparameters);
209  // HCAL, Outer
210  std::vector<double> hoet = iConfig.getParameter<std::vector<double> >("HO_EtResPar");
211  std::vector<double> hophi = iConfig.getParameter<std::vector<double> >("HO_PhiResPar");
212 
213  etparameters[0] = hoet[0];
214  etparameters[1] = hoet[1];
215  etparameters[2] = hoet[2];
216  phiparameters[0] = hophi[0];
217  addfunction(caloHO, ET, etparameters);
218  addfunction(caloHO, PHI, phiparameters);
219  // HCAL, Forward
220  std::vector<double> hfet = iConfig.getParameter<std::vector<double> >("HF_EtResPar");
221  std::vector<double> hfphi = iConfig.getParameter<std::vector<double> >("HF_PhiResPar");
222 
223  etparameters[0] = hfet[0];
224  etparameters[1] = hfet[1];
225  etparameters[2] = hfet[2];
226  phiparameters[0] = hfphi[0];
227  addfunction(caloHF, ET, etparameters);
228  addfunction(caloHF, PHI, phiparameters);
229 
230  // PF objects:
231  // type 1:
232  std::vector<double> pf1et = iConfig.getParameter<std::vector<double> >("PF_EtResType1");
233  std::vector<double> pf1phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType1");
234  etparameters[0] = pf1et[0];
235  etparameters[1] = pf1et[1];
236  etparameters[2] = pf1et[2];
237  phiparameters[0] = pf1phi[0];
238  addfunction(PFtype1, ET, etparameters);
239  addfunction(PFtype1, PHI, phiparameters);
240 
241  // PF objects:
242  // type 2:
243  std::vector<double> pf2et = iConfig.getParameter<std::vector<double> >("PF_EtResType2");
244  std::vector<double> pf2phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType2");
245  etparameters[0] = pf2et[0];
246  etparameters[1] = pf2et[1];
247  etparameters[2] = pf2et[2];
248  phiparameters[0] = pf2phi[0];
249  addfunction(PFtype2, ET, etparameters);
250  addfunction(PFtype2, PHI, phiparameters);
251 
252  // PF objects:
253  // type 3:
254  std::vector<double> pf3et = iConfig.getParameter<std::vector<double> >("PF_EtResType3");
255  std::vector<double> pf3phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType3");
256  etparameters[0] = pf3et[0];
257  etparameters[1] = pf3et[1];
258  etparameters[2] = pf3et[2];
259  phiparameters[0] = pf3phi[0];
260  addfunction(PFtype3, ET, etparameters);
261  addfunction(PFtype3, PHI, phiparameters);
262 
263  // PF objects:
264  // type 4:
265  std::vector<double> pf4et = iConfig.getParameter<std::vector<double> >("PF_EtResType4");
266  std::vector<double> pf4phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType4");
267  etparameters[0] = pf4et[0];
268  etparameters[1] = pf4et[1];
269  etparameters[2] = pf4et[2];
270  //phiparameters[0]=pf4phi[0];
271  addfunction(PFtype4, ET, etparameters);
272  addfunction(PFtype4, PHI, pf4phi); //use the same functional form for photon phi error as for pT, pass whole vector
273 
274  // PF objects:
275  // type 5:
276  std::vector<double> pf5et = iConfig.getParameter<std::vector<double> >("PF_EtResType5");
277  std::vector<double> pf5phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType5");
278  etparameters[0] = pf5et[0];
279  etparameters[1] = pf5et[1];
280  etparameters[2] = pf5et[2];
281  phiparameters[0] = pf5phi[0];
282  addfunction(PFtype5, ET, etparameters);
283  addfunction(PFtype5, PHI, pf5phi);
284 
285  // PF objects:
286  // type 6:
287  std::vector<double> pf6et = iConfig.getParameter<std::vector<double> >("PF_EtResType6");
288  std::vector<double> pf6phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType6");
289  etparameters[0] = pf6et[0];
290  etparameters[1] = pf6et[1];
291  etparameters[2] = pf6et[2];
292  phiparameters[0] = pf6phi[0];
293  addfunction(PFtype6, ET, etparameters);
294  addfunction(PFtype6, PHI, phiparameters);
295 
296  // PF objects:
297  // type 7:
298  std::vector<double> pf7et = iConfig.getParameter<std::vector<double> >("PF_EtResType7");
299  std::vector<double> pf7phi = iConfig.getParameter<std::vector<double> >("PF_PhiResType7");
300  etparameters[0] = pf7et[0];
301  etparameters[1] = pf7et[1];
302  etparameters[2] = pf7et[2];
303  phiparameters[0] = pf7phi[0];
304  addfunction(PFtype7, ET, etparameters);
305  addfunction(PFtype7, PHI, phiparameters);
306 
307  return;
308 }
void addfunction(const resolutionType type, const resolutionFunc func, const std::vector< double > &parameters)
std::vector< double > jdpt[10]
std::vector< double > functionPars
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void initializeJetResolutions(const edm::ParameterSet &iConfig)
std::vector< double > jdphi[10]
double metsig::SignAlgoResolutions::ElectronPtResolution ( const reco::PFCandidate c) const
private

Definition at line 408 of file SignAlgoResolutions.cc.

References relval_parameters_module::energy, reco::LeafCandidate::energy(), PVValHelper::eta, and reco::LeafCandidate::eta().

408  {
409  double eta = c->eta();
410  double energy = c->energy();
411  double dEnergy = pfresol_->getEnergyResolutionEm(energy, eta);
412 
413  return dEnergy / cosh(eta);
414 }
double getEnergyResolutionEm(double CorrectedEnergy, double eta) const
double energy() const final
energy
double eta() const final
momentum pseudorapidity
double metsig::SignAlgoResolutions::EtFunction ( const functionPars x,
const functionPars par 
) const
private

Definition at line 344 of file SignAlgoResolutions.cc.

References mps_fire::result, and mathSSE::sqrt().

344  {
345  if (par.size() < 3)
346  return 0.;
347  if (x.empty())
348  return 0.;
349  double et = x[0];
350  if (et <= 0.)
351  return 0.;
352  double result = et * sqrt((par[2] * par[2]) + (par[1] * par[1] / et) + (par[0] * par[0] / (et * et)));
353  return result;
354 }
tuple result
Definition: mps_fire.py:311
T sqrt(T t)
Definition: SSEVec.h:19
double metsig::SignAlgoResolutions::eval ( const resolutionType type,
const resolutionFunc func,
const double &  et,
const double &  phi,
const double &  eta,
const double &  p 
) const

Definition at line 49 of file SignAlgoResolutions.cc.

References PVValHelper::eta, class-composition::getfunc, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by PFMEtSignInterfaceBase::compResolution().

54  {
55  functionPars x(4);
56  x[0] = et;
57  x[1] = phi;
58  x[2] = eta;
59  x[3] = p;
60  // std::cout << "getting function of type " << type << " " << func << " " << x[0] << " " << x[1] << " " << x[2] << " " << x[3] << std::endl;
61  return getfunc(type, func, x);
62 }
double getfunc(const resolutionType &type, const resolutionFunc &func, std::vector< double > &x) const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
std::vector< double > functionPars
double metsig::SignAlgoResolutions::eval ( const resolutionType type,
const resolutionFunc func,
const double &  et,
const double &  phi,
const double &  eta 
) const

Definition at line 38 of file SignAlgoResolutions.cc.

References funct::exp(), AlCaHLTBitMon_ParallelJobs::p, funct::sin(), and theta().

42  {
43  // derive p from et and eta;
44  double theta = 2 * atan(exp(-eta));
45  double p = et / sin(theta); // rough assumption: take e and p equivalent...
46  return eval(type, func, et, phi, eta, p);
47 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
double eval(const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
metsig::SigInputObj metsig::SignAlgoResolutions::evalPF ( const reco::PFCandidate candidate) const

Definition at line 64 of file SignAlgoResolutions.cc.

References reco::LeafCandidate::energy(), metsig::ET, PVValHelper::eta, reco::LeafCandidate::eta(), edm::Ref< C, T, F >::isNull(), mergeVDriftHistosByStation::name, reco::PFCandidate::particleId(), metsig::PFtype1, metsig::PFtype2, metsig::PFtype3, metsig::PFtype4, metsig::PFtype5, metsig::PFtype6, metsig::PFtype7, metsig::PHI, reco::LeafCandidate::phi(), funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, reco::LeafCandidate::theta(), and reco::PFCandidate::trackRef().

Referenced by PFMEtSignInterfaceBase::compResolution().

64  {
65  double eta = candidate->eta();
66  double phi = candidate->phi();
67  double et = candidate->energy() * sin(candidate->theta());
68  resolutionType thetype;
70  int type = candidate->particleId();
71  switch (type) {
72  case 1:
73  thetype = PFtype1;
74  name = "PFChargedHadron";
75  break;
76  case 2:
77  thetype = PFtype2;
78  name = "PFChargedEM";
79  break;
80  case 3:
81  thetype = PFtype3;
82  name = "PFMuon";
83  break;
84  case 4:
85  thetype = PFtype4;
86  name = "PFNeutralEM";
87  break;
88  case 5:
89  thetype = PFtype5;
90  name = "PFNeutralHadron";
91  break;
92  case 6:
93  thetype = PFtype6;
94  name = "PFtype6";
95  break;
96  case 7:
97  thetype = PFtype7;
98  name = "PFtype7";
99  break;
100  default:
101  thetype = PFtype7;
102  name = "PFunknown";
103  break;
104  }
105 
106  double d_et = 0, d_phi = 0; //d_phi here is the error on phi component of the et
107  reco::TrackRef trackRef = candidate->trackRef();
108  if (!trackRef.isNull()) {
109  d_phi = et * trackRef->phiError();
110  d_et = (type == 2) ? ElectronPtResolution(candidate) : trackRef->ptError();
111  //if(type==2) std::cout << eval(thetype,ET,et,phi,eta) << " " << trackRef->ptError() << " "<< ElectronPtResolution(candidate) << std::endl;
112  } else {
113  d_et = eval(thetype, ET, et, phi, eta);
114  d_phi = eval(thetype, PHI, et, phi, eta);
115  }
116 
117  metsig::SigInputObj resultingobj(name, et, phi, d_et, d_phi);
118  return resultingobj;
119 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double eval(const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:430
double ElectronPtResolution(const reco::PFCandidate *c) const
double theta() const final
momentum polar angle
bool isNull() const
Checks for null.
Definition: Ref.h:235
virtual ParticleType particleId() const
Definition: PFCandidate.h:392
double phi() const final
momentum azimuthal angle
double energy() const final
energy
double eta() const final
momentum pseudorapidity
metsig::SigInputObj metsig::SignAlgoResolutions::evalPFJet ( const reco::Jet jet) const

Definition at line 121 of file SignAlgoResolutions.cc.

References Abs(), reco::LeafCandidate::eta(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PFMEtSignInterfaceBase::compResolution().

121  {
122  double jpt = jet->pt();
123  double jphi = jet->phi();
124  double jeta = jet->eta();
125  double jdeltapt = 999.;
126  double jdeltapphi = 999.;
127 
128  if (jpt < ptResolThreshold_ && jpt < 20.) { //use temporary fix for low pT jets
129  double feta = TMath::Abs(jeta);
130  int ieta = feta < 5. ? int(feta / 0.5) : 9; //bin size = 0.5
131  int ipt = jpt > 3. ? int(jpt - 3. / 2) : 0; //bin size =2, starting from ptmin=3GeV
132  jdeltapt = jdpt[ieta][ipt];
133  jdeltapphi = jpt * jdphi[ieta][ipt];
134  } else {
135  //use the resolution functions at |eta|=5 to avoid crash for jets with large eta.
136  if (jeta > 5)
137  jeta = 5;
138  if (jeta < -5)
139  jeta = -5;
140  double jptForEval = jpt > ptResolThreshold_ ? jpt : ptResolThreshold_;
141  jdeltapt = jpt * ptResol_->parameterEtaEval("sigma", jeta, jptForEval);
142  jdeltapphi = jpt * phiResol_->parameterEtaEval("sigma", jeta, jptForEval);
143  }
144 
145  std::string inputtype = "jet";
146  metsig::SigInputObj obj_jet(inputtype, jpt, jphi, jdeltapt, jdeltapphi);
147  //std::cout << "RESOLUTIONS JET: " << jpt << " " << jphi<< " " <<jdeltapt << " " << jdeltapphi << std::endl;
148  return obj_jet;
149 }
double pt() const final
transverse momentum
std::vector< double > jdpt[10]
double parameterEtaEval(const std::string &parameterName, float eta, float pt)
T Abs(T a)
Definition: MathUtil.h:49
double phi() const final
momentum azimuthal angle
std::vector< double > jdphi[10]
double eta() const final
momentum pseudorapidity
double metsig::SignAlgoResolutions::getfunc ( const resolutionType type,
const resolutionFunc func,
std::vector< double > &  x 
) const
private

Definition at line 317 of file SignAlgoResolutions.cc.

References metsig::CONSTPHI, metsig::ET, metsig::PHI, mps_fire::result, edm::second(), metsig::TRACKP, and makeHLTPrescaleTable::values.

319  {
320  double result = 0;
321  functionCombo mypair(type, func);
322 
323  if (functionmap_.count(mypair) == 0) {
324  return result;
325  }
326 
327  functionPars values = (functionmap_.find(mypair))->second;
328  switch (func) {
329  case metsig::ET:
330  return EtFunction(x, values);
331  case metsig::PHI:
332  return PhiFunction(x, values);
333  case metsig::TRACKP:
334  return PFunction(x, values);
335  case metsig::CONSTPHI:
336  return PhiConstFunction(x, values);
337  }
338 
339  // std::cout << "returning function " << type << " " << func << " " << result << " " << x[0] << std::endl;
340 
341  return result;
342 }
double PhiFunction(const functionPars &x, const functionPars &par) const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
tuple result
Definition: mps_fire.py:311
U second(std::pair< T, U > const &p)
std::map< functionCombo, functionPars > functionmap_
double EtFunction(const functionPars &x, const functionPars &par) const
std::vector< double > functionPars
double PhiConstFunction(const functionPars &x, const functionPars &par) const
std::pair< metsig::resolutionType, metsig::resolutionFunc > functionCombo
double PFunction(const functionPars &x, const functionPars &par) const
void metsig::SignAlgoResolutions::initializeJetResolutions ( const edm::ParameterSet iConfig)
private

Definition at line 380 of file SignAlgoResolutions.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, runTheMatrix::cmssw_base, edm::ParameterSet::getParameter(), fed_dqm_sourceclient-live_cfg::path, edm_modernize_messagelogger::stat, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by addResolutions().

380  {
381  using namespace std;
382 
383  // only reinitialize the resolutsion if the pointers are zero
384  if (ptResol_ == nullptr) {
385  string resolutionsAlgo = iConfig.getParameter<std::string>("resolutionsAlgo");
386  string resolutionsEra = iConfig.getParameter<std::string>("resolutionsEra");
387 
388  string cmssw_base(std::getenv("CMSSW_BASE"));
389  string cmssw_release_base(std::getenv("CMSSW_RELEASE_BASE"));
390  string path = cmssw_base + "/src/CondFormats/JetMETObjects/data";
391  struct stat st;
392  if (stat(path.c_str(), &st) != 0) {
393  path = cmssw_release_base + "/src/CondFormats/JetMETObjects/data";
394  }
395  if (stat(path.c_str(), &st) != 0) {
396  cerr << "ERROR: tried to set path but failed, abort." << endl;
397  }
398  const string &era(resolutionsEra);
399  const string &alg(resolutionsAlgo);
400  string ptFileName = path + "/" + era + "_PtResolution_" + alg + ".txt";
401  string phiFileName = path + "/" + era + "_PhiResolution_" + alg + ".txt";
402 
403  ptResol_ = new JetResolution(ptFileName, false);
404  phiResol_ = new JetResolution(phiFileName, false);
405  }
406 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
tuple cmssw_base
bool metsig::SignAlgoResolutions::isFilled ( ) const
inline

Definition at line 80 of file SignAlgoResolutions.h.

References functionmap_.

80 { return !functionmap_.empty(); }
std::map< functionCombo, functionPars > functionmap_
double metsig::SignAlgoResolutions::PFunction ( const functionPars x,
const functionPars par 
) const
private

Definition at line 371 of file SignAlgoResolutions.cc.

371  {
372  // not currently implemented
373  return 0;
374 }
double metsig::SignAlgoResolutions::PhiConstFunction ( const functionPars x,
const functionPars par 
) const
private

Definition at line 376 of file SignAlgoResolutions.cc.

376  {
377  return par[0];
378 }
double metsig::SignAlgoResolutions::PhiFunction ( const functionPars x,
const functionPars par 
) const
private

Definition at line 356 of file SignAlgoResolutions.cc.

References mathSSE::sqrt().

356  {
357  double et = x[0];
358  if (et <= 0.) {
359  return 0.;
360  }
361 
362  //if 1 parameter is C provided, returns C*pT, if three parameters N, S, C are provided, it returns the usual resolution value, as for sigmaPt
363  if (par.size() != 1 && par.size() != 3) { //only 1 or 3 parameters supported for phi function
364  return 0.;
365  } else if (par.size() == 1) {
366  return par[0] * et;
367  } else {
368  return et * sqrt((par[2] * par[2]) + (par[1] * par[1] / et) + (par[0] * par[0] / (et * et)));
369  }
370 }
T sqrt(T t)
Definition: SSEVec.h:19

Member Data Documentation

std::map<functionCombo, functionPars> metsig::SignAlgoResolutions::functionmap_
private

Definition at line 89 of file SignAlgoResolutions.h.

Referenced by isFilled().

std::vector<double> metsig::SignAlgoResolutions::jdphi[10]
private

Definition at line 102 of file SignAlgoResolutions.h.

std::vector<double> metsig::SignAlgoResolutions::jdpt[10]
private

Definition at line 101 of file SignAlgoResolutions.h.

PFEnergyResolution* metsig::SignAlgoResolutions::pfresol_
private

Definition at line 106 of file SignAlgoResolutions.h.

JetResolution* metsig::SignAlgoResolutions::phiResol_
private

Definition at line 105 of file SignAlgoResolutions.h.

JetResolution* metsig::SignAlgoResolutions::ptResol_
private

Definition at line 104 of file SignAlgoResolutions.h.

double metsig::SignAlgoResolutions::ptResolThreshold_
private

Definition at line 97 of file SignAlgoResolutions.h.