7 ptMinCaloJet_(iConfig.getParameter< double > (
"ptMinCaloJet")),
8 etaMinCaloJet_(iConfig.getParameter< double > (
"etaMinCaloJet")),
9 etaMaxCaloJet_(iConfig.getParameter< double > (
"etaMaxCaloJet")),
10 tauConeSize_(iConfig.getParameter< double > (
"tauConeSize")),
11 isolationConeSize_(iConfig.getParameter< double > (
"isolationConeSize")),
12 fractionMinCaloInTauCone_(iConfig.getParameter< double > (
"fractionMinCaloInTauCone")),
13 fractionMaxChargedPUInCaloCone_(iConfig.getParameter< double > (
"fractionMaxChargedPUInCaloCone")),
14 ptTrkMaxInCaloCone_(iConfig.getParameter< double > (
"ptTrkMaxInCaloCone")),
15 nTrkMaxInCaloCone_(iConfig.getParameter<
int > (
"nTrkMaxInCaloCone"))
22 produces<reco::TrackJetCollection>();
48 for (reco::TrackJetCollection::const_iterator trackjet = trackjets->begin();
49 trackjet != trackjets->end(); trackjet++) {
50 augmentedTrackJets->push_back(*trackjet);
62 for (reco::CaloJetCollection::const_iterator calojet = calojets->begin();
63 calojet != calojets->end(); calojet++) {
66 double etaJet = calojet->eta();
67 double phiJet = calojet->phi();
71 std::vector <CaloTowerPtr>
const & theTowers = calojet->getCaloConstituents();
74 for (
unsigned int itwr = 0; itwr < theTowers.size(); ++itwr ) {
75 double etaTwr = theTowers[itwr]->eta() - etaJet;
76 double phiTwr =
deltaPhi(theTowers[itwr]->
phi(), phiJet);
77 double deltaR2 = etaTwr*etaTwr + phiTwr*phiTwr;
79 if ( deltaR2 < tauConeSize2 ) {
80 ptIn += theTowers[itwr]->pt();
81 }
else if ( deltaR2 < isolationConeSize2 ) {
82 ptOut += theTowers[itwr]->pt();
85 double ptTot = ptIn+ptOut;
86 double fracIn = ptIn/ptTot;
94 for (reco::TrackJetCollection::const_iterator trackjet = trackjets->begin();
95 trackjet != trackjets->end(); trackjet++) {
96 for (
unsigned itr=0; itr<trackjet->numberOfTracks(); ++itr) {
101 if ( deltaR2 < isolationConeSize2 ) {
103 ptTrk += track->
pt();
114 for (reco::TrackCollection::const_iterator
track = tracks->begin();
119 if ( deltaR2 < isolationConeSize2 ) {
121 ptTrk2 +=
track->pt();
125 double fractionChargedPU = ptTrk2/calojet->pt();
156 desc.
add<
edm::InputTag>(
"inputTrackTag",
edm::InputTag(
"hltPFlowTrackSelectionHighPurity"))->setComment(
"Track collection for track isolation");
157 desc.
add<
double>(
"ptMinCaloJet",5.0)->
setComment(
"Min. pT of CaloJet");
158 desc.
add<
double>(
"etaMinCaloJet",-2.7)->
setComment(
"Min. eta of CaloJet");
159 desc.
add<
double>(
"etaMaxCaloJet",+2.7)->
setComment(
"Max. eta of CaloJet");
160 desc.
add<
double>(
"tauConeSize",0.2)->
setComment(
"Radius of tau signal cone");
161 desc.
add<
double>(
"isolationConeSize",0.5)->
setComment(
"Radius of isolation cone");
162 desc.
add<
double>(
"fractionMinCaloInTauCone",0.8)->
setComment(
"Min. fraction of calo energy in tau signal cone");
163 desc.
add<
double>(
"fractionMaxChargedPUInCaloCone",0.2)->
setComment(
"Max. fraction of PU charged energy Sum(Pt_trks)/Pt_jet in signal cone");
164 desc.
add<
double>(
"ptTrkMaxInCaloCone",1.0)->
setComment(
"Max. sum of pT of tracks in isolation cone");
165 desc.
add<
int>(
"nTrkMaxInCaloCone",0)->setComment(
"Max. no. of tracks in isolation cone");
166 descriptions.
setComment(
"This module produces a collection of TrackJets to seed iterative tracking.\nIt is done by enriching the input TrackJet collection with CaloJets passing isolation critera - tau candidates");
167 descriptions.
add(
"tauJetSelectorForHLTTrackSeeding",desc);
T getParameter(std::string const &) const
void setComment(std::string const &value)
~TauJetSelectorForHLTTrackSeeding() override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::TrackJetCollection > inputTrackJetToken_
edm::EDGetTokenT< reco::TrackCollection > inputTrackToken_
double phi() const
azimuthal angle of momentum vector
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.
double eta() const
pseudorapidity of momentum vector
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const double tauConeSize_
double pt() const
track transverse momentum
const double fractionMinCaloInTauCone_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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)
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
std::vector< TrackJet > TrackJetCollection
collection of TrackJet objects
const int nTrkMaxInCaloCone_
edm::EDGetTokenT< reco::CaloJetCollection > inputCaloJetToken_
const double ptTrkMaxInCaloCone_