forked from UCATLAS/xAODAnaHelpers
/
TruthContainer.h
75 lines (53 loc) · 1.94 KB
/
TruthContainer.h
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
73
74
75
#ifndef xAODAnaHelpers_TruthContainer_H
#define xAODAnaHelpers_TruthContainer_H
#include <TTree.h>
#include <TLorentzVector.h>
#include <vector>
#include <string>
#include "xAODTruth/TruthParticle.h"
#include <xAODAnaHelpers/HelperClasses.h>
#include <xAODAnaHelpers/HelperFunctions.h>
#include <xAODAnaHelpers/TruthPart.h>
#include <xAODAnaHelpers/ParticleContainer.h>
namespace xAH {
class TruthContainer : public ParticleContainer<TruthPart,HelperClasses::TruthInfoSwitch>
{
public:
TruthContainer(const std::string& name = "truth", const std::string& detailStr="", float units = 1e3);
virtual ~TruthContainer();
virtual void setTree (TTree *tree);
virtual void setBranches(TTree *tree);
virtual void clear();
virtual void FillTruth( const xAOD::TruthParticle* truth );
virtual void FillTruth( const xAOD::IParticle* particle );
using ParticleContainer::setTree; // make other overloaded version of execute() to show up in subclass
protected:
virtual void updateParticle(uint idx, TruthPart& truth);
private:
//
// Vector branches
//
// All
std::vector<int>* m_pdgId;
std::vector<int>* m_status;
std::vector<int>* m_barcode;
// type
std::vector<int>* m_is_higgs;
std::vector<int>* m_is_bhad;
// bVtx
std::vector<float>* m_Bdecay_x;
std::vector<float>* m_Bdecay_y;
std::vector<float>* m_Bdecay_z;
// parents
std::vector<int>* m_nParents;
std::vector< std::vector<int> >* m_parent_pdgId;
std::vector< std::vector<int> >* m_parent_barcode;
std::vector< std::vector<int> >* m_parent_status;
// children
std::vector<int>* m_nChildren;
std::vector< std::vector<int> >* m_child_pdgId;
std::vector< std::vector<int> >* m_child_barcode;
std::vector< std::vector<int> >* m_child_status;
};
}
#endif // xAODAnaHelpers_TruthContainer_H