-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29053 from guitargeek/unused_reco_deps
Remove remaining unneeded dependencies from Reco subsystems
- Loading branch information
Showing
54 changed files
with
49 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,22 @@ | ||
#ifndef HiEgammaAlgos_TrackIsoCalculator_h | ||
#define HiEgammaAlgos_TrackIsoCalculator_h | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/Utilities/interface/InputTag.h" | ||
|
||
#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" | ||
#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" | ||
|
||
#include "DataFormats/EgammaCandidates/interface/Photon.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
|
||
#include "DataFormats/PatCandidates/interface/Photon.h" | ||
|
||
#include "Geometry/CaloGeometry/interface/CaloGeometry.h" | ||
#include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
|
||
class TrackIsoCalculator { | ||
public: | ||
TrackIsoCalculator(const edm::Event &iEvent, | ||
const edm::EventSetup &iSetup, | ||
const edm::Handle<reco::TrackCollection> trackLabel, | ||
const std::string trackQuality_); | ||
TrackIsoCalculator(reco::TrackCollection const& trackCollection, std::string const& trackQuality); | ||
|
||
/// Return the tracker energy in a cone around the photon | ||
double getTrackIso(const reco::Photon clus, const double i, const double threshold, const double innerDR = 0); | ||
double getTrackIso(reco::Photon const& clus, const double i, const double threshold, const double innerDR = 0); | ||
/// Return the background-subtracted tracker energy in a cone around the photon | ||
double getBkgSubTrackIso(const reco::Photon clus, const double i, const double threshold, const double innerDR = 0); | ||
double getBkgSubTrackIso(reco::Photon const& clus, const double i, const double threshold, const double innerDR = 0); | ||
|
||
private: | ||
edm::Handle<reco::TrackCollection> recCollection; | ||
std::string trackQuality_; | ||
reco::TrackCollection const& recCollection_; | ||
std::string const& trackQuality_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,62 @@ | ||
// ROOT includes | ||
#include <Math/VectorUtil.h> | ||
|
||
#include "RecoHI/HiEgammaAlgos/interface/TrackIsoCalculator.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
|
||
#include "Geometry/Records/interface/CaloGeometryRecord.h" | ||
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" | ||
|
||
#include "DataFormats/Common/interface/Handle.h" | ||
#include "DataFormats/EgammaReco/interface/BasicCluster.h" | ||
#include "DataFormats/EgammaReco/interface/SuperCluster.h" | ||
#include "DataFormats/Math/interface/Vector3D.h" | ||
#include "DataFormats/Math/interface/deltaR.h" | ||
|
||
using namespace edm; | ||
using namespace reco; | ||
using namespace std; | ||
|
||
TrackIsoCalculator::TrackIsoCalculator(const edm::Event &iEvent, | ||
const edm::EventSetup &iSetup, | ||
const edm::Handle<reco::TrackCollection> trackLabel, | ||
const std::string trackQuality) { | ||
recCollection = trackLabel; | ||
trackQuality_ = trackQuality; | ||
} | ||
TrackIsoCalculator::TrackIsoCalculator(reco::TrackCollection const& trackCollection, std::string const& trackQuality) | ||
: recCollection_{trackCollection}, trackQuality_{trackQuality} {} | ||
|
||
double TrackIsoCalculator::getTrackIso(const reco::Photon cluster, | ||
double TrackIsoCalculator::getTrackIso(reco::Photon const& cluster, | ||
const double x, | ||
const double threshold, | ||
const double innerDR) { | ||
double TotalPt = 0; | ||
double totalPt = 0; | ||
|
||
for (reco::TrackCollection::const_iterator recTrack = recCollection->begin(); recTrack != recCollection->end(); | ||
recTrack++) { | ||
bool goodtrack = recTrack->quality(reco::TrackBase::qualityByName(trackQuality_)); | ||
for (auto const& recTrack : recCollection_) { | ||
bool goodtrack = recTrack.quality(reco::TrackBase::qualityByName(trackQuality_)); | ||
if (!goodtrack) | ||
continue; | ||
|
||
double pt = recTrack->pt(); | ||
double dR2 = reco::deltaR2(cluster, *recTrack); | ||
double pt = recTrack.pt(); | ||
double dR2 = reco::deltaR2(cluster, recTrack); | ||
if (dR2 >= (0.01 * x * x)) | ||
continue; | ||
if (dR2 < innerDR * innerDR) | ||
continue; | ||
if (pt > threshold) | ||
TotalPt = TotalPt + pt; | ||
totalPt = totalPt + pt; | ||
} | ||
|
||
return TotalPt; | ||
return totalPt; | ||
} | ||
|
||
double TrackIsoCalculator::getBkgSubTrackIso(const reco::Photon cluster, | ||
double TrackIsoCalculator::getBkgSubTrackIso(reco::Photon const& cluster, | ||
const double x, | ||
const double threshold, | ||
const double innerDR) { | ||
double SClusterEta = cluster.eta(); | ||
double TotalPt = 0; | ||
double totalPt = 0.0; | ||
|
||
TotalPt = 0; | ||
|
||
for (reco::TrackCollection::const_iterator recTrack = recCollection->begin(); recTrack != recCollection->end(); | ||
recTrack++) { | ||
bool goodtrack = recTrack->quality(reco::TrackBase::qualityByName(trackQuality_)); | ||
for (auto const& recTrack : recCollection_) { | ||
bool goodtrack = recTrack.quality(reco::TrackBase::qualityByName(trackQuality_)); | ||
if (!goodtrack) | ||
continue; | ||
|
||
double pt = recTrack->pt(); | ||
double eta2 = recTrack->eta(); | ||
double dEta = fabs(eta2 - SClusterEta); | ||
double dR2 = reco::deltaR2(cluster, *recTrack); | ||
if (dEta >= 0.1 * x) | ||
double pt = recTrack.pt(); | ||
if (std::abs(recTrack.eta() - SClusterEta) >= 0.1 * x) | ||
continue; | ||
if (dR2 < innerDR * innerDR) | ||
if (reco::deltaR2(cluster, recTrack) < innerDR * innerDR) | ||
continue; | ||
|
||
if (pt > threshold) | ||
TotalPt = TotalPt + pt; | ||
totalPt = totalPt + pt; | ||
} | ||
|
||
double Tx = getTrackIso(cluster, x, threshold, innerDR); | ||
double CTx = (Tx - TotalPt / 40.0 * x) * (1 / (1 - x / 40.)); | ||
double CTx = (Tx - totalPt / 40.0 * x) * (1 / (1 - x / 40.)); | ||
|
||
return CTx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<use name="DataFormats/JetReco"/> | ||
<use name="DataFormats/Common"/> | ||
|
||
<use name="fftjet"/> | ||
<use name="fftw3"/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<use name="FWCore/MessageLogger"/> | ||
<use name="FWCore/Framework"/> | ||
<use name="clhep"/> | ||
<export> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.