30 TMom::TMom(std::vector<double> cutlow, std::vector<double> cuthigh)
58 _cutLow.push_back(cutlow);
59 _cutHigh.push_back(cuthigh);
60 for(
int i=0;
i<101;
i++){
65 void TMom::init(std::vector<double> cutlow, std::vector<double> cuthigh)
80 assert(cutlow.size()==cuthigh.size());
83 _dimCut=cutlow.size();
86 for(
int i=0;
i<101;
i++){
96 _cutLow.push_back(cutlow);
97 _cutHigh.push_back(cuthigh);
100 void TMom::setCut(std::vector<double> cutlow ,std::vector<double> cuthigh){
102 assert(cutlow.size( )== cuthigh.size());
105 _dimCut=cutlow.size();
113 std::vector<double> dumb;
121 int passingAllCuts=1;
123 for (
int iCut=0;iCut<_dimCut;iCut++){
125 if( valcut.at(iCut)>_cutLow.at(iCut) && valcut.at(iCut) <=_cutHigh.at(iCut) ){
128 passingAllCuts*=passing;
131 if( passingAllCuts == 1 ){
141 _ampl.push_back(val);
149 if(nevt!=0)
mean=sum/nevt;
155 if(nevt!=0) mean2=sum2/nevt;
160 if(nevt!=0) mean3=sum3/nevt;
169 double m2=getMean2();
170 if(nevt!=0)
rms=TMath::Sqrt( m2 - m*m );
178 double m2=getMean2();
179 double m3=getMean3();
180 double sig = getRMS();
182 if(nevt!=0 && sig!=0) M3=( m3 - 3.0*m*(m2-m*
m) - m*m*m )/(sig*sig*sig);
192 std::vector<double>
p;
193 double wbin=(
max-
min)/100.;
196 for(
unsigned int i=0;
i<_ampl.size();
i++){
200 bung= (int) ((_ampl.at(
i)-
min)/wbin)+1;
201 if(1 <= bung && bung <= 100)
210 for(
int k=1;
k<101;
k++) {
211 if(bing[
k] > popmax) {
217 peakM -> peakFinder(&bing[0]);
218 p.push_back(peakM -> getPeakValue(0));
219 p.push_back(peakM -> getPeakValue(1));
void addEntry(double val)
void setCut(double, double)
void init(double, double)
const T & max(const T &a, const T &b)
std::vector< double > getPeak()