15 #include "TStopwatch.h" 30 1.5, 2.0, 2.5, 3.0, 3.5, 4.0,
31 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0,
32 16.0, 18.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0,
33 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0 };
39 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 20.0, 50.0,
40 100, 500, 1000, 5000, 7500, 50000};
56 if(BDTPt < 0) BDTPt = PrelimFit;
57 if(BDTPt > 250) BDTPt = PrelimFit;
63 if (Quality == 3) scaleF = 1.15;
64 if (Quality == 2) scaleF = 1.3;
65 if (Quality == 1) scaleF = 1.7;
67 BDTPt1 = scaleF*BDTPt1;
80 if (BDTPt1 > 140) BDTPt1 = 140;
81 if (BDTPt1 < 0) BDTPt1 = 0;
92 TChain
chain(ntuplename);
93 chain.Add(filestomerge);
94 chain.Merge(outputfile);
104 TFile
f(filenametosort);
105 TNtuple *
tree = (TNtuple*)f.Get(ntuplename);
106 int nentries = (
int)tree->GetEntries();
109 tree->Draw(
"Event",
"",
"goff");
110 int *
index =
new int[nentries];
113 TMath::Sort(nentries,tree->GetV1(),
index);
117 TFile
f2(outputfile,
"recreate");
120 TTree *tsorted = (TTree*)tree->CloneTree(0);
121 for (
int i=0;
i<nentries;
i++) {
122 tree->GetEntry(index[
i]);
static const double pts[33]
void sortNtupleByEvent(const char *ntuplename, const char *filenametosort, const char *outputfile)
const double twoJets_scale[16]
void mergeNtuples(const char *ntuplename, const char *filestomerge, const char *outputfile)
const std::vector< double > twoJetsScale
const std::vector< double > ptScale
float processPrediction(float BDTPt, int Quality, float PrelimFit)