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
CSCTriggerPrimitivesProducer Class Reference

#include <CSCTriggerPrimitivesProducer.h>

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

Public Member Functions

 CSCTriggerPrimitivesProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~CSCTriggerPrimitivesProducer ()
 
- 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

edm::InputTag compDigiProducer_
 
int iev
 
CSCTriggerPrimitivesBuilderlctBuilder_
 
edm::InputTag wireDigiProducer_
 

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

Implementation of the local Level-1 Cathode Strip Chamber trigger. Simulates functionalities of the anode and cathode Local Charged Tracks (LCT) processors, of the Trigger Mother Board (TMB), and of the Muon Port Card (MPC).

Input to the simulation are collections of the CSC wire and comparator digis.

Produces four collections of the Level-1 CSC Trigger Primitives (track stubs, or LCTs): anode LCTs (ALCTs), cathode LCTs (CLCTs), correlated LCTs at TMB, and correlated LCTs at MPC.

Author
Slava Valuev, UCLA.
Date:
2010/02/16 17:06:34
Revision:
1.3

Definition at line 33 of file CSCTriggerPrimitivesProducer.h.

Constructor & Destructor Documentation

CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer ( const edm::ParameterSet conf)
explicit

Definition at line 39 of file CSCTriggerPrimitivesProducer.cc.

References compDigiProducer_, edm::ParameterSet::getParameter(), lctBuilder_, and wireDigiProducer_.

39  : iev(0) {
40 
41  wireDigiProducer_ = conf.getParameter<edm::InputTag>("CSCWireDigiProducer");
42  compDigiProducer_ = conf.getParameter<edm::InputTag>("CSCComparatorDigiProducer");
43 
44  lctBuilder_ = new CSCTriggerPrimitivesBuilder(conf); // pass on the conf
45 
46  // register what this produces
47  produces<CSCALCTDigiCollection>();
48  produces<CSCCLCTDigiCollection>();
49  produces<CSCCLCTPreTriggerCollection>();
50  produces<CSCCorrelatedLCTDigiCollection>();
51  produces<CSCCorrelatedLCTDigiCollection>("MPCSORTED");
52 }
T getParameter(std::string const &) const
CSCTriggerPrimitivesBuilder * lctBuilder_
CSCTriggerPrimitivesProducer::~CSCTriggerPrimitivesProducer ( )

Definition at line 54 of file CSCTriggerPrimitivesProducer.cc.

References iev, lctBuilder_, and LogDebug.

54  {
55  LogDebug("L1CSCTrigger")
56  << "deleting trigger primitives after " << iev << " events.";
57  delete lctBuilder_;
58 }
#define LogDebug(id)
CSCTriggerPrimitivesBuilder * lctBuilder_

Member Function Documentation

void CSCTriggerPrimitivesProducer::produce ( edm::Event ev,
const edm::EventSetup setup 
)
virtual

Implements edm::EDProducer.

Definition at line 63 of file CSCTriggerPrimitivesProducer.cc.

References CSCTriggerPrimitivesBuilder::build(), compDigiProducer_, dbtoconf::conf, edm::EventSetup::get(), edm::Event::getByLabel(), h, iev, edm::InputTag::instance(), edm::HandleBase::isValid(), edm::InputTag::label(), lctBuilder_, LogDebug, edm::Handle< T >::product(), edm::ESHandle< class >::product(), edm::Event::put(), CSCTriggerPrimitivesBuilder::setConfigParameters(), CSCTriggerGeometry::setGeometry(), and wireDigiProducer_.

64  {
65 
66  LogDebug("L1CSCTrigger") << "start producing LCTs for event " << ++iev;
67 
68  // Find the geometry (& conditions?) for this event & cache it in
69  // CSCTriggerGeometry.
70  {
72  setup.get<MuonGeometryRecord>().get(h);
74  }
75 
76  // Find conditions data for bad chambers.
77  edm::ESHandle<CSCBadChambers> pBadChambers;
78  setup.get<CSCBadChambersRcd>().get(pBadChambers);
79 
80  // Get config. parameters using EventSetup mechanism. This must be done
81  // in produce() for every event and not in beginJob() (see mail from
82  // Jim Brooke sent to hn-cms-L1TrigEmulator on July 30, 2007).
84  setup.get<CSCDBL1TPParametersRcd>().get(conf);
85  if (conf.product() == 0) {
86  edm::LogError("L1CSCTPEmulatorConfigError")
87  << "+++ Failed to find a CSCDBL1TPParametersRcd in EventSetup! +++\n"
88  << "+++ Cannot continue emulation without these parameters +++\n";
89  return;
90  }
92 
93  // Get the collections of comparator & wire digis from event.
98 
99  // Create empty collections of ALCTs, CLCTs, and correlated LCTs upstream
100  // and downstream of MPC.
101  std::auto_ptr<CSCALCTDigiCollection> oc_alct(new CSCALCTDigiCollection);
102  std::auto_ptr<CSCCLCTDigiCollection> oc_clct(new CSCCLCTDigiCollection);
103  std::auto_ptr<CSCCLCTPreTriggerCollection> oc_pretrig(new CSCCLCTPreTriggerCollection);
104  std::auto_ptr<CSCCorrelatedLCTDigiCollection> oc_lct(new CSCCorrelatedLCTDigiCollection);
105  std::auto_ptr<CSCCorrelatedLCTDigiCollection> oc_sorted_lct(new CSCCorrelatedLCTDigiCollection);
106 
107  if (!wireDigis.isValid()) {
108  edm::LogWarning("L1CSCTPEmulatorNoInputCollection")
109  << "+++ Warning: Collection of wire digis with label "
111  << " requested in configuration, but not found in the event..."
112  << " Skipping production of CSC TP digis +++\n";
113  }
114  if (!compDigis.isValid()) {
115  edm::LogWarning("L1CSCTPEmulatorNoInputCollection")
116  << "+++ Warning: Collection of comparator digis with label "
118  << " requested in configuration, but not found in the event..."
119  << " Skipping production of CSC TP digis +++\n";
120  }
121 
122  // Fill output collections if valid input collections are available.
123  if (wireDigis.isValid() && compDigis.isValid()) {
124  lctBuilder_->build(pBadChambers.product(),
125  wireDigis.product(), compDigis.product(),
126  *oc_alct, *oc_clct, *oc_pretrig, *oc_lct, *oc_sorted_lct);
127  }
128 
129  // Put collections in event.
130  ev.put(oc_alct);
131  ev.put(oc_clct);
132  ev.put(oc_pretrig);
133  ev.put(oc_lct);
134  ev.put(oc_sorted_lct,"MPCSORTED");
135 }
#define LogDebug(id)
void build(const CSCBadChambers *badChambers, const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, CSCALCTDigiCollection &oc_alct, CSCCLCTDigiCollection &oc_clct, CSCCLCTPreTriggerCollection &oc_pretrig, CSCCorrelatedLCTDigiCollection &oc_lct, CSCCorrelatedLCTDigiCollection &oc_sorted_lct)
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
void setConfigParameters(const CSCDBL1TPParameters *conf)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple conf
Definition: dbtoconf.py:185
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
CSCTriggerPrimitivesBuilder * lctBuilder_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
T const * product() const
Definition: Handle.h:74
std::string const & label() const
Definition: InputTag.h:25
std::string const & instance() const
Definition: InputTag.h:26

Member Data Documentation

edm::InputTag CSCTriggerPrimitivesProducer::compDigiProducer_
private

Definition at line 44 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

int CSCTriggerPrimitivesProducer::iev
private

Definition at line 43 of file CSCTriggerPrimitivesProducer.h.

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

CSCTriggerPrimitivesBuilder* CSCTriggerPrimitivesProducer::lctBuilder_
private
edm::InputTag CSCTriggerPrimitivesProducer::wireDigiProducer_
private

Definition at line 45 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().