test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
MBLTProducer.cc File Reference
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include <FWCore/Framework/interface/ConsumesCollector.h>
#include "L1Trigger/L1TMuon/interface/deprecate/MuonTriggerPrimitive.h"
#include "L1Trigger/L1TMuonBarrel/src/Twinmux_v1/MBLTCollection.h"
#include "L1Trigger/L1TMuonBarrel/src/Twinmux_v1/MBLTCollectionFwd.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"

Go to the source code of this file.

Functions

std::auto_ptr< MBLTContainerMBLTProducer (TriggerPrimitiveCollection *tps)
 

Function Documentation

std::auto_ptr<MBLTContainer> MBLTProducer ( TriggerPrimitiveCollection tps)
inline

Definition at line 21 of file MBLTProducer.cc.

References DTChamberId, relval_steps::key, GenerateHcalLaserBadRunList::out, RPCDetId::region(), relativeConstraints::ring, and relativeConstraints::station.

Referenced by L1TTwinMuxAlgortithm::produce().

22 {
23 
24  double _maxDeltaPhi = 0.05;
25 
26  std::auto_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 }
type
Definition: HCALResponse.h:21
std::map< DTChamberId, MBLTCollection > MBLTContainer
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