Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 /// ---------------------------------------------------------------------------
0002 /*! \file   TwrTools.h
0003  *  \author Derek Anderson
0004  *  \date   08.04.2024
0005  *
0006  *  Collection of frequent tower-related methods utilized in
0007  *  the sPHENIX Cold QCD Energy-Energy Correlator analysis.
0008  */
0009 /// ---------------------------------------------------------------------------
0010 
0011 #ifndef SCORRELATORUTILITIES_TWRTOOLS_H
0012 #define SCORRELATORUTILITIES_TWRTOOLS_H
0013 
0014 // c++ utilities
0015 #include <cmath>
0016 #include <utility>
0017 // root libraries
0018 #include <Math/Vector3D.h>
0019 #include <Math/Vector4D.h>
0020 // phool libraries
0021 #include <phool/PHCompositeNode.h>
0022 // calobase libraries
0023 #include <calobase/TowerInfo.h>
0024 #include <calobase/RawTowerDefs.h>
0025 #include <calobase/RawTowerGeom.h>
0026 #include <calobase/TowerInfoContainer.h>
0027 // analysis utilities
0028 #include "VtxTools.h"
0029 #include "Constants.h"
0030 #include "Interfaces.h"
0031 
0032 // make common namespaces implicit
0033 using namespace std;
0034 
0035 
0036 
0037 namespace SColdQcdCorrelatorAnalysis {
0038   namespace Tools {
0039 
0040     // tower methods ----------------------------------------------------------
0041 
0042     int                         GetTowerStatus(const TowerInfo* tower);
0043     int                         GetCaloIDFromRawTower(RawTower* tower);
0044     int                         GetRawTowerKey(const int idGeo, const tuple<int, int, int> indices);
0045     tuple<int, int, int>        GetTowerIndices(const int channel, const int subsys, PHCompositeNode* topNode);
0046     ROOT::Math::XYZVector       GetTowerPositionXYZ(const int rawKey, const int subsys, PHCompositeNode* topNode);
0047     ROOT::Math::RhoEtaPhiVector GetTowerPositionRhoEtaPhi(const int rawKey, const int subsys, const float zVtx, PHCompositeNode* topNode);
0048     ROOT::Math::PxPyPzEVector   GetTowerMomentum(const double energy, const ROOT::Math::RhoEtaPhiVector pos);
0049 
0050   }  // end Tools namespace
0051 }  // end SColdQcdCorrelatorAnalysis namespace
0052 
0053 #endif
0054 
0055 // end ------------------------------------------------------------------------