.. _program_listing_file_xAODAnaHelpers_TreeAlgo.h: Program Listing for File TreeAlgo.h =================================== |exhale_lsh| :ref:`Return to documentation for file ` (``xAODAnaHelpers/TreeAlgo.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef xAODAnaHelpers_TreeAlgo_H #define xAODAnaHelpers_TreeAlgo_H #include "TTree.h" #include // algorithm wrapper #include "xAODAnaHelpers/Algorithm.h" class TreeAlgo : public xAH::Algorithm { // put your configuration variables here as public variables. // that way they can be set directly from CINT and python. public: // choose whether the tree gets saved in the same directory as output histograms bool m_outHistDir = false; std::string m_treeStreamName = "tree"; // holds bools that control which branches are filled std::string m_evtDetailStr = ""; std::string m_trigDetailStr = ""; std::string m_muDetailStr = ""; std::string m_elDetailStr = ""; std::string m_jetDetailStr = ""; std::string m_trigJetDetailStr = ""; std::string m_truthJetDetailStr = ""; std::string m_fatJetDetailStr = ""; std::string m_truthFatJetDetailStr = ""; std::string m_tauDetailStr = ""; std::string m_METDetailStr = ""; std::string m_METReferenceDetailStr = ""; std::string m_photonDetailStr = ""; std::string m_clusterDetailStr = ""; std::string m_truthParticlesDetailStr = ""; std::string m_trackParticlesDetailStr = ""; std::string m_vertexDetailStr = ""; std::string m_evtContainerName = ""; std::string m_muContainerName = ""; std::string m_elContainerName = ""; std::string m_jetContainerName = ""; std::string m_jetBranchName = "jet"; std::string m_truthJetContainerName = ""; std::string m_truthJetBranchName = "truthJet"; std::string m_trigJetContainerName = ""; std::string m_trigJetBranchName = "trigJet"; std::string m_fatJetContainerName = ""; std::string m_fatJetBranchName = ""; // default is to use container name std::string m_truthFatJetContainerName = ""; std::string m_truthFatJetBranchName = "truth_fatjet"; std::string m_tauContainerName = ""; std::string m_METContainerName = ""; std::string m_METReferenceContainerName = ""; std::string m_photonContainerName = ""; std::string m_clusterContainerName = ""; std::string m_clusterBranchName = "CaloCalTopoClusters"; std::string m_truthParticlesContainerName = ""; std::string m_truthParticlesBranchName = "xAH_truth"; std::string m_trackParticlesContainerName = ""; std::string m_l1JetContainerName = ""; std::string m_l1JetBranchName = "L1Jet"; std::string m_vertexBranchName = "vertex"; bool m_sortL1Jets = false; bool m_retrievePV = true; // if these are set, assume systematics are being processed over std::string m_muSystsVec = ""; std::string m_elSystsVec = ""; std::string m_tauSystsVec = ""; std::string m_jetSystsVec = ""; std::string m_photonSystsVec = ""; std::string m_fatJetSystsVec = ""; std::string m_metSystsVec = ""; float m_units = 1e3; int m_autoFlush = 0; protected: std::vector m_jetDetails; std::vector m_trigJetDetails; std::vector m_fatJetDetails; std::vector m_jetContainers; std::vector m_truthJetContainers; std::vector m_trigJetContainers; std::vector m_fatJetContainers; std::vector m_l1JetContainers; std::vector m_vertexContainers; std::vector m_truthParticlesContainers; std::vector m_jetBranches; std::vector m_truthJetBranches; std::vector m_trigJetBranches; std::vector m_fatJetBranches; std::vector m_l1JetBranches; std::vector m_vertexBranches; std::vector m_truthParticlesBranches; std::vector m_clusterDetails; std::vector m_clusterContainers; std::vector m_clusterBranches; std::vector m_vertexDetails; std::map m_trees; public: // this is a standard constructor TreeAlgo (); // these are the functions inherited from Algorithm virtual EL::StatusCode setupJob (EL::Job& job); virtual EL::StatusCode fileExecute (); virtual EL::StatusCode histInitialize (); virtual EL::StatusCode changeInput (bool firstFile); virtual EL::StatusCode initialize (); virtual EL::StatusCode execute (); virtual EL::StatusCode postExecute (); virtual EL::StatusCode finalize (); virtual EL::StatusCode histFinalize (); // Help tree creator function virtual HelpTreeBase* createTree(xAOD::TEvent *event, TTree* tree, TFile* file, const float units, bool debug, xAOD::TStore* store); // this is needed to distribute the algorithm to the workers ClassDef(TreeAlgo, 1); }; #endif