CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCTriggerPrimitivesProducer Class Reference

#include <CSCTriggerPrimitivesProducer.h>

Inheritance diagram for CSCTriggerPrimitivesProducer:
edm::global::EDProducer< edm::StreamCache< CSCTriggerPrimitivesBuilder > > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCTriggerPrimitivesProducer (const edm::ParameterSet &)
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 ~CSCTriggerPrimitivesProducer () override
 
- Public Member Functions inherited from edm::global::EDProducer< edm::StreamCache< CSCTriggerPrimitivesBuilder > >
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

std::unique_ptr< CSCTriggerPrimitivesBuilderbeginStream (edm::StreamID) const override
 

Private Attributes

bool checkBadChambers_
 
edm::EDGetTokenT< CSCComparatorDigiCollectioncomp_token_
 
edm::InputTag compDigiProducer_
 
edm::ParameterSet config_
 
bool debugParameters_
 
edm::EDGetTokenT< GEMPadDigiClusterCollectiongem_pad_cluster_token_
 
edm::EDGetTokenT< GEMPadDigiCollectiongem_pad_token_
 
edm::InputTag gemPadDigiClusterProducer_
 
edm::InputTag gemPadDigiProducer_
 
bool runME11ILT_
 
bool runME21ILT_
 
edm::EDGetTokenT< CSCWireDigiCollectionwire_token_
 
edm::InputTag wireDigiProducer_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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.

The trigger primitive emulator has been expanded with options to use both ALCTs, CLCTs and GEM pads. The GEM-CSC integrated local trigger combines ALCT, CLCT and GEM information to produce integrated stubs. The available stub types can be found in the class definition of CSCCorrelatedLCTDigi (DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h) Either single GEM pads or GEM pad clusters can be used as input. The online system will use GEM pad clusters however.

authors: Sven Dildick (TAMU), Tao Huang (TAMU)

Definition at line 44 of file CSCTriggerPrimitivesProducer.h.

Constructor & Destructor Documentation

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

Definition at line 37 of file CSCTriggerPrimitivesProducer.cc.

References checkBadChambers_, comp_token_, compDigiProducer_, config_, debugParameters_, edm::ParameterSet::existsAs(), gem_pad_cluster_token_, gem_pad_token_, gemPadDigiClusterProducer_, gemPadDigiProducer_, edm::ParameterSet::getParameter(), or, runME11ILT_, runME21ILT_, wire_token_, and wireDigiProducer_.

38 {
39  config_ = conf;
40 
41  // if false, parameters will be read in from DB using EventSetup mechanism
42  // else will use all parameters from the config file
43  debugParameters_ = conf.getParameter<bool>("debugParameters");
44 
45  wireDigiProducer_ = conf.getParameter<edm::InputTag>("CSCWireDigiProducer");
46  compDigiProducer_ = conf.getParameter<edm::InputTag>("CSCComparatorDigiProducer");
47  gemPadDigiProducer_ = conf.existsAs<edm::InputTag>("GEMPadDigiProducer")?conf.getParameter<edm::InputTag>("GEMPadDigiProducer"):edm::InputTag("");
48  checkBadChambers_ = conf.getParameter<bool>("checkBadChambers");
49 
50  // check whether you need to run the integrated local triggers
51  const edm::ParameterSet commonParam(conf.getParameter<edm::ParameterSet>("commonParam"));
52  runME11ILT_ = commonParam.existsAs<bool>("runME11ILT")?commonParam.getParameter<bool>("runME11ILT"):false;
53  runME21ILT_ = commonParam.existsAs<bool>("runME21ILT")?commonParam.getParameter<bool>("runME21ILT"):false;
54 
55  wire_token_ = consumes<CSCWireDigiCollection>(wireDigiProducer_);
56  comp_token_ = consumes<CSCComparatorDigiCollection>(compDigiProducer_);
57  gem_pad_token_ = consumes<GEMPadDigiCollection>(gemPadDigiProducer_);
58  gem_pad_cluster_token_ = consumes<GEMPadDigiClusterCollection>(gemPadDigiClusterProducer_);
59 
60  // register what this produces
61  produces<CSCALCTDigiCollection>();
62  produces<CSCCLCTDigiCollection>();
63  produces<CSCCLCTPreTriggerDigiCollection>();
64  produces<CSCCLCTPreTriggerCollection>();
65  produces<CSCCorrelatedLCTDigiCollection>();
66  produces<CSCCorrelatedLCTDigiCollection>("MPCSORTED");
68  produces<GEMCoPadDigiCollection>();
69 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:161
edm::EDGetTokenT< GEMPadDigiClusterCollection > gem_pad_cluster_token_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::EDGetTokenT< CSCComparatorDigiCollection > comp_token_
edm::EDGetTokenT< GEMPadDigiCollection > gem_pad_token_
edm::EDGetTokenT< CSCWireDigiCollection > wire_token_
CSCTriggerPrimitivesProducer::~CSCTriggerPrimitivesProducer ( )
override

Definition at line 71 of file CSCTriggerPrimitivesProducer.cc.

72 {
73 }

Member Function Documentation

std::unique_ptr<CSCTriggerPrimitivesBuilder> CSCTriggerPrimitivesProducer::beginStream ( edm::StreamID  ) const
inlineoverrideprivate

Definition at line 57 of file CSCTriggerPrimitivesProducer.h.

57  {
58  return std::unique_ptr<CSCTriggerPrimitivesBuilder>(new CSCTriggerPrimitivesBuilder(config_));
59  }
void CSCTriggerPrimitivesProducer::produce ( edm::StreamID  iID,
edm::Event ev,
const edm::EventSetup setup 
) const
override

Definition at line 75 of file CSCTriggerPrimitivesProducer.cc.

References checkBadChambers_, comp_token_, compDigiProducer_, debugParameters_, gem_pad_cluster_token_, gem_pad_token_, gemPadDigiClusterProducer_, gemPadDigiProducer_, edm::EventSetup::get(), edm::Event::getByToken(), h, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), edm::InputTag::label(), eostools::move(), or, edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::Event::put(), runME11ILT_, runME21ILT_, groupFilesInBlocks::temp, wire_token_, and wireDigiProducer_.

76 {
77  // Remark: access builder using "streamCache(iID)"
78 
79  // get the csc geometry
81  setup.get<MuonGeometryRecord>().get(h);
82  streamCache(iID)->setCSCGeometry(&*h);
83 
84  // get the gem geometry if it's there
86  setup.get<MuonGeometryRecord>().get(h_gem);
87  if (h_gem.isValid()) {
88  streamCache(iID)->setGEMGeometry(&*h_gem);
89  } else {
90  edm::LogInfo("CSCTriggerPrimitivesProducer|NoGEMGeometry")
91  << "+++ Info: GEM geometry is unavailable. Running CSC-only trigger algorithm. +++\n";
92  }
93 
94  // Find conditions data for bad chambers.
95  edm::ESHandle<CSCBadChambers> pBadChambers;
96  setup.get<CSCBadChambersRcd>().get(pBadChambers);
97 
98  // If !debugParameters then get config parameters using EventSetup mechanism.
99  // This must be done in produce() for every event and not in beginJob()
100  // (see mail from Jim Brooke sent to hn-cms-L1TrigEmulator on July 30, 2007).
101  if (!debugParameters_) {
103  setup.get<CSCDBL1TPParametersRcd>().get(conf);
104  if (conf.product() == nullptr) {
105  edm::LogError("CSCTriggerPrimitivesProducer|ConfigError")
106  << "+++ Failed to find a CSCDBL1TPParametersRcd in EventSetup! +++\n"
107  << "+++ Cannot continue emulation without these parameters +++\n";
108  return;
109  }
110  streamCache(iID)->setConfigParameters(conf.product());
111  }
112 
113  // Get the collections of comparator & wire digis from event.
116  ev.getByToken(comp_token_, compDigis);
117  ev.getByToken(wire_token_, wireDigis);
118 
119  // input GEM pad collection for upgrade scenarios
120  const GEMPadDigiCollection *gemPads = nullptr;
121  if (!gemPadDigiProducer_.label().empty()) {
123  ev.getByToken(gem_pad_token_, gemPadDigis);
124  gemPads = gemPadDigis.product();
125  }
126 
127  // input GEM pad cluster collection for upgrade scenarios
128  const GEMPadDigiClusterCollection *gemPadClusters = nullptr;
129  if (!gemPadDigiClusterProducer_.label().empty()) {
130  edm::Handle<GEMPadDigiClusterCollection> gemPadDigiClusters;
131  ev.getByToken(gem_pad_cluster_token_, gemPadDigiClusters);
132  gemPadClusters = gemPadDigiClusters.product();
133  }
134 
135  // Create empty collections of ALCTs, CLCTs, and correlated LCTs upstream
136  // and downstream of MPC.
137  std::unique_ptr<CSCALCTDigiCollection> oc_alct(new CSCALCTDigiCollection);
138  std::unique_ptr<CSCCLCTDigiCollection> oc_clct(new CSCCLCTDigiCollection);
139  std::unique_ptr<CSCCLCTPreTriggerDigiCollection> oc_clctpretrigger(new CSCCLCTPreTriggerDigiCollection);
140  std::unique_ptr<CSCCLCTPreTriggerCollection> oc_pretrig(new CSCCLCTPreTriggerCollection);
141  std::unique_ptr<CSCCorrelatedLCTDigiCollection> oc_lct(new CSCCorrelatedLCTDigiCollection);
142  std::unique_ptr<CSCCorrelatedLCTDigiCollection> oc_sorted_lct(new CSCCorrelatedLCTDigiCollection);
143  std::unique_ptr<GEMCoPadDigiCollection> oc_gemcopad(new GEMCoPadDigiCollection);
144 
145  if (!wireDigis.isValid()) {
146  edm::LogWarning("CSCTriggerPrimitivesProducer|NoInputCollection")
147  << "+++ Warning: Collection of wire digis with label "
149  << " requested in configuration, but not found in the event..."
150  << " Skipping production of CSC TP digis +++\n";
151  }
152  if (!compDigis.isValid()) {
153  edm::LogWarning("CSCTriggerPrimitivesProducer|NoInputCollection")
154  << "+++ Warning: Collection of comparator digis with label "
156  << " requested in configuration, but not found in the event..."
157  << " Skipping production of CSC TP digis +++\n";
158  }
159  // Fill output collections if valid input collections are available.
160  if (wireDigis.isValid() && compDigis.isValid()) {
161  const CSCBadChambers* temp = checkBadChambers_ ? pBadChambers.product() : new CSCBadChambers;
162  streamCache(iID)->build(temp,
163  wireDigis.product(), compDigis.product(),
164  gemPads, gemPadClusters,
165  *oc_alct, *oc_clct,
166  *oc_clctpretrigger, *oc_pretrig,
167  *oc_lct, *oc_sorted_lct, *oc_gemcopad);
168  if (!checkBadChambers_)
169  delete temp;
170  }
171 
172  // Put collections in event.
173  ev.put(std::move(oc_alct));
174  ev.put(std::move(oc_clct));
175  ev.put(std::move(oc_clctpretrigger));
176  ev.put(std::move(oc_pretrig));
177  ev.put(std::move(oc_lct));
178  ev.put(std::move(oc_sorted_lct),"MPCSORTED");
179  // only put GEM copad collections in the event when the
180  // integrated local triggers are running
182  ev.put(std::move(oc_gemcopad));
183 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< GEMPadDigiClusterCollection > gem_pad_cluster_token_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< CSCComparatorDigiCollection > comp_token_
edm::EDGetTokenT< GEMPadDigiCollection > gem_pad_token_
T const * product() const
Definition: Handle.h:74
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< CSCWireDigiCollection > wire_token_
T get() const
Definition: EventSetup.h:71
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:511
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...

Member Data Documentation

bool CSCTriggerPrimitivesProducer::checkBadChambers_
private

Definition at line 77 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCTriggerPrimitivesProducer::comp_token_
private

Definition at line 68 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::InputTag CSCTriggerPrimitivesProducer::compDigiProducer_
private

Definition at line 62 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::ParameterSet CSCTriggerPrimitivesProducer::config_
private

Definition at line 55 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer().

bool CSCTriggerPrimitivesProducer::debugParameters_
private

Definition at line 74 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::EDGetTokenT<GEMPadDigiClusterCollection> CSCTriggerPrimitivesProducer::gem_pad_cluster_token_
private

Definition at line 71 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::EDGetTokenT<GEMPadDigiCollection> CSCTriggerPrimitivesProducer::gem_pad_token_
private

Definition at line 70 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::InputTag CSCTriggerPrimitivesProducer::gemPadDigiClusterProducer_
private

Definition at line 65 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::InputTag CSCTriggerPrimitivesProducer::gemPadDigiProducer_
private

Definition at line 64 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

bool CSCTriggerPrimitivesProducer::runME11ILT_
private

Definition at line 80 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

bool CSCTriggerPrimitivesProducer::runME21ILT_
private

Definition at line 81 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::EDGetTokenT<CSCWireDigiCollection> CSCTriggerPrimitivesProducer::wire_token_
private

Definition at line 69 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().

edm::InputTag CSCTriggerPrimitivesProducer::wireDigiProducer_
private

Definition at line 63 of file CSCTriggerPrimitivesProducer.h.

Referenced by CSCTriggerPrimitivesProducer(), and produce().