Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Dildick committed Oct 25, 2013
2 parents f21f9fb + 3cd4d92 commit 8a09a48
Show file tree
Hide file tree
Showing 10 changed files with 3,168 additions and 1,018 deletions.
5 changes: 3 additions & 2 deletions GEMValidation/plugins/GEMDigiAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,10 @@ void GEMDigiAnalyzer::beginRun(edm::Run const&, edm::EventSetup const& iSetup)
iSetup.get<MuonGeometryRecord>().get(gem_geo_);
gem_geometry_ = &*gem_geo_;

// FIXME - when a geometry with different partition numbers will be released, the code will brake!
const auto top_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,1)));
// TODO: it's really bad to hardcode max partition number!
const auto bottom_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,6)));
const int nEtaPartitions(gem_geometry_->chamber(GEMDetId(1,1,1,1,1,1))->nEtaPartitions());
const auto bottom_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,nEtaPartitions)));
const float top_half_striplength = top_chamber->specs()->specificTopology().stripLength()/2.;
const float bottom_half_striplength = bottom_chamber->specs()->specificTopology().stripLength()/2.;
const LocalPoint lp_top(0., top_half_striplength, 0.);
Expand Down
5 changes: 3 additions & 2 deletions GEMValidation/plugins/GEMRecHitAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ void GEMRecHitAnalyzer::beginRun(edm::Run const& iRun, edm::EventSetup const& iS
iSetup.get<MuonGeometryRecord>().get(gem_geom_);
gem_geometry_ = &*gem_geom_;

// FIXME - when a geometry with different partition numbers will be released, the code will brake!
const auto top_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,1)));
// TODO: it's really bad to hardcode max partition number!
const auto bottom_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,6)));
const int nEtaPartitions(gem_geometry_->chamber(GEMDetId(1,1,1,1,1,1))->nEtaPartitions());
const auto bottom_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,nEtaPartitions)));
const float top_half_striplength = top_chamber->specs()->specificTopology().stripLength()/2.;
const float bottom_half_striplength = bottom_chamber->specs()->specificTopology().stripLength()/2.;
const LocalPoint lp_top(0., top_half_striplength, 0.);
Expand Down
7 changes: 3 additions & 4 deletions GEMValidation/plugins/GEMSimHitAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ void GEMSimHitAnalyzer::beginRun(const edm::Run &iRun, const edm::EventSetup &iS
iSetup.get<MuonGeometryRecord>().get(gem_geom);
gem_geometry_ = &*gem_geom;

// FIXME - when a geometry with different partition numbers will be released, the code will brake!
const auto top_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,1)));
// TODO: it's really bad to hardcode max partition number!
const auto bottom_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,6)));
const int nEtaPartitions(gem_geometry_->chamber(GEMDetId(1,1,1,1,1,1))->nEtaPartitions());
const auto bottom_chamber = static_cast<const GEMEtaPartition*>(gem_geometry_->idToDetUnit(GEMDetId(1,1,1,1,1,nEtaPartitions)));
const float top_half_striplength = top_chamber->specs()->specificTopology().stripLength()/2.;
const float bottom_half_striplength = bottom_chamber->specs()->specificTopology().stripLength()/2.;
const LocalPoint lp_top(0., top_half_striplength, 0.);
Expand Down Expand Up @@ -433,8 +434,6 @@ void GEMSimHitAnalyzer::buildLUT()
std::vector<int> neg_ids;
neg_ids.push_back(GEMDetId(-1,1,1,1,36,1).rawId());

// VK: I would really suggest getting phis from GEMGeometry

std::vector<float> phis;
phis.push_back(0.);
for(int i=1; i<37; ++i)
Expand Down
Loading

0 comments on commit 8a09a48

Please sign in to comment.