Skip to content

Commit

Permalink
fixed small buggs in the unpackers + renamed scouting namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmiglio committed Nov 23, 2023
1 parent b55f10b commit 4949fc8
Show file tree
Hide file tree
Showing 18 changed files with 296 additions and 268 deletions.
30 changes: 12 additions & 18 deletions DataFormats/L1Scouting/interface/L1ScoutingCalo.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#ifndef DataFormats_L1Scouting_L1ScoutingCalo_h
#define DataFormats_L1Scouting_L1ScoutingCalo_h

#include "DataFormats/L1Scouting/interface/OrbitCollection.h"
#include "DataFormats/L1Trigger/interface/EtSum.h"
#include <cmath>

namespace scoutingRun3 {
namespace l1ScoutingRun3 {

class ScJet;
typedef OrbitCollection<ScJet> ScJetOrbitCollection;
class ScEGamma;
typedef OrbitCollection<ScEGamma> ScEGammaOrbitCollection;
class ScTau;
typedef OrbitCollection<ScTau> ScTauOrbitCollection;
class ScEtSum;
typedef OrbitCollection<ScEtSum> ScEtSumOrbitCollection;

class ScCaloObject {
public:
Expand Down Expand Up @@ -47,27 +56,12 @@ namespace scoutingRun3 {
inline int hwPhi() const {return hwPhi_;}
inline int hwIso() const {return hwIso_;}

// inline float Et() const {
// return et_scale_* hwEt_;
// }
// inline float eta()const {
// return eta_scale_*hwEta_;
// }
// inline float phi() const {
// float fPhi = phi_scale_*hwPhi_;
// fPhi = fPhi>=M_PI ? fPhi-2.*M_PI : fPhi;
// return fPhi;
// }

private:
int hwEt_;
int hwEta_;
int hwPhi_;
int hwIso_;

// static constexpr float phi_scale_ = 2.*M_PI/144.;
// static constexpr float eta_scale_ = 0.0435;
// static constexpr float et_scale_ = 0.5;
};

class ScJet: public ScCaloObject {
Expand Down Expand Up @@ -161,5 +155,5 @@ namespace scoutingRun3 {
// static constexpr float et_scale_ = 0.5;
};

} // namespace scoutingRun3
} // namespace l1ScoutingRun3
#endif // DataFormats_L1Scouting_L1ScoutingCalo_h
34 changes: 6 additions & 28 deletions DataFormats/L1Scouting/interface/L1ScoutingMuon.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#ifndef DataFormats_L1Scouting_L1ScoutingMuon_h
#define DataFormats_L1Scouting_L1ScoutingMuon_h

#include <cmath>
#include "DataFormats/L1Scouting/interface/OrbitCollection.h"

namespace scoutingRun3 {
namespace l1ScoutingRun3 {

class ScMuon;
typedef OrbitCollection<ScMuon> ScMuonOrbitCollection;
class ScMuon {
public:

Expand Down Expand Up @@ -94,25 +97,6 @@ namespace scoutingRun3 {
inline int hwPtUnconstrained() const {return hwPtUnconstrained_;}
inline int hwDXY() const {return hwDXY_;}
inline int tfMuonIndex() const {return tfIndex_;}

// inline float pt() const {
// return pt_scale_*(hwPt_-1);
// }
// inline float eta()const {
// return eta_scale_*hwEta_;
// }
// inline float phi() const {
// return phi_scale_*hwPhi_;
// }
// inline float ptUnconstrained() const {
// return pt_scale_*(hwPtUnconstrained_-1);
// }
// inline float etaAtVtx() const {
// return eta_scale_*hwEtaAtVtx_;
// }
// inline float phiAtVtx() const {
// return phi_scale_*hwPhiAtVtx_;
// }

private:
int hwPt_;
Expand All @@ -127,14 +111,8 @@ namespace scoutingRun3 {
int hwPhiAtVtx_;
int hwPtUnconstrained_;
int hwDXY_;

// constants to convert from harware to physical quantities
// static constexpr float pt_scale_ = 0.5;
// static constexpr float ptunconstrained_scale_ = 1.0;
// static constexpr float phi_scale_ = 2.*M_PI/576.;
// static constexpr float eta_scale_ = 0.0870/8;
};

} // namespace scoutingRun3
} // namespace l1ScoutingRun3

#endif // DataFormats_L1Scouting_L1ScoutingMuon_h
Loading

0 comments on commit 4949fc8

Please sign in to comment.