-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVertexTree.cc
More file actions
42 lines (29 loc) · 823 Bytes
/
VertexTree.cc
File metadata and controls
42 lines (29 loc) · 823 Bytes
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
#include "HiggsAnalysisTools/include/VertexTree.hh"
// C++
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <cmath>
// Root
#include "TFile.h"
#include "TTree.h"
VertexTree::VertexTree(const char * filename) {
myFile = new TFile(filename,"RECREATE");
myTree = new TTree("T1","higgs vertexing tree");
myTree->Branch("deltaZ", &myDeltaZ, "deltaZ/F");
myTree->Branch("deltaXY", &myDeltaXY, "deltaXY/F");
myTree->Branch("deltaXYZ", &myDeltaXYZ, "deltaXYZ/F");
}
VertexTree::~VertexTree() { delete myFile; }
void VertexTree::store() { myTree->Fill(); }
void VertexTree::save() {
myFile->cd();
myTree->Write();
myFile->Close();
}
void VertexTree::fillAll(float dz, float dxy, float dxyz) {
myDeltaZ = dz;
myDeltaXY = dxy;
myDeltaXYZ = dxyz;
}