CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cms::MTCCHLTrigger Class Reference

#include <MTCCHLTrigger.h>

Inheritance diagram for cms::MTCCHLTrigger:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

bool filter (edm::Event &e, edm::EventSetup const &c) override
 
 MTCCHLTrigger (const edm::ParameterSet &ps)
 
 ~MTCCHLTrigger () override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () 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 Attributes

unsigned int ChargeThreshold
 
std::string clusterProducer
 
bool selOnDigiCharge
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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

Definition at line 13 of file MTCCHLTrigger.h.

Constructor & Destructor Documentation

cms::MTCCHLTrigger::MTCCHLTrigger ( const edm::ParameterSet ps)

Definition at line 9 of file MTCCHLTrigger.cc.

References ChargeThreshold, clusterProducer, edm::ParameterSet::getParameter(), selOnDigiCharge, and AlCaHLTBitMon_QueryRunRegistry::string.

9  {
10  selOnDigiCharge=ps.getParameter<bool>("SelOnDigiCharge");
11  ChargeThreshold=ps.getParameter<int>("ChargeThreshold");
12  clusterProducer = ps.getParameter<std::string>("ClusterProducer");
13  produces <int>();
14  produces <unsigned int>();
15 }
T getParameter(std::string const &) const
unsigned int ChargeThreshold
Definition: MTCCHLTrigger.h:23
std::string clusterProducer
Definition: MTCCHLTrigger.h:27
cms::MTCCHLTrigger::~MTCCHLTrigger ( )
inlineoverride

Definition at line 16 of file MTCCHLTrigger.h.

References EnergyCorrector::c, MillePedeFileConverter_cfg::e, and filter().

16 {}

Member Function Documentation

bool cms::MTCCHLTrigger::filter ( edm::Event e,
edm::EventSetup const &  c 
)
overridevirtual

Implements edm::EDFilter.

Definition at line 17 of file MTCCHLTrigger.cc.

References edm::DetSetVector< T >::begin(), ChargeThreshold, clusterProducer, end, edm::Event::getByLabel(), edm::Event::getManyByType(), h, edm::Event::put(), and selOnDigiCharge.

Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), and ~MTCCHLTrigger().

17  {
18  //get data
19  //StripCluster
22 
23  //StripDigi from RawToDigi and ZeroSuppressor
24  std::vector< edm::Handle< edm::DetSetVector<SiStripDigi> > > di;
25  e.getManyByType(di);
26 
27  if (selOnDigiCharge) {
28  unsigned int digiadc=0;
29  for (std::vector< edm::Handle< edm::DetSetVector<SiStripDigi> > >::const_iterator mi = di.begin(); mi!=di.end(); mi++){
30  for (edm::DetSetVector<SiStripDigi>::const_iterator it = (*mi)->begin(); it!= (*mi)->end();it++) {
31  for(std::vector<SiStripDigi>::const_iterator vit=(it->data).begin(); vit!=(it->data).end(); vit++) digiadc += vit->adc();
32  }
33  }
34  return (digiadc>ChargeThreshold) ? true : false;
35  } else {
36  unsigned int amplclus=0;
37  for (edm::DetSetVector<SiStripCluster>::const_iterator it=h->begin();it!=h->end();it++) {
38  for(std::vector<SiStripCluster>::const_iterator vit=(it->data).begin(); vit!=(it->data).end(); vit++){
39  for(auto ia=vit->amplitudes().begin(); ia!=vit->amplitudes().end(); ia++)
40  {
41  if ((*ia)>0){ amplclus+=(*ia); }
42  }
43  }
44  }
45  bool decision= (amplclus>ChargeThreshold) ? true : false;
46  e.put(std::make_unique<unsigned int>(amplclus));
47  e.put(std::make_unique<int>(decision));
48  return decision;
49  }
50  }
unsigned int ChargeThreshold
Definition: MTCCHLTrigger.h:23
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.
std::string clusterProducer
Definition: MTCCHLTrigger.h:27
void getManyByType(std::vector< Handle< PROD >> &results) const
Definition: Event.h:508
#define end
Definition: vmac.h:39
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:346
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104

Member Data Documentation

unsigned int cms::MTCCHLTrigger::ChargeThreshold
private

Definition at line 23 of file MTCCHLTrigger.h.

Referenced by filter(), and MTCCHLTrigger().

std::string cms::MTCCHLTrigger::clusterProducer
private

Definition at line 27 of file MTCCHLTrigger.h.

Referenced by filter(), and MTCCHLTrigger().

bool cms::MTCCHLTrigger::selOnDigiCharge
private

Definition at line 22 of file MTCCHLTrigger.h.

Referenced by filter(), and MTCCHLTrigger().