Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Dildick committed May 13, 2020
1 parent 26c0d20 commit d5a9b13
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 30 deletions.
3 changes: 1 addition & 2 deletions Validation/MuonCSCDigis/src/CSCDigiMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ std::set<int> CSCDigiMatcher::wiregroupsInChamber(unsigned int detid, int max_ga
return result;
}

void CSCDigiMatcher::clear()
{
void CSCDigiMatcher::clear() {
detid_to_comparators_.clear();
chamber_to_comparators_.clear();

Expand Down
21 changes: 11 additions & 10 deletions Validation/MuonCSCDigis/src/CSCStubMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void CSCStubMatcher::matchCLCTsToSimTrack(const CSCCLCTDigiCollection& clcts) {

// get the comparator digis in this chamber
std::vector<CSCComparatorDigiContainer> comps;
for (int ilayer = 1; ilayer <= 6; ilayer++){
for (int ilayer = 1; ilayer <= 6; ilayer++) {
CSCDetId layerid(ch_id.endcap(), ch_id.station(), ring, ch_id.chamber(), ilayer);
comps.push_back(cscDigiMatcher_->comparatorDigisInDetId(layerid));
}
Expand All @@ -106,9 +106,9 @@ void CSCStubMatcher::matchCLCTsToSimTrack(const CSCCLCTDigiCollection& clcts) {
if (verboseCLCT_) {
cout << "clct: digi_strips " << ch_id2 << endl;
int layer = 0;
for (const auto& p : comps){
for (const auto& p : comps) {
layer++;
for (const auto& q : p){
for (const auto& q : p) {
cout << "L" << layer << " " << q << " " << q.getHalfStrip() << " ";
}
cout << endl;
Expand All @@ -134,10 +134,10 @@ void CSCStubMatcher::matchCLCTsToSimTrack(const CSCCLCTDigiCollection& clcts) {
// check that at least 3 comparator digis were matched!
int nMatches = 0;
int layer = 0;
for (const auto& p : comps){
for (const auto& p : comps) {
layer++;
for (const auto& q : p){
for (const auto& clctComp : (*c).getHits()[layer-1]) {
for (const auto& q : p) {
for (const auto& clctComp : (*c).getHits()[layer - 1]) {
if (q.getHalfStrip() == clctComp) {
nMatches++;
}
Expand All @@ -153,7 +153,7 @@ void CSCStubMatcher::matchCLCTsToSimTrack(const CSCCLCTDigiCollection& clcts) {
cout << "clctGOOD" << endl;

// store matching CLCTs in this chamber
if(std::find(chamber_to_clcts_[id].begin(), chamber_to_clcts_[id].end(), *c) == chamber_to_clcts_[id].end()) {
if (std::find(chamber_to_clcts_[id].begin(), chamber_to_clcts_[id].end(), *c) == chamber_to_clcts_[id].end()) {
chamber_to_clcts_[id].push_back(*c);
}
}
Expand Down Expand Up @@ -211,7 +211,7 @@ void CSCStubMatcher::matchALCTsToSimTrack(const CSCALCTDigiCollection& alcts) {
cout << "alctGOOD" << endl;

// store matching ALCTs in this chamber
if(std::find(chamber_to_alcts_[id].begin(), chamber_to_alcts_[id].end(), *a) == chamber_to_alcts_[id].end()) {
if (std::find(chamber_to_alcts_[id].begin(), chamber_to_alcts_[id].end(), *a) == chamber_to_alcts_[id].end()) {
chamber_to_alcts_[id].push_back(*a);
}
}
Expand Down Expand Up @@ -309,7 +309,7 @@ void CSCStubMatcher::matchLCTsToSimTrack(const CSCCorrelatedLCTDigiCollection& l
if (lct_matched) {
if (verboseLCT_)
cout << "this LCT matched to simtrack in chamber " << ch_id << endl;
if(std::find(chamber_to_lcts_[id].begin(), chamber_to_lcts_[id].end(), lct) == chamber_to_lcts_[id].end()) {
if (std::find(chamber_to_lcts_[id].begin(), chamber_to_lcts_[id].end(), lct) == chamber_to_lcts_[id].end()) {
chamber_to_lcts_[id].emplace_back(lct);
}
}
Expand Down Expand Up @@ -337,7 +337,8 @@ void CSCStubMatcher::matchMPLCTsToSimTrack(const CSCCorrelatedLCTDigiCollection&
// check if this stub corresponds with a previously matched stub
for (const auto& sim_stub : lctsInChamber(id)) {
if (sim_stub == *lct) {
if(std::find(chamber_to_mplcts_[id].begin(), chamber_to_mplcts_[id].end(), *lct) == chamber_to_mplcts_[id].end()) {
if (std::find(chamber_to_mplcts_[id].begin(), chamber_to_mplcts_[id].end(), *lct) ==
chamber_to_mplcts_[id].end()) {
chamber_to_mplcts_[id].emplace_back(*lct);
}
}
Expand Down
22 changes: 11 additions & 11 deletions Validation/MuonGEMDigis/src/GEMDigiMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,18 +415,18 @@ GlobalPoint GEMDigiMatcher::getGlobalPointPad(unsigned int rawId, const GEMPadDi
return gem_gp;
}

void GEMDigiMatcher::clear(){
detid_to_digis_.clear();
chamber_to_digis_.clear();
superchamber_to_digis_.clear();
void GEMDigiMatcher::clear() {
detid_to_digis_.clear();
chamber_to_digis_.clear();
superchamber_to_digis_.clear();

detid_to_pads_.clear();
chamber_to_pads_.clear();
superchamber_to_pads_.clear();
detid_to_pads_.clear();
chamber_to_pads_.clear();
superchamber_to_pads_.clear();

detid_to_clusters_.clear();
chamber_to_clusters_.clear();
superchamber_to_clusters_.clear();
detid_to_clusters_.clear();
chamber_to_clusters_.clear();
superchamber_to_clusters_.clear();

superchamber_to_copads_.clear();
superchamber_to_copads_.clear();
}
4 changes: 1 addition & 3 deletions Validation/MuonHits/src/CSCSimHitMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,4 @@ std::set<unsigned int> CSCSimHitMatcher::chamberIdsStation(int station) const {
return result;
}

void CSCSimHitMatcher::clear() {
MuonSimHitMatcher::clear();
}
void CSCSimHitMatcher::clear() { MuonSimHitMatcher::clear(); }
4 changes: 1 addition & 3 deletions Validation/MuonHits/src/GEMSimHitMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ void GEMSimHitMatcher::init(const edm::Event& iEvent, const edm::EventSetup& iSe

/// do the matching
void GEMSimHitMatcher::match(const SimTrack& track, const SimVertex& vertex) {

clear();

// instantiates the track ids and simhits
Expand Down Expand Up @@ -349,8 +348,7 @@ int GEMSimHitMatcher::nCoincidencePadsWithHits() const {
return result;
}

void GEMSimHitMatcher::clear()
{
void GEMSimHitMatcher::clear() {
MuonSimHitMatcher::clear();

superchamber_to_hits_.clear();
Expand Down
2 changes: 1 addition & 1 deletion Validation/MuonHits/src/MuonSimHitMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ GlobalVector MuonSimHitMatcher::simHitsMeanMomentum(const edm::PSimHitContainer&
return GlobalVector(sumx / n, sumy / n, sumz / n);
}

void MuonSimHitMatcher::clear(){
void MuonSimHitMatcher::clear() {
track_ids_.clear();
trkid_to_index_.clear();
hits_.clear();
Expand Down

0 comments on commit d5a9b13

Please sign in to comment.