69 virtual void endJob();
98 iConfig.getParameter<
edm::
InputTag>(
"L1TrackInputTag"))),
120 produces<TkJetCollection>(
"L1FastTrackingJetsExtended");
122 produces<TkJetCollection>(
"L1FastTrackingJets");
135 std::vector<TTTrack<Ref_Phase2TrackerDigi_>>::const_iterator iterL1Track;
149 std::vector<fastjet::PseudoJet> JetInputs;
151 float recoVtx = L1VertexHandle->begin()->z0();
152 unsigned int this_l1track = 0;
153 for (iterL1Track = TTTrackHandle->begin(); iterL1Track != TTTrackHandle->end(); iterL1Track++) {
155 float trk_pt = iterL1Track->momentum().perp();
156 float trk_z0 = iterL1Track->z0();
157 float trk_chi2dof = iterL1Track->chi2Red();
158 float trk_bendchi2 = iterL1Track->stubPtConsistency();
160 theStubs = iterL1Track->getStubRefs();
161 int trk_nstub = (
int)theStubs.size();
179 for (
int istub = 0; istub < trk_nstub; istub++) {
180 DetId detId(theStubs.at(istub)->getDetId());
181 bool tmp_isPS =
false;
195 if (!
iEvent.isRealData()) {
200 if (!(MCTrkAssociation->isLooselyGenuine(trk_ptr) || MCTrkAssociation->isGenuine(trk_ptr)) &&
203 if (!(MCTrkAssociation->isLooselyGenuine(trk_ptr) || MCTrkAssociation->isGenuine(trk_ptr) ||
204 MCTrkAssociation->isCombinatoric(trk_ptr)) &&
209 fastjet::PseudoJet psuedoJet(iterL1Track->momentum().x(),
210 iterL1Track->momentum().y(),
211 iterL1Track->momentum().z(),
212 iterL1Track->momentum().mag());
213 JetInputs.push_back(psuedoJet);
214 JetInputs.back().set_user_index(this_l1track - 1);
217 fastjet::ClusterSequence
cs(JetInputs,
jet_def);
218 std::vector<fastjet::PseudoJet> JetOutputs =
219 fastjet::sorted_by_pt(
cs.inclusive_jets(0));
221 for (
unsigned int ijet = 0; ijet < JetOutputs.size(); ++ijet) {
223 JetOutputs[ijet].
px(), JetOutputs[ijet].
py(), JetOutputs[ijet].pz(), JetOutputs[ijet].modp());
226 std::vector<edm::Ptr<L1TTTrackType>> L1TrackPtrs;
227 std::vector<fastjet::PseudoJet> fjConstituents = fastjet::sorted_by_pt(
cs.constituents(JetOutputs[ijet]));
229 for (
unsigned int i = 0;
i < fjConstituents.size(); ++
i) {
230 auto index = fjConstituents[
i].user_index();
232 L1TrackPtrs.push_back(trkPtr);
238 TkJet trkJet(jetP4, jetRef, L1TrackPtrs, avgZ);
259 desc.add<
double>(
"trk_zMax", 15.0);
260 desc.add<
double>(
"trk_chi2dofMax", 10.0);
261 desc.add<
double>(
"trk_bendChi2Max", 2.2);
262 desc.add<
double>(
"trk_ptMin", 2.0);
263 desc.add<
double>(
"trk_etaMax", 2.5);
264 desc.add<
int>(
"trk_nStubMin", 4);
265 desc.add<
int>(
"trk_nPSStubMin", -1);
266 desc.add<
double>(
"deltaZ0Cut", 0.5);
267 desc.add<
bool>(
"doTightChi2",
true);
268 desc.add<
double>(
"trk_ptTightChi2", 20.0);
269 desc.add<
double>(
"trk_chi2dofTightChi2", 5.0);
270 desc.add<
double>(
"coneSize", 0.4);
271 desc.add<
bool>(
"displaced",
false);
272 desc.add<
bool>(
"selectTrkMatchGenTight",
true);
273 desc.add<
bool>(
"selectTrkMatchGenLoose",
false);
274 desc.add<
bool>(
"selectTrkMatchGenOrPU",
false);
275 descriptions.
add(
"L1FastTrackingJets",
desc);