Skip to content

Commit

Permalink
Merge pull request cms-sw#1245 from gkaratha/tracktriplet_fixes
Browse files Browse the repository at this point in the history
bug fixes for tracktriplet
  • Loading branch information
aloeliger committed Apr 10, 2024
2 parents 5538a01 + 193718e commit 91c7602
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 19 deletions.
10 changes: 5 additions & 5 deletions DataFormats/L1TCorrelator/interface/TkTriplet.h
Expand Up @@ -34,11 +34,11 @@ namespace l1t {

~TkTriplet() override{};

int getTripletCharge() const;
double getPairMassMax() const;
double getPairMassMin() const;
double getPairDzMax() const;
double getPairDzMin() const;
int getTripletCharge() const { return charge_; }
double getPairMassMax() const { return pair_mass_max_; }
double getPairMassMin() const { return pair_mass_min_; }
double getPairDzMax() const { return pair_dz_max_; }
double getPairDzMin() const { return pair_dz_min_; }
const edm::Ptr<L1TTTrackType>& trkPtr(size_t i) const { return trkPtrList_.at(i); }
int bx() const;

Expand Down
10 changes: 0 additions & 10 deletions DataFormats/L1TCorrelator/src/TkTriplet.cc
Expand Up @@ -34,13 +34,3 @@ int TkTriplet::bx() const {
// in the producer TkJetProducer.cc, we keep only jets with bx = 0
return 0;
}

int TkTriplet::getTripletCharge() const { return charge_; }

double TkTriplet::getPairMassMax() const { return pair_mass_max_; }

double TkTriplet::getPairMassMin() const { return pair_mass_min_; }

double TkTriplet::getPairDzMax() const { return pair_dz_max_; }

double TkTriplet::getPairDzMin() const { return pair_dz_min_; }
9 changes: 9 additions & 0 deletions L1Trigger/Configuration/python/SimL1Emulator_cff.py
Expand Up @@ -191,25 +191,30 @@
from L1Trigger.L1TTrackMatch.l1tTrackerEtMiss_cfi import *
from L1Trigger.L1TTrackMatch.l1tTrackerHTMiss_cfi import *



#Selected and Associated tracks for Jets and Emulated Jets
_phase2_siml1emulator.add(l1tTrackSelectionProducerForJets)
_phase2_siml1emulator.add(l1tTrackSelectionProducerExtendedForJets)
_phase2_siml1emulator.add(l1tTrackVertexAssociationProducerForJets)
_phase2_siml1emulator.add(l1tTrackVertexAssociationProducerExtendedForJets)


#Selected and Associated tracks for EtMiss and Emulated EtMiss
_phase2_siml1emulator.add(l1tTrackSelectionProducerForEtMiss)
_phase2_siml1emulator.add(l1tTrackSelectionProducerExtendedForEtMiss)
_phase2_siml1emulator.add(l1tTrackVertexAssociationProducerForEtMiss)
_phase2_siml1emulator.add(l1tTrackVertexAssociationProducerExtendedForEtMiss)


#Track Jets, Track Only Et Miss, Track Only HT Miss
_phase2_siml1emulator.add(l1tTrackJets)
_phase2_siml1emulator.add(l1tTrackJetsExtended)
_phase2_siml1emulator.add(l1tTrackFastJets)
_phase2_siml1emulator.add(l1tTrackerEtMiss)
_phase2_siml1emulator.add(l1tTrackerHTMiss)


#Emulated Track Jets, Track Only Et Miss, Track Only HT Miss
from L1Trigger.L1TTrackMatch.l1tTrackJetsEmulation_cfi import *
_phase2_siml1emulator.add(l1tTrackJetsEmulation)
Expand All @@ -222,6 +227,10 @@
_phase2_siml1emulator.add(l1tTrackerEmuHTMiss)
_phase2_siml1emulator.add(l1tTrackerEmuHTMissExtended)

from L1Trigger.L1TTrackMatch.l1tTrackTripletEmulation_cfi import *
_phase2_siml1emulator.add(l1tTrackTripletEmulation)


# PF Candidates
# ########################################################################
from L1Trigger.Phase2L1ParticleFlow.l1ctLayer1_cff import *
Expand Down
Expand Up @@ -277,15 +277,15 @@ void L1TrackTripletEmulatorProducer::produce(Event &iEvent, const EventSetup &iS

if (!event_pass) {
iEvent.put(std::move(L1TrackTripletContainer), OutputDigisName);
iEvent.put(std::move(L1TrackTripletWordContainer), OutputWordName);
return;
}

float tripletPx = (pion1 + pion2 + pion3).Pt() * cos((pion1 + pion2 + pion3).Phi());
float tripletPy = (pion1 + pion2 + pion3).Pt() * sin((pion1 + pion2 + pion3).Phi());
float tripletPz = (pion1 + pion2 + pion3).Pt() * sinh((pion1 + pion2 + pion3).Eta());
float tripletP = (pion1 + pion2 + pion3).Pt() * cosh((pion1 + pion2 + pion3).Eta());

TkTriplet trkTriplet(math::XYZTLorentzVector(tripletPx, tripletPy, tripletPz, tripletP),
float tripletE =
sqrt(tripletPx * tripletPx + tripletPy * tripletPy + tripletPz * tripletPz + triplet_mass * triplet_mass);
TkTriplet trkTriplet(math::XYZTLorentzVector(tripletPx, tripletPy, tripletPz, tripletE),
triplet_charge,
pair_masses[0],
pair_masses[2],
Expand Down

0 comments on commit 91c7602

Please sign in to comment.