source: HiSusy/trunk/Delphes-3.0.0/classes/DelphesFormula.cc @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

File size: 1.3 KB
Line 
1
2#include "classes/DelphesFormula.h"
3
4//------------------------------------------------------------------------------
5
6DelphesFormula::DelphesFormula() :
7  TFormula()
8{
9}
10
11//------------------------------------------------------------------------------
12
13DelphesFormula::DelphesFormula(const char *name, const char *expression) :
14  TFormula()
15{
16}
17
18//------------------------------------------------------------------------------
19
20DelphesFormula::~DelphesFormula()
21{
22}
23
24//------------------------------------------------------------------------------
25
26Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi, Double_t energy)
27{
28   Double_t x[4] = {pt, eta, phi, energy};
29   return EvalPar(x);
30}
31
32//------------------------------------------------------------------------------
33
34Int_t DelphesFormula::DefinedVariable(TString &chaine, Int_t &action)
35{
36  action = kVariable;
37  if (chaine == "pt") {
38    if (fNdim < 1) fNdim = 1;
39    return 0;
40  } else if (chaine == "eta") {
41    if (fNdim < 2) fNdim = 2;
42    return 1;
43  } else if (chaine == "phi") {
44    if (fNdim < 3) fNdim = 3;
45    return 2;
46  } else if (chaine == "energy") {
47    if (fNdim < 4) fNdim = 4;
48    return 3;
49  }
50  return -1;
51}
52
53//------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.