CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::PFJet *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, 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 44 of file SignAlgoResolutions.h.

Member Typedef Documentation

Definition at line 62 of file SignAlgoResolutions.h.

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

Definition at line 63 of file SignAlgoResolutions.h.

Constructor & Destructor Documentation

metsig::SignAlgoResolutions::SignAlgoResolutions ( )
inline

Definition at line 47 of file SignAlgoResolutions.h.

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

Definition at line 35 of file SignAlgoResolutions.cc.

References addResolutions().

35  :
36  functionmap_(),
37  ptResol_(0),
38  phiResol_(0)
39 {
40  addResolutions(iConfig);
41 }
std::map< functionCombo, functionPars > functionmap_
void addResolutions(const edm::ParameterSet &iConfig)

Member Function Documentation

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

Definition at line 305 of file SignAlgoResolutions.cc.

References Parameters::parameters.

305  {
306 
307  functionCombo mypair(type,func);
308  functionmap_[mypair]=parameters;
309 
310 }
type
Definition: HCALResponse.h:21
dictionary parameters
Definition: Parameters.py:2
std::map< functionCombo, functionPars > functionmap_
std::pair< metsig::resolutionType, metsig::resolutionFunc > functionCombo
void metsig::SignAlgoResolutions::addResolutions ( const edm::ParameterSet iConfig)

Definition at line 141 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().

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

Definition at line 413 of file SignAlgoResolutions.cc.

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

413  {
414 
415  double eta = c->eta();
416  double energy = c->energy();
417  double dEnergy = pfresol_->getEnergyResolutionEm(energy, eta);
418 
419  return dEnergy/cosh(eta);
420 }
virtual double energy() const GCC11_FINAL
energy
T eta() const
double getEnergyResolutionEm(double CorrectedEnergy, double eta) const
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
PFEnergyResolution * pfresol_
double metsig::SignAlgoResolutions::EtFunction ( const functionPars x,
const functionPars par 
) const
private

Definition at line 338 of file SignAlgoResolutions.cc.

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

339 {
340  if(par.size()<3)
341  return 0.;
342  if(x.size()<1)
343  return 0.;
344  double et=x[0];
345  if(et<=0.)
346  return 0.;
347  double result = et*sqrt((par[2]*par[2])+(par[1]*par[1]/et)+(par[0]*par[0]/(et*et)));
348  return result;
349 }
T sqrt(T t)
Definition: SSEVec.h:48
tuple result
Definition: query.py:137
Definition: DDAxes.h:10
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 53 of file SignAlgoResolutions.cc.

References eta(), AlCaHLTBitMon_ParallelJobs::p, phi, and x.

53  {
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 
63 }
type
Definition: HCALResponse.h:21
double getfunc(const resolutionType &type, const resolutionFunc &func, std::vector< double > &x) const
T eta() const
std::vector< double > functionPars
Definition: DDAxes.h:10
Definition: DDAxes.h:10
double metsig::SignAlgoResolutions::eval ( const resolutionType type,
const resolutionFunc func,
const double &  et,
const double &  phi,
const double &  eta 
) const

Definition at line 45 of file SignAlgoResolutions.cc.

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

45  {
46  // derive p from et and eta;
47  double theta = 2*atan(exp(-eta));
48  double p = et / sin(theta); // rough assumption: take e and p equivalent...
49  return eval(type,func,et,phi,eta,p);
50 
51 }
type
Definition: HCALResponse.h:21
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
T eta() const
double eval(const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
Definition: DDAxes.h:10
metsig::SigInputObj metsig::SignAlgoResolutions::evalPF ( const reco::PFCandidate candidate) const

Definition at line 65 of file SignAlgoResolutions.cc.

References reco::LeafCandidate::energy(), metsig::ET, reco::LeafCandidate::eta(), 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, phi, metsig::PHI, reco::LeafCandidate::phi(), funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, reco::LeafCandidate::theta(), and reco::PFCandidate::trackRef().

65  {
66  double eta = candidate->eta();
67  double phi = candidate->phi();
68  double et = candidate->energy()*sin(candidate->theta());
69  resolutionType thetype;
71  int type = candidate->particleId();
72  switch (type)
73  {
74  case 1:
75  thetype=PFtype1;name="PFChargedHadron"; break;
76  case 2:
77  thetype=PFtype2;name="PFChargedEM"; break;
78  case 3:
79  thetype=PFtype3;name="PFMuon"; break;
80  case 4:
81  thetype=PFtype4;name="PFNeutralEM"; break;
82  case 5:
83  thetype=PFtype5;name="PFNeutralHadron"; break;
84  case 6:
85  thetype=PFtype6;name="PFtype6"; break;
86  case 7:
87  thetype=PFtype7;name="PFtype7"; break;
88  default:
89  thetype=PFtype7;name="PFunknown"; break;
90  }
91 
92  double d_et=0, d_phi=0; //d_phi here is the error on phi component of the et
93  reco::TrackRef trackRef = candidate->trackRef();
94  if(!trackRef.isNull()){
95  d_phi = et*trackRef->phiError();
96  d_et = (type==2) ? ElectronPtResolution(candidate) : trackRef->ptError();
97  //if(type==2) std::cout << eval(thetype,ET,et,phi,eta) << " " << trackRef->ptError() << " "<< ElectronPtResolution(candidate) << std::endl;
98  }
99  else{
100  d_et = eval(thetype,ET,et,phi,eta);
101  d_phi = eval(thetype,PHI,et,phi,eta);
102  }
103 
104  metsig::SigInputObj resultingobj(name,et,phi,d_et,d_phi);
105  return resultingobj;
106 }
type
Definition: HCALResponse.h:21
virtual double energy() const GCC11_FINAL
energy
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
virtual double theta() const GCC11_FINAL
momentum polar angle
T eta() const
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:349
double ElectronPtResolution(const reco::PFCandidate *c) const
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
bool isNull() const
Checks for null.
Definition: Ref.h:247
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
virtual ParticleType particleId() const
Definition: PFCandidate.h:347
Definition: DDAxes.h:10
metsig::SigInputObj metsig::SignAlgoResolutions::evalPFJet ( const reco::PFJet jet) const

Definition at line 110 of file SignAlgoResolutions.cc.

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

110  {
111 
112  double jpt = jet->pt();
113  double jphi = jet->phi();
114  double jeta = jet->eta();
115  double jdeltapt = 999.;
116  double jdeltapphi = 999.;
117 
118  if(jpt<ptResolThreshold_ && jpt<20.){ //use temporary fix for low pT jets
119  double feta = TMath::Abs(jeta);
120  int ieta = feta<5.? int(feta/0.5) : 9; //bin size = 0.5
121  int ipt = jpt>3. ? int(jpt-3./2) : 0; //bin size =2, starting from ptmin=3GeV
122  jdeltapt = jdpt[ieta][ipt];
123  jdeltapphi = jpt*jdphi[ieta][ipt];
124  }
125  else{
126  //use the resolution functions at |eta|=5 to avoid crash for jets with large eta.
127  if(jeta>5) jeta=5;
128  if(jeta<-5) jeta=-5;
129  double jptForEval = jpt>ptResolThreshold_ ? jpt : ptResolThreshold_;
130  jdeltapt = jpt*ptResol_->parameterEtaEval("sigma",jeta,jptForEval);
131  jdeltapphi = jpt*phiResol_->parameterEtaEval("sigma",jeta,jptForEval);
132  }
133 
134  std::string inputtype = "jet";
135  metsig::SigInputObj obj_jet(inputtype,jpt,jphi,jdeltapt,jdeltapphi);
136  //std::cout << "RESOLUTIONS JET: " << jpt << " " << jphi<< " " <<jdeltapt << " " << jdeltapphi << std::endl;
137  return obj_jet;
138 }
std::vector< double > jdpt[10]
double parameterEtaEval(const std::string &parameterName, float eta, float pt)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
virtual float pt() const GCC11_FINAL
transverse momentum
std::vector< double > jdphi[10]
double metsig::SignAlgoResolutions::getfunc ( const resolutionType type,
const resolutionFunc func,
std::vector< double > &  x 
) const
private

Definition at line 312 of file SignAlgoResolutions.cc.

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

312  {
313 
314  double result=0;
315  functionCombo mypair(type,func);
316 
317  if(functionmap_.count(mypair)==0){
318  return result;
319  }
320 
321  functionPars values = (functionmap_.find(mypair))->second;
322  switch ( func ){
323  case metsig::ET :
324  return EtFunction(x,values);
325  case metsig::PHI :
326  return PhiFunction(x,values);
327  case metsig::TRACKP :
328  return PFunction(x,values);
329  case metsig::CONSTPHI :
330  return PhiConstFunction(x,values);
331  }
332 
333  // std::cout << "returning function " << type << " " << func << " " << result << " " << x[0] << std::endl;
334 
335  return result;
336 }
type
Definition: HCALResponse.h:21
double PhiFunction(const functionPars &x, const functionPars &par) const
U second(std::pair< T, U > const &p)
tuple result
Definition: query.py:137
double EtFunction(const functionPars &x, const functionPars &par) const
std::vector< double > functionPars
double PhiConstFunction(const functionPars &x, const functionPars &par) const
Definition: DDAxes.h:10
std::map< functionCombo, functionPars > functionmap_
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 383 of file SignAlgoResolutions.cc.

References dtNoiseDBValidation_cfg::cerr, cmsBenchmark::cmssw_base, cmsBenchmark::cmssw_release_base, edm::ParameterSet::getParameter(), getHLTPrescaleColumns::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by addResolutions().

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

Definition at line 55 of file SignAlgoResolutions.h.

References functionmap_.

55 {return functionmap_.size()>0;}
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.

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

Definition at line 377 of file SignAlgoResolutions.cc.

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

Definition at line 352 of file SignAlgoResolutions.cc.

References mathSSE::sqrt().

353 {
354  double et=x[0];
355  if(et<=0.){
356  return 0.;
357  }
358 
359  //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
360  if(par.size()!=1 && par.size()!=3){//only 1 or 3 parameters supported for phi function
361  return 0.;
362  }
363  else if(par.size()==1){
364  return par[0]*et;
365  }
366  else{
367  return et*sqrt((par[2]*par[2])+(par[1]*par[1]/et)+(par[0]*par[0]/(et*et)));
368  }
369 
370 }
T sqrt(T t)
Definition: SSEVec.h:48
Definition: DDAxes.h:10

Member Data Documentation

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

Definition at line 64 of file SignAlgoResolutions.h.

Referenced by isFilled().

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

Definition at line 77 of file SignAlgoResolutions.h.

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

Definition at line 76 of file SignAlgoResolutions.h.

PFEnergyResolution* metsig::SignAlgoResolutions::pfresol_
private

Definition at line 81 of file SignAlgoResolutions.h.

JetResolution* metsig::SignAlgoResolutions::phiResol_
private

Definition at line 80 of file SignAlgoResolutions.h.

JetResolution* metsig::SignAlgoResolutions::ptResol_
private

Definition at line 79 of file SignAlgoResolutions.h.

double metsig::SignAlgoResolutions::ptResolThreshold_
private

Definition at line 72 of file SignAlgoResolutions.h.