CMS 3D CMS Logo

BMTFSetup.cc
Go to the documentation of this file.
2 
6 
7 #include "BMTFSetup.h"
8 
9 namespace l1t {
10  namespace stage2 {
11  std::unique_ptr<PackerTokens>
13  {
14  return std::unique_ptr<PackerTokens>(new BMTFTokens(cfg, cc));
15  }
16 
18 
19  PackerMap
20  BMTFSetup::getPackers(int fed, unsigned int fw)
21  {
22  PackerMap res;
23 
24  /* if (fed == 1360) {
25  // Use board id 1 for packing
26  res[{1, 1}] = {
27  PackerFactory::get()->make("stage2::MuonPacker")
28  };
29  }
30  */
31  return res;
32  }
33 
34  void
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  std::unique_ptr<UnpackerCollections>
46  {
47  return std::unique_ptr<UnpackerCollections>(new BMTFCollections(e));
48  }
49 
51  BMTFSetup::getUnpackers(int fed, int board, int amc, unsigned int fw)
52  {
53  auto outputMuon = UnpackerFactory::get()->make("stage2::BMTFUnpackerOutput");
54  auto inputMuonsOld = UnpackerFactory::get()->make("stage2::BMTFUnpackerInputsOldQual");
55  auto inputMuonsNew = UnpackerFactory::get()->make("stage2::BMTFUnpackerInputsNewQual");
56 
58  if (fed == 1376 || fed == 1377) {
59  for (int iL = 0; iL <= 70; iL += 2) {
60  if (iL == 12 || iL == 14 || ( iL > 26 && iL < 32) || iL == 60 || iL == 62)
61  continue;
62 
63  if (fw < 2452619552)
64  res[iL] = inputMuonsOld;
65  else
66  res[iL] = inputMuonsNew;
67  }
68  res[123] = outputMuon;
69  }
70  return res;
71  };
72  };
73 }
74 
virtual std::unique_ptr< PackerTokens > registerConsumes(const edm::ParameterSet &cfg, edm::ConsumesCollector &cc) override
Definition: BMTFSetup.cc:12
delete x;
Definition: CaloConfig.h:22
virtual PackerMap getPackers(int fed, unsigned int fw) override
Definition: BMTFSetup.cc:20
Definition: Electron.h:4
std::map< int, std::shared_ptr< Unpacker > > UnpackerMap
Definition: PackingSetup.h:27
std::shared_ptr< Unpacker > make(const std::string &) const
virtual void fillDescription(edm::ParameterSetDescription &desc) override
Definition: BMTFSetup.cc:17
#define DEFINE_L1T_PACKING_SETUP(type)
virtual std::unique_ptr< UnpackerCollections > getCollections(edm::Event &e) override
Definition: BMTFSetup.cc:45
virtual void registerProducts(edm::stream::EDProducerBase &prod) override
Definition: BMTFSetup.cc:35
static const UnpackerFactory * get()
virtual UnpackerMap getUnpackers(int fed, int board, int amc, unsigned int fw) override
Definition: BMTFSetup.cc:51
std::map< std::pair< int, int >, Packers > PackerMap
Definition: PackingSetup.h:25
Definition: AMCSpec.h:8