Skip to content

Commit b27e785

Browse files
committed
modify Classes/Variables/Methods Names
1 parent 6f0d9c0 commit b27e785

18 files changed

+672
-656
lines changed

DataFormats/GEMDigi/interface/ME0Stub.h

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,73 +12,74 @@
1212

1313
class ME0Stub final {
1414
public:
15-
ME0Stub() : detId(), etaPartition(0), padStrip(0), bending_angle(0), layercount(0), quality(0), patternId(0), bx(0) {}
15+
ME0Stub()
16+
: detId_(), etaPartition_(0), padStrip_(0), bendingAngle_(0), layerCount_(0), quality_(0), patternId_(0), bx_(0) {}
1617
ME0Stub(const GEMDetId& id, const ME0StubPrimitive& stub)
17-
: detId(id),
18-
etaPartition(stub.EtaPartition()),
19-
padStrip(stub.Strip() + stub.SubStrip()),
20-
bending_angle(stub.BendingAngle()),
21-
layercount(stub.LayerCount()),
22-
quality(stub.Quality()),
23-
patternId(stub.PatternId()),
24-
bx(stub.BX()) {}
18+
: detId_(id),
19+
etaPartition_(stub.etaPartition()),
20+
padStrip_(stub.strip() + stub.subStrip()),
21+
bendingAngle_(stub.bendingAngle()),
22+
layerCount_(stub.layerCount()),
23+
quality_(stub.quality()),
24+
patternId_(stub.patternId()),
25+
bx_(stub.bx()) {}
2526
ME0Stub(const GEMDetId& id,
26-
int etaPartition_,
27-
double padStrip_,
28-
double bending_angle_,
29-
int layercount_,
30-
int quality_,
31-
int patternId_,
32-
double bx_)
33-
: detId(id),
34-
etaPartition(etaPartition_),
35-
padStrip(padStrip_),
36-
bending_angle(bending_angle_),
37-
layercount(layercount_),
38-
quality(quality_),
39-
patternId(patternId_),
40-
bx(bx_) {}
27+
int etaPartition,
28+
double padStrip,
29+
double bendingAngle,
30+
int layerCount,
31+
int quality,
32+
int patternId,
33+
double bx)
34+
: detId_(id),
35+
etaPartition_(etaPartition),
36+
padStrip_(padStrip),
37+
bendingAngle_(bendingAngle),
38+
layerCount_(layerCount),
39+
quality_(quality),
40+
patternId_(patternId),
41+
bx_(bx) {}
4142

4243
// clone
4344
ME0Stub* clone() const { return new ME0Stub(*this); }
4445

4546
// Get private variable
46-
GEMDetId DetId() const { return detId; }
47-
int EtaPartition() const { return etaPartition; }
48-
double Strip() const { return padStrip; }
49-
double BendingAngle() const { return bending_angle; }
50-
int LayerCount() const { return layercount; }
51-
int Quality() const { return quality; }
52-
int PatternId() const { return patternId; }
53-
double BX() const { return bx; }
47+
GEMDetId detId() const { return detId_; }
48+
int etaPartition() const { return etaPartition_; }
49+
double strip() const { return padStrip_; }
50+
double bendingAngle() const { return bendingAngle_; }
51+
int layerCount() const { return layerCount_; }
52+
int quality() const { return quality_; }
53+
int patternId() const { return patternId_; }
54+
double bx() const { return bx_; }
5455

5556
// operators
5657
bool operator==(const ME0Stub& other) {
57-
if (layercount == 0 && other.layercount == 0) {
58+
if (layerCount_ == 0 && other.layerCount_ == 0) {
5859
return true;
5960
}
60-
return (quality == other.quality);
61+
return (quality_ == other.quality_);
6162
}
62-
bool operator>(const ME0Stub& other) { return (quality > other.quality); }
63-
bool operator<(const ME0Stub& other) { return (quality < other.quality); }
64-
bool operator>=(const ME0Stub& other) { return (quality >= other.quality); }
65-
bool operator<=(const ME0Stub& other) { return (quality <= other.quality); }
63+
bool operator>(const ME0Stub& other) { return (quality_ > other.quality_); }
64+
bool operator<(const ME0Stub& other) { return (quality_ < other.quality_); }
65+
bool operator>=(const ME0Stub& other) { return (quality_ >= other.quality_); }
66+
bool operator<=(const ME0Stub& other) { return (quality_ <= other.quality_); }
6667
// ostream
6768
friend std::ostream& operator<<(std::ostream& os, const ME0Stub& stub) {
68-
os << "id=" << stub.PatternId() << ", lc=" << stub.LayerCount() << ", strip=" << std::fixed << std::setprecision(3)
69-
<< stub.Strip() << ", prt=" << stub.EtaPartition() << ", quality=" << stub.Quality();
69+
os << "id=" << stub.patternId() << ", lc=" << stub.layerCount() << ", strip=" << std::fixed << std::setprecision(3)
70+
<< stub.strip() << ", prt=" << stub.etaPartition() << ", quality=" << stub.quality();
7071
return os;
7172
}
7273

7374
private:
74-
GEMDetId detId;
75-
int etaPartition;
76-
double padStrip;
77-
double bending_angle;
78-
int layercount;
79-
int quality;
80-
int patternId;
81-
double bx;
75+
GEMDetId detId_;
76+
int etaPartition_;
77+
double padStrip_;
78+
double bendingAngle_;
79+
int layerCount_;
80+
int quality_;
81+
int patternId_;
82+
double bx_;
8283
};
8384

8485
#endif

DataFormats/GEMDigi/src/classes_def.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@
137137
<class name="MuonDigiCollection<ME0DetId,ME0TriggerDigi>"/>
138138
<class name="edm::Wrapper<MuonDigiCollection<ME0DetId,ME0TriggerDigi> >" splitLevel="0"/>
139139

140-
<class name="ME0Stub" ClassVersion="3">
140+
<class name="ME0Stub" ClassVersion="4">
141141
<version ClassVersion="3" checksum="896321440"/>
142+
<version ClassVersion="4" checksum="1308525807"/>
142143
</class>
143144
<class name="std::vector<ME0Stub*>" splitLevel="0"/>
144145
<class name="edm::OwnVector<ME0Stub,edm::ClonePolicy<ME0Stub> >" splitLevel="0" rntupleSplit="false" />

L1Trigger/L1TGEM/interface/ME0StubAlgoChamber.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
namespace l1t {
1212
namespace me0 {
13-
std::vector<std::vector<ME0StubPrimitive>> cross_partition_cancellation(
14-
std::vector<std::vector<ME0StubPrimitive>>& segments, int cross_part_seg_width);
15-
std::vector<ME0StubPrimitive> process_chamber(const std::vector<std::vector<UInt192>>& chamber_data,
16-
const std::vector<std::vector<std::vector<int>>>& chamber_bx_data,
17-
Config& config);
13+
std::vector<std::vector<ME0StubPrimitive>> crossPartitionCancellation(
14+
std::vector<std::vector<ME0StubPrimitive>>& segments, int crossPartSegWidth);
15+
std::vector<ME0StubPrimitive> processChamber(const std::vector<std::vector<UInt192>>& chamberData,
16+
const std::vector<std::vector<std::vector<int>>>& chamberBxData,
17+
Config& config);
1818
} // namespace me0
1919
} // namespace l1t
2020

L1Trigger/L1TGEM/interface/ME0StubAlgoMask.h

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55

66
namespace l1t {
77
namespace me0 {
8-
std::vector<int> shift_center(const hi_lo_t& ly, int max_span);
9-
uint64_t set_high_bits(const std::vector<int>& lo_hi_pair);
10-
Mask get_ly_mask(const patdef_t& ly_pat, int max_span);
8+
std::vector<int> shiftCenter(const HiLo& layer, int maxSpan);
9+
uint64_t setHighBits(const std::vector<int>& loHiPair);
10+
Mask getLayerMask(const PatternDefinition& layerPattern, int maxSpan);
1111

1212
/*
13-
create_pat_ly(low, high) returns a vector of hi_lo_t objects with the given low and high values.
14-
low and high are relative distances from the center of the pattern (strip 18 for max_span=37).
13+
createPatternLayer(low, high) returns a vector of HiLo objects with the given low and high values.
14+
low and high are relative distances from the center of the pattern (strip 18 for maxSpan=37).
1515
16-
For example, create_pat_ly(0.2, 0.9) returns a vector of hi_lo_t objects with the following values:
16+
For example, createPatternLayer(0.2, 0.9) returns a vector of HiLo objects with the following values:
1717
{ [ hi: 0, lo: -3 ], [ hi: 0, lo: -2 ], [ hi: 0, lo: -1 ], [ hi: 1, lo: 0 ], [ hi: 2, lo: 0 ], [ hi: 3, lo: 0 ]}
1818
19-
patdef_t(id, layers) saves the pattern ID and the vector of hi_lo_t objects for each layer.
19+
PatternDefinition(id, layers) saves the pattern ID and the vector of HiLo objects for each layer.
2020
21-
get_ly_mask(patdef_f pat, int pat_width) returns a Mask object with the given pattern and max_span values.
21+
getLayerMask(PatternDefinition pattern, int maxSpan) returns a Mask object with the given pattern and maxSpan values.
2222
example:
2323
24-
get_ly_mask(pat_l, 37) returns a Mask object with the following values:
24+
getLayerMask(patternLeft, 37) returns a Mask object with the following values:
2525
Pattern ID: 16
2626
{0b0000000000000000001111000000000000000, // ly5
2727
0b0000000000000000001110000000000000000, // ly4
@@ -31,41 +31,41 @@ namespace l1t {
3131
0b0000000000000001111000000000000000000} // ly0
3232
*/
3333

34-
const patdef_t pat_straight = patdef_t(17, create_pat_ly(-0.4, 0.4));
35-
const patdef_t pat_l = patdef_t(16, create_pat_ly(0.2, 0.9));
36-
const patdef_t pat_r = mirror_patdef(pat_l, pat_l.id - 1);
37-
const patdef_t pat_l2 = patdef_t(14, create_pat_ly(0.9, 1.7));
38-
const patdef_t pat_r2 = mirror_patdef(pat_l2, pat_l2.id - 1);
39-
const patdef_t pat_l3 = patdef_t(12, create_pat_ly(1.4, 2.3));
40-
const patdef_t pat_r3 = mirror_patdef(pat_l3, pat_l3.id - 1);
41-
const patdef_t pat_l4 = patdef_t(10, create_pat_ly(2.0, 3.0));
42-
const patdef_t pat_r4 = mirror_patdef(pat_l4, pat_l4.id - 1);
43-
const patdef_t pat_l5 = patdef_t(8, create_pat_ly(2.7, 3.8));
44-
const patdef_t pat_r5 = mirror_patdef(pat_l5, pat_l5.id - 1);
45-
const patdef_t pat_l6 = patdef_t(6, create_pat_ly(3.5, 4.7));
46-
const patdef_t pat_r6 = mirror_patdef(pat_l6, pat_l6.id - 1);
47-
const patdef_t pat_l7 = patdef_t(4, create_pat_ly(4.3, 5.5));
48-
const patdef_t pat_r7 = mirror_patdef(pat_l7, pat_l7.id - 1);
49-
const patdef_t pat_l8 = patdef_t(2, create_pat_ly(5.4, 7.0));
50-
const patdef_t pat_r8 = mirror_patdef(pat_l8, pat_l8.id - 1);
51-
52-
const std::vector<Mask> LAYER_MASK{get_ly_mask(pat_straight, 37),
53-
get_ly_mask(pat_l, 37),
54-
get_ly_mask(pat_r, 37),
55-
get_ly_mask(pat_l2, 37),
56-
get_ly_mask(pat_r2, 37),
57-
get_ly_mask(pat_l3, 37),
58-
get_ly_mask(pat_r3, 37),
59-
get_ly_mask(pat_l4, 37),
60-
get_ly_mask(pat_r4, 37),
61-
get_ly_mask(pat_l5, 37),
62-
get_ly_mask(pat_r5, 37),
63-
get_ly_mask(pat_l6, 37),
64-
get_ly_mask(pat_r6, 37),
65-
get_ly_mask(pat_l7, 37),
66-
get_ly_mask(pat_r7, 37),
67-
get_ly_mask(pat_l8, 37),
68-
get_ly_mask(pat_r8, 37)};
34+
const PatternDefinition kPatternStraight = PatternDefinition(17, createPatternLayer(-0.4, 0.4));
35+
const PatternDefinition kPatternLeft = PatternDefinition(16, createPatternLayer(0.2, 0.9));
36+
const PatternDefinition kPatternRight = mirrorPatternDefinition(kPatternLeft, kPatternLeft.id - 1);
37+
const PatternDefinition kPatternLeft2 = PatternDefinition(14, createPatternLayer(0.9, 1.7));
38+
const PatternDefinition kPatternRight2 = mirrorPatternDefinition(kPatternLeft2, kPatternLeft2.id - 1);
39+
const PatternDefinition kPatternLeft3 = PatternDefinition(12, createPatternLayer(1.4, 2.3));
40+
const PatternDefinition kPatternRight3 = mirrorPatternDefinition(kPatternLeft3, kPatternLeft3.id - 1);
41+
const PatternDefinition kPatternLeft4 = PatternDefinition(10, createPatternLayer(2.0, 3.0));
42+
const PatternDefinition kPatternRight4 = mirrorPatternDefinition(kPatternLeft4, kPatternLeft4.id - 1);
43+
const PatternDefinition kPatternLeft5 = PatternDefinition(8, createPatternLayer(2.7, 3.8));
44+
const PatternDefinition kPatternRight5 = mirrorPatternDefinition(kPatternLeft5, kPatternLeft5.id - 1);
45+
const PatternDefinition kPatternLeft6 = PatternDefinition(6, createPatternLayer(3.5, 4.7));
46+
const PatternDefinition kPatternRight6 = mirrorPatternDefinition(kPatternLeft6, kPatternLeft6.id - 1);
47+
const PatternDefinition kPatternLeft7 = PatternDefinition(4, createPatternLayer(4.3, 5.5));
48+
const PatternDefinition kPatternRight7 = mirrorPatternDefinition(kPatternLeft7, kPatternLeft7.id - 1);
49+
const PatternDefinition kPatternLeft8 = PatternDefinition(2, createPatternLayer(5.4, 7.0));
50+
const PatternDefinition kPatternRight8 = mirrorPatternDefinition(kPatternLeft8, kPatternLeft8.id - 1);
51+
52+
const std::vector<Mask> kLayerMask{getLayerMask(kPatternStraight, 37),
53+
getLayerMask(kPatternLeft, 37),
54+
getLayerMask(kPatternRight, 37),
55+
getLayerMask(kPatternLeft2, 37),
56+
getLayerMask(kPatternRight2, 37),
57+
getLayerMask(kPatternLeft3, 37),
58+
getLayerMask(kPatternRight3, 37),
59+
getLayerMask(kPatternLeft4, 37),
60+
getLayerMask(kPatternRight4, 37),
61+
getLayerMask(kPatternLeft5, 37),
62+
getLayerMask(kPatternRight5, 37),
63+
getLayerMask(kPatternLeft6, 37),
64+
getLayerMask(kPatternRight6, 37),
65+
getLayerMask(kPatternLeft7, 37),
66+
getLayerMask(kPatternRight7, 37),
67+
getLayerMask(kPatternLeft8, 37),
68+
getLayerMask(kPatternRight8, 37)};
6969
} // namespace me0
7070
} // namespace l1t
7171
#endif

L1Trigger/L1TGEM/interface/ME0StubAlgoPartition.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
namespace l1t {
88
namespace me0 {
9-
bool is_ghost(const ME0StubPrimitive& seg,
10-
const ME0StubPrimitive& comp,
11-
bool check_ids = false,
12-
bool check_strips = false);
13-
bool is_at_edge(int x, int group_width, int edge_distance);
14-
std::vector<ME0StubPrimitive> cancel_edges(const std::vector<ME0StubPrimitive>& segments,
15-
int group_width = 8,
16-
int ghost_width = 2,
17-
int edge_distance = 2,
18-
bool verbose = false);
19-
std::vector<ME0StubPrimitive> process_partition(const std::vector<UInt192>& partition_data,
20-
const std::vector<std::vector<int>>& partition_bx_data,
21-
int partition,
22-
Config& config);
9+
bool isGhost(const ME0StubPrimitive& segment,
10+
const ME0StubPrimitive& comparison,
11+
bool checkIds = false,
12+
bool checkStrips = false);
13+
bool isAtEdge(int x, int groupWidth, int edgeDistance);
14+
std::vector<ME0StubPrimitive> cancelEdges(const std::vector<ME0StubPrimitive>& segments,
15+
int groupWidth = 8,
16+
int ghostWidth = 2,
17+
int edgeDistance = 2,
18+
bool verbose = false);
19+
std::vector<ME0StubPrimitive> processPartition(const std::vector<UInt192>& partitionData,
20+
const std::vector<std::vector<int>>& partitionBxData,
21+
int partition,
22+
Config& config);
2323
} // namespace me0
2424
} // namespace l1t
2525

L1Trigger/L1TGEM/interface/ME0StubAlgoPatUnit.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,28 @@
1010

1111
namespace l1t {
1212
namespace me0 {
13-
std::vector<uint64_t> mask_layer_data(const std::vector<uint64_t>& data, const Mask& mask);
14-
std::pair<std::vector<double>, double> calculate_centroids(const std::vector<uint64_t>& masked_data,
15-
const std::vector<std::vector<int>>& partition_bx_data);
16-
int calculate_hit_count(const std::vector<uint64_t>& masked_data, bool light = false);
17-
int calculate_layer_count(const std::vector<uint64_t>& masked_data);
18-
std::vector<int> calculate_cluster_size(const std::vector<uint64_t>& data);
19-
std::vector<int> calculate_hits(const std::vector<uint64_t>& data);
13+
std::vector<uint64_t> maskLayerData(const std::vector<uint64_t>& data, const Mask& mask);
14+
std::pair<std::vector<double>, double> calculateCentroids(const std::vector<uint64_t>& maskedData,
15+
const std::vector<std::vector<int>>& partitionBxData);
16+
int calculateHitCount(const std::vector<uint64_t>& maskedData, bool light = false);
17+
int calculateLayerCount(const std::vector<uint64_t>& maskedData);
18+
std::vector<int> calculateClusterSize(const std::vector<uint64_t>& data);
19+
std::vector<int> calculateHits(const std::vector<uint64_t>& data);
2020

21-
ME0StubPrimitive pat_unit(const std::vector<uint64_t>& data,
22-
const std::vector<std::vector<int>>& bx_data,
23-
int strip = 0,
24-
int partition = -1,
25-
std::vector<int> ly_thresh_patid = {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 4, 4, 4, 4, 4},
26-
// layer count threshold for 17 pattern ids
27-
std::vector<int> ly_thresh_eta = {4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4},
28-
// layer count threshold for 8 eta partitions + 7 "virtual" eta partitions
29-
int input_max_span = 37,
30-
bool skip_centroids = true,
31-
int num_or = 2,
32-
bool light_hit_count = true,
33-
bool verbose = false);
21+
ME0StubPrimitive patUnit(
22+
const std::vector<uint64_t>& data,
23+
const std::vector<std::vector<int>>& bxData,
24+
int strip = 0,
25+
int partition = -1,
26+
std::vector<int> layerThresholdPatternId = {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 4, 4, 4, 4, 4},
27+
// layer count threshold for 17 pattern ids
28+
std::vector<int> layerThresholdEta = {4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4},
29+
// layer count threshold for 8 eta partitions + 7 "virtual" eta partitions
30+
int inputMaxSpan = 37,
31+
bool skipCentroids = true,
32+
int numOr = 2,
33+
bool lightHitCount = true,
34+
bool verbose = false);
3435
} // namespace me0
3536
} // namespace l1t
3637
#endif

L1Trigger/L1TGEM/interface/ME0StubAlgoPatUnitMux.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99

1010
namespace l1t {
1111
namespace me0 {
12-
uint64_t parse_data(const UInt192& data, int strip, int max_span);
13-
std::vector<uint64_t> extract_data_window(const std::vector<UInt192>& ly_dat, int strip, int max_span);
14-
std::vector<int> parse_bx_data(const std::vector<int>& bx_data, int strip, int max_span);
15-
std::vector<std::vector<int>> extract_bx_data_window(const std::vector<std::vector<int>>& ly_dat,
16-
int strip,
17-
int max_span);
18-
std::vector<ME0StubPrimitive> pat_mux(const std::vector<UInt192>& partition_data,
19-
const std::vector<std::vector<int>>& partition_bx_data,
20-
int partition,
21-
Config& config);
12+
uint64_t parseData(const UInt192& data, int strip, int maxSpan);
13+
std::vector<uint64_t> extractDataWindow(const std::vector<UInt192>& layerData, int strip, int maxSpan);
14+
std::vector<int> parseBxData(const std::vector<int>& bxData, int strip, int maxSpan);
15+
std::vector<std::vector<int>> extractBxDataWindow(const std::vector<std::vector<int>>& layerData,
16+
int strip,
17+
int maxSpan);
18+
std::vector<ME0StubPrimitive> patMux(const std::vector<UInt192>& partitionData,
19+
const std::vector<std::vector<int>>& partitionBxData,
20+
int partition,
21+
Config& config);
2222
} // namespace me0
2323
} // namespace l1t
2424
#endif

0 commit comments

Comments
 (0)