-
Notifications
You must be signed in to change notification settings - Fork 2
Scouting Phase 2 - Inclusion of PF and TTracks #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 15_1_X_scoutingPhase2
Are you sure you want to change the base?
Changes from 40 commits
72c4f5a
e5d45d0
b1d1d29
656f50d
f426e31
f6c84d1
8a35029
90faf2c
cce510d
61f8a98
931840b
69c27da
5d119b9
d34d690
fba64ee
9f689d3
46e62ee
07ab893
67d9a4a
f4b1f51
c2a7d5c
9a0cefc
08258da
80820cb
597e442
1bb87a7
2960951
17dfec5
e69c6c3
42b3bc4
191486f
8ada589
19f9b8a
f277e45
ca1280b
d5c75d9
447d55f
a7e4a1f
19a6ee7
5605ddd
608d009
4a1fc58
0cd27b8
d464acc
c433e51
a59acc3
b4718a2
20baf41
11db07a
2cbecb0
44d5a8a
23cbeb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#ifndef DataFormats_L1TParticleFlow_L1ScoutingPF_h | ||
#define DataFormats_L1TParticleFlow_L1ScoutingPF_h | ||
|
||
#include <vector> | ||
#include <utility> | ||
#include <cstdint> | ||
#include <Math/Vector4D.h> | ||
|
||
namespace l1Scouting { | ||
class PF { | ||
public: | ||
PF() {} | ||
PF(float pt, float eta, float phi, uint8_t pid, float z0, float dxy, float pfw, uint8_t quality) | ||
: pt_(pt), eta_(eta), phi_(phi), z0_(z0), dxy_(dxy), pfw_(pfw), pid_(pid), quality_(quality) {} | ||
PF(float pt, float eta, float phi, uint8_t pid, float z0, float dxy, uint8_t quality) | ||
: pt_(pt), eta_(eta), phi_(phi), z0_(z0), dxy_(dxy), pfw_(1.0f), pid_(pid), quality_(quality) {} | ||
PF(float pt, float eta, float phi, uint8_t pid, float pfw, uint8_t quality) | ||
: pt_(pt), eta_(eta), phi_(phi), z0_(0.0f), dxy_(0.0f), pfw_(pfw), pid_(pid), quality_(quality) {} | ||
|
||
float pt() const { return pt_; } | ||
float eta() const { return eta_; } | ||
float phi() const { return phi_; } | ||
float z0() const { return z0_; } | ||
float dxy() const { return dxy_; } | ||
float pfw() const { return pfw_; } | ||
uint8_t pid() const { return pid_; } | ||
int16_t pdgId() const { return PDGID_[pid_]; } | ||
uint8_t quality() const { return quality_; } | ||
float mass() const { return MASS_[pid_]; } | ||
int charge() const { return (pid_ < 2) ? 0 : (2 * (pid_ & 1) - 1); } | ||
|
||
void setPt(float pt) { pt_ = pt; } | ||
void setEta(float eta) { eta_ = eta; } | ||
void setPhi(float phi) { phi_ = phi; } | ||
void setZ0(float z0) { z0_ = z0; } | ||
void setDxy(float dxy) { dxy_ = dxy; } | ||
void setPFw(float pfw) { pfw_ = pfw; } | ||
void setPid(int8_t pid) { pid_ = pid; } | ||
void setQuality(uint8_t quality) { quality_ = quality; } | ||
|
||
ROOT::Math::PtEtaPhiMVector p4() const { return ROOT::Math::PtEtaPhiMVector(pt_, eta_, phi_, mass()); } | ||
|
||
enum PIDs { | ||
HadZero = 0, | ||
Gamma = 1, | ||
HadMinus = 2, | ||
HadPlus = 3, | ||
EleMinus = 4, | ||
ElePlus = 5, | ||
MuMinus = 6, | ||
MuPlus = 7, | ||
nPIDs = 8 | ||
}; | ||
|
||
private: | ||
float pt_, eta_, phi_, z0_, dxy_, pfw_; | ||
uint8_t pid_, quality_; | ||
|
||
static constexpr int16_t PDGID_[nPIDs] = {130, 22, -211, 211, 11, -11, 13, -13}; | ||
static constexpr float MASS_[nPIDs] = {0.5, 0.0, 0.13, 0.13, 0.0005, 0.0005, 0.105, 0.105}; | ||
}; | ||
|
||
struct PFSOA { | ||
caroll-costa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
std::vector<uint16_t> bx; | ||
std::vector<uint32_t> offsets; | ||
std::vector<float> pt, eta, phi, z0, dxy, pfw; | ||
std::vector<int16_t> pdgId; | ||
std::vector<uint8_t> quality; | ||
PFSOA() : bx(), offsets(), pt(), eta(), phi(), z0(), dxy(), pfw(), pdgId(), quality() {} | ||
PFSOA(const PFSOA& other) = default; | ||
PFSOA(PFSOA&& other) = default; | ||
PFSOA& operator=(const PFSOA& other) = default; | ||
PFSOA& operator=(PFSOA&& other) = default; | ||
void swap(PFSOA& other) { | ||
using std::swap; | ||
swap(bx, other.bx); | ||
swap(offsets, other.offsets); | ||
swap(pt, other.pt); | ||
swap(eta, other.eta); | ||
swap(phi, other.phi); | ||
swap(z0, other.z0); | ||
swap(dxy, other.dxy); | ||
swap(pfw, other.pfw); | ||
swap(pdgId, other.pdgId); | ||
swap(quality, other.quality); | ||
} | ||
}; | ||
inline void swap(PFSOA& a, PFSOA& b) { a.swap(b); } | ||
} // namespace l1Scouting | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#ifndef DataFormats_L1TParticleFlow_TTrack_h | ||
#define DataFormats_L1TParticleFlow_TTrack_h | ||
caroll-costa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#include <algorithm> | ||
#include <array> | ||
#include <bitset> | ||
#include <cmath> | ||
#include <limits> | ||
#include <string> | ||
#include <vector> | ||
caroll-costa marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
namespace l1Scouting { | ||
class TTrack { | ||
public: | ||
TTrack() {} | ||
TTrack(float pt, float eta, float phi, float z0, float dxy, float mvaQuality, uint8_t nStub, uint8_t quality, int8_t charge) | ||
: pt_(pt), eta_(eta), phi_(phi), z0_(z0), dxy_(dxy), mvaQuality_(mvaQuality), nStub_(nStub), quality_(quality), charge_(charge) {} | ||
|
||
float pt() const { return pt_; } | ||
float eta() const { return eta_; } | ||
float phi() const { return phi_; } | ||
float z0() const { return z0_; } | ||
float dxy() const { return dxy_; } | ||
float mvaQuality() const { return mvaQuality_; } | ||
uint8_t nStub() const { return nStub_; } | ||
uint8_t quality() const { return quality_; } | ||
int8_t charge() const { return charge_; } | ||
|
||
private: | ||
float pt_, eta_, phi_, z0_, dxy_, mvaQuality_; | ||
uint8_t nStub_, quality_; | ||
int8_t charge_; | ||
}; | ||
|
||
struct TTrackSOA { | ||
std::vector<uint16_t> bx; | ||
std::vector<uint32_t> offsets; | ||
std::vector<float> pt, eta, phi, z0, dxy, mvaQuality; | ||
std::vector<uint8_t> nStub, quality; | ||
std::vector<int8_t> charge; | ||
TTrackSOA() : bx(), offsets(), pt(), eta(), phi(), z0(), dxy(), mvaQuality(), nStub(), quality(), charge() {} | ||
TTrackSOA(const TTrackSOA& other) = default; | ||
TTrackSOA(TTrackSOA&& other) = default; | ||
TTrackSOA& operator=(const TTrackSOA& other) = default; | ||
TTrackSOA& operator=(TTrackSOA&& other) = default; | ||
}; | ||
}; | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef DataFormats_L1TParticleFlow_RecMeson_h | ||
#define DataFormats_L1TParticleFlow_RecMeson_h | ||
|
||
#include <vector> | ||
#include <utility> | ||
#include <cstdint> | ||
#include <Math/Vector4D.h> | ||
|
||
namespace l1Scouting { | ||
class RecMeson { | ||
public: | ||
RecMeson() {} | ||
RecMeson(float pt, float eta, float phi, float mass, int charge, float dmass1, float dmass2, int pdgId, int id1, int id2, float isoDR0p25) | ||
|
||
: pt_(pt), eta_(eta), phi_(phi), mass_(mass), charge_(charge), dmass1_(dmass1), dmass2_(dmass2), pdgId_(pdgId), id1_(id1), id2_(id2), isoDR0p25_(isoDR0p25) {} | ||
|
||
float pt() const { return pt_; } | ||
float eta() const { return eta_; } | ||
float phi() const { return phi_; } | ||
float mass() const { return mass_; } | ||
int charge() const { return charge_; } | ||
float dmass1() const { return dmass1_; } | ||
float dmass2() const { return dmass2_; } | ||
int pdgId() const { return pdgId_; } | ||
int id1() const { return id1_; } | ||
int id2() const { return id2_; } | ||
float isoDR0p25() const { return isoDR0p25_; } | ||
ROOT::Math::PtEtaPhiMVector p4() const { return ROOT::Math::PtEtaPhiMVector(pt_, eta_, phi_, mass()); } | ||
|
||
void setPt(float pt) { pt_ = pt; } | ||
void setEta(float eta) { eta_ = eta; } | ||
void setPhi(float phi) { phi_ = phi; } | ||
void setMass(float mass) { mass_ = mass; } | ||
void setCharge(int charge) { charge_ = charge; } | ||
void setDmass1(float dmass1) { dmass1_ = dmass1; } | ||
void setDmass2(float dmass2) { dmass2_ = dmass2; } | ||
void setPdgId(int pdgId) { pdgId_ = pdgId; } | ||
void setId1(int id1) { id1_ = id1; } | ||
void setId2(int id2) { id2_ = id2; } | ||
void setIsoDR0p25(float isoDR0p25) { isoDR0p25_ = isoDR0p25; } | ||
|
||
|
||
private: | ||
float pt_, eta_, phi_, mass_; | ||
int charge_; | ||
float dmass1_, dmass2_; | ||
int pdgId_; | ||
int id1_, id2_; | ||
float isoDR0p25_; | ||
}; | ||
} // namespace l1Scouting | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "DataFormats/L1TParticleFlow/interface/L1ScoutingPF.h" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "DataFormats/L1TParticleFlow/interface/L1ScoutingTTrack.h" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "DataFormats/L1TParticleFlow/interface/RecMeson.h" |
Uh oh!
There was an error while loading. Please reload this page.