Skip to content

Commit

Permalink
Pass a TrackerTopology pointer, rather than a handle
Browse files Browse the repository at this point in the history
  • Loading branch information
William Tanenbaum committed Jan 3, 2013
1 parent 59ed190 commit cfc9cbe
Show file tree
Hide file tree
Showing 27 changed files with 1,154 additions and 1,124 deletions.
9 changes: 5 additions & 4 deletions Alignment/LaserAlignment/test/RecoAnalyzerRecHits.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** \file RecoAnalyzerRecHits.cc
* plots for RecHits
*
* $Date: 2008/11/07 11:04:19 $
* $Revision: 1.10 $
* $Date: 2012/12/26 20:35:50 $
* $Revision: 1.11 $
* \author Maarten Thomas
*/

Expand All @@ -22,8 +22,9 @@
void RecoAnalyzer::trackerRecHits(edm::Event const& theEvent, edm::EventSetup const& theSetup)
{
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopo;
#include.get<IdealGeometryRecord>().get(tTopo);
edm::ESHandle<TrackerTopology> tTopoHandle;
theSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();


// access the Tracker
Expand Down
9 changes: 5 additions & 4 deletions Alignment/LaserDQM/plugins/LaserDQMStatistics.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** \file LaserDQMStatistics.cc
* Fill the DQM Monitors
*
* $Date: 2007/12/04 23:54:44 $
* $Revision: 1.5 $
* $Date: 2012/12/26 20:38:59 $
* $Revision: 1.6 $
* \author Maarten Thomas
*/

Expand All @@ -26,8 +26,9 @@
void LaserDQM::trackerStatistics(edm::Event const& theEvent,edm::EventSetup const& theSetup)
{
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopo;
theSetup.get<IdealGeometryRecord>().get(tTopo);
edm::ESHandle<TrackerTopology> tTopoHandle;
theSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();


// access the tracker
Expand Down
6 changes: 4 additions & 2 deletions AnalysisAlgos/TrackInfoProducer/test/TrackInfoAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ class TrackInfoAnalyzer : public edm::EDAnalyzer {

using namespace reco;

edm::ESHandle<TrackerTopology> tTopo;
setup.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
setup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

//std::cout << "\nEvent ID = "<< event.id() << std::endl ;
edm::InputTag TkTag = conf_.getParameter<edm::InputTag>("TrackInfo");
Expand Down
7 changes: 4 additions & 3 deletions DQM/SiPixelMonitorTrack/src/SiPixelTrackResidualSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Original Author: Shan-Huei Chuang
// Created: Fri Mar 23 18:41:42 CET 2007
// Updated by Lukas Wehrli (plots for clusters on/off track added)
// $Id: SiPixelTrackResidualSource.cc,v 1.25 2012/09/11 09:37:41 clseitz Exp $
// $Id: SiPixelTrackResidualSource.cc,v 1.26 2012/12/26 21:07:10 wmtan Exp $


#include <iostream>
Expand Down Expand Up @@ -514,8 +514,9 @@ void SiPixelTrackResidualSource::endJob(void) {

void SiPixelTrackResidualSource::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopo;
iSetup.get<IdealGeometryRecord>().get(tTopo);
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ SiStripBadComponentsDQMServiceReader::~SiStripBadComponentsDQMServiceReader(){}

void SiStripBadComponentsDQMServiceReader::analyze( const edm::Event& e, const edm::EventSetup& iSetup)
{
edm::ESHandle<TrackerTopology> tTopo;
iSetup.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

uint32_t FedErrorMask = 1; // bit 0
uint32_t DigiErrorMask = 2; // bit 1
Expand Down Expand Up @@ -77,7 +79,7 @@ void SiStripBadComponentsDQMServiceReader::printError( std::stringstream & ss, c
}
}

string SiStripBadComponentsDQMServiceReader::detIdToString(const DetId & detid, edm::ESHandle<TrackerTopology>& tTopo)
string SiStripBadComponentsDQMServiceReader::detIdToString(const DetId & detid, const TrackerTopology* tTopo)
{
std::string detector;
int layer = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SiStripBadComponentsDQMServiceReader : public edm::EDAnalyzer {

void printError( std::stringstream & ss, const bool error, const std::string & errorText );

std::string detIdToString(const DetId & detid, edm::ESHandle<TrackerTopology>& tTopo);
std::string detIdToString(const DetId & detid, const TrackerTopology* tTopo);

private:
bool printdebug_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ ClusterMTCCFilter::ClusterMTCCFilter(const edm::ParameterSet& ps){

bool ClusterMTCCFilter::filter(edm::Event & e, edm::EventSetup const& c) {

edm::ESHandle<TrackerTopology> tTopo;
c.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
c.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

//get SiStripCluster
edm::Handle< edm::DetSetVector<SiStripCluster> > h;
Expand Down
5 changes: 3 additions & 2 deletions Geometry/TrackerNumberingBuilder/test/ModuleNumbering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ void
ModuleNumbering::analyze( const edm::Event& iEvent, const edm::EventSetup& iSetup )
{
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopo;
iSetup.get<IdealGeometryRecord>().get(tTopo);
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ class TrackerTopologyAnalyzer : public edm::EDAnalyzer {

void TrackerTopologyAnalyzer::analyze( const edm::Event &iEvent, const edm::EventSetup& iSetup) {
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopo;
iSetup.get<IdealGeometryRecord>().get(tTopo);
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

typedef std::vector<DetId> DetIdContainer;

Expand Down
6 changes: 4 additions & 2 deletions HLTrigger/special/src/HLTTrackerHaloFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ HLTTrackerHaloFilter::~HLTTrackerHaloFilter()
bool HLTTrackerHaloFilter::hltFilter(edm::Event& event, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct)
{

edm::ESHandle<TrackerTopology> tTopo;
iSetup.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

// All HLT filters must create and fill an HLT filter object,
// recording any reconstructed physics objects satisfying (or not)
Expand Down
2 changes: 1 addition & 1 deletion PhysicsTools/RecoUtils/interface/CheckHitPattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CheckHitPattern {
// Return a pair<uint32, uint32> consisting of the numbers used by HitPattern to
// identify subdetector and layer number respectively.
typedef std::pair<uint32_t, uint32_t> DetInfo;
static DetInfo interpretDetId(DetId detId, edm::ESHandle<TrackerTopology>& tTopo);
static DetInfo interpretDetId(DetId detId, const TrackerTopology* tTopo);

// Return a bool indicating if a given subdetector is in the barrel.
static bool barrel(uint32_t subDet);
Expand Down
8 changes: 5 additions & 3 deletions PhysicsTools/RecoUtils/src/CheckHitPattern.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ CheckHitPattern::RZrangeMap CheckHitPattern::rangeRorZ_;

void CheckHitPattern::init(const edm::EventSetup& iSetup) {

edm::ESHandle<TrackerTopology> tTopo;
iSetup.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

//
// Note min/max radius (z) of each barrel layer (endcap disk).
Expand Down Expand Up @@ -78,7 +80,7 @@ void CheckHitPattern::init(const edm::EventSetup& iSetup) {
#endif
}

CheckHitPattern::DetInfo CheckHitPattern::interpretDetId(DetId detId, edm::ESHandle<TrackerTopology>& tTopo) {
CheckHitPattern::DetInfo CheckHitPattern::interpretDetId(DetId detId, const TrackerTopology* tTopo) {
// Convert detId to a pair<uint32, uint32> consisting of the numbers used by HitPattern
// to identify subdetector and layer number respectively.
if (detId.subdetId() == StripSubdetector::TIB) {
Expand Down
8 changes: 4 additions & 4 deletions QCDAnalysis/ChargedHadronSpectra/interface/HitInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class HitInfo
HitInfo();
~HitInfo();

static std::string getInfo(const DetId & id, edm::ESHandle<TrackerTopology>& tTopo);
static std::string getInfo(const TrackingRecHit & recHit, edm::ESHandle<TrackerTopology>& tTopo);
static std::string getInfo(std::vector<const TrackingRecHit *> recHits, edm::ESHandle<TrackerTopology>& tTopo);
static std::string getInfo(const PSimHit & simHit, edm::ESHandle<TrackerTopology>& tTopo);
static std::string getInfo(const DetId & id, const TrackerTopology* tTopo);
static std::string getInfo(const TrackingRecHit & recHit, const TrackerTopology* tTopo);
static std::string getInfo(std::vector<const TrackingRecHit *> recHits, const TrackerTopology* tTopo);
static std::string getInfo(const PSimHit & simHit, const TrackerTopology* tTopo);
};

#endif
4 changes: 2 additions & 2 deletions QCDAnalysis/ChargedHadronSpectra/interface/PlotRecTracks.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class PlotRecTracks

private:
std::string getPixelInfo(const TrackingRecHit* recHit,
edm::ESHandle<TrackerTopology>& tTopo,
const TrackerTopology* tTopo,
const std::ostringstream& o,
const std::ostringstream& d);
std::string getStripInfo(const TrackingRecHit* recHit,
edm::ESHandle<TrackerTopology>& tTopo,
const TrackerTopology* tTopo,
const std::ostringstream& o,
const std::ostringstream& d);
FreeTrajectoryState getTrajectoryAtOuterPoint(const reco::Track& track);
Expand Down
8 changes: 4 additions & 4 deletions QCDAnalysis/ChargedHadronSpectra/src/HitInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ HitInfo::~HitInfo()
}

/*****************************************************************************/
string HitInfo::getInfo(const DetId & id, edm::ESHandle<TrackerTopology>& tTopo)
string HitInfo::getInfo(const DetId & id, const TrackerTopology* tTopo)
{
std::string info;

Expand Down Expand Up @@ -50,15 +50,15 @@ string HitInfo::getInfo(const DetId & id, edm::ESHandle<TrackerTopology>& tTopo)
}

/*****************************************************************************/
string HitInfo::getInfo(const TrackingRecHit & recHit, edm::ESHandle<TrackerTopology>& tTopo)
string HitInfo::getInfo(const TrackingRecHit & recHit, const TrackerTopology* tTopo)
{
DetId id(recHit.geographicalId());

return getInfo(id, tTopo);
}

/*****************************************************************************/
string HitInfo::getInfo(std::vector<const TrackingRecHit *> recHits, edm::ESHandle<TrackerTopology>& tTopo)
string HitInfo::getInfo(std::vector<const TrackingRecHit *> recHits, const TrackerTopology* tTopo)
{
std::string info;

Expand All @@ -71,7 +71,7 @@ string HitInfo::getInfo(std::vector<const TrackingRecHit *> recHits, edm::ESHand
}

/*****************************************************************************/
string HitInfo::getInfo(const PSimHit & simHit, edm::ESHandle<TrackerTopology>& tTopo)
string HitInfo::getInfo(const PSimHit & simHit, const TrackerTopology* tTopo)
{
std::string info;

Expand Down
10 changes: 6 additions & 4 deletions QCDAnalysis/ChargedHadronSpectra/src/PlotRecTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ PlotRecTracks::~PlotRecTracks()
}

/*****************************************************************************/
string PlotRecTracks::getPixelInfo(const TrackingRecHit* recHit, edm::ESHandle<TrackerTopology>& tTopo, const ostringstream& o, const ostringstream& d)
string PlotRecTracks::getPixelInfo(const TrackingRecHit* recHit, const TrackerTopology* tTopo, const ostringstream& o, const ostringstream& d)
{
const SiPixelRecHit* pixelRecHit =
dynamic_cast<const SiPixelRecHit *>(recHit);
Expand Down Expand Up @@ -125,7 +125,7 @@ string PlotRecTracks::getPixelInfo(const TrackingRecHit* recHit, edm::ESHandle<T

/*****************************************************************************/
string PlotRecTracks::getStripInfo
(const TrackingRecHit* recHit, edm::ESHandle<TrackerTopology>& tTopo, const ostringstream& o, const ostringstream& d)
(const TrackingRecHit* recHit, const TrackerTopology* tTopo, const ostringstream& o, const ostringstream& d)
{
DetId id = recHit->geographicalId();
LocalPoint lpos = recHit->localPosition();
Expand Down Expand Up @@ -198,8 +198,10 @@ FreeTrajectoryState PlotRecTracks::getTrajectoryAtOuterPoint
/*****************************************************************************/
void PlotRecTracks::printRecTracks(const edm::Event& ev, const edm::EventSetup& es)
{
edm::ESHandle<TrackerTopology> tTopo;
es.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
es.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

theHitAssociator = new TrackerHitAssociator(ev);

Expand Down
6 changes: 4 additions & 2 deletions QCDAnalysis/ChargedHadronSpectra/src/PlotSimTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ PlotSimTracks::~PlotSimTracks()
/*****************************************************************************/
void PlotSimTracks::printSimTracks(const edm::Event& ev, const edm::EventSetup& es)
{
edm::ESHandle<TrackerTopology> tTopo;
es.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
es.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

// Tracker
edm::Handle<TrackingParticleCollection> simTrackHandle;
Expand Down
14 changes: 8 additions & 6 deletions QCDAnalysis/ChargedHadronSpectra/test/QCDTrackAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class QCDTrackAnalyzer : public edm::EDAnalyzer
virtual void endJob();

private:
int getDetLayerId(const PSimHit& simHit, edm::ESHandle<TrackerTopology>& tTopo);
bool isAccepted(const TrackingParticle& simTrack, edm::ESHandle<TrackerTopology>& tTopo);
int getDetLayerId(const PSimHit& simHit, const TrackerTopology* tTopo);
bool isAccepted(const TrackingParticle& simTrack, const TrackerTopology* tTopo);

bool isPrimary(const edm::RefToBase<reco::Track> & recTrack);
edm::RefToBase<reco::Track> getAssociatedRecTrack
Expand Down Expand Up @@ -207,7 +207,7 @@ void QCDTrackAnalyzer::endJob()
}

/*****************************************************************************/
int QCDTrackAnalyzer::getDetLayerId(const PSimHit& simHit, edm::ESHandle<TrackerTopology>& tTopo)
int QCDTrackAnalyzer::getDetLayerId(const PSimHit& simHit, const TrackerTopology* tTopo)
{
int layerId;

Expand All @@ -229,7 +229,7 @@ int QCDTrackAnalyzer::getDetLayerId(const PSimHit& simHit, edm::ESHandle<Tracker
}

/*****************************************************************************/
bool QCDTrackAnalyzer::isAccepted(const TrackingParticle& simTrack_, edm::ESHandle<TrackerTopology>& tTopo)
bool QCDTrackAnalyzer::isAccepted(const TrackingParticle& simTrack_, const TrackerTopology* tTopo)
{
TrackingParticle * simTrack = const_cast<TrackingParticle *>(&simTrack_);

Expand Down Expand Up @@ -466,8 +466,10 @@ float QCDTrackAnalyzer::refitWithVertex
/*****************************************************************************/
int QCDTrackAnalyzer::processSimTracks(const edm::EventSetup& es)
{
edm::ESHandle<TrackerTopology> tTopo;
es.get<IdealGeometryRecord>().get(tTopo);
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopoHandle;
es.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

int ntrk = 0;

Expand Down
5 changes: 3 additions & 2 deletions SLHCUpgradeSimulations/Geometry/test/FastsimHitNtuplizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ void FastsimHitNtuplizer::beginJob(const edm::EventSetup& es)
void FastsimHitNtuplizer::analyze(const edm::Event& e, const edm::EventSetup& es)
{
//Retrieve tracker topology from geometry
edm::ESHandle<TrackerTopology> tTopo;
es.get<IdealGeometryRecord>().get(tTopo);
//edm::ESHandle<TrackerTopology> tTopoHandle;
//es.get<IdealGeometryRecord>().get(tTopoHandle);
//const TrackerTopology* const tTopo = tTopoHandle.product();


edm::Handle<SiTrackerGSRecHit2DCollection> theGSRecHits;
Expand Down
Loading

0 comments on commit cfc9cbe

Please sign in to comment.