CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BMTFSetup.cc
Go to the documentation of this file.
2 
5 
7 
8 #include "BMTFCollections.h"
9 #include "BMTFTokens.h"
10 
11 namespace l1t {
12  namespace stage2 {
13  class BMTFSetup : public PackingSetup {
14  public:
15  virtual std::unique_ptr<PackerTokens> registerConsumes(const edm::ParameterSet& cfg, edm::ConsumesCollector& cc) override {
16  return std::unique_ptr<PackerTokens>(new BMTFTokens(cfg, cc));
17  };
18 
19  virtual void fillDescription(edm::ParameterSetDescription& desc) override {};
20 
21  virtual PackerMap getPackers(int fed, unsigned int fw) override
22  {
23  PackerMap res;
24 
25 /* if (fed == 1360) {
26  // Use board id 1 for packing
27  res[{1, 1}] = {
28  PackerFactory::get()->make("stage2::MuonPacker")
29  };
30  }
31 */
32  return res;
33  };
34 
36  {
37  prod.produces<RegionalMuonCandBxCollection>("BMTF");
38  prod.produces<L1MuDTChambPhContainer>();
39  prod.produces<L1MuDTChambThContainer>();
40  };
41 
42  virtual std::unique_ptr<UnpackerCollections> getCollections(edm::Event& e) override
43  {
44  return std::unique_ptr<UnpackerCollections>(new BMTFCollections(e));
45  };
46 
47  virtual UnpackerMap getUnpackers(int fed, int board, int amc, unsigned int fw) override
48  {
49  auto outputMuon = UnpackerFactory::get()->make("stage2::BMTFUnpackerOutput");
50  auto inputMuons = UnpackerFactory::get()->make("stage2::BMTFUnpackerInputs");
51 
52  UnpackerMap res;
53  if (fed == 1376 || fed == 1377 )
54  {
55 
56  for(int iL = 0; iL <= 70; iL += 2)
57  {
58  if ( iL == 12 || iL == 14 || ( iL > 26 && iL < 32) || iL == 60 || iL == 62 )
59  continue;
60 
61  res[iL] = inputMuons;
62  }
63 
64  res[123] = outputMuon;
65  }
66 
67  return res;
68  };
69  };
70  }
71 }
72 
tuple cfg
Definition: looper.py:293
virtual std::unique_ptr< UnpackerCollections > getCollections(edm::Event &e) override
Definition: BMTFSetup.cc:42
virtual void registerProducts(edm::stream::EDProducerBase &prod) override
Definition: BMTFSetup.cc:35
std::map< int, std::shared_ptr< Unpacker > > UnpackerMap
Definition: PackingSetup.h:27
double amc
Definition: hdecay.h:20
std::shared_ptr< Unpacker > make(const std::string &) const
Definition: Unpacker.cc:21
virtual void fillDescription(edm::ParameterSetDescription &desc) override
Definition: BMTFSetup.cc:19
virtual UnpackerMap getUnpackers(int fed, int board, int amc, unsigned int fw) override
Definition: BMTFSetup.cc:47
virtual PackerMap getPackers(int fed, unsigned int fw) override
Definition: BMTFSetup.cc:21
virtual std::unique_ptr< PackerTokens > registerConsumes(const edm::ParameterSet &cfg, edm::ConsumesCollector &cc) override
Definition: BMTFSetup.cc:15
static const UnpackerFactory * get()
Definition: Unpacker.h:23
std::map< std::pair< int, int >, Packers > PackerMap
Definition: PackingSetup.h:25
#define DEFINE_L1T_PACKING_SETUP(type)
Definition: PackingSetup.h:61