38 #include <fastjet/JetDefinition.hh> 77 : coneSize_((
float)iConfig.getParameter<double>(
"coneSize")),
78 displaced_(iConfig.getParameter<
bool>(
"displaced")),
81 produces<TkJetCollection>(
"L1TrackFastJetsExtended");
83 produces<TkJetCollection>(
"L1TrackFastJets");
97 fastjet::JetDefinition jet_def(fastjet::antikt_algorithm,
coneSize_);
98 std::vector<fastjet::PseudoJet> JetInputs;
100 for (
unsigned int this_l1track = 0; this_l1track < TTTrackHandle->
size(); this_l1track++) {
103 fastjet::PseudoJet psuedoJet(iterL1Track->
momentum().
x(),
107 JetInputs.push_back(psuedoJet);
108 JetInputs.back().set_user_index(this_l1track);
111 fastjet::ClusterSequence
cs(JetInputs, jet_def);
112 std::vector<fastjet::PseudoJet> JetOutputs =
113 fastjet::sorted_by_pt(
cs.inclusive_jets(0));
115 for (
unsigned int ijet = 0; ijet < JetOutputs.size(); ++ijet) {
117 JetOutputs[ijet].
px(), JetOutputs[ijet].
py(), JetOutputs[ijet].pz(), JetOutputs[ijet].modp());
120 std::vector<edm::Ptr<L1TTTrackType> > L1TrackPtrs;
121 std::vector<fastjet::PseudoJet> fjConstituents = fastjet::sorted_by_pt(
cs.constituents(JetOutputs[ijet]));
123 for (
unsigned int i = 0;
i < fjConstituents.size(); ++
i) {
124 auto index = fjConstituents[
i].user_index();
126 L1TrackPtrs.push_back(trkPtr);
132 TkJet trkJet(jetP4, jetRef, L1TrackPtrs, avgZ);
133 L1TrackFastJets->push_back(trkJet);
147 edm::InputTag(
"l1tTrackVertexAssociationProducerForJets",
"Level1TTTracksSelectedAssociated"));
148 desc.add<
double>(
"coneSize", 0.5);
149 desc.add<
bool>(
"displaced",
false);
const EDGetTokenT< L1TTTrackRefCollectionType > trackToken_
GlobalVector momentum() const
Track momentum.
void produce(edm::Event &, const edm::EventSetup &) override
L1TrackFastJetProducer(const edm::ParameterSet &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
std::vector< L1TTTrackType > L1TTTrackCollectionType
#define DEFINE_FWK_MODULE(type)
size_type size() const
Size of the RefVector.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Class to store the L1 Track Trigger tracks.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::RefVector< L1TTTrackCollectionType > L1TTTrackRefCollectionType
double z0() const
Track z0.
~L1TrackFastJetProducer() override
std::vector< TkJet > TkJetCollection