8 : region_(region), station_(station), chamber_(chamber), hasGE21Geometry16Partitions_(
false) {
13 edm::LogError(
"GEMClusterProcessor") <<
"Class constructed for a chamber in ME3 or ME4!";
45 if (in_clusters ==
nullptr) {
46 edm::LogWarning(
"GEMClusterProcessor") <<
"Attempt to run without valid in_clusters pointer.";
61 std::vector<GEMInternalCluster>
output;
80 std::vector<GEMInternalCluster>
output;
84 if (
cl.bx() == bx and
cl.isCoincidence()) {
94 for (
auto det_range = in_clusters->begin(); det_range != in_clusters->end(); ++det_range) {
95 const GEMDetId&
id = (*det_range).first;
113 auto co_clusters_range = in_clusters->get(co_id);
116 if (co_clusters_range.first == co_clusters_range.second)
120 const auto& pads_range = (*det_range).second;
121 for (
auto p = pads_range.first;
p != pads_range.second; ++
p) {
132 for (
auto co_p = co_clusters_range.first; co_p != co_clusters_range.second; ++co_p) {
134 if (!co_p->isValid())
146 int cl2_min = co_p->pads().front();
147 int cl2_max = co_p->pads().back();
150 const bool condition1(cl1_min <= cl2_min and cl1_max >= cl2_min);
151 const bool condition2(cl1_min <= cl2_max and cl1_max >= cl2_max);
152 const bool match(condition1
or condition2);
167 const std::vector<GEMInternalCluster>& coincidences =
clusters_;
170 for (
auto det_range = in_clusters->begin(); det_range != in_clusters->end(); ++det_range) {
171 const GEMDetId&
id = (*det_range).first;
181 const auto& clusters_range = (*det_range).second;
182 for (
auto p = clusters_range.first;
p != clusters_range.second; ++
p) {
211 if (cluster.cl1().isValid()) {
213 const int layer1_first_pad = cluster.layer1_pad();
214 const int layer1_last_pad = layer1_first_pad + cluster.layer1_size() - 1;
217 int layer1_pad_to_first_hs = -1;
218 int layer1_pad_to_last_hs = -1;
219 int layer1_pad_to_first_hs_me1a = -1;
220 int layer1_pad_to_last_hs_me1a = -1;
251 int layer1_middle_hs = 0.5 * (layer1_pad_to_first_hs + layer1_pad_to_last_hs);
252 int layer1_middle_hs_me1a = 0.5 * (layer1_pad_to_first_hs_me1a + layer1_pad_to_last_hs_me1a);
255 cluster.set_layer1_first_hs(layer1_pad_to_first_hs);
256 cluster.set_layer1_last_hs(layer1_pad_to_last_hs);
257 cluster.set_layer1_middle_hs(layer1_middle_hs);
260 cluster.set_layer1_first_hs_me1a(layer1_pad_to_first_hs_me1a);
261 cluster.set_layer1_last_hs_me1a(layer1_pad_to_last_hs_me1a);
262 cluster.set_layer1_middle_hs_me1a(layer1_middle_hs_me1a);
265 int layer1_pad_to_first_es = -1;
266 int layer1_pad_to_last_es = -1;
268 int layer1_pad_to_first_es_me1a = -1;
269 int layer1_pad_to_last_es_me1a = -1;
300 int layer1_middle_es = 0.5 * (layer1_pad_to_first_es + layer1_pad_to_last_es);
301 int layer1_middle_es_me1a = 0.5 * (layer1_pad_to_first_es_me1a + layer1_pad_to_last_es_me1a);
303 cluster.set_layer1_first_es(layer1_pad_to_first_es);
304 cluster.set_layer1_last_es(layer1_pad_to_last_es);
305 cluster.set_layer1_middle_es(layer1_middle_es);
308 cluster.set_layer1_first_es_me1a(layer1_pad_to_first_es_me1a);
309 cluster.set_layer1_last_es_me1a(layer1_pad_to_last_es_me1a);
310 cluster.set_layer1_middle_es_me1a(layer1_middle_es_me1a);
315 const int roll = cluster.roll() - 1;
317 int roll_l1_to_min_wg = -1;
318 int roll_l1_to_max_wg = -1;
343 cluster.set_layer1_min_wg(roll_l1_to_min_wg);
344 cluster.set_layer1_max_wg(roll_l1_to_max_wg);
347 if (cluster.cl2().isValid()) {
349 const int layer2_first_pad = cluster.layer2_pad();
350 const int layer2_last_pad = layer2_first_pad + cluster.layer2_size() - 1;
353 int layer2_pad_to_first_hs = -1;
354 int layer2_pad_to_last_hs = -1;
355 int layer2_pad_to_first_hs_me1a = -1;
356 int layer2_pad_to_last_hs_me1a = -1;
386 int layer2_middle_hs = 0.5 * (layer2_pad_to_first_hs + layer2_pad_to_last_hs);
387 int layer2_middle_hs_me1a = 0.5 * (layer2_pad_to_first_hs_me1a + layer2_pad_to_last_hs_me1a);
390 cluster.set_layer2_first_hs(layer2_pad_to_first_hs);
391 cluster.set_layer2_last_hs(layer2_pad_to_last_hs);
392 cluster.set_layer2_middle_hs(layer2_middle_hs);
395 cluster.set_layer2_first_hs_me1a(layer2_pad_to_first_hs_me1a);
396 cluster.set_layer2_last_hs_me1a(layer2_pad_to_last_hs_me1a);
397 cluster.set_layer2_middle_hs_me1a(layer2_middle_hs_me1a);
400 int layer2_pad_to_first_es = -1;
401 int layer2_pad_to_last_es = -1;
403 int layer2_pad_to_first_es_me1a = -1;
404 int layer2_pad_to_last_es_me1a = -1;
435 int layer2_middle_es = 0.5 * (layer2_pad_to_first_es + layer2_pad_to_last_es);
436 int layer2_middle_es_me1a = 0.5 * (layer2_pad_to_first_es_me1a + layer2_pad_to_last_es_me1a);
438 cluster.set_layer2_first_es(layer2_pad_to_first_es);
439 cluster.set_layer2_last_es(layer2_pad_to_last_es);
440 cluster.set_layer2_middle_es(layer2_middle_es);
443 cluster.set_layer2_first_es_me1a(layer2_pad_to_first_es_me1a);
444 cluster.set_layer2_last_es_me1a(layer2_pad_to_last_es_me1a);
445 cluster.set_layer2_middle_es_me1a(layer2_middle_es_me1a);
451 const int roll = cluster.roll() - 1;
453 int roll_l2_to_min_wg = -1;
454 int roll_l2_to_max_wg = -1;
479 cluster.set_layer2_min_wg(roll_l2_to_min_wg);
480 cluster.set_layer2_max_wg(roll_l2_to_max_wg);
485 std::vector<GEMCoPadDigi>
output;
490 if (!cluster.isCoincidence())
494 output.emplace_back(cluster.roll(), cluster.mid1(), cluster.mid2());
unsigned GEM_pad_CSC_es_ME1b_odd(unsigned pad) const
unsigned GEM_pad_CSC_es_ME21_even(unsigned pad) const
unsigned GEM_roll_L2_CSC_max_wg_ME21_odd(unsigned roll) const
std::vector< GEMInternalCluster > clusters_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
unsigned GEM_roll_L2_CSC_min_wg_ME21_even(unsigned roll) const
unsigned GEM_pad_CSC_hs_ME1b_odd(unsigned pad) const
unsigned GEM_roll_L1_CSC_min_wg_ME21_odd(unsigned roll) const
void run(const GEMPadDigiClusterCollection *)
unsigned GEM_roll_L2_CSC_min_wg_ME11_odd(unsigned roll) const
bool isME0(GeomDetEnumerators::SubDetector m)
unsigned GEM_roll_L1_CSC_max_wg_ME11_odd(unsigned roll) const
Log< level::Error, false > LogError
void doCoordinateConversion()
unsigned GEM_pad_CSC_hs_ME21_even(unsigned pad) const
unsigned GEM_pad_CSC_es_ME1a_even(unsigned pad) const
constexpr std::array< uint8_t, layerIndexSize > layer
unsigned GEM_pad_CSC_es_ME21_odd(unsigned pad) const
std::vector< GEMCoPadDigi > readoutCoPads() const
unsigned GEM_roll_L1_CSC_max_wg_ME21_even(unsigned roll) const
Abs< T >::type abs(const T &t)
unsigned GEM_pad_CSC_hs_ME1a_odd(unsigned pad) const
void addSingleClusters(const GEMPadDigiClusterCollection *)
unsigned GEM_roll_L1_CSC_max_wg_ME21_odd(unsigned roll) const
unsigned GEM_roll_L1_CSC_min_wg_ME11_even(unsigned roll) const
bool hasGE21Geometry16Partitions_
unsigned GEM_roll_L2_CSC_max_wg_ME11_even(unsigned roll) const
unsigned int maxDeltaRoll_
unsigned GEM_roll_L1_CSC_max_wg_ME11_even(unsigned roll) const
unsigned GEM_pad_CSC_es_ME1b_even(unsigned pad) const
unsigned GEM_roll_L2_CSC_min_wg_ME21_odd(unsigned roll) const
const CSCL1TPLookupTableME21ILT * lookupTableME21ILT_
void setESLookupTables(const CSCL1TPLookupTableME11ILT *conf)
T getParameter(std::string const &) const
unsigned GEM_pad_CSC_hs_ME1b_even(unsigned pad) const
unsigned GEM_roll_L1_CSC_min_wg_ME21_even(unsigned roll) const
void addCoincidenceClusters(const GEMPadDigiClusterCollection *)
unsigned GEM_pad_CSC_hs_ME1a_even(unsigned pad) const
unsigned GEM_pad_CSC_es_ME1a_odd(unsigned pad) const
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
unsigned GEM_roll_L2_CSC_max_wg_ME21_even(unsigned roll) const
GEMClusterProcessor(int region, unsigned station, unsigned chamber, const edm::ParameterSet &conf)
Log< level::Warning, false > LogWarning
unsigned GEM_roll_L2_CSC_max_wg_ME11_odd(unsigned roll) const
bool has_cluster(const GEMPadDigiCluster &cluster) const
const CSCL1TPLookupTableME11ILT * lookupTableME11ILT_
unsigned GEM_roll_L2_CSC_min_wg_ME11_even(unsigned roll) const
std::vector< GEMInternalCluster > getClusters(int bx, int deltaBX=0, ClusterTypes option=AllClusters) const
unsigned GEM_roll_L1_CSC_min_wg_ME11_odd(unsigned roll) const
unsigned GEM_pad_CSC_hs_ME21_odd(unsigned pad) const
std::vector< GEMInternalCluster > getCoincidenceClusters(int bx) const
unsigned int maxDeltaPad_