111 std::vector<TTTrack<Ref_Phase2TrackerDigi_> >::const_iterator iterL1Track;
120 fastjet::JetDefinition jet_def(fastjet::antikt_algorithm,
coneSize_);
121 std::vector<fastjet::PseudoJet> JetInputs;
123 unsigned int this_l1track = 0;
124 for (iterL1Track = TTTrackHandle->begin(); iterL1Track != TTTrackHandle->end(); iterL1Track++) {
128 theStubs = iterL1Track->getStubRefs();
135 if (iterL1Track->momentum().perp() <
trkPtMin_)
137 int trk_nstub = (
int)theStubs.size();
142 for (
int istub = 0; istub < trk_nstub; istub++) {
144 bool tmp_isPS =
false;
165 fastjet::PseudoJet psuedoJet(iterL1Track->momentum().x(),
166 iterL1Track->momentum().y(),
167 iterL1Track->momentum().z(),
168 iterL1Track->momentum().mag());
169 JetInputs.push_back(psuedoJet);
170 JetInputs.back().set_user_index(this_l1track - 1);
173 fastjet::ClusterSequence
cs(JetInputs, jet_def);
174 std::vector<fastjet::PseudoJet> JetOutputs =
175 fastjet::sorted_by_pt(
cs.inclusive_jets(0));
177 for (
unsigned int ijet = 0; ijet < JetOutputs.size(); ++ijet) {
179 JetOutputs[ijet].
px(), JetOutputs[ijet].
py(), JetOutputs[ijet].pz(), JetOutputs[ijet].modp());
182 std::vector<edm::Ptr<L1TTTrackType> > L1TrackPtrs;
183 std::vector<fastjet::PseudoJet> fjConstituents = fastjet::sorted_by_pt(
cs.constituents(JetOutputs[ijet]));
185 for (
unsigned int i = 0;
i < fjConstituents.size(); ++
i) {
186 auto index = fjConstituents[
i].user_index();
188 L1TrackPtrs.push_back(trkPtr);
189 sumpt = sumpt + trkPtr->momentum().perp();
190 avgZ = avgZ + trkPtr->momentum().perp() * trkPtr->z0();
194 TkJet trkJet(jetP4, jetRef, L1TrackPtrs, avgZ);
195 L1TrackFastJets->push_back(trkJet);
199 iEvent.put(
std::move(L1TrackFastJets),
"L1TruthTrackFastJetsExtended");
unsigned int tobLayer(const DetId &id) const
EncodedEventId eventId() const
Signal source, crossing number.
int event() const
get the contents of the subdetector field (should be protected?)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNull() const
Checks for null.
Abs< T >::type abs(const T &t)
static constexpr auto TOB
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
Class to store the L1 Track Trigger stubs.
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
unsigned int tidRing(const DetId &id) const
std::vector< TkJet > TkJetCollection
static constexpr auto TID
const edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > ttTrackMCTruthToken_