Skip to content

Commit

Permalink
Merge pull request #29053 from guitargeek/unused_reco_deps
Browse files Browse the repository at this point in the history
Remove remaining unneeded dependencies from Reco subsystems
  • Loading branch information
cmsbuild authored Mar 9, 2020
2 parents 7c4303c + 2477826 commit a743515
Show file tree
Hide file tree
Showing 54 changed files with 49 additions and 245 deletions.
1 change: 0 additions & 1 deletion DQMOffline/JetMET/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<use name="RecoJets/JetAlgorithms"/>
<use name="RecoJets/JetProducers"/>
<use name="RecoHI/HiJetAlgos"/>
<use name="RecoHI/HiCentralityAlgos"/>
<use name="DataFormats/CSCRecHit"/>
<use name="DataFormats/EcalDetId"/>
<use name="DataFormats/DetId"/>
Expand Down
21 changes: 0 additions & 21 deletions DQMServices/StreamerIO/BuildFile.xml

This file was deleted.

9 changes: 0 additions & 9 deletions IORawData/DTCommissioning/BuildFile.xml

This file was deleted.

1 change: 0 additions & 1 deletion IORawData/DTCommissioning/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<use name="FWCore/ParameterSet"/>
<use name="DataFormats/FEDRawData"/>
<use name="DataFormats/Provenance"/>
<use name="IORawData/DTCommissioning"/>
<flags EDM_PLUGIN="1"/>
<use name="xrootd"/>
<flags cppflags="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"/>
Expand Down
1 change: 0 additions & 1 deletion RecoEgamma/PhotonIdentification/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/EgammaReco"/>
<use name="DataFormats/PatCandidates"/>
<use name="DataFormats/ParticleFlowCandidate"/>
<use name="RecoEcal/EgammaCoreTools"/>
<use name="DataFormats/BeamSpot"/>
<use name="Geometry/CaloGeometry"/>
Expand Down
1 change: 0 additions & 1 deletion RecoHGCal/TICL/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<use name="DataFormats/HGCalReco"/>
<use name="DataFormats/VertexReco"/>
<use name="FWCore/PluginManager"/>
<use name="RecoLocalCalo/HGCalRecProducers"/>
<export>
<lib name="1"/>
</export>
29 changes: 6 additions & 23 deletions RecoHI/HiEgammaAlgos/interface/TrackIsoCalculator.h
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
5 changes: 1 addition & 4 deletions RecoHI/HiEgammaAlgos/plugins/photonIsolationHIProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
class photonIsolationHIProducer : public edm::stream::EDProducer<> {
public:
explicit photonIsolationHIProducer(const edm::ParameterSet& ps);
~photonIsolationHIProducer() override;

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

Expand Down Expand Up @@ -56,8 +55,6 @@ photonIsolationHIProducer::photonIsolationHIProducer(const edm::ParameterSet& co
produces<reco::HIPhotonIsolationMap>();
}

photonIsolationHIProducer::~photonIsolationHIProducer() {}

void photonIsolationHIProducer::produce(edm::Event& evt, const edm::EventSetup& es) {
edm::Handle<reco::PhotonCollection> photons;
evt.getByToken(photonProducer_, photons);
Expand All @@ -84,7 +81,7 @@ void photonIsolationHIProducer::produce(edm::Event& evt, const edm::EventSetup&

EcalClusterIsoCalculator CxC(evt, es, barrelClusters, endcapClusters);
HcalRechitIsoCalculator RxC(evt, es, hbhe, hf, ho);
TrackIsoCalculator TxC(evt, es, trackCollection, trackQuality_);
TrackIsoCalculator TxC(*trackCollection, trackQuality_);
EcalClusterLazyTools lazyTool(evt, es, barrelEcalHits_, endcapEcalHits_);

for (reco::PhotonCollection::const_iterator phoItr = photons->begin(); phoItr != photons->end(); ++phoItr) {
Expand Down
62 changes: 20 additions & 42 deletions RecoHI/HiEgammaAlgos/src/TrackIsoCalculator.cc
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;
}
1 change: 0 additions & 1 deletion RecoJets/FFTJetAlgorithms/BuildFile.xml
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"/>
Expand Down
4 changes: 0 additions & 4 deletions RecoJets/JetAlgorithms/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
<use name="DataFormats/JetReco"/>
<use name="DataFormats/Candidate"/>
<use name="FWCore/Framework"/>
<use name="SimDataFormats/Vertex"/>
<use name="SimDataFormats/Track"/>
<use name="DataFormats/HepMCCandidate"/>
<use name="FWCore/Utilities"/>
<use name="FWCore/ServiceRegistry"/>
<use name="CondFormats/JetMETObjects"/>
<use name="CondFormats/DataRecord"/>
<export>
<lib name="1"/>
</export>
9 changes: 1 addition & 8 deletions RecoJets/JetAnalyzers/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@
<use name="FWCore/ParameterSet"/>
<use name="root"/>
<use name="DataFormats/Candidate"/>
<use name="Geometry/CaloGeometry"/>
<use name="Geometry/Records"/>
<use name="DataFormats/JetReco"/>
<use name="DataFormats/HepMCCandidate"/>
<use name="DataFormats/CaloTowers"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/HcalDigi"/>
<use name="DataFormats/HcalDetId"/>
<use name="DataFormats/FEDRawData"/>
<use name="DataFormats/StdDictionaries"/>
<use name="DataFormats/WrappedStdDictionaries"/>
<use name="TBDataFormats/HcalTBObjects"/>
<use name="SimDataFormats/GeneratorProducts"/>
<use name="JetMETCorrections/Objects"/>
<use name="JetMETCorrections/MCJet"/>
<use name="CommonTools/UtilAlgos"/>
<use name="FWCore/ServiceRegistry"/>
<use name="FWCore/Utilities"/>
<use name="PhysicsTools/PatUtils"/>
<use name="PhysicsTools/PatAlgos"/>
<use name="PhysicsTools/SelectorUtils"/>
2 changes: 0 additions & 2 deletions RecoJets/JetProducers/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<use name="boost"/>
<use name="FWCore/Framework"/>
<use name="DataFormats/JetReco"/>
<use name="DataFormats/BTauReco"/>
<use name="DataFormats/PatCandidates"/>
<use name="Geometry/CaloGeometry"/>
<use name="Geometry/CaloTopology"/>
Expand All @@ -15,7 +14,6 @@
<use name="fastjet"/>
<use name="vdt_headers"/>
<use name="boost_serialization"/>
<use name="CondFormats/DataRecord"/>
<export>
<lib name="1"/>
</export>
1 change: 0 additions & 1 deletion RecoLocalCalo/CaloTowersCreator/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<use name="boost"/>
<use name="DataFormats/CaloTowers"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/EcalDetId"/>
<use name="DataFormats/DetId"/>
<use name="DataFormats/RecoCandidate"/>
<use name="Geometry/CaloTopology"/>
Expand Down
1 change: 0 additions & 1 deletion RecoLocalCalo/Castor/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<use name="FWCore/Framework"/>
<use name="FWCore/PluginManager"/>
<use name="FWCore/ParameterSet"/>
<use name="DataFormats/CastorReco"/>
<use name="DataFormats/Math"/>
Expand Down
2 changes: 0 additions & 2 deletions RecoLocalCalo/EcalDeadChannelRecoveryAlgos/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<use name="DataFormats/EcalDetId"/>
<use name="Geometry/CaloGeometry"/>
<use name="Geometry/CaloTopology"/>
<use name="Geometry/Records"/>
<use name="CommonTools/MVAUtils"/>
<use name="root"/>
<use name="rootmath"/>
Expand Down
1 change: 0 additions & 1 deletion RecoLocalCalo/EcalRecProducers/BuildFile.xml
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>
Expand Down
1 change: 0 additions & 1 deletion RecoLocalCalo/HGCalRecAlgos/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<use name="FWCore/MessageLogger"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/Framework"/>
<use name="CondFormats/DataRecord"/>
<use name="Geometry/HGCalGeometry"/>
<use name="Geometry/HcalTowerAlgo"/>
<use name="Geometry/Records"/>
Expand Down
1 change: 0 additions & 1 deletion RecoLocalCalo/HGCalRecProducers/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<use name="FWCore/MessageLogger"/>
<use name="FWCore/Framework"/>
<use name="Geometry/HGCalGeometry"/>
<use name="clhep"/>
Expand Down
5 changes: 2 additions & 3 deletions RecoLocalCalo/HcalRecAlgos/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
<use name="clhep"/>
<use name="DataFormats/HcalDigi"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/TrackReco"/>
<use name="CalibFormats/HcalObjects"/>
<use name="CalibFormats/CaloObjects"/>
<use name="CalibCalorimetry/HcalAlgos"/>
<use name="RecoMET/METAlgorithms"/>
<use name="DataFormats/CaloTowers"/>
<use name="FWCore/Framework"/>
<use name="FWCore/PluginManager"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/MessageLogger"/>
<use name="CondFormats/DataRecord"/>
<use name="RecoLocalCalo/EcalRecAlgos"/>
<use name="vdt_headers"/>
<use name="rootminuit2"/>
<export>
Expand Down
4 changes: 0 additions & 4 deletions RecoLocalCalo/HcalRecProducers/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
<use name="RecoLocalCalo/HcalRecAlgos"/>
<use name="FWCore/Framework"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/Math"/>
<use name="DataFormats/RecoCandidate"/>
<use name="Geometry/Records"/>
<use name="Geometry/CaloGeometry"/>
<use name="CondFormats/EcalObjects"/>
<use name="boost"/>
2 changes: 0 additions & 2 deletions RecoLocalFastTime/FTLClusterizer/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<use name="FWCore/MessageLogger"/>
<use name="FWCore/Framework"/>
<use name="FWCore/Utilities"/>
<use name="Geometry/MTDGeometryBuilder"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/TrackerRecHit2D"/>
<use name="TrackingTools/TrajectoryState"/>
<use name="clhep"/>
<export>
Expand Down
1 change: 0 additions & 1 deletion RecoLocalFastTime/FTLCommonAlgos/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<use name="FWCore/MessageLogger"/>
<use name="FWCore/Framework"/>
<use name="Geometry/HGCalGeometry"/>
<use name="Geometry/Records"/>
Expand Down
8 changes: 0 additions & 8 deletions RecoLocalFastTime/FTLRecProducers/BuildFile.xml

This file was deleted.

Loading

0 comments on commit a743515

Please sign in to comment.