6 : ptMinCaloJet_(iConfig.getParameter<double>(
"ptMinCaloJet")),
7 etaMinCaloJet_(iConfig.getParameter<double>(
"etaMinCaloJet")),
8 etaMaxCaloJet_(iConfig.getParameter<double>(
"etaMaxCaloJet")),
9 tauConeSize_(iConfig.getParameter<double>(
"tauConeSize")),
10 isolationConeSize_(iConfig.getParameter<double>(
"isolationConeSize")),
11 fractionMinCaloInTauCone_(iConfig.getParameter<double>(
"fractionMinCaloInTauCone")),
12 fractionMaxChargedPUInCaloCone_(iConfig.getParameter<double>(
"fractionMaxChargedPUInCaloCone")),
13 ptTrkMaxInCaloCone_(iConfig.getParameter<double>(
"ptTrkMaxInCaloCone")),
14 nTrkMaxInCaloCone_(iConfig.getParameter<
int>(
"nTrkMaxInCaloCone")) {
20 produces<reco::TrackJetCollection>();
41 for (reco::TrackJetCollection::const_iterator trackjet = trackjets->begin(); trackjet != trackjets->end();
43 augmentedTrackJets->push_back(*trackjet);
55 for (reco::CaloJetCollection::const_iterator calojet = calojets->begin(); calojet != calojets->end(); calojet++) {
58 double etaJet = calojet->eta();
59 double phiJet = calojet->phi();
65 std::vector<CaloTowerPtr>
const& theTowers = calojet->getCaloConstituents();
68 for (
unsigned int itwr = 0; itwr < theTowers.size(); ++itwr) {
69 double etaTwr = theTowers[itwr]->eta() - etaJet;
70 double phiTwr =
deltaPhi(theTowers[itwr]->
phi(), phiJet);
71 double deltaR2 = etaTwr * etaTwr + phiTwr * phiTwr;
74 ptIn += theTowers[itwr]->pt();
75 }
else if (
deltaR2 < isolationConeSize2) {
76 ptOut += theTowers[itwr]->pt();
79 double ptTot = ptIn + ptOut;
80 double fracIn = ptIn / ptTot;
89 for (reco::TrackJetCollection::const_iterator trackjet = trackjets->begin(); trackjet != trackjets->end();
91 for (
unsigned itr = 0; itr < trackjet->numberOfTracks(); ++itr) {
96 if (
deltaR2 < isolationConeSize2) {
115 if (
deltaR2 < isolationConeSize2) {
117 ptTrk2 +=
track->pt();
121 double fractionChargedPU = ptTrk2 / calojet->pt();
148 ->setComment(
"Oryginal TrackJet collection");
150 ->setComment(
"CaloJet collection");
152 ->setComment(
"Track collection for track isolation");
153 desc.add<
double>(
"ptMinCaloJet", 5.0)->setComment(
"Min. pT of CaloJet");
154 desc.add<
double>(
"etaMinCaloJet", -2.7)->setComment(
"Min. eta of CaloJet");
155 desc.add<
double>(
"etaMaxCaloJet", +2.7)->setComment(
"Max. eta of CaloJet");
156 desc.add<
double>(
"tauConeSize", 0.2)->setComment(
"Radius of tau signal cone");
157 desc.add<
double>(
"isolationConeSize", 0.5)->setComment(
"Radius of isolation cone");
158 desc.add<
double>(
"fractionMinCaloInTauCone", 0.8)->setComment(
"Min. fraction of calo energy in tau signal cone");
159 desc.add<
double>(
"fractionMaxChargedPUInCaloCone", 0.2)
160 ->setComment(
"Max. fraction of PU charged energy Sum(Pt_trks)/Pt_jet in signal cone");
161 desc.add<
double>(
"ptTrkMaxInCaloCone", 1.0)->setComment(
"Max. sum of pT of tracks in isolation cone");
162 desc.add<
int>(
"nTrkMaxInCaloCone", 0)->setComment(
"Max. no. of tracks in isolation cone");
164 "This module produces a collection of TrackJets to seed iterative tracking.\nIt is done by enriching the input " 165 "TrackJet collection with CaloJets passing isolation critera - tau candidates");
166 descriptions.
add(
"tauJetSelectorForHLTTrackSeeding",
desc);
~TauJetSelectorForHLTTrackSeeding() override
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackJetCollection > inputTrackJetToken_
edm::EDGetTokenT< reco::TrackCollection > inputTrackToken_
TauJetSelectorForHLTTrackSeeding(const edm::ParameterSet &)
const double isolationConeSize_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const double etaMinCaloJet_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const double tauConeSize_
const double fractionMinCaloInTauCone_
#define DEFINE_FWK_MODULE(type)
const double fractionMaxChargedPUInCaloCone_
void setComment(std::string const &value)
const double etaMaxCaloJet_
XYZPointD XYZPoint
point in space with cartesian internal representation
const double ptMinCaloJet_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< TrackJet > TrackJetCollection
collection of TrackJet objects
const int nTrkMaxInCaloCone_
edm::EDGetTokenT< reco::CaloJetCollection > inputCaloJetToken_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const double ptTrkMaxInCaloCone_