Tree Maker Base Class¶
-
class HelpTreeBase¶
Public Functions
-
HelpTreeBase(xAOD::TEvent *event, TTree *tree, TFile *file, const float units = 1e3, bool debug = false, xAOD::TStore *store = nullptr, std::string nominalTreeName = "nominal")¶
-
HelpTreeBase(TTree *tree, TFile *file, xAOD::TEvent *event = nullptr, xAOD::TStore *store = nullptr, const float units = 1e3, bool debug = false, std::string nominalTreeName = "nominal")¶
-
virtual ~HelpTreeBase()¶
-
void AddEvent(const std::string &detailStr = "")¶
-
void AddTrigger(const std::string &detailStr = "")¶
-
void AddJetTrigger(const std::string &detailStr = "")¶
-
void AddMuons(const std::string &detailStr = "", const std::string &muonName = "muon")¶
-
void AddElectrons(const std::string &detailStr = "", const std::string &elecName = "el")¶
-
void AddPhotons(const std::string &detailStr = "", const std::string &photonName = "ph")¶
-
void AddClusters(const std::string &detailStr = "", const std::string &clusterName = "cl")¶
-
void AddJets(const std::string &detailStr = "", const std::string &jetName = "jet")¶
-
void AddL1Jets(const std::string &jetName = "")¶
-
void AddTruthParts(const std::string &detailStr = "", const std::string &truthName = "xAH_truth")¶
-
void AddTrackParts(const std::string &detailStr = "", const std::string &trackName = "trk")¶
-
void AddVertices(const std::string &detailStr = "", const std::string &vertexName = "vertex")¶
-
void AddTruthVertices(const std::string &detailStr = "", const std::string &vertexName = "truth_vertex")¶
-
void AddFatJets(const std::string &detailStr = "", const std::string &fatjetName = "fatjet", const std::string &subjetDetailStr = "", const std::string &suffix = "")¶
Declare a new collection of fatjets to be written to the output tree.
- Parameters
detailStr – A (space-separated) list of detail options. These keywords specify exactly which information about each jet is written out. Current influential options are:
kinematic
substructure
constituent
constituentAll
fatjetName – The (prefix) name of the container. Default:
fatjet
.subjetDetailStr – List of detail options to pass to the subjet container. See :cpp:member:
HelpTreeBase::AddJets
for list of supported values.
-
void AddTruthFatJets(const std::string &detailStr = "", const std::string &truthFatJetName = "truth_fatjet")¶
-
void AddTaus(const std::string &detailStr = "", const std::string &tauName = "tau")¶
-
void AddMET(const std::string &detailStr = "", const std::string &metName = "met")¶
-
void FillEvent(const xAOD::EventInfo *eventInfo, xAOD::TEvent *event = nullptr, const xAOD::VertexContainer *vertices = nullptr)¶
-
void FillTrigger(const xAOD::EventInfo *eventInfo)¶
-
void FillJetTrigger()¶
-
void FillMuons(const xAOD::MuonContainer *muons, const xAOD::Vertex *primaryVertex, const std::string &muonName = "muon")¶
-
void FillMuon(const xAOD::Muon *muon, const xAOD::Vertex *primaryVertex, const std::string &muonName = "muon")¶
-
void FillElectrons(const xAOD::ElectronContainer *electrons, const xAOD::Vertex *primaryVertex, const std::string &elecName = "el")¶
-
void FillElectron(const xAOD::Electron *elec, const xAOD::Vertex *primaryVertex, const std::string &elecName = "el")¶
-
void FillPhotons(const xAOD::PhotonContainer *photons, const std::string &photonName = "ph")¶
-
void FillPhoton(const xAOD::Photon *photon, const std::string &photonName = "ph")¶
-
void FillClusters(const xAOD::CaloClusterContainer *clusters, const std::string &clusterName = "cl")¶
-
void FillCluster(const xAOD::CaloCluster *cluster, const std::string &clusterName = "cl")¶
-
void FillJets(const xAOD::JetContainer *jets, int pvLocation = -1, const std::string &jetName = "jet")¶
-
void FillJet(const xAOD::Jet *jet_itr, const xAOD::Vertex *pv, int pvLocation, const std::string &jetName = "jet")¶
-
void FillLegacyL1Jets(const xAOD::JetRoIContainer *jets, const std::string &jetName = "L1Jet", bool sortL1Jets = false)¶
-
template<typename T>
inline void FillPhase1L1Jets(T *&jets, const std::string &jetName = "L1Jet", bool sortL1Jets = false)¶
-
void FillTruth(const xAOD::TruthParticleContainer *truth, const std::string &truthName = "xAH_truth")¶
-
void FillTruth(const xAOD::TruthParticle *truthPart, const std::string &truthName)¶
-
void FillTracks(const xAOD::TrackParticleContainer *tracks, const std::string &trackName = "trk")¶
-
void FillTrack(const xAOD::TrackParticle *trackPart, const std::string &trackName)¶
-
void FillVertices(const xAOD::VertexContainer *vertices, const std::string &vertexName = "vertex")¶
-
void FillTruthVertices(const xAOD::TruthVertexContainer *truthVertices, const std::string &truthVertexName = "truth_vertex")¶
-
void FillFatJets(const xAOD::JetContainer *fatJets, int pvLocation = 0, const std::string &fatjetName = "fatjet", const std::string &suffix = "")¶
Write a container of jets to the specified container name (and optionally suffix). The container name and suffix should be declared beforehand using
AddFatJets()
. This clears the current branch state for the collection so it only makes sense to call once per call toFill()
.- Parameters
fatJets – A container of jets to be written out.
fatjetName – The name of the output collection to write to.
suffix – The suffix of the output collection to write to.
-
void FillFatJet(const xAOD::Jet *fatjet_itr, int pvLocation = 0, const std::string &fatjetName = "fatjet", const std::string &suffix = "")¶
-
void FillTruthFatJets(const xAOD::JetContainer *truthFatJets, int pvLocation = 0, const std::string &truthFatJetName = "truth_fatjet")¶
-
void FillTruthFatJet(const xAOD::Jet *truth_fatjet_itr, int pvLocation = 0, const std::string &truthFatJetName = "truth_fatjet")¶
-
void FillTaus(const xAOD::TauJetContainer *taus, const std::string &tauName = "tau")¶
-
void FillTau(const xAOD::TauJet *tau, const std::string &tauName = "tau")¶
-
void FillMET(const xAOD::MissingETContainer *met, const std::string &metName = "met")¶
-
void Fill()¶
-
void ClearEvent()¶
-
void ClearTrigger()¶
-
void ClearJetTrigger()¶
-
void ClearMuons(const std::string &jetName = "muon")¶
-
void ClearElectrons(const std::string &elecName = "el")¶
-
void ClearPhotons(const std::string &photonName = "ph")¶
-
void ClearClusters(const std::string &clusterName = "cl")¶
-
void ClearJets(const std::string &jetName = "jet")¶
-
void ClearL1Jets(const std::string &jetName = "L1Jet")¶
-
void ClearTruth(const std::string &truthName)¶
-
void ClearTracks(const std::string &trackName)¶
-
void ClearFatJets(const std::string &fatjetName, const std::string &suffix = "")¶
-
void ClearTruthFatJets(const std::string &truthFatJetName = "truth_fatjet")¶
-
void ClearTaus(const std::string &tauName = "tau")¶
-
void ClearMET(const std::string &metName = "met")¶
-
void ClearVertices(const std::string &vertexName = "vertex")¶
-
void ClearTruthVertices(const std::string &vertexName = "truth_vertex")¶
-
bool writeTo(TFile *file)¶
-
inline virtual void AddEventUser(const std::string &detailStr = "")¶
-
inline virtual void AddTriggerUser(const std::string &detailStr = "")¶
-
inline virtual void AddJetTriggerUser(const std::string &detailStr = "")¶
-
inline virtual void AddMuonsUser(const std::string &detailStr = "", const std::string &muonName = "muon")¶
-
inline virtual void AddElectronsUser(const std::string &detailStr = "", const std::string &elecName = "el")¶
-
inline virtual void AddPhotonsUser(const std::string &detailStr = "", const std::string &photonName = "ph")¶
-
inline virtual void AddClustersUser(const std::string &detailStr = "", const std::string &clusterName = "cl")¶
-
inline virtual void AddJetsUser(const std::string &detailStr = "", const std::string &jetName = "jet")¶
-
inline virtual void AddTruthUser(const std::string &truthName = "", const std::string &detailStr = "xAH_truth")¶
-
inline virtual void AddTracksUser(const std::string &trackName = "", const std::string &detailStr = "trk")¶
-
inline virtual void AddFatJetsUser(const std::string &detailStr = "", const std::string &fatjetName = "", const std::string &suffix = "")¶
Declare a new fat jet collection. Automatically called once per call to
AddFatJets()
; override this if you want to provide your own additional branches for fatjets.- Parameters
detailStr – The space-separated list of detail requested by the called.
fatjetName – The (prefix) name of the output collection.
suffix – A suffix to be appeneded to the end of the output branch name(s).
-
inline virtual void AddTruthFatJetsUser(const std::string &detailStr = "", const std::string &truthFatJetName = "truth_fatjet")¶
-
inline virtual void AddTausUser(const std::string &detailStr = "", const std::string &tauName = "tau")¶
-
inline virtual void AddMETUser(const std::string &detailStr = "", const std::string &metName = "met")¶
-
inline virtual void ClearEventUser()¶
-
inline virtual void ClearTriggerUser()¶
-
inline virtual void ClearMuonsUser(const std::string&)¶
-
inline virtual void ClearElectronsUser(const std::string&)¶
-
inline virtual void ClearPhotonsUser(const std::string&)¶
-
inline virtual void ClearClustersUser(const std::string&)¶
-
inline virtual void ClearTruthUser(const std::string&)¶
-
inline virtual void ClearTracksUser(const std::string&)¶
-
inline virtual void ClearJetsUser(const std::string&)¶
-
inline virtual void ClearFatJetsUser(const std::string&, const std::string&)¶
-
inline virtual void ClearTruthFatJetsUser(const std::string&)¶
-
inline virtual void ClearTausUser(const std::string&)¶
-
inline virtual void ClearMETUser(const std::string&)¶
-
inline virtual void FillEventUser(const xAOD::EventInfo*)¶
-
inline virtual void FillMuonsUser(const xAOD::Muon*, const std::string&, const xAOD::Vertex*)¶
-
inline virtual void FillElectronsUser(const xAOD::Electron*, const std::string&, const xAOD::Vertex*)¶
-
inline virtual void FillPhotonsUser(const xAOD::Photon*, const std::string&)¶
-
inline virtual void FillClustersUser(const xAOD::CaloCluster*, const std::string&)¶
-
inline virtual void FillJetsUser(const xAOD::Jet*, const std::string&)¶
-
inline virtual void FillTruthUser(const xAOD::TruthParticle*, const std::string&)¶
-
inline virtual void FillTracksUser(const xAOD::TrackParticle*, const std::string&)¶
-
inline virtual void FillFatJetsUser(const xAOD::Jet*, int, const std::string&, const std::string&)¶
Called once per call to
FillFatJets()
.Ooverride this if you want to any additional information to your jet collection.- Parameters
jet – a pointer to the current xAOD::Jet object that should be written to the output branch(s).
fatjetName – the (prefix) name of the output collection
suffix – the suffix to append to output branches.
-
inline virtual void FillTruthFatJetsUser(const xAOD::Jet*, int, const std::string&)¶
-
inline virtual void FillTausUser(const xAOD::TauJet*, const std::string&)¶
-
inline virtual void FillMETUser(const xAOD::MissingETContainer*, const std::string&)¶
-
inline virtual void FillTriggerUser(const xAOD::EventInfo*)¶
-
inline virtual void FillJetTriggerUser()¶
Public Members
-
xAOD::TEvent *m_event¶
-
xAOD::TStore *m_store¶
-
std::string m_vertexContainerName = "PrimaryVertices"¶
Name of vertex container.
-
std::string m_truthVertexContainerName = "TruthVertices"¶
-
HelperClasses::TriggerInfoSwitch *m_trigInfoSwitch¶
-
std::string m_triggerSelection¶
-
TrigConf::xAODConfigTool *m_trigConfTool¶
-
Trig::TrigDecisionTool *m_trigDecTool¶
Public Static Functions
-
static std::string FatJetCollectionName(const std::string &fatjetName = "fatjet", const std::string &suffix = "")¶
Helper function to lookup each fatjet container name/suffix combo in the internal map of vectors for vectors. You probably don’t need this but it might be useful if you’re implementing
[Add/Fill/Clear]FatJetsUser()
.- Parameters
fatjetName – The (prefix) name of the container.
suffix – The container branch suffix.
- Returns
a string that uniquely identifies the collection name/suffix in the lookup map.
Protected Functions
-
template<typename T, typename U, typename V>
void safeFill(const V *xAODObj, SG::AuxElement::ConstAccessor<T> &accessor, std::vector<U> &destination, U defaultValue, int m_units = 1)¶
Protected Attributes
-
TTree *m_tree¶
-
int m_units¶
-
bool m_debug¶
-
bool m_isMC¶
-
std::string m_nominalTreeName¶
-
bool m_nominalTree¶
-
int m_passL1¶
-
int m_passHLT¶
-
unsigned int m_masterKey¶
-
unsigned int m_L1PSKey¶
-
unsigned int m_HLTPSKey¶
-
std::vector<std::string> m_elTrigForMatching¶
-
std::vector<std::string> m_passedTriggers¶
-
std::vector<std::string> m_disabledTriggers¶
-
std::vector<float> m_triggerPrescales¶
-
std::vector<float> m_triggerPrescalesLumi¶
-
std::vector<std::string> m_isPassBitsNames¶
-
std::vector<unsigned int> m_isPassBits¶
-
std::map<std::string, xAH::JetContainer*> m_jets¶
-
std::map<std::string, xAH::L1JetContainer*> m_l1Jets¶
-
std::map<std::string, xAH::TruthContainer*> m_truth¶
-
std::map<std::string, xAH::TrackContainer*> m_tracks¶
-
std::map<std::string, xAH::FatJetContainer*> m_fatjets¶
-
std::map<std::string, xAH::FatJetContainer*> m_truth_fatjets¶
-
std::map<std::string, xAH::MuonContainer*> m_muons¶
-
std::map<std::string, std::vector<std::string>> m_MuonRecoEff_SF_sysNames¶
-
std::map<std::string, std::vector<std::string>> m_MuonIsoEff_SF_sysNames¶
-
std::map<std::string, std::map<std::string, std::vector<std::string>>> m_MuonTrigEff_SF_sysNames¶
-
std::vector<std::string> m_MuonTTVAEff_SF_sysNames¶
-
std::map<std::string, xAH::ElectronContainer*> m_elecs¶
-
std::map<std::string, xAH::PhotonContainer*> m_photons¶
-
std::map<std::string, xAH::ClusterContainer*> m_clusters¶
-
std::map<std::string, xAH::TauContainer*> m_taus¶
-
std::map<std::string, xAH::MetContainer*> m_met¶
-
std::map<std::string, xAH::VertexContainer*> m_vertices¶
-
std::map<std::string, xAH::VertexContainer*> m_truth_vertices¶
-
HelpTreeBase(xAOD::TEvent *event, TTree *tree, TFile *file, const float units = 1e3, bool debug = false, xAOD::TStore *store = nullptr, std::string nominalTreeName = "nominal")¶