Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for on track cluster plots in Pix DQM for HI runs #12607

Merged
merged 2 commits into from
Dec 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions DQM/SiPixelCommon/python/SiPixelOfflineDQM_source_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,18 @@
SiPixelHitEfficiencySource.ringOn = False

#HI track modules
hiTracks = "hiGlobalPrimTracks"
hiTracks = "hiGeneralTracks"

SiPixelTrackResidualSource_HeavyIons = SiPixelTrackResidualSource.clone(
TrackCandidateProducer = 'hiPrimTrackCandidates',
trajectoryInput = hiTracks
TrackCandidateProducer = hiTracks,
trajectoryInput = hiTracks,
tracksrc=hiTracks,
vtxsrc='hiSelectedVertex'
)

SiPixelHitEfficiencySource_HeavyIons = SiPixelHitEfficiencySource.clone(
trajectoryInput = hiTracks
trajectoryInput = hiTracks,
vtxsrc='hiSelectedVertex'
)


Expand Down
6 changes: 4 additions & 2 deletions DQM/SiPixelCommon/python/SiPixelP5DQM_source_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@

SiPixelTrackResidualSource_HeavyIons = SiPixelTrackResidualSource.clone(
TrackCandidateProducer = 'hiPrimTrackCandidates',
trajectoryInput = hiTracks
trajectoryInput = hiTracks,
vtxsrc='hiSelectedVertex'
)

SiPixelHitEfficiencySource_HeavyIons = SiPixelHitEfficiencySource.clone(
trajectoryInput = hiTracks
trajectoryInput = hiTracks,
vtxsrc='hiSelectedVertex'
)

#DQM service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class SiPixelHitEfficiencySource : public DQMEDAnalyzer {
bool firstRun;

std::map<uint32_t, SiPixelHitEfficiencyModule*> theSiPixelStructure;


std::string vtxsrc_;
int nmissing,nvalid;

int nvtx_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SiPixelTrackResidualSource : public DQMEDAnalyzer {
edm::EDGetTokenT<std::vector<reco::Track> > trackToken_;
edm::EDGetTokenT<TrajTrackAssociationCollection> trackAssociationToken_;
edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > clustersrcToken_;

std::string vtxsrc_;

bool debug_;
bool modOn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
bladeOn = cms.untracked.bool(True),
diskOn = cms.untracked.bool(False),
updateEfficiencies = cms.untracked.bool(False),
vtxsrc = cms.untracked.string('offlinePrimaryVertices'),

trajectoryInput = cms.InputTag('rsWithMaterialTracksP5'),
trajectoryInput = cms.InputTag('generalTracks'),
applyEdgeCut = cms.untracked.bool(False),
nSigma_EdgeCut = cms.untracked.double(2.)
)
1 change: 1 addition & 0 deletions DQM/SiPixelMonitorTrack/python/SiPixelMonitorTrack_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
bladeOn = cms.untracked.bool(True),
diskOn = cms.untracked.bool(True),
PtMinRes = cms.untracked.double(4.0),
vtxsrc= cms.untracked.string("offlinePrimaryVertices"),

trajectoryInput = cms.InputTag('generalTracks')
)
3 changes: 2 additions & 1 deletion DQM/SiPixelMonitorTrack/src/SiPixelHitEfficiencySource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ SiPixelHitEfficiencySource::SiPixelHitEfficiencySource(const edm::ParameterSet&
debug_ = pSet_.getUntrackedParameter<bool>("debug", false);
applyEdgeCut_ = pSet_.getUntrackedParameter<bool>("applyEdgeCut");
nSigma_EdgeCut_ = pSet_.getUntrackedParameter<double>("nSigma_EdgeCut");
vertexCollectionToken_ = consumes<reco::VertexCollection>(std::string("offlinePrimaryVertices"));
vtxsrc_= pSet_.getUntrackedParameter<std::string>("vtxsrc","offlinePrimaryVertices");
vertexCollectionToken_ = consumes<reco::VertexCollection>(vtxsrc_);
tracksrc_ = consumes<TrajTrackAssociationCollection>(pSet_.getParameter<edm::InputTag>("trajectoryInput"));
clusterCollectionToken_ = consumes<edmNew::DetSetVector<SiPixelCluster> >(std::string("siPixelClusters"));

Expand Down
11 changes: 6 additions & 5 deletions DQM/SiPixelMonitorTrack/src/SiPixelTrackResidualSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ SiPixelTrackResidualSource::SiPixelTrackResidualSource(const edm::ParameterSet&
ttrhbuilder_ = pSet_.getParameter<std::string>("TTRHBuilder");
ptminres_= pSet.getUntrackedParameter<double>("PtMinRes",4.0) ;
beamSpotToken_ = consumes<reco::BeamSpot>(std::string("offlineBeamSpot"));
offlinePrimaryVerticesToken_ = consumes<reco::VertexCollection>(std::string("offlinePrimaryVertices"));
vtxsrc_=pSet_.getUntrackedParameter<std::string>("vtxsrc", "offlinePrimaryVertices");
offlinePrimaryVerticesToken_ = consumes<reco::VertexCollection>(vtxsrc_);// consumes<reco::VertexCollection>(std::string("hiSelectedVertex")); //"offlinePrimaryVertices"));
generalTracksToken_ = consumes<reco::TrackCollection>(pSet_.getParameter<edm::InputTag>("tracksrc"));
tracksrcToken_ = consumes<std::vector<Trajectory> >(pSet_.getParameter<edm::InputTag>("trajectoryInput"));
trackToken_ = consumes<std::vector<reco::Track> >(pSet_.getParameter<edm::InputTag>("trajectoryInput"));
Expand Down Expand Up @@ -880,20 +881,20 @@ void SiPixelTrackResidualSource::analyze(const edm::Event& iEvent, const edm::Ev
edm::Handle<std::vector<reco::Track> > trackCollectionHandle;
//iEvent.getByLabel(tracksrc_,trackCollectionHandle);
iEvent.getByToken( trackToken_, trackCollectionHandle );

auto const & trackColl = *(trackCollectionHandle.product());

//get the map
edm::Handle<TrajTrackAssociationCollection> match;
//iEvent.getByLabel(tracksrc_,match);
iEvent.getByToken( trackAssociationToken_, match);
auto const & ttac = *(match.product());

// get clusters
edm::Handle< edmNew::DetSetVector<SiPixelCluster> > clusterColl;
//iEvent.getByLabel( clustersrc_, clusterColl );
iEvent.getByToken( clustersrcToken_, clusterColl );
auto const & clustColl = *(clusterColl.product());


if(debug_){
std::cout << "Trajectories\t : " << trajColl.size() << std::endl;
Expand Down Expand Up @@ -1047,7 +1048,7 @@ void SiPixelTrackResidualSource::analyze(const edm::Event& iEvent, const edm::Ev
float phi = clustgp.phi();
float z = clustgp.z();

PixelBarrelName pbn(DetId((*hit).geographicalId()), tTopo, isUpgrade);
PixelBarrelName pbn(DetId((*hit).geographicalId()), tTopo, isUpgrade);
int ladder = pbn.ladderName();
int module = pbn.moduleName();

Expand Down