Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:13:18

0001 // ----------------------------------------------------------------------------
0002 // 'SMakeClustQATree.h'
0003 // Derek Anderson
0004 // 01.21.2024
0005 //
0006 // SCorrelatorQAMaker plugin to produce the QA tree
0007 // for calorimeter clusters.
0008 // ----------------------------------------------------------------------------
0009 
0010 #ifndef SCORRELATORQAMAKER_SMAKECLUSTQATREE_H
0011 #define SCORRELATORQAMAKER_SMAKECLUSTQATREE_H
0012 
0013 // c++ utilities
0014 #include <string>
0015 #include <vector>
0016 #include <utility>
0017 // root utilities
0018 #include <TF1.h>
0019 #include <TTree.h>
0020 #include <Math/Vector3D.h>
0021 // f4a libraries
0022 #include <fun4all/SubsysReco.h>
0023 #include <fun4all/Fun4AllReturnCodes.h>
0024 #include <fun4all/Fun4AllHistoManager.h>
0025 // phool libraries
0026 #include <phool/phool.h>
0027 #include <phool/getClass.h>
0028 #include <phool/PHIODataNode.h>
0029 #include <phool/PHNodeIterator.h>
0030 #include <phool/PHCompositeNode.h>
0031 // calo includes
0032 #include <calobase/RawCluster.h>
0033 #include <calobase/RawClusterUtility.h>
0034 #include <calobase/RawClusterContainer.h>
0035 #include <calobase/RawTower.h>
0036 #include <calobase/RawTowerGeom.h>
0037 #include <calobase/RawTowerContainer.h>
0038 #include <calobase/RawTowerGeomContainer.h>
0039 #include <calotrigger/CaloTriggerInfo.h>
0040 // analysis utilities
0041 #include <scorrelatorutilities/Tools.h>
0042 #include <scorrelatorutilities/Types.h>
0043 #include <scorrelatorutilities/Constants.h>
0044 #include <scorrelatorutilities/Interfaces.h>
0045 // plugin definitions
0046 #include "SBaseQAPlugin.h"
0047 #include "SMakeClustQATreeConfig.h"
0048 #include "SMakeClustQATreeOutput.h"
0049 
0050 // make common namespaces implicit
0051 using namespace std;
0052 
0053 
0054 
0055 namespace SColdQcdCorrelatorAnalysis {
0056 
0057   // SMakeClustQATree definition ----------------------------------------------
0058 
0059   class SMakeClustQATree : public SubsysReco, public SBaseQAPlugin<SMakeClustQATreeConfig> {
0060 
0061     public:
0062 
0063       // ctor/dtor
0064       SMakeClustQATree(const string& name = "ClustQATree") : SubsysReco(name) {};
0065       ~SMakeClustQATree() {};
0066 
0067       // F4A methods
0068       int Init(PHCompositeNode*)          override;
0069       int process_event(PHCompositeNode*) override;
0070       int End(PHCompositeNode*)           override;
0071 
0072     private:
0073 
0074       // internal methods
0075       void InitTree();
0076       void SaveOutput();
0077       void DoClustLoop(PHCompositeNode* topNode, const string node);
0078       bool IsGoodCluster(const RawCluster* cluster);
0079 
0080       // output
0081       SMakeClustQATreeOutput m_output;
0082 
0083       // root members
0084       TTree* m_tClustQA;
0085 
0086   };  // end SMakeClustQATree
0087 
0088 }  // end SColdQcdCorrelatorAnalysis namespace
0089 
0090 #endif
0091 
0092 // end ------------------------------------------------------------------------