Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /// ---------------------------------------------------------------------------
0002 /*! \file   TrkInterfaces.cc
0003  *  \author Derek Anderson
0004  *  \date   03.05.2024
0005  *
0006  *  Track-related interfaces.
0007  */
0008 /// ---------------------------------------------------------------------------
0009 
0010 #define SCORRELATORUTILITIES_TRKINTERFACES_CC
0011 
0012 // namespace definition
0013 #include "TrkInterfaces.h"
0014 
0015 // make common namespaces implicit
0016 using namespace std;
0017 using namespace findNode;
0018 
0019 
0020 
0021 // track interfaces ===========================================================
0022 
0023 namespace SColdQcdCorrelatorAnalysis {
0024 
0025   // --------------------------------------------------------------------------
0026   //! Generate TF1 for DCA sigma based on provided parameters
0027   // --------------------------------------------------------------------------
0028   TF1* Interfaces::GetSigmaDcaTF1(
0029     const string name,
0030     const vector<float> params,
0031     const pair<float, float> range
0032   ) {
0033 
0034     TF1* func = new TF1(
0035       name.data(),
0036       Const::SigmaDcaFunc().data(),
0037       range.first,
0038       range.second
0039     );
0040     func -> SetParameter(0, params.at(0));
0041     func -> SetParameter(1, params.at(1));
0042     func -> SetParameter(2, params.at(2));
0043     return func; 
0044 
0045   }  // end 'GetSigmaDcaTF1(string, vector<float>, pair<float, float>)'
0046 
0047 
0048 
0049   // --------------------------------------------------------------------------
0050   //! Grab track map from node tree
0051   // --------------------------------------------------------------------------
0052   SvtxTrackMap* Interfaces::GetTrackMap(PHCompositeNode* topNode) {
0053 
0054     // grab track map
0055     SvtxTrackMap* mapTrks = getClass<SvtxTrackMap>(topNode, "SvtxTrackMap");
0056     if (!mapTrks) {
0057       cerr << PHWHERE
0058            << "PANIC: SvtxTrackMap node is missing!"
0059            << endl;
0060       assert(mapTrks);
0061     }
0062     return mapTrks;
0063 
0064   }  // end 'GetTrackMap(PHCompositeNode*)'
0065 
0066 }  // end SColdQcdCorrelatorAnalysis namespace
0067 
0068 // end ------------------------------------------------------------------------