CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CentralityBins.h
Go to the documentation of this file.
1 #ifndef __Cent_Bin_h__
2 #define __Cent_Bin_h__
3 
4 #include <TNamed.h>
5 #include <TFile.h>
6 #include <vector>
7 #include <map>
8 
9 class CBin : public TObject {
10  public:
11  CBin(){;}
12  ~CBin(){;}
13 
14  float bin_edge;
15  float n_part_mean;
16  float n_part_var;
17  float n_coll_mean;
18  float n_coll_var;
19  float n_hard_mean;
20  float n_hard_var;
21  float b_mean;
22  float b_var;
23 
24  float eccRP_mean;
25  float eccRP_var;
26  float ecc2_mean;
27  float ecc2_var;
28  float ecc3_mean;
29  float ecc3_var;
30 
31  float s_mean;
32  float s_var;
33 
34  ClassDef(CBin,1)
35 };
36 
37 class CentralityBins : public TNamed {
38 
39  public:
40  typedef std::map<int, const CentralityBins*> RunMap;
41 
43  CentralityBins(const char* name, const char* title, int nbins) : TNamed(name,title) {
44  table_.reserve(nbins);
45  for(int j = 0; j < nbins; ++j){
46  CBin b;
47  table_.push_back(b);
48  }
49  }
51  int getBin(double value) const;
52  int getNbins() const {return table_.size();}
53  float lowEdge(double value) const { return lowEdgeOfBin(getBin(value));}
54  float lowEdgeOfBin(int bin) const { return table_[bin].bin_edge;}
55  float NpartMean(double value) const { return NpartMeanOfBin(getBin(value));}
56  float NpartMeanOfBin(int bin) const { return table_[bin].n_part_mean;}
57  float NpartSigma(double value) const { return NpartSigmaOfBin(getBin(value));}
58  float NpartSigmaOfBin(int bin) const { return table_[bin].n_part_var;}
59  float NcollMean(double value) const { return NcollMeanOfBin(getBin(value));}
60  float NcollMeanOfBin(int bin) const { return table_[bin].n_coll_mean;}
61  float NcollSigma(double value) const { return NcollSigmaOfBin(getBin(value));}
62  float NcollSigmaOfBin(int bin) const { return table_[bin].n_coll_var;}
63  float NhardMean(double value) const { return NhardMeanOfBin(getBin(value));}
64  float NhardMeanOfBin(int bin) const { return table_[bin].n_hard_mean;}
65  float NhardSigma(double value) const { return NhardSigmaOfBin(getBin(value));}
66  float NhardSigmaOfBin(int bin) const { return table_[bin].n_hard_var;}
67  float bMean(double value) const { return bMeanOfBin(getBin(value));}
68  float bMeanOfBin(int bin) const { return table_[bin].b_mean;}
69  float bSigma(double value) const { return bSigmaOfBin(getBin(value));}
70  float bSigmaOfBin(int bin) const { return table_[bin].b_var;}
71 
72  float eccentricityRPMean(double value) const { return eccentricityRPMeanOfBin(getBin(value));}
73  float eccentricityRPMeanOfBin(int bin) const { return table_[bin].eccRP_mean;}
74  float eccentricityRPSigma(double value) const { return eccentricityRPSigmaOfBin(getBin(value));}
75  float eccentricityRPSigmaOfBin(int bin) const { return table_[bin].eccRP_var;}
76  float eccentricityMean(double value) const { return eccentricityMeanOfBin(getBin(value));}
77  float eccentricityMeanOfBin(int bin) const { return table_[bin].ecc2_mean;}
78  float eccentricitySigma(double value) const { return eccentricitySigmaOfBin(getBin(value));}
79  float eccentricitySigmaOfBin(int bin) const { return table_[bin].ecc2_var;}
80  float triangularityMean(double value) const { return triangularityMeanOfBin(getBin(value));}
81  float triangularityMeanOfBin(int bin) const { return table_[bin].ecc3_mean;}
82  float triangularitySigma(double value) const { return triangularitySigmaOfBin(getBin(value));}
83  float triangularitySigmaOfBin(int bin) const { return table_[bin].ecc3_var;}
84  float areaMean(double value) const { return areaMeanOfBin(getBin(value));}
85  float areaMeanOfBin(int bin) const { return table_[bin].s_mean;}
86  float areaSigma(double value) const { return areaSigmaOfBin(getBin(value));}
87  float areaSigmaOfBin(int bin) const { return table_[bin].s_var;}
88 
89  // private:
90  std::vector<CBin> table_;
91  ClassDef(CentralityBins,1)
92 };
93 
94 CentralityBins::RunMap getCentralityFromFile(TDirectoryFile*, const char* dir, const char* tag, int firstRun = 0, int lastRun = 10);
95 CentralityBins::RunMap getCentralityFromFile(TDirectoryFile*, const char* tag, int firstRun = 0, int lastRun = 10);
96 
97 
98 
99 
100 
101 #endif
float areaMeanOfBin(int bin) const
float eccentricityMean(double value) const
float ecc2_var
float NcollSigma(double value) const
float areaMean(double value) const
float s_mean
float eccentricityRPMean(double value) const
float NpartSigmaOfBin(int bin) const
float eccRP_var
float eccentricityRPSigmaOfBin(int bin) const
float triangularityMeanOfBin(int bin) const
float bin_edge
float triangularitySigma(double value) const
string firstRun
Definition: dataset.py:870
float bSigma(double value) const
float n_part_mean
float lowEdgeOfBin(int bin) const
float NhardMean(double value) const
std::map< int, const CentralityBins * > RunMap
float n_hard_var
float b_var
float NcollMeanOfBin(int bin) const
float n_hard_mean
float ecc2_mean
float eccentricitySigmaOfBin(int bin) const
int j
Definition: DBlmapReader.cc:9
float bSigmaOfBin(int bin) const
float NhardMeanOfBin(int bin) const
float eccentricitySigma(double value) const
float areaSigmaOfBin(int bin) const
float NpartMean(double value) const
float triangularitySigmaOfBin(int bin) const
float eccentricityMeanOfBin(int bin) const
float areaSigma(double value) const
float eccRP_mean
float ecc3_var
float triangularityMean(double value) const
float eccentricityRPMeanOfBin(int bin) const
float n_coll_mean
float NpartMeanOfBin(int bin) const
double b
Definition: hdecay.h:120
int getNbins() const
float eccentricityRPSigma(double value) const
int getBin(double value) const
float n_part_var
float bMeanOfBin(int bin) const
float bMean(double value) const
float b_mean
float NhardSigma(double value) const
float lowEdge(double value) const
float NpartSigma(double value) const
dbl *** dir
Definition: mlp_gen.cc:35
float s_var
float NcollMean(double value) const
std::vector< CBin > table_
float NhardSigmaOfBin(int bin) const
CentralityBins(const char *name, const char *title, int nbins)
float ecc3_mean
float n_coll_var
CentralityBins::RunMap getCentralityFromFile(TDirectoryFile *, const char *dir, const char *tag, int firstRun=0, int lastRun=10)
float NcollSigmaOfBin(int bin) const