-
Notifications
You must be signed in to change notification settings - Fork 0
/
YcutCalculator.cc
49 lines (42 loc) · 1.3 KB
/
YcutCalculator.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "YcutCalculator.hh"
#include "NtupleReader.hh"
#include "TMath.h"
#include <iostream>
using std::string;
using std::vector;
YcutCalculator::YcutCalculator( const string & algo ) :
algorithm(algo) {}
void YcutCalculator::print() const {
std::cout << "YcutCalculator algorithm: " << algorithm << std::endl;
}
vector<Double_t>
YcutCalculator::getValues( NtupleReader* ntr,
const vector<Double_t> & Ycutpoints,
const string & reco ) const {
size_t n= Ycutpoints.size();
vector<Double_t> NJets( n );
for( size_t i= 0; i < n; i++ ) {
Double_t ycut= Ycutpoints[i];
for( int njet= 2; njet <= 6; njet++ ) {
// Double_t ymergelo= 0.0;
// Double_t ymergehi= 0.0;
// if( algorithm == "jade" ) {
// ymergehi= ntr->getYmergeE( reco, njet-1 );
// ymergelo= ntr->getYmergeE( reco, njet );
// }
// else if( algorithm == "durham" ) {
// ymergehi= ntr->getYmergeD( reco, njet-1 );
// ymergelo= ntr->getYmergeD( reco, njet );
// }
Double_t ymergehi= ntr->getYmerge( algorithm, reco, njet-1 );
Double_t ymergelo= ntr->getYmerge( algorithm, reco, njet );
NJets[i]= 0.0;
if( ymergelo > 0.0 and ymergehi > 0.0 and
ymergelo < ycut and ycut < ymergehi ) {
NJets[i]= njet;
break;
}
}
}
return NJets;
}