-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedTriggerTree.cc
More file actions
72 lines (54 loc) · 2.23 KB
/
RedTriggerTree.cc
File metadata and controls
72 lines (54 loc) · 2.23 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include "HiggsAnalysisTools/include/RedTriggerTree.hh"
// C++
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <cmath>
RedTriggerTree::RedTriggerTree(const char * filename) {
myFile = new TFile(filename,"RECREATE");
myTree = new TTree("T1","trigger tree");
myTree->Branch("decayEE", &myDecayEE, "decayEE/B");
myTree->Branch("decayMM", &myDecayMM, "decayMM/B");
myTree->Branch("decayEM", &myDecayEM, "decayEM/B");
myTree->Branch("promptDecayEE", &myPromptDecayEE, "promptDecayEE/B");
myTree->Branch("promptDecayMM", &myPromptDecayMM, "promptDecayMM/B");
myTree->Branch("promptDecayEM", &myPromptDecayEM, "promptDecayEM/B");
myTree->Branch("HLTSingleElectron", &myHLTSingleElectron, "HLTSingleElectron/B");
// myTree->Branch("HLTSingleElectronRelaxed", &myHLTSingleElectronRelaxed, "HLTSingleElectronRelaxed/B");
// myTree->Branch("HLTSingleElectronOR", &myHLTSingleElectronOR, "HLTSingleElectronOR/B");
myTree->Branch("HLTSingleMuon", &myHLTSingleMuon, "HLTSingleMuon/B");
// myTree->Branch("HLTSingleMuonRelaxed", &myHLTSingleMuonRelaxed, "HLTSingleMuonRelaxed/B");
// myTree->Branch("HLTSingleMuonOR", &myHLTSingleMuonOR, "HLTSingleMuonOR/B");
}
RedTriggerTree::~RedTriggerTree() {
delete myFile;
}
void RedTriggerTree::fillMcTruth(bool decayEE, bool decayMM, bool decayEM, bool promptEE, bool promptMM, bool promptEM) {
myDecayEE = decayEE;
myDecayMM = decayMM;
myDecayEM = decayEM;
myPromptDecayEE = promptEE;
myPromptDecayMM = promptMM;
myPromptDecayEM = promptEM;
}
void RedTriggerTree::fillHLTElectrons(bool singleEle, bool singleEleRelaxed, bool singleEleOR) {
myHLTSingleElectron = singleEle;
// myHLTSingleElectronRelaxed = singleEleRelaxed;
// myHLTSingleElectronOR = singleEleOR;
}
void RedTriggerTree::fillHLTMuons(bool singleMuon, bool singleMuonRelaxed, bool singleMuonOR) {
myHLTSingleMuon = singleMuon;
// myHLTSingleMuonRelaxed = singleMuonRelaxed;
// myHLTSingleMuonOR = singleMuonOR;
}
void RedTriggerTree::store()
{
myTree->Fill();
}
void RedTriggerTree::save()
{
myFile->cd();
myTree->Write();
myFile->Close();
}