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) {
98 double trackEta = track->eta() - etaJet;
101 if ( deltaR2 < isolationConeSize2 ) {
103 ptTrk += track->pt();
114 for (reco::TrackCollection::const_iterator track = tracks->begin();
115 track != tracks->end(); track++) {
116 double trackEta = track->eta() - etaJet;
119 if ( deltaR2 < isolationConeSize2 ) {
121 ptTrk2 += track->pt();
125 double fractionChargedPU = ptTrk2/calojet->pt();
139 iEvent.
put(augmentedTrackJets);
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::TrackJetCollection > inputTrackJetToken_
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::TrackCollection > inputTrackToken_
TauJetSelectorForHLTTrackSeeding(const edm::ParameterSet &)
const double isolationConeSize_
const double etaMinCaloJet_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const double tauConeSize_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const double fractionMinCaloInTauCone_
const double fractionMaxChargedPUInCaloCone_
const double etaMaxCaloJet_
~TauJetSelectorForHLTTrackSeeding()
XYZPointD XYZPoint
point in space with cartesian internal representation
const double ptMinCaloJet_
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_