#include <ResidualFitter.h>
|
void | AddMeas (double x, double y, double z) |
|
void | AddTrue (double x, double y, double z) |
|
void | cd () |
|
void | CreateCanvas () |
|
TH1D * | CurBin () |
|
void | ExecuteEvent (Int_t event, Int_t px, Int_t py, TObject *sel) |
|
void | Fill () |
|
void | Fit (int x, int y, const char *opt="") |
|
void | FitSlicesZ (TF1 *f1=0) |
|
TCanvas * | GetCanvas () |
|
TF1 * | GetFunction () |
|
| ResidualFitter (const char *name, const char *title, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup, int nbinsz, double zlow, double zup) |
|
void | SetAutoRange (int n) |
|
void | SetFitFunction (TF1 *func) |
|
void | SetFitOptions (const char *opt) |
|
void | SetMinN (int n) |
|
void | ShowFit (TH2 *h2d, double x, double y) |
|
| ~ResidualFitter () |
|
Definition at line 11 of file ResidualFitter.h.
ResidualFitter::ResidualFitter |
( |
const char * |
name, |
|
|
const char * |
title, |
|
|
int |
nbinsx, |
|
|
double |
xlow, |
|
|
double |
xup, |
|
|
int |
nbinsy, |
|
|
double |
ylow, |
|
|
double |
yup, |
|
|
int |
nbinsz, |
|
|
double |
zlow, |
|
|
double |
zup |
|
) |
| |
Definition at line 21 of file ResidualFitter.cc.
References chi2_, gather_cfg::cout, CreateCanvas(), mean_, mergeVDriftHistosByStation::name, and sigma_.
36 cout<<
"creating residual fitter with name "<<
name<<endl;
38 string meanname =
name; meanname +=
"_mean";
39 mean_ =
new TH2D(meanname.c_str(), meanname.c_str(),
44 string sigmaname =
name; sigmaname +=
"_sigma";
45 sigma_ =
new TH2D(sigmaname.c_str(), sigmaname.c_str(),
51 string chi2name =
name; chi2name +=
"_chi2";
52 chi2_ =
new TH2D(chi2name.c_str(), chi2name.c_str(),
ResidualFitter::~ResidualFitter |
( |
| ) |
|
void ResidualFitter::AddMeas |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
inline |
void ResidualFitter::AddTrue |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
inline |
void ResidualFitter::cd |
( |
void |
| ) |
|
|
inline |
void ResidualFitter::CreateCanvas |
( |
| ) |
|
Definition at line 79 of file ResidualFitter.cc.
References canvas_, xCanvas_, and yCanvas_.
Referenced by ResidualFitter().
80 string cname =
"ResidualFitterCanvas_"; cname += GetName();
83 canvas_ ->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
85 this,
"ExecuteEvent(Int_t,Int_t,Int_t,TObject*)");
TH1D* ResidualFitter::CurBin |
( |
| ) |
|
|
inline |
void ResidualFitter::ExecuteEvent |
( |
Int_t |
event, |
|
|
Int_t |
px, |
|
|
Int_t |
py, |
|
|
TObject * |
sel |
|
) |
| |
Definition at line 124 of file ResidualFitter.cc.
References canvas_, EgammaValidation_Wenu_cff::sel, ShowFit(), x, and detailsBasic3DVector::y.
126 if(
event != kButton1Down )
return;
128 TH2* histo2d =
dynamic_cast<TH2*
>(
sel);
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void ShowFit(TH2 *h2d, double x, double y)
void ResidualFitter::Fill |
( |
| ) |
|
void ResidualFitter::Fit |
( |
int |
x, |
|
|
int |
y, |
|
|
const char * |
opt = "" |
|
) |
| |
Definition at line 166 of file ResidualFitter.cc.
References autoRangeN_, chi2_, gather_cfg::cout, curBin_, fitFunction_, fitOptions_, mean_, minN_, and sigma_.
Referenced by FitSlicesZ(), and ShowFit().
167 TH1::AddDirectory(0);
170 curBin_ = TH3::ProjectionZ(
"", binx, binx, biny, biny);
173 TH1::AddDirectory(1);
180 double maxpos =
curBin_->GetBinCenter(
curBin_->GetMaximumBin() );
186 cout<<
"range : "<<minrange<<
" "<<maxrange<<endl;
192 double chi2overndf=0;
200 chi2_->SetBinContent(binx,biny,chi2overndf);
207 TH1::AddDirectory(1);
void ResidualFitter::FitSlicesZ |
( |
TF1 * |
f1 = 0 | ) |
|
TCanvas* ResidualFitter::GetCanvas |
( |
| ) |
|
|
inline |
TF1* ResidualFitter::GetFunction |
( |
| ) |
|
|
inline |
void ResidualFitter::SetAutoRange |
( |
int |
n | ) |
|
|
inline |
static void ResidualFitter::SetCanvas |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inlinestatic |
void ResidualFitter::SetFitFunction |
( |
TF1 * |
func | ) |
|
|
inline |
void ResidualFitter::SetFitOptions |
( |
const char * |
opt | ) |
|
|
inline |
void ResidualFitter::SetMinN |
( |
int |
n | ) |
|
|
inline |
void ResidualFitter::ShowFit |
( |
TH2 * |
h2d, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| |
int ResidualFitter::autoRangeN_ |
|
private |
TCanvas* ResidualFitter::canvas_ |
|
private |
TCanvas* ResidualFitter::canvasFit_ |
|
private |
TH2D* ResidualFitter::chi2_ |
|
private |
TH1D* ResidualFitter::curBin_ |
|
private |
TF1* ResidualFitter::fitFunction_ |
|
private |
std::string ResidualFitter::fitOptions_ |
|
private |
TH2D* ResidualFitter::mean_ |
|
private |
int ResidualFitter::minN_ |
|
private |
if the number of entries in a bin is lower than this, fit is not performed. set to 5 by default.
Definition at line 98 of file ResidualFitter.h.
Referenced by Fit(), and SetMinN().
int ResidualFitter::oldBinx_ |
|
private |
int ResidualFitter::oldBiny_ |
|
private |
TH2D* ResidualFitter::sigma_ |
|
private |
int ResidualFitter::xCanvas_ = 600 |
|
staticprivate |
int ResidualFitter::yCanvas_ = 600 |
|
staticprivate |