|
DAS
3.0
Das Analysis System
|
Go to the documentation of this file. 1 #ifndef ElectroWeakAnalysis_RoccoR_H
2 #define ElectroWeakAnalysis_RoccoR_H
4 #include <boost/math/special_functions/erf.hpp>
7 static const double pi;
37 double ex = exp(-fa*fa/2);
38 double A = pow(
n/fa,
n) * ex;
39 double C1 =
n/fa/(
n-1) * ex;
59 double pdf(
double x)
const{
61 if(d<-
a)
return NA*pow(
B-d, -
n);
62 if(d>
a)
return NA*pow(
B+d, -
n);
66 double pdf(
double x,
double ks,
double dm)
const{
67 double d=(x-
m-
dm)/(
s*ks);
68 if(d<-
a)
return NA/ks*pow(
B-d, -
n);
69 if(d>
a)
return NA/ks*pow(
B+d, -
n);
70 return N/ks*exp(-d*d/2);
73 double cdf(
double x)
const{
75 if(d<-
a)
return NC / pow(
F-
s*d/
G,
n-1);
76 if(d>
a)
return NC * (
C - pow(
F+
s*d/
G, 1-
n) );
94 std::vector<double>
nTrk[2];
96 std::vector<CrystalBall>
cb;
108 int etaBin(
double x)
const;
112 double rndm(
int H,
int F,
double v)
const;
113 double Sigma(
double pt,
int H,
int F)
const;
114 double kSpread(
double gpt,
double rpt,
double eta,
int nlayers,
double w)
const;
115 double kSpread(
double gpt,
double rpt,
double eta)
const;
116 double kSmear(
double pt,
double eta,
TYPE type,
double v,
double u)
const;
117 double kSmear(
double pt,
double eta,
TYPE type,
double v,
double u,
int n)
const;
118 double kExtra(
double pt,
double eta,
int nlayers,
double u,
double w)
const;
119 double kExtra(
double pt,
double eta,
int nlayers,
double u)
const;
138 std::vector<std::vector<CorParams>>
CP[2];
144 std::vector<std::vector<RocOne>>
RC;
145 template <
typename T>
double error(T
f)
const;
149 int phiBin(
double phi)
const;
155 RoccoR(std::string filename);
157 void init(std::string filename);
161 double getM(
int T,
int H,
int F,
int s=0,
int m=0)
const{
return RC[s][m].CP[T][H][F].M;}
162 double getA(
int T,
int H,
int F,
int s=0,
int m=0)
const{
return RC[s][m].CP[T][H][F].A;}
163 double getK(
int T,
int H,
int s=0,
int m=0)
const{
return RC[s][m].RR.resol[H].kRes[T];}
165 double kScaleMC(
int Q,
double pt,
double eta,
double phi,
int s=0,
int m=0)
const;
167 double kScaleDT(
int Q,
double pt,
double eta,
double phi,
int s=0,
int m=0)
const;
168 double kSpreadMC(
int Q,
double pt,
double eta,
double phi,
double gt,
int s=0,
int m=0)
const;
169 double kSmearMC(
int Q,
double pt,
double eta,
double phi,
int n,
double u,
int s=0,
int m=0)
const;
173 double kSmearMCerror(
int Q,
double pt,
double eta,
double phi,
int n,
double u)
const;
176 double kScaleFromGenMC(
int Q,
double pt,
double eta,
double phi,
int n,
double gt,
double w,
int s=0,
int m=0)
const;
177 double kScaleAndSmearMC(
int Q,
double pt,
double eta,
double phi,
int n,
double u,
double w,
int s=0,
int m=0)
const;
int nset
Definition: RoccoR.h:141
double NA
Definition: RoccoR.h:21
double kScaleAndSmearMC(int Q, double pt, double eta, double phi, int n, double u, double w, int s=0, int m=0) const
Definition: RoccoR.cc:299
double kScaleAndSmearMCerror(int Q, double pt, double eta, double phi, int n, double u, double w) const
Definition: RoccoR.cc:340
double kSmearMC(int Q, double pt, double eta, double phi, int n, double u, int s=0, int m=0) const
Definition: RoccoR.cc:282
std::vector< std::vector< RocOne > > RC
Definition: RoccoR.h:144
RocRes RR
Definition: RoccoR.h:137
pt
Definition: jmarExample.py:19
double cdf(double x) const
Definition: RoccoR.h:73
double D
Definition: RoccoR.h:18
double getA(int T, int H, int F, int s=0, int m=0) const
Definition: RoccoR.h:162
double error(T f) const
Definition: RoccoR.cc:313
double getK(int T, int H, int s=0, int m=0) const
Definition: RoccoR.h:163
std::vector< int > tvar
Definition: RoccoR.h:143
double F
Definition: RoccoR.h:24
std::vector< CrystalBall > cb
Definition: RoccoR.h:96
int NPHI
Definition: RoccoR.h:130
double Ns
Definition: RoccoR.h:22
double eta
Definition: RoccoR.h:92
@ Data
Definition: RoccoR.h:89
f
Definition: Ntupliser_cfg.py:256
@ Symhes
Definition: RoccoR.h:125
double M
Definition: RoccoR.h:134
std::vector< double > rsPar[3]
Definition: RoccoR.h:95
double kSmear(double pt, double eta, TYPE type, double v, double u) const
Definition: RoccoR.cc:70
static const float w
Definition: common.h:51
const RocRes & getRes(int s=0, int m=0) const
Definition: RoccoR.h:160
std::vector< int > nmem
Definition: RoccoR.h:142
double a
Definition: RoccoR.h:13
int phiBin(double phi) const
Definition: RoccoR.cc:255
double kScaleFromGenMCerror(int Q, double pt, double eta, double phi, int n, double gt, double w) const
Definition: RoccoR.cc:336
double B
Definition: RoccoR.h:16
double cdfMa
Definition: RoccoR.h:28
double kRes[2]
Definition: RoccoR.h:93
void init(std::string filename)
Definition: RoccoR.cc:129
std::vector< ResParams > resol
Definition: RoccoR.h:104
@ Extra
Definition: RoccoR.h:89
ResParams()
Definition: RoccoR.h:97
double A
Definition: RoccoR.h:134
TYPE
Definition: RoccoR.h:152
TVAR
Definition: RoccoR.h:125
double getM(int T, int H, int F, int s=0, int m=0) const
Definition: RoccoR.h:161
static const double pi
Definition: RoccoR.h:7
int trkBin(double x, int h, TYPE T=MC) const
Definition: RoccoR.cc:32
dm
Definition: tauExample.py:24
double DPHI
Definition: RoccoR.h:131
double kSpreadMCerror(int Q, double pt, double eta, double phi, double gt) const
Definition: RoccoR.cc:328
bool empty() const
Definition: RoccoR.h:159
TYPE
Definition: RoccoR.h:89
double cdfPa
Definition: RoccoR.h:29
static const double sqrt2
Definition: RoccoR.h:9
double pdf(double x) const
Definition: RoccoR.h:59
static const double MPHI
Definition: RoccoR.h:127
int NMIN
Definition: RoccoR.h:102
double kSpread(double gpt, double rpt, double eta, int nlayers, double w) const
Definition: RoccoR.cc:48
double k
Definition: RoccoR.h:26
int etaBin(double eta) const
Definition: RoccoR.cc:250
double kExtra(double pt, double eta, int nlayers, double u, double w) const
Definition: RoccoR.cc:87
int NTRK
Definition: RoccoR.h:101
double kScaleFromGenMC(int Q, double pt, double eta, double phi, int n, double gt, double w, int s=0, int m=0) const
Definition: RoccoR.cc:291
int NETA
Definition: RoccoR.h:129
void reset()
Definition: RoccoR.cc:118
void init()
Definition: RoccoR.h:35
double Sigma(double pt, int H, int F) const
Definition: RoccoR.cc:37
double NC
Definition: RoccoR.h:23
double invcdf(double u) const
Definition: RoccoR.h:80
@ MC
Definition: RoccoR.h:89
RocRes()
Definition: RoccoR.cc:15
double s
Definition: RoccoR.h:12
double kScaleDT(int Q, double pt, double eta, double phi, int s=0, int m=0) const
Definition: RoccoR.cc:262
CrystalBall()
Definition: RoccoR.h:31
static const double sqrtPiOver2
Definition: RoccoR.h:8
double m
Definition: RoccoR.h:11
double n
Definition: RoccoR.h:14
double kSmearMCerror(int Q, double pt, double eta, double phi, int n, double u) const
Definition: RoccoR.cc:332
double kScaleDTerror(int Q, double pt, double eta, double phi) const
Definition: RoccoR.cc:324
@ Default
Definition: RoccoR.h:125
double N
Definition: RoccoR.h:19
double kScaleMC(int Q, double pt, double eta, double phi, int s=0, int m=0) const
Definition: RoccoR.cc:268
std::vector< double > etabin
Definition: RoccoR.h:132
int etaBin(double x) const
Definition: RoccoR.cc:26
std::vector< std::vector< CorParams > > CP[2]
Definition: RoccoR.h:138
RoccoR()
Definition: RoccoR.cc:112
double kGenSmear(double pt, double eta, double v, double u, RocRes::TYPE TT=RocRes::Data, int s=0, int m=0) const
Definition: RoccoR.cc:307
double G
Definition: RoccoR.h:25
eta
DeepAK8/ParticleNet tagging.
Definition: jmarExample.py:19
void reset()
Definition: RoccoR.cc:19
double kSpreadMC(int Q, double pt, double eta, double phi, double gt, int s=0, int m=0) const
Definition: RoccoR.cc:274
int NETA
Definition: RoccoR.h:100
@ Replica
Definition: RoccoR.h:125
double pdf(double x, double ks, double dm) const
Definition: RoccoR.h:66
double C
Definition: RoccoR.h:17
std::vector< double > nTrk[2]
Definition: RoccoR.h:94
@ MC
Definition: RoccoR.h:152
double rndm(int H, int F, double v) const
Definition: RoccoR.cc:43