Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // ----------------------------------------------------------------------------
0002 // 'SCheckTrackPairs.h'
0003 // Derek Anderson
0004 // 11.14.2023
0005 //
0006 // SCorrelatorQAMaker plugin to iterate through
0007 // all pairs of tracks in an event and fill
0008 // tuples/histograms comparing them.
0009 // ----------------------------------------------------------------------------
0010 
0011 #ifndef SCORRELATORQAMAKER_SCHECKTRACKPAIRS_H
0012 #define SCORRELATORQAMAKER_SCHECKTRACKPAIRS_H
0013 
0014 // c++ utilities
0015 #include <string>
0016 #include <vector>
0017 #include <utility>
0018 // root utilities
0019 #include <TF1.h>
0020 #include <TNtuple.h>
0021 #include <Math/Vector3D.h>
0022 // f4a libraries
0023 #include <fun4all/SubsysReco.h>
0024 #include <fun4all/Fun4AllReturnCodes.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 // tracking libraries
0032 #include <trackbase_historic/SvtxTrack.h>
0033 #include <trackbase_historic/SvtxTrackMap.h>
0034 #include <trackbase_historic/TrackAnalysisUtils.h>
0035 // analysis utilities
0036 #include <scorrelatorutilities/Tools.h>
0037 #include <scorrelatorutilities/Types.h>
0038 #include <scorrelatorutilities/Constants.h>
0039 #include <scorrelatorutilities/Interfaces.h>
0040 // plugin definitions
0041 #include "SBaseQAPlugin.h"
0042 #include "SCheckTrackPairsConfig.h"
0043 
0044 // make common namespaces implicit
0045 using namespace std;
0046 
0047 
0048 
0049 namespace SColdQcdCorrelatorAnalysis {
0050 
0051   // SCheckTrackPairs definition ----------------------------------------------
0052 
0053   class SCheckTrackPairs : public SubsysReco, public SBaseQAPlugin<SCheckTrackPairsConfig> {
0054 
0055     public:
0056 
0057       // ctor/dtor
0058       SCheckTrackPairs(const string& name = "CheckTrackPairs") : SubsysReco(name) {};
0059       ~SCheckTrackPairs() {};
0060 
0061       // F4A methods
0062       int Init(PHCompositeNode*)          override;
0063       int process_event(PHCompositeNode*) override;
0064       int End(PHCompositeNode*)           override;
0065 
0066     private:
0067 
0068       // internal methods
0069       void InitTuples();
0070       void SaveOutput();
0071       void ResetVectors();
0072       void DoDoubleTrackLoop(PHCompositeNode* topNode);
0073       bool IsGoodTrack(SvtxTrack* track, PHCompositeNode* topNode);
0074 
0075       // vector members
0076       vector<float>             m_vecTrackPairLeaves;
0077       vector<TrkrDefs::cluskey> m_vecClustKeysA;
0078       vector<TrkrDefs::cluskey> m_vecClustKeysB;
0079 
0080       // root members
0081       TNtuple* m_ntTrackPairs;
0082 
0083   };  // end SCheckTrackPairs
0084 
0085 }  // end SColdQcdCorrelatorAnalysis namespace
0086 
0087 #endif
0088 
0089 // end ------------------------------------------------------------------------