File indexing completed on 2025-03-26 01:51:22
0001 #ifndef PHASE_2_L1_CALO_BARREL_TO_CORRELATOR
0002 #define PHASE_2_L1_CALO_BARREL_TO_CORRELATOR
0003
0004 #include "DataFormats/L1TCalorimeterPhase2/interface/GCTEmDigiCluster.h"
0005 #include "DataFormats/L1TCalorimeterPhase2/interface/GCTHadDigiCluster.h"
0006
0007 #include "L1Trigger/L1CaloTrigger/interface/Phase2L1CaloEGammaUtils.h"
0008
0009
0010
0011
0012 inline float p2eg::deltaPhiInDegrees(float phi1, float phi2, const float c = 180) {
0013 float r = std::fmod(phi1 - phi2, 2.0 * c);
0014 if (r < -c) {
0015 r += 2.0 * c;
0016 } else if (r > c) {
0017 r -= 2.0 * c;
0018 }
0019 return r;
0020 }
0021
0022
0023
0024
0025 inline float p2eg::wrappedPhiInDegrees(float phi) { return p2eg::deltaPhiInDegrees(phi, 0); }
0026
0027 #endif