-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedEleIDTree.cc
More file actions
58 lines (46 loc) · 1.3 KB
/
RedEleIDTree.cc
File metadata and controls
58 lines (46 loc) · 1.3 KB
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
49
50
51
52
53
54
55
56
57
58
#include "../include/RedEleIDTree.h"
// C++
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <cmath>
// Root
#include "TFile.h"
#include "TTree.h"
RedEleIDTree::RedEleIDTree(const char * filename) {
myFile = new TFile(filename,"RECREATE");
myTree = new TTree("T1","eleID tree");
// GENERAL block
myTree->Branch("class", &myClass, "class/I");
myTree->Branch("hOverE", &myHOverE, "hOverE/F");
myTree->Branch("eOverP", &myEOverP, "eOverP/F");
myTree->Branch("eOverPout", &myEOverPout, "eOverPout/F");
myTree->Branch("deltaEtaAtVtx", &myDeltaEtaAtVtx, "deltaEtaAtVtx/F");
myTree->Branch("deltaPhiAtVtx", &myDeltaPhiAtVtx, "deltaPhiAtVtx/F");
myTree->Branch("sigmaIEtaIEta", &mySigmaIEtaIEta, "sigmaIEtaIEta/F");
}
RedEleIDTree::~RedEleIDTree()
{
delete myFile;
}
void RedEleIDTree::store()
{
myTree->Fill();
}
void RedEleIDTree::save()
{
myFile->cd();
myTree->Write();
myFile->Close();
}
void RedEleIDTree::fillAll(int cl, float hoe, float eop, float eopo, float deta, float dphi, float see)
{
myClass = cl;
myHOverE = hoe;
myEOverP = eop;
myEOverPout = eopo;
myDeltaEtaAtVtx = deta;
myDeltaPhiAtVtx = dphi;
mySigmaIEtaIEta = see;
}