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>("PhiDigis");
39  //prod.produces<L1MuDTChambThContainer>("TheDigis");
40  prod.produces<L1MuDTChambPhContainer>();
41  prod.produces<L1MuDTChambThContainer>();
42  };
43 
44  virtual std::unique_ptr<UnpackerCollections> getCollections(edm::Event& e) override
45  {
46  return std::unique_ptr<UnpackerCollections>(new BMTFCollections(e));
47  };
48 
49  virtual UnpackerMap getUnpackers(int fed, int board, int amc, unsigned int fw) override
50  {
51  auto outputMuon = UnpackerFactory::get()->make("stage2::BMTFUnpackerOutput");
52  auto inputMuons = UnpackerFactory::get()->make("stage2::BMTFUnpackerInputs");
53 
54  UnpackerMap res;
55  if (fed == 1376 || fed == 1377 )
56  {
57 
58  for(int iL = 0; iL <= 70; iL += 2)
59  {
60  if ( iL == 12 || iL == 14 || ( iL > 26 && iL < 32) || iL == 60 || iL == 62 )
61  continue;
62 
63  res[iL] = inputMuons;
64  }
65 
66  res[123] = outputMuon;
67  }
68 
69  return res;
70  };
71  };
72  }
73 }
74 
tuple cfg
Definition: looper.py:293
virtual std::unique_ptr< UnpackerCollections > getCollections(edm::Event &e) override
Definition: BMTFSetup.cc:44
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:49
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