35 #include <fastjet/JetDefinition.hh> 88 : trkZMax_((
float)iConfig.getParameter<double>(
"trk_zMax")),
89 trkChi2dofMax_((
float)iConfig.getParameter<double>(
"trk_chi2dofMax")),
90 trkBendChi2Max_(iConfig.getParameter<double>(
"trk_bendChi2Max")),
91 trkPtMin_((
float)iConfig.getParameter<double>(
"trk_ptMin")),
92 trkEtaMax_((
float)iConfig.getParameter<double>(
"trk_etaMax")),
93 trkNStubMin_((
int)iConfig.getParameter<
int>(
"trk_nStubMin")),
94 trkNPSStubMin_((
int)iConfig.getParameter<
int>(
"trk_nPSStubMin")),
95 deltaZ0Cut_((
float)iConfig.getParameter<double>(
"deltaZ0Cut")),
96 coneSize_((
float)iConfig.getParameter<double>(
"coneSize")),
97 doTightChi2_(iConfig.getParameter<
bool>(
"doTightChi2")),
98 trkPtTightChi2_((
float)iConfig.getParameter<double>(
"trk_ptTightChi2")),
99 trkChi2dofTightChi2_((
float)iConfig.getParameter<double>(
"trk_chi2dofTightChi2")),
100 displaced_(iConfig.getParameter<
bool>(
"displaced")),
102 iConfig.getParameter<
edm::
InputTag>(
"L1TrackInputTag"))),
106 produces<TkJetCollection>(
"L1TrackFastJetsExtended");
108 produces<TkJetCollection>(
"L1TrackFastJets");
121 std::vector<TTTrack<Ref_Phase2TrackerDigi_> >::const_iterator iterL1Track;
129 fastjet::JetDefinition jet_def(fastjet::antikt_algorithm,
coneSize_);
130 std::vector<fastjet::PseudoJet> JetInputs;
132 float recoVtx = TkPrimaryVertexHandle->begin()->z0();
133 unsigned int this_l1track = 0;
134 for (iterL1Track = TTTrackHandle->begin(); iterL1Track != TTTrackHandle->end(); iterL1Track++) {
136 float trk_pt = iterL1Track->momentum().perp();
137 float trk_z0 = iterL1Track->z0();
138 float trk_chi2dof = iterL1Track->chi2Red();
139 float trk_bendchi2 = iterL1Track->stubPtConsistency();
141 theStubs = iterL1Track->getStubRefs();
142 int trk_nstub = (
int)theStubs.size();
160 for (
int istub = 0; istub < trk_nstub; istub++) {
161 DetId detId(theStubs.at(istub)->getDetId());
162 bool tmp_isPS =
false;
177 fastjet::PseudoJet psuedoJet(iterL1Track->momentum().x(),
178 iterL1Track->momentum().y(),
179 iterL1Track->momentum().z(),
180 iterL1Track->momentum().mag());
181 JetInputs.push_back(psuedoJet);
182 JetInputs.back().set_user_index(this_l1track - 1);
185 fastjet::ClusterSequence
cs(JetInputs, jet_def);
186 std::vector<fastjet::PseudoJet> JetOutputs =
187 fastjet::sorted_by_pt(
cs.inclusive_jets(0));
189 for (
unsigned int ijet = 0; ijet < JetOutputs.size(); ++ijet) {
191 JetOutputs[ijet].
px(), JetOutputs[ijet].
py(), JetOutputs[ijet].pz(), JetOutputs[ijet].modp());
194 std::vector<edm::Ptr<L1TTTrackType> > L1TrackPtrs;
195 std::vector<fastjet::PseudoJet> fjConstituents = fastjet::sorted_by_pt(
cs.constituents(JetOutputs[ijet]));
197 for (
unsigned int i = 0;
i < fjConstituents.size(); ++
i) {
198 auto index = fjConstituents[
i].user_index();
200 L1TrackPtrs.push_back(trkPtr);
206 TkJet trkJet(jetP4, jetRef, L1TrackPtrs, avgZ);
unsigned int tobLayer(const DetId &id) const
#define DEFINE_FWK_MODULE(type)
GlobalVector momentum() const
Track momentum.
std::vector< Vertex > VertexCollection
edm::EDGetTokenT< VertexCollection > pvToken_
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
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< L1TTTrackType > L1TTTrackCollectionType
const float trkPtTightChi2_
Abs< T >::type abs(const T &t)
bool getData(T &iHolder) const
static constexpr auto TOB
Class to store the L1 Track Trigger stubs.
const double trkBendChi2Max_
const float trkChi2dofTightChi2_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Class to store the L1 Track Trigger tracks.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const float trkChi2dofMax_
double z0() const
Track z0.
unsigned int tidRing(const DetId &id) const
~L1TrackFastJetProducer() override
std::vector< TkJet > TkJetCollection
static constexpr auto TID