CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
LateralityBasicProvider Class Reference

#include <LateralityBasicProvider.h>

Inheritance diagram for LateralityBasicProvider:
LateralityProvider

Public Member Functions

void finish () override
 
void initialise (const edm::EventSetup &iEventSetup) override
 
 LateralityBasicProvider (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
void run (edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, std::vector< lat_vector > &lateralities) override
 
 ~LateralityBasicProvider () override
 
- Public Member Functions inherited from LateralityProvider
 LateralityProvider (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
virtual ~LateralityProvider ()
 

Private Member Functions

void analyze (MuonPathPtr &inMPath, std::vector< lat_vector > &lateralities)
 
void fill_lat_combinations ()
 

Private Attributes

const bool debug_
 
std::vector< lat_combinationlat_combinations
 

Additional Inherited Members

- Public Attributes inherited from LateralityProvider
lat_vector LAT_VECTOR_NULL = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}
 

Detailed Description

Definition at line 20 of file LateralityBasicProvider.h.

Constructor & Destructor Documentation

◆ LateralityBasicProvider()

LateralityBasicProvider::LateralityBasicProvider ( const edm::ParameterSet pset,
edm::ConsumesCollector iC 
)

Definition at line 11 of file LateralityBasicProvider.cc.

References debug_, fill_lat_combinations(), and LogDebug.

12  : LateralityProvider(pset, iC), debug_(pset.getUntrackedParameter<bool>("debug")) {
13  if (debug_)
14  LogDebug("LateralityBasicProvider") << "LateralityBasicProvider: constructor";
15 
17 }
LateralityProvider(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
#define LogDebug(id)

◆ ~LateralityBasicProvider()

LateralityBasicProvider::~LateralityBasicProvider ( )
override

Definition at line 19 of file LateralityBasicProvider.cc.

References debug_, and LogDebug.

19  {
20  if (debug_)
21  LogDebug("LateralityBasicProvider") << "LateralityBasicProvider: destructor";
22 }
#define LogDebug(id)

Member Function Documentation

◆ analyze()

void LateralityBasicProvider::analyze ( MuonPathPtr inMPath,
std::vector< lat_vector > &  lateralities 
)
private

Definition at line 54 of file LateralityBasicProvider.cc.

References lat_combination::cellLayout, debug_, lat_combinations, LateralityProvider::LAT_VECTOR_NULL, lat_combination::latcombs, LogDebug, and lat_combination::missing_layer.

Referenced by run().

54  {
55  if (debug_)
56  LogDebug("LateralityBasicProvider") << "DTp2:analyze \t\t\t\t starts";
57  for (auto &lat_combination : lat_combinations) {
58  if (inMPath->missingLayer() == lat_combination.missing_layer &&
59  inMPath->cellLayout()[0] == lat_combination.cellLayout[0] &&
60  inMPath->cellLayout()[1] == lat_combination.cellLayout[1] &&
61  inMPath->cellLayout()[2] == lat_combination.cellLayout[2] &&
62  inMPath->cellLayout()[3] == lat_combination.cellLayout[3]) {
63  lateralities.push_back(lat_combination.latcombs);
64  return;
65  }
66  }
67  lateralities.push_back(LAT_VECTOR_NULL);
68  return;
69 }
std::vector< lat_combination > lat_combinations
#define LogDebug(id)
short cellLayout[cmsdt::NUM_LAYERS]

◆ fill_lat_combinations()

void LateralityBasicProvider::fill_lat_combinations ( )
private

Definition at line 71 of file LateralityBasicProvider.cc.

References lat_combinations.

Referenced by LateralityBasicProvider().

71  {
72  lat_combinations.push_back({-1, {0, 0, 0, -1}, {{0, 0, 0, 1}, {0, 0, 1, 1}, {0, 1, 1, 1}, {0, 0, 0, 0}}});
73  lat_combinations.push_back({-1, {0, 0, 1, -1}, {{0, 0, 1, 0}, {0, 1, 1, 0}, {1, 1, 1, 0}, {0, 0, 0, 0}}});
74  lat_combinations.push_back({-1, {0, 1, 0, -1}, {{0, 1, 0, 0}, {0, 1, 0, 1}, {1, 1, 0, 0}, {1, 1, 0, 1}}});
75  lat_combinations.push_back({-1, {0, 1, 1, -1}, {{0, 1, 0, 0}, {0, 1, 1, 0}, {0, 1, 1, 1}, {0, 0, 0, 0}}});
76  lat_combinations.push_back({-1, {1, 0, 0, -1}, {{1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 1}, {0, 0, 0, 0}}});
77  lat_combinations.push_back({-1, {1, 0, 1, -1}, {{0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 1, 0}, {1, 0, 1, 1}}});
78  lat_combinations.push_back({-1, {1, 1, 0, -1}, {{0, 0, 0, 1}, {1, 0, 0, 1}, {1, 1, 0, 1}, {0, 0, 0, 0}}});
79  lat_combinations.push_back({-1, {1, 1, 1, -1}, {{1, 0, 0, 0}, {1, 1, 0, 0}, {1, 1, 1, 0}, {0, 0, 0, 0}}});
80  lat_combinations.push_back({0, {0, 0, 0, -1}, {{0, 0, 0, 1}, {0, 0, 1, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
81  lat_combinations.push_back({0, {0, 0, 1, -1}, {{0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 1, 0}, {0, 0, 0, 0}}});
82  lat_combinations.push_back({0, {0, 1, 0, -1}, {{0, 0, 0, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 0, 0, 0}}});
83  lat_combinations.push_back({0, {0, 1, 1, -1}, {{0, 1, 0, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
84  lat_combinations.push_back({1, {0, 0, 0, -1}, {{0, 0, 0, 1}, {0, 0, 1, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
85  lat_combinations.push_back({1, {0, 0, 1, -1}, {{0, 0, 1, 0}, {1, 0, 1, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
86  lat_combinations.push_back({1, {0, 1, 0, -1}, {{0, 0, 0, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {0, 0, 0, 0}}});
87  lat_combinations.push_back({1, {0, 1, 1, -1}, {{0, 0, 1, 0}, {0, 0, 1, 1}, {1, 0, 1, 0}, {0, 0, 0, 0}}});
88  lat_combinations.push_back({1, {1, 1, 0, -1}, {{0, 0, 0, 1}, {1, 0, 0, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
89  lat_combinations.push_back({1, {1, 1, 1, -1}, {{1, 0, 0, 0}, {1, 0, 1, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
90  lat_combinations.push_back({2, {0, 0, 0, -1}, {{0, 0, 0, 1}, {0, 1, 0, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
91  lat_combinations.push_back({2, {0, 0, 1, -1}, {{0, 1, 0, 0}, {0, 1, 0, 1}, {1, 1, 0, 0}, {0, 0, 0, 0}}});
92  lat_combinations.push_back({2, {0, 1, 1, -1}, {{0, 1, 0, 0}, {0, 1, 0, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
93  lat_combinations.push_back({2, {1, 0, 0, -1}, {{1, 0, 0, 0}, {1, 0, 0, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
94  lat_combinations.push_back({2, {1, 0, 1, -1}, {{0, 0, 0, 1}, {1, 0, 0, 0}, {1, 0, 0, 1}, {0, 0, 0, 0}}});
95  lat_combinations.push_back({2, {1, 1, 1, -1}, {{1, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
96  lat_combinations.push_back({3, {0, 0, 0, -1}, {{0, 0, 1, 0}, {0, 1, 1, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
97  lat_combinations.push_back({3, {0, 1, 0, -1}, {{0, 1, 0, 0}, {0, 1, 1, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}}});
98  lat_combinations.push_back({3, {1, 0, 0, -1}, {{0, 0, 1, 0}, {1, 0, 0, 0}, {1, 0, 1, 0}, {0, 0, 0, 0}}});
99  lat_combinations.push_back({3, {1, 1, 0, -1}, {{1, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}});
100 };
std::vector< lat_combination > lat_combinations

◆ finish()

void LateralityBasicProvider::finish ( )
overridevirtual

Reimplemented from LateralityProvider.

Definition at line 45 of file LateralityBasicProvider.cc.

References debug_, and LogDebug.

Referenced by progressbar.ProgressBar::__next__().

45  {
46  if (debug_)
47  LogDebug("LateralityBasicProvider") << "LateralityBasicProvider: finish";
48 };
#define LogDebug(id)

◆ initialise()

void LateralityBasicProvider::initialise ( const edm::EventSetup iEventSetup)
overridevirtual

Reimplemented from LateralityProvider.

Definition at line 27 of file LateralityBasicProvider.cc.

References debug_, and LogDebug.

27  {
28  if (debug_)
29  LogDebug("LateralityBasicProvider") << "LateralityBasicProvider::initialiase";
30 }
#define LogDebug(id)

◆ run()

void LateralityBasicProvider::run ( edm::Event iEvent,
const edm::EventSetup iEventSetup,
MuonPathPtrs inMpath,
std::vector< lat_vector > &  lateralities 
)
overridevirtual

Implements LateralityProvider.

Definition at line 32 of file LateralityBasicProvider.cc.

References analyze(), debug_, and LogDebug.

35  {
36  if (debug_)
37  LogDebug("LateralityBasicProvider") << "LateralityBasicProvider: run";
38 
39  // fit per SL (need to allow for multiple outputs for a single mpath)
40  for (auto &muonpath : muonpaths) {
41  analyze(muonpath, lateralities);
42  }
43 }
void analyze(MuonPathPtr &inMPath, std::vector< lat_vector > &lateralities)
#define LogDebug(id)

Member Data Documentation

◆ debug_

const bool LateralityBasicProvider::debug_
private

◆ lat_combinations

std::vector<lat_combination> LateralityBasicProvider::lat_combinations
private

Definition at line 43 of file LateralityBasicProvider.h.

Referenced by analyze(), and fill_lat_combinations().