57 m_token{
config, consumesCollector(),
"src"},
58 m_trigGeomUtils{consumesCollector()} {
59 produces<nanoaod::FlatTable>();
67 edm::allowedValues<std::string>(
"BMTF_IN",
"TM_IN",
"TM_OUT"));
78 unsigned int nTrigs{0};
80 std::vector<int8_t>
wheel;
81 std::vector<int8_t>
sector;
85 std::vector<int8_t> rpcBit;
88 std::vector<int> phiB;
91 std::vector<float> dirLoc_phi;
93 std::vector<int8_t>
bx;
94 std::vector<int8_t> is2nd;
98 if (trigColl.isValid()) {
99 const auto trigs = trigColl->getContainer();
100 for (
const auto&
trig : (*trigs)) {
101 if (
trig.code() != 7) {
109 rpcBit.push_back(
trig.RpcBit());
112 phiB.push_back(
trig.phiB());
117 dirLoc_phi.push_back(
dir);
120 is2nd.push_back(
trig.Ts2Tag());
127 auto table = std::make_unique<nanoaod::FlatTable>(nTrigs,
m_name,
false,
false);
129 table->setDoc(
"Barrel trigger primitive information (phi view)");
136 "<br /> - [1:12] range for TwinMux" 137 "<br /> - [0:11] range for BMTF input" 138 "<br /> - double MB4 stations are part of S4 and S10 in TwinMux" 139 "<br /> - double MB4 stations are part of S3 and S9 in BMTF input");
144 "quality - [0:6] range" 145 "<br /> - [0:1] : uncorrelated L triggers" 146 "<br /> - [2:3] : uncorrelated H triggers" 147 "<br /> - 4 : correlated LL triggers" 148 "<br /> - 5 : correlated HL triggers" 149 "<br /> - 6 : correlated HH triggers");
154 "use of RPC - [0:2] range" 155 "<br /> - 0 : RPC not used" 156 "<br /> - 1 : RPC+DT combined trigger" 157 "<br /> - 2 : RPC-only trigger");
163 "phi - scale and range:" 164 "<br /> - 4096 correstpond to 1 rad" 165 "<br /> - 0 is @ (DT sector - 1) * 30 deg in global CMS phi");
169 "phiB - scale and range:" 170 "<br /> - 512 correstpond to 1 rad" 171 "<br /> - 0 is a muon with infinite pT (straight line)");
173 addColumn(
table,
"dirLoc_phi", dirLoc_phi,
"direction phi angle in chamber local coordinates - deg");
178 "<br /> - BX = 0 is the one where the event is collected" 179 "<br /> - TwinMux range [X:Y]" 180 "<br /> - BMT input range [X:Y]");
193 <<
" is not a valid tag, defaulting to TM_IN";
197 }
else if (
tagName ==
"BMTF_IN") {
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
nano_mu::DTTrigGeomUtils m_trigGeomUtils
The class to perform DT local trigger coordinate conversions.
static void fillDescriptions(edm::ConfigurationDescriptions &)
Fill descriptors.
dictionary config
Read in AllInOne config in JSON format.
MuDTTPGPhiFlatTableProducer(const edm::ParameterSet &)
Constructor.
auto conditionalGet(const edm::Event &ev) const
Log< level::Error, false > LogError
void addColumn(std::unique_ptr< nanoaod::FlatTable > &table, const std::string name, const std::vector< T > &vec, const std::string descr)
void getFromES(const edm::Run &run, const edm::EventSetup &environment)
Update EventSetup information.
void getFromES(const edm::Run &, const edm::EventSetup &) final
Get info from the ES by run.
#define DEFINE_FWK_MODULE(type)
void fillTable(edm::Event &) final
Fill tree branches for a given event.
std::string m_name
The label name of the FlatTableProducer.
nano_mu::EDTokenHandle< L1MuDTChambPhContainer > m_token
The trigger-primitive token.
TriggerTag getTag(const edm::ParameterSet &)
Helper function translating config parameter into TriggerTag.
chambCoord trigToReco(const L1MuDTChambPhDigi *trig)
Return local position and direction in chamber RF - legacy.