test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MBLTProducer.cc
Go to the documentation of this file.
1 //Authors:
2 // Carlo Battilana - Giuseppe Codispoti
3 // framework include files
8 
11 
15 
18 using namespace L1TwinMux;
19 using namespace L1TMuon;
20 
21 inline std::unique_ptr<MBLTContainer> MBLTProducer( TriggerPrimitiveCollection* tps )
22 {
23 
24  double _maxDeltaPhi = 0.05;
25 
26  std::unique_ptr<MBLTContainer> out ( new MBLTContainer );
27  MBLTContainer & tracksMap = *out;
28 
29  auto tp = tps->cbegin();
30  auto tpbeg = tps->cbegin();
31  auto tpend = tps->cend();
32  for( ; tp != tpend; ++tp ) {
33 
35 
36  TriggerPrimitive::subsystem_type type = tp->subsystem();
37  switch ( type ) {
38 
39  case TriggerPrimitive::kDT :
40  key = tp->detId<DTChamberId>();
41  break;
42 
43  case TriggerPrimitive::kRPC : {
44  if ( tp->detId<RPCDetId>().region() ) continue; // endcap
45  int station = tp->detId<RPCDetId>().station();
46  int sector = tp->detId<RPCDetId>().sector();
47  int wheel = tp->detId<RPCDetId>().ring();
48  key = DTChamberId( wheel, station, sector );
49  break;
50  }
51 
52  default : continue;
53  }
54 
55  if ( out->find( key ) == out->end() ) {
56  tracksMap[key] = MBLTCollection( key );
57  }
58 
59  TriggerPrimitiveRef tpref(tps, tp - tpbeg);
60  tracksMap[key].addStub( tpref );
61  }
62 
63 
64  MBLTContainer::iterator st = out->begin();
65  MBLTContainer::iterator stend = out->end();
66  for ( ; st != stend; ++st ) st->second.associate( _maxDeltaPhi );
67 
68  return out;
69 
70 }
71 
72 
type
Definition: HCALResponse.h:21
std::map< DTChamberId, MBLTCollection > MBLTContainer
std::vector< TriggerPrimitive > TriggerPrimitiveCollection
std::unique_ptr< MBLTContainer > MBLTProducer(TriggerPrimitiveCollection *tps)
Definition: MBLTProducer.cc:21
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63