hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ZBiHistos.h
Go to the documentation of this file.
1#ifndef ZBIHISTOS_H
2#define ZBIHISTOS_H
3
4#include "TFile.h"
5#include "HistoManager.h"
6#include "TGraph.h"
7#include "TKey.h"
8#include "TH1.h"
9#include "TH1F.h"
10#include "TF1.h"
11#include "TCanvas.h"
12#include "TFitResult.h"
13#include "TFitResultPtr.h"
14#include "TF1.h"
15#include "TRandom3.h"
16#include "MutableTTree.h"
17#include <vector>
18#include <fstream>
19#include <string>
20#include <math.h>
21
27class ZBiHistos : public HistoManager{
28
29 public:
30 ZBiHistos();
31 ~ZBiHistos();
32
33 ZBiHistos(const std::string& inputName);
38 virtual void Define3DHistos(){};
39
44 virtual void Define2DHistos(){};
45
46
51 void writeHistos(TFile* outF, std::string folder);
52
57 void resetHistograms1d();
58
63 void resetHistograms2d();
64
69 void addHisto1d(std::string histoname, std::string xtitle, int nbinsX, float xmin, float xmax);
70
75 void addHisto2d(std::string histoname, std::string xtitle, int nbinsX, float xmin, float xmax, std::string ytitle, int nbinsY, float ymin, float ymax);
76
81 void set2DHistoYlabel(std::string histoName, int ybin, std::string ylabel);
82
87 std::vector<double> defineImpactParameterCut(double alpha = 0.15);
88
94
95
101 void setDebug(bool value){debug_ = value;};
102
107 double cutFractionOfSignalVariable(std::string cutvariable, bool isCutGreaterThan, double cutFraction, double initialIntegral);
108
113 double integrateHistogram1D(std::string histoname);
114
119 TF1* fitExponentialTail(std::string histogramName, double start_nevents);
120
125 TF1* fitExponentialPlusConst(std::string histogramName, double starnt_nevents);
130 TF1* fitExponentialPlusExp(std::string histogramName, double starnt_nevents);
135 double fitZTail(std::string zVtxHistoname, double max_tail_events);
136
141 double shosFitZTail(std::string cutname, double max_tail_events);
142
147 TF1* getZTailFit(std::string cutname);
148
153 void writeGraphs(TFile* outF, std::string folder);
154
155 private:
156 std::map<std::string, TGraph*> graphs_;
157};
158
159#endif
description
bool debug_
description
description
Definition ZBiHistos.h:27
virtual void Define3DHistos()
description
Definition ZBiHistos.h:38
double shosFitZTail(std::string cutname, double max_tail_events)
description
void setDebug(bool value)
Set debug.
Definition ZBiHistos.h:101
TF1 * getZTailFit(std::string cutname)
description
TF1 * fitExponentialTail(std::string histogramName, double start_nevents)
description
void writeGraphs(TFile *outF, std::string folder)
description
virtual void Define2DHistos()
description
Definition ZBiHistos.h:44
double cutFractionOfSignalVariable(std::string cutvariable, bool isCutGreaterThan, double cutFraction, double initialIntegral)
description
Definition ZBiHistos.cxx:64
TF1 * fitExponentialPlusExp(std::string histogramName, double starnt_nevents)
description
double integrateHistogram1D(std::string histoname)
description
Definition ZBiHistos.cxx:37
void addHisto1d(std::string histoname, std::string xtitle, int nbinsX, float xmin, float xmax)
description
Definition ZBiHistos.cxx:15
double fitZTail(std::string zVtxHistoname, double max_tail_events)
description
void set2DHistoYlabel(std::string histoName, int ybin, std::string ylabel)
description
void addHisto2d(std::string histoname, std::string xtitle, int nbinsX, float xmin, float xmax, std::string ytitle, int nbinsY, float ymin, float ymax)
description
Definition ZBiHistos.cxx:19
std::vector< double > defineImpactParameterCut(double alpha=0.15)
description
void resetHistograms2d()
description
Definition ZBiHistos.cxx:30
void defineZBiCutflowProcessorHistograms()
description
Definition ZBiHistos.cxx:95
std::map< std::string, TGraph * > graphs_
hold graphs
Definition ZBiHistos.h:156
void resetHistograms1d()
description
Definition ZBiHistos.cxx:23
TF1 * fitExponentialPlusConst(std::string histogramName, double starnt_nevents)
description
void writeHistos(TFile *outF, std::string folder)
description