-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsoTracksTree.cc
More file actions
49 lines (41 loc) · 1.41 KB
/
IsoTracksTree.cc
File metadata and controls
49 lines (41 loc) · 1.41 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
#include "IsoTracksTree.h"
#include "Math/GenVector/PtEtaPhiE4D.h"
#include "CMS3.h"
#include "IsoTrackVeto.h"
#include "StopSelections.h"
IsoTracksTree::IsoTracksTree ()
{
}
using namespace tas;
void IsoTracksTree::FillCommon (int idx)
{
if (idx < 0) return;
//if electron or muon, iso < 0.2
isoTracks_charge.push_back ( pfcands_charge().at(idx) );
isoTracks_p4.push_back ( pfcands_p4().at(idx) );
isoTracks_absIso.push_back( TrackIso(idx,0.3,0.1) );
isoTracks_dz.push_back ( pfcands_dz().at(idx) );
isoTracks_pdgId.push_back ( pfcands_particleId().at(idx));
}
void IsoTracksTree::Reset()
{
isoTracks_p4.clear();
isoTracks_charge.clear();
isoTracks_absIso.clear();
isoTracks_dz.clear();
isoTracks_pdgId.clear();
isoTracks_selectedidx.clear();
isoTracks_nselected = -9999;
isoTracks_isVetoTrack.clear();
}
void IsoTracksTree::SetBranches(TTree* tree)
{
tree->Branch("isoTracks_p4", &isoTracks_p4);
tree->Branch("isoTracks_charge", &isoTracks_charge);
tree->Branch("isoTracks_absIso", &isoTracks_absIso);
tree->Branch("isoTracks_dz", &isoTracks_dz);
tree->Branch("isoTracks_pdgId", &isoTracks_pdgId);
tree->Branch("isoTracks_selectedidx", &isoTracks_selectedidx);
tree->Branch("isoTracks_nselected", &isoTracks_nselected);
tree->Branch("isoTracks_isVetoTrack", &isoTracks_isVetoTrack);
}