CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
L1MuGlobalMuonTrigger Class Reference

#include <L1MuGlobalMuonTrigger.h>

Inheritance diagram for L1MuGlobalMuonTrigger:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginJob ()
 
const L1MuGMTCancelOutUnitCancelOutUnit (int id) const
 return pointer to Cancel Out Unit More...
 
L1MuGMTReadoutRecordcurrentReadoutRecord () const
 return a reference to the current record in the ring buffer More...
 
const L1MuGMTPSBData () const
 return pointer to PSB More...
 
L1MuGMTDebugBlockDebugBlockForFill () const
 for debug: return the debug block (in order to fill it) More...
 
std::auto_ptr
< L1MuGMTReadoutCollection
getReadoutCollection ()
 
 L1MuGlobalMuonTrigger (const edm::ParameterSet &)
 
const L1MuGMTMatcherMatcher (int id) const
 return pointer to Matcher More...
 
const L1MuGMTMergerMerger (int id) const
 return pointer to Merger More...
 
const L1MuGMTMipIsoAUMipIsoAU (int id) const
 return pointer to MIP & ISO bit assignment unit More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
void reset ()
 
const L1MuGMTSorterSorter () const
 return pointer to Sorter More...
 
 ~L1MuGlobalMuonTrigger ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

L1MuGMTCancelOutUnitm_CancelOutUnit [4]
 
std::vector< L1MuGMTExtendedCandm_ExtendedCands
 
unsigned long long m_L1CaloGeometryCacheID
 
unsigned long long m_L1MuGMTChannelMaskCacheID
 
unsigned long long m_L1MuGMTParametersCacheID
 
unsigned long long m_L1MuGMTScalesCacheID
 
unsigned long long m_L1MuTriggerPtScaleCacheID
 
unsigned long long m_L1MuTriggerScalesCacheID
 
L1MuGMTMatcherm_Matcher [2]
 
L1MuGMTMergerm_Merger [2]
 
L1MuGMTMipIsoAUm_MipIsoAU [2]
 
L1MuGMTPSBm_PSB
 
std::vector
< L1MuGMTReadoutRecord * > 
m_ReadoutRingbuffer
 
bool m_sendMipIso
 
L1MuGMTSorterm_Sorter
 
bool m_writeLUTsAndRegs
 

Static Private Attributes

static L1MuGMTConfigm_config = 0
 
static L1MuGMTDebugBlockm_db = 0
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 52 of file L1MuGlobalMuonTrigger.h.

Constructor & Destructor Documentation

L1MuGlobalMuonTrigger::L1MuGlobalMuonTrigger ( const edm::ParameterSet ps)
explicit

Definition at line 71 of file L1MuGlobalMuonTrigger.cc.

References L1MuGMTConfig::Debug(), L1MuGMTConfig::getBxMax(), L1MuGMTConfig::getBxMin(), edm::ParameterSet::getUntrackedParameter(), m_CancelOutUnit, m_config, m_db, m_ExtendedCands, m_L1CaloGeometryCacheID, m_L1MuGMTChannelMaskCacheID, m_L1MuGMTParametersCacheID, m_L1MuGMTScalesCacheID, m_L1MuTriggerPtScaleCacheID, m_L1MuTriggerScalesCacheID, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_sendMipIso, m_Sorter, and m_writeLUTsAndRegs.

71  {
72  produces<std::vector<L1MuGMTCand> >();
73  produces<L1MuGMTReadoutCollection>();
74  m_sendMipIso = ps.getUntrackedParameter<bool>("SendMipIso",false);
75  if( m_sendMipIso ) {
76  produces<std::vector<unsigned> >();
77  }
78 
85 
86  m_ExtendedCands.reserve(20);
87 
88  // set configuration parameters
89  if(!m_config) m_config = new L1MuGMTConfig(ps);
90  m_writeLUTsAndRegs = ps.getUntrackedParameter<bool>("WriteLUTsAndRegs",false);
91 
92  // build GMT
93  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_info");
94  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_info") << "**** L1GlobalMuonTrigger building ****";
95  if ( L1MuGMTConfig::Debug(1) ) edm::LogVerbatim("GMT_info");
96 
97  // create new PSB
98  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "creating GMT PSB";
99  m_PSB = new L1MuGMTPSB(*this);
100 
101  // create new matcher
102  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "creating GMT Matcher (0,1)";
103  m_Matcher[0] = new L1MuGMTMatcher(*this,0); // barrel
104  m_Matcher[1] = new L1MuGMTMatcher(*this,1); // endcap
105 
106  // create new cancel-out units
107  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "creating GMT Cancel Out Unit (0,1,2,3)";
108  m_CancelOutUnit[0] = new L1MuGMTCancelOutUnit(*this,0); // barrel
109  m_CancelOutUnit[1] = new L1MuGMTCancelOutUnit(*this,1); // endcap
110  m_CancelOutUnit[2] = new L1MuGMTCancelOutUnit(*this,2); // CSC/bRPC
111  m_CancelOutUnit[3] = new L1MuGMTCancelOutUnit(*this,3); // DT/fRPC
112 
113  // create new MIP & ISO bit assignment units
114  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "creating GMT MIP & ISO bit Assigment Unit (0,1)";
115  m_MipIsoAU[0] = new L1MuGMTMipIsoAU(*this,0); // barrel
116  m_MipIsoAU[1] = new L1MuGMTMipIsoAU(*this,1); // endcap
117 
118  // create new Merger
119  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "creating GMT Merger (0,1)";
120  m_Merger[0] = new L1MuGMTMerger(*this,0); // barrel
121  m_Merger[1] = new L1MuGMTMerger(*this,1); // endcap
122 
123  // create new sorter
124  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "creating GMT Sorter";
125  m_Sorter = new L1MuGMTSorter(*this); // barrel
126 
128 }
T getUntrackedParameter(std::string const &, T const &) const
unsigned long long m_L1MuTriggerScalesCacheID
unsigned long long m_L1MuGMTChannelMaskCacheID
std::vector< L1MuGMTExtendedCand > m_ExtendedCands
unsigned long long m_L1CaloGeometryCacheID
unsigned long long m_L1MuTriggerPtScaleCacheID
static bool Debug()
L1MuGMTMipIsoAU * m_MipIsoAU[2]
L1MuGMTMatcher * m_Matcher[2]
L1MuGMTMerger * m_Merger[2]
unsigned long long m_L1MuGMTScalesCacheID
static int getBxMin()
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
static L1MuGMTConfig * m_config
unsigned long long m_L1MuGMTParametersCacheID
static int getBxMax()
static L1MuGMTDebugBlock * m_db
L1MuGlobalMuonTrigger::~L1MuGlobalMuonTrigger ( )

Definition at line 133 of file L1MuGlobalMuonTrigger.cc.

References m_CancelOutUnit, m_config, m_db, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_ReadoutRingbuffer, and m_Sorter.

133  {
134 
135  if(m_db) delete m_db;
136  m_db = 0;
137 
138  delete m_Sorter;
139  delete m_Merger[1]; // endcap Merger
140  delete m_Merger[0]; // barrel Merger
141  delete m_MipIsoAU[1]; // barrel MIP & ISO bit assignment unit
142  delete m_MipIsoAU[0]; // barrel MIP & ISO bit assignment unit
143  delete m_CancelOutUnit[3]; // DT/fRPC cancel-out unit (in endcap chip)
144  delete m_CancelOutUnit[2]; // CSC/bRPC cancel-out unit (in barrel chip)
145  delete m_CancelOutUnit[1]; // endcap DT/CSC cancel out unit
146  delete m_CancelOutUnit[0]; // barrel DT/CSC cancel out unit
147  delete m_Matcher[1]; // endcap matcher
148  delete m_Matcher[0]; // barrel matcher
149  delete m_PSB;
150 
151  if(m_config) delete m_config;
152  m_config = 0;
153 
154  // copied from produce() by Jim B, 7 Aug 2007
155  std::vector<L1MuGMTReadoutRecord*>::iterator irr = m_ReadoutRingbuffer.begin();
156  for ( ;irr!=m_ReadoutRingbuffer.end(); irr++) delete (*irr);
157  m_ReadoutRingbuffer.clear();
158  // end Jim B edit
159 
160 }
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
L1MuGMTMipIsoAU * m_MipIsoAU[2]
L1MuGMTMatcher * m_Matcher[2]
L1MuGMTMerger * m_Merger[2]
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
static L1MuGMTConfig * m_config
static L1MuGMTDebugBlock * m_db

Member Function Documentation

void L1MuGlobalMuonTrigger::beginJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 166 of file L1MuGlobalMuonTrigger.cc.

166  {
167 
168 }
const L1MuGMTCancelOutUnit* L1MuGlobalMuonTrigger::CancelOutUnit ( int  id) const
inline

return pointer to Cancel Out Unit

Definition at line 71 of file L1MuGlobalMuonTrigger.h.

References errorMatrix2Lands_multiChannel::id, and m_CancelOutUnit.

Referenced by L1MuGMTMerger::merge().

L1MuGMTReadoutRecord* L1MuGlobalMuonTrigger::currentReadoutRecord ( ) const
inline

return a reference to the current record in the ring buffer

Definition at line 89 of file L1MuGlobalMuonTrigger.h.

References m_ReadoutRingbuffer.

Referenced by L1MuGMTPSB::getCalo(), L1MuGMTPSB::receiveData(), and L1MuGMTSorter::run().

89 { return m_ReadoutRingbuffer.back(); };
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
const L1MuGMTPSB* L1MuGlobalMuonTrigger::Data ( ) const
inline

return pointer to PSB

Definition at line 65 of file L1MuGlobalMuonTrigger.h.

References m_PSB.

Referenced by L1MuGMTMipIsoAU::assignISO(), L1MuGMTMipIsoAU::assignMIP(), L1MuGMTMatcher::load(), L1MuGMTMipIsoAU::load(), and L1MuGMTMerger::load().

65 { return m_PSB; }
L1MuGMTDebugBlock* L1MuGlobalMuonTrigger::DebugBlockForFill ( ) const
inline
std::auto_ptr< L1MuGMTReadoutCollection > L1MuGlobalMuonTrigger::getReadoutCollection ( )

get the GMT readout data for the triggered bx readout data contains input and output muons as well as MIP and Quiet bits for 3 or 5 bx around the triggered bx

Definition at line 386 of file L1MuGlobalMuonTrigger.cc.

References L1MuGMTConfig::getBxMaxRo(), L1MuGMTConfig::getBxMinRo(), and m_ReadoutRingbuffer.

Referenced by produce().

386  {
387 
388  int bx_min_ro = L1MuGMTConfig::getBxMinRo();
389  int bx_max_ro = L1MuGMTConfig::getBxMaxRo();
390  int bx_size = bx_max_ro - bx_min_ro + 1;
391 
392  std::auto_ptr<L1MuGMTReadoutCollection> rrc(new L1MuGMTReadoutCollection(bx_size));
393 
394  for (int bx = bx_min_ro; bx <= bx_max_ro; bx++) {
395  std::vector<L1MuGMTReadoutRecord*>::const_iterator iter = m_ReadoutRingbuffer.begin();
396 
397  for ( ;iter!=m_ReadoutRingbuffer.end(); iter++) {
398 
399  if ( (*iter)->getBxInEvent() == bx ) {
400  rrc->addRecord(**iter);
401  break;
402  }
403  }
404 
405  }
406 
407  return rrc;
408 }
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
static int getBxMaxRo()
static int getBxMinRo()
const L1MuGMTMatcher* L1MuGlobalMuonTrigger::Matcher ( int  id) const
inline

return pointer to Matcher

Definition at line 68 of file L1MuGlobalMuonTrigger.h.

References errorMatrix2Lands_multiChannel::id, and m_Matcher.

Referenced by L1MuGMTCancelOutUnit::decide(), and L1MuGMTMerger::merge().

const L1MuGMTMerger* L1MuGlobalMuonTrigger::Merger ( int  id) const
inline

return pointer to Merger

Definition at line 77 of file L1MuGlobalMuonTrigger.h.

References errorMatrix2Lands_multiChannel::id, and m_Merger.

Referenced by L1MuGMTSorter::run().

const L1MuGMTMipIsoAU* L1MuGlobalMuonTrigger::MipIsoAU ( int  id) const
inline

return pointer to MIP & ISO bit assignment unit

Definition at line 74 of file L1MuGlobalMuonTrigger.h.

References errorMatrix2Lands_multiChannel::id, and m_MipIsoAU.

Referenced by L1MuGMTMerger::createDTCSCCand(), L1MuGMTMerger::createMergedCand(), and L1MuGMTMerger::createRPCCand().

void L1MuGlobalMuonTrigger::produce ( edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 170 of file L1MuGlobalMuonTrigger.cc.

References L1MuGMTSorter::Cands(), L1MuGMTConfig::clearLUTsRegs(), L1MuGMTConfig::createLUTsRegs(), L1MuGMTConfig::Debug(), dir, L1MuGMTConfig::dumpLUTs(), L1MuGMTConfig::dumpRegs(), L1MuGMTPSB::empty(), edm::EventSetup::get(), L1MuGMTConfig::getBxMax(), L1MuGMTConfig::getBxMin(), L1MuGMTConfig::getGMTChanMask(), getReadoutCollection(), L1MuGMTChannelMask::getSubsystemMask(), i, L1MuGMTDebugBlock::IsMIPISO(), m_CancelOutUnit, m_config, m_db, m_ExtendedCands, m_L1CaloGeometryCacheID, m_L1MuGMTChannelMaskCacheID, m_L1MuGMTParametersCacheID, m_L1MuGMTScalesCacheID, m_L1MuTriggerPtScaleCacheID, m_L1MuTriggerScalesCacheID, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_ReadoutRingbuffer, m_sendMipIso, m_Sorter, m_writeLUTsAndRegs, L1MuGMTSorter::numberOfCands(), L1MuGMTSorter::print(), L1MuGMTMatcher::print(), L1MuGMTPSB::print(), L1MuGMTMipIsoAU::print(), L1MuGMTMerger::print(), L1MuGMTCancelOutUnit::print(), edm::ESHandle< class >::product(), edm::Event::put(), L1MuGMTPSB::receiveData(), L1MuGMTDebugBlock::reset(), reset(), L1MuGMTSorter::run(), L1MuGMTMatcher::run(), L1MuGMTMipIsoAU::run(), L1MuGMTMerger::run(), L1MuGMTCancelOutUnit::run(), L1MuGMTDebugBlock::SetBX(), L1MuGMTConfig::setCaloGeom(), L1MuGMTConfig::setDefaults(), L1MuGMTConfig::setGMTChanMask(), L1MuGMTConfig::setGMTParams(), L1MuGMTConfig::setGMTScales(), L1MuGMTConfig::setTriggerPtScale(), and L1MuGMTConfig::setTriggerScales().

170  {
171 
172  // configure from the event setup
173 
174  unsigned long long L1MuGMTScalesCacheID = es.get< L1MuGMTScalesRcd >().cacheIdentifier();
175  if(L1MuGMTScalesCacheID != m_L1MuGMTScalesCacheID) {
176  edm::ESHandle< L1MuGMTScales > gmtscales_h;
177  es.get< L1MuGMTScalesRcd >().get( gmtscales_h );
178  m_config->setGMTScales( gmtscales_h.product() );
179  }
180 
181  unsigned long long L1MuTriggerScalesCacheID = es.get< L1MuTriggerScalesRcd >().cacheIdentifier();
182  if(L1MuTriggerScalesCacheID != m_L1MuTriggerScalesCacheID) {
184  es.get< L1MuTriggerScalesRcd >().get( trigscales_h );
185  m_config->setTriggerScales( trigscales_h.product() );
186  }
187 
188  unsigned long long L1MuTriggerPtScaleCacheID = es.get< L1MuTriggerPtScaleRcd >().cacheIdentifier();
189  if(L1MuTriggerPtScaleCacheID != m_L1MuTriggerPtScaleCacheID) {
191  es.get< L1MuTriggerPtScaleRcd >().get( trigptscale_h );
192  m_config->setTriggerPtScale( trigptscale_h.product() );
193  }
194 
195  unsigned long long L1MuGMTParametersCacheID = es.get< L1MuGMTParametersRcd >().cacheIdentifier();
196  if(L1MuGMTParametersCacheID != m_L1MuGMTParametersCacheID) {
198  es.get< L1MuGMTParametersRcd >().get( gmtparams_h );
199  m_config->setGMTParams( gmtparams_h.product() );
201  }
202 
203  unsigned long long L1MuGMTChannelMaskCacheID = es.get< L1MuGMTChannelMaskRcd >().cacheIdentifier();
204  if(L1MuGMTChannelMaskCacheID != m_L1MuGMTChannelMaskCacheID) {
206  es.get< L1MuGMTChannelMaskRcd >().get( gmtchanmask_h );
207  m_config->setGMTChanMask( gmtchanmask_h.product() );
208  if ( L1MuGMTConfig::Debug(1) ) {
209  std::string onoff;
210  const L1MuGMTChannelMask* theChannelMask = L1MuGMTConfig::getGMTChanMask();
211  unsigned mask = theChannelMask->getSubsystemMask();
212 
213  edm::LogVerbatim("GMT_info");
214  edm::LogVerbatim("GMT_info") << " GMT input Channel Mask:" << std::hex << mask << std::dec;
215  onoff = mask&1 ? "OFF" : "ON";
216  edm::LogVerbatim("GMT_info") << " DT input " << onoff;
217  onoff = mask&2 ? "OFF" : "ON";
218  edm::LogVerbatim("GMT_info") << " RPCb input " << onoff;
219  onoff = mask&4 ? "OFF" : "ON";
220  edm::LogVerbatim("GMT_info") << " CSC input " << onoff;
221  onoff = mask&8 ? "OFF" : "ON";
222  edm::LogVerbatim("GMT_info") << " RPCf input " << onoff;
223  edm::LogVerbatim("GMT_info");
224  }
225  }
226 
227  unsigned long long L1CaloGeometryCacheID = es.get< L1CaloGeometryRecord >().cacheIdentifier();
228  if(L1CaloGeometryCacheID != m_L1CaloGeometryCacheID) {
230  es.get< L1CaloGeometryRecord >().get( caloGeom_h ) ;
231  m_config->setCaloGeom( caloGeom_h.product() ) ;
232  }
233 
235 
236  // write LUTs and Regs if required
237 
238  if(m_writeLUTsAndRegs) {
239  std::string dir = "gmtconfig";
240 
241  mkdir(dir.c_str(), S_ISUID|S_ISGID|S_ISVTX|S_IRUSR|S_IWUSR|S_IXUSR);
242 
243  m_config->dumpLUTs(dir);
244  m_config->dumpRegs(dir);
245  }
246 
247  // process the event
248  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info");
249  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "**** L1GlobalMuonTrigger processing ****";
250  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info");
251 
252  int bx_min = L1MuGMTConfig::getBxMin();
253  int bx_max = L1MuGMTConfig::getBxMax();
254 
255  m_ExtendedCands.clear();
256 
257  // clear readout ring buffer
258  std::vector<L1MuGMTReadoutRecord*>::iterator irr = m_ReadoutRingbuffer.begin();
259  for ( ;irr!=m_ReadoutRingbuffer.end(); irr++) delete (*irr);
260  m_ReadoutRingbuffer.clear();
261 
262  if(m_db) m_db->reset(); // reset debug block
263 
264  for ( int bx = bx_min; bx <= bx_max; bx++ ) {
265  m_db->SetBX(bx);
266 
267  // create new element in readout ring buffer
268  m_ReadoutRingbuffer.push_back( new L1MuGMTReadoutRecord(bx) );
269 
270  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "L1GlobalMuonTrigger processing bunch-crossing : " << bx;
271 
272  // get data into the data buffer
273  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT PSB";
274  if ( m_PSB ) {
275  m_PSB->receiveData(e,bx);
276  if ( L1MuGMTConfig::Debug(4) ) m_PSB->print();
277  }
278 
279  if ( m_PSB && !m_PSB->empty() ) {
280 
281  // run matcher
282  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT barrel Matcher";
283  if ( m_Matcher[0] ) m_Matcher[0]->run();
284  if ( L1MuGMTConfig::Debug(3) && m_Matcher[0] ) m_Matcher[0]->print();
285  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT endcap Matcher";
286  if ( m_Matcher[1] ) m_Matcher[1]->run();
287  if ( L1MuGMTConfig::Debug(3) && m_Matcher[1] ) m_Matcher[1]->print();
288 
289  // run cancel-out units
290  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT barrel Cancel Out Unit";
291  if ( m_CancelOutUnit[0] ) m_CancelOutUnit[0]->run();
293 
294  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT endcap Cancel Out Unit";
295  if ( m_CancelOutUnit[1] ) m_CancelOutUnit[1]->run();
297 
298  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT CSC/fRPC Cancel Out Unit";
299  if ( m_CancelOutUnit[2] ) m_CancelOutUnit[2]->run();
301 
302  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT DT/bRPC Cancel Out Unit";
303  if ( m_CancelOutUnit[3] ) m_CancelOutUnit[3]->run();
305 
306  // run MIP & ISO bit assignment units
307  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT barrel MIP & ISO bit Assignment Unit";
308  if ( m_MipIsoAU[0] ) m_MipIsoAU[0]->run();
309  if ( L1MuGMTConfig::Debug(3) && m_MipIsoAU[0] ) m_MipIsoAU[0]->print();
310  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT endcap MIP & ISO bit Assignment Unit";
311  if ( m_MipIsoAU[1] ) m_MipIsoAU[1]->run();
312  if ( L1MuGMTConfig::Debug(3) && m_MipIsoAU[1] ) m_MipIsoAU[1]->print();
313 
314  // run Merger
315  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT barrel Merger";
316  if ( m_Merger[0] ) m_Merger[0]->run();
317  if ( L1MuGMTConfig::Debug(3) && m_Merger[0] ) m_Merger[0]->print();
318  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT endcap Merger";
319  if ( m_Merger[1] ) m_Merger[1]->run();
320  if ( L1MuGMTConfig::Debug(3) && m_Merger[1] ) m_Merger[1]->print();
321 
322  // run sorter
323  if ( L1MuGMTConfig::Debug(2) ) edm::LogVerbatim("GMT_info") << "running GMT Sorter";
324  if ( m_Sorter ) m_Sorter->run();
326 
327  // store found track candidates in a container
328  if ( m_Sorter->numberOfCands() > 0 ) {
329  const std::vector<const L1MuGMTExtendedCand*>& gmt_cont = m_Sorter->Cands();
330  std::vector<const L1MuGMTExtendedCand*>::const_iterator iexc;
331  for ( iexc = gmt_cont.begin(); iexc != gmt_cont.end(); iexc++ ) {
332  if ( *iexc ) m_ExtendedCands.push_back( **iexc );
333  }
334  }
335 
336  // reset GMT
337  reset();
338 
339  }
340  }
341 
342  // produce the output
343  std::auto_ptr<std::vector<L1MuGMTCand> > GMTCands(new std::vector<L1MuGMTCand>);
344  std::vector<L1MuGMTExtendedCand>::const_iterator iexc;
345  for(iexc=m_ExtendedCands.begin(); iexc!=m_ExtendedCands.end(); iexc++) {
346  GMTCands->push_back(*iexc);
347  }
348  e.put(GMTCands);
349 
350  std::auto_ptr<L1MuGMTReadoutCollection> GMTRRC(getReadoutCollection());
351  e.put(GMTRRC);
352 
353  if( m_sendMipIso ) {
354  std::auto_ptr<std::vector<unsigned> > mipiso(new std::vector<unsigned>);
355  for(int i=0; i<32; i++) {
356  mipiso->push_back(m_db->IsMIPISO(0,i));
357  }
358  e.put(mipiso);
359  }
360 
361 // delete registers and LUTs
363 }
void setGMTChanMask(const L1MuGMTChannelMask *gmtchanmask)
int i
Definition: DBlmapReader.cc:9
unsigned long long m_L1MuTriggerScalesCacheID
std::vector< L1MuGMTReadoutRecord * > m_ReadoutRingbuffer
unsigned long long m_L1MuGMTChannelMaskCacheID
void print() const
print PSB
Definition: L1MuGMTPSB.cc:217
void SetBX(int bx)
Set the current bunch crossing.
void setTriggerPtScale(const L1MuTriggerPtScale *trigptscale)
void dumpRegs(std::string dir)
std::vector< L1MuGMTExtendedCand > m_ExtendedCands
void print() const
print results after MIP &amp; ISO bit assignment
void print()
print cancel-out bits
bool empty() const
are there any data in the PSB
Definition: L1MuGMTPSB.cc:309
unsigned getSubsystemMask() const
void run()
run Matcher
void print()
print matching results
const std::vector< const L1MuGMTExtendedCand * > & Cands() const
return std::vector with all muon candidates
Definition: L1MuGMTSorter.h:66
unsigned long long m_L1CaloGeometryCacheID
virtual void run()
run Sorter
void run()
run GMT MIP &amp; ISO bit assignment unit
std::auto_ptr< L1MuGMTReadoutCollection > getReadoutCollection()
void setGMTScales(const L1MuGMTScales *gmtscales)
unsigned long long m_L1MuTriggerPtScaleCacheID
static bool Debug()
L1MuGMTMipIsoAU * m_MipIsoAU[2]
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
static const L1MuGMTChannelMask * getGMTChanMask()
unsigned IsMIPISO(int bx, int idx)
Get stored MIP/ISO select bits.
L1MuGMTMatcher * m_Matcher[2]
void dumpLUTs(std::string dir)
L1MuGMTMerger * m_Merger[2]
void setCaloGeom(const L1CaloGeometry *caloGeom)
void print() const
print results after selection
unsigned long long m_L1MuGMTScalesCacheID
static int getBxMin()
void print()
print results after sorting
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void run()
run GMT Merger
void setGMTParams(const L1MuGMTParameters *gmtparams)
void clearLUTsRegs()
void receiveData(edm::Event &e, int bx)
receive muon candidates
Definition: L1MuGMTPSB.cc:88
void reset()
Reset the debug block.
static L1MuGMTConfig * m_config
unsigned long long m_L1MuGMTParametersCacheID
void createLUTsRegs()
static int getBxMax()
static L1MuGMTDebugBlock * m_db
dbl *** dir
Definition: mlp_gen.cc:35
void setTriggerScales(const L1MuTriggerScales *trigscales)
void run()
run cancel-out unit
int numberOfCands() const
return number of found muon candidates after sorter
Definition: L1MuGMTSorter.h:63
void L1MuGlobalMuonTrigger::reset ( void  )

Definition at line 368 of file L1MuGlobalMuonTrigger.cc.

References m_CancelOutUnit, m_Matcher, m_Merger, m_MipIsoAU, m_PSB, m_Sorter, L1MuGMTSorter::reset(), L1MuGMTMatcher::reset(), L1MuGMTPSB::reset(), L1MuGMTMipIsoAU::reset(), L1MuGMTMerger::reset(), and L1MuGMTCancelOutUnit::reset().

Referenced by produce().

368  {
369 
370  if ( m_PSB ) m_PSB->reset();
371  if ( m_Matcher[0] ) m_Matcher[0]->reset();
372  if ( m_Matcher[1] ) m_Matcher[1]->reset();
373  if ( m_CancelOutUnit[0] ) m_CancelOutUnit[0]->reset();
374  if ( m_CancelOutUnit[1] ) m_CancelOutUnit[1]->reset();
375  if ( m_CancelOutUnit[2] ) m_CancelOutUnit[2]->reset();
376  if ( m_CancelOutUnit[3] ) m_CancelOutUnit[3]->reset();
377  if ( m_MipIsoAU[0] ) m_MipIsoAU[0]->reset();
378  if ( m_MipIsoAU[1] ) m_MipIsoAU[1]->reset();
379  if ( m_Merger[0] ) m_Merger[0]->reset();
380  if ( m_Merger[1] ) m_Merger[1]->reset();
381  if ( m_Sorter) m_Sorter->reset();
382 
383 }
void reset()
clear cancel-out unit
virtual void reset()
reset Sorter
void reset()
clear MIP &amp; ISO bit assignment unit
void reset()
clear PSB
Definition: L1MuGMTPSB.cc:196
L1MuGMTMipIsoAU * m_MipIsoAU[2]
L1MuGMTMatcher * m_Matcher[2]
L1MuGMTMerger * m_Merger[2]
void reset()
clear Merger
L1MuGMTCancelOutUnit * m_CancelOutUnit[4]
void reset()
clear Matcher
const L1MuGMTSorter* L1MuGlobalMuonTrigger::Sorter ( ) const
inline

return pointer to Sorter

Definition at line 80 of file L1MuGlobalMuonTrigger.h.

References m_Sorter.

80 { return m_Sorter; }

Member Data Documentation

L1MuGMTCancelOutUnit* L1MuGlobalMuonTrigger::m_CancelOutUnit[4]
private
L1MuGMTConfig * L1MuGlobalMuonTrigger::m_config = 0
staticprivate

Definition at line 110 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), produce(), and ~L1MuGlobalMuonTrigger().

L1MuGMTDebugBlock * L1MuGlobalMuonTrigger::m_db = 0
staticprivate

Definition at line 112 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), produce(), and ~L1MuGlobalMuonTrigger().

std::vector<L1MuGMTExtendedCand> L1MuGlobalMuonTrigger::m_ExtendedCands
private

Definition at line 104 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1CaloGeometryCacheID
private

Definition at line 119 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuGMTChannelMaskCacheID
private

Definition at line 118 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuGMTParametersCacheID
private

Definition at line 117 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuGMTScalesCacheID
private

Definition at line 114 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuTriggerPtScaleCacheID
private

Definition at line 116 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

unsigned long long L1MuGlobalMuonTrigger::m_L1MuTriggerScalesCacheID
private

Definition at line 115 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

L1MuGMTMatcher* L1MuGlobalMuonTrigger::m_Matcher[2]
private
L1MuGMTMerger* L1MuGlobalMuonTrigger::m_Merger[2]
private
L1MuGMTMipIsoAU* L1MuGlobalMuonTrigger::m_MipIsoAU[2]
private
L1MuGMTPSB* L1MuGlobalMuonTrigger::m_PSB
private
std::vector<L1MuGMTReadoutRecord*> L1MuGlobalMuonTrigger::m_ReadoutRingbuffer
private
bool L1MuGlobalMuonTrigger::m_sendMipIso
private

Definition at line 108 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().

L1MuGMTSorter* L1MuGlobalMuonTrigger::m_Sorter
private
bool L1MuGlobalMuonTrigger::m_writeLUTsAndRegs
private

Definition at line 107 of file L1MuGlobalMuonTrigger.h.

Referenced by L1MuGlobalMuonTrigger(), and produce().