CMS 3D CMS Logo

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

#include <FastSimDataFilter.h>

Inheritance diagram for cms::FastSimDataFilter:
edm::stream::EDFilter<> edm::stream::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
 FastSimDataFilter (const edm::ParameterSet &pset)
 
bool filter (edm::Event &, const edm::EventSetup &) override
 
 ~FastSimDataFilter () override
 
- Public Member Functions inherited from edm::stream::EDFilter<>
 EDFilter ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
- Public Member Functions inherited from edm::stream::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () 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 Types

typedef math::RhoEtaPhiVector Vector
 

Private Attributes

int npassed
 
int ntotal
 
double towercut
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDFilter<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDFilterBase
typedef EDFilterAdaptorBase 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::stream::EDFilterBase
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

Definition at line 25 of file FastSimDataFilter.h.

Member Typedef Documentation

Definition at line 39 of file FastSimDataFilter.h.

Constructor & Destructor Documentation

cms::FastSimDataFilter::FastSimDataFilter ( const edm::ParameterSet pset)

Definition at line 20 of file FastSimDataFilter.cc.

References edm::ParameterSet::getUntrackedParameter(), and CastorTowerReco_cfi::towercut.

21 {
22  towercut= conf.getUntrackedParameter<double>("towercut", 1.4);
23 }
cms::FastSimDataFilter::~FastSimDataFilter ( )
override

Definition at line 25 of file FastSimDataFilter.cc.

25 {}

Member Function Documentation

void cms::FastSimDataFilter::beginJob ( void  )
virtual
void cms::FastSimDataFilter::endJob ( void  )
virtual

Definition at line 28 of file FastSimDataFilter.cc.

References gather_cfg::cout, and groupFilesInBlocks::ntotal.

28  {
29  cout << " FastSimDataFilter: accepted " << npassed << " out of total "
30  << ntotal << endl;
31 
32  }
bool cms::FastSimDataFilter::filter ( edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 34 of file FastSimDataFilter.cc.

References edm::SortedCollection< T, SORT >::begin(), DEFINE_FWK_MODULE, edm::SortedCollection< T, SORT >::end(), stringResolutionProvider_cfi::et, PVValHelper::eta, groupFilesInBlocks::ntotal, mps_fire::result, objects.METAnalyzer::sumEt, and CastorTowerReco_cfi::towercut.

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

35 {
36  ntotal++;
37  bool result = false;
38 
40  event.getByLabel("towerMaker",towers);
42 
43 
44  int nplusP = 0;
45  int nminusP = 0;
46  int nplusR = 0;
47  int nminusR = 0;
48  double metx = 0.;
49  double mety = 0.;
50  double sumEt = 0.;
51 
52  for ( cal = towers->begin(); cal != towers->end(); ++cal ) {
53 
54  // double eE = cal->emEnergy();
55  // double eH = cal->hadEnergy();
56  // double eHO = cal->outerEnergy();
57  // double phi = cal->phi();
58 
59  double eta = cal->eta();
60  double en = cal->energy();
61  double et = cal->et();
62 
63  // cylindrical
64  math::RhoEtaPhiVector mom(cal->et(), cal->eta(), cal->phi());
65 
66  /*
67  // cell properties
68  CaloTowerDetId idT = cal->id();
69  int ieta = idT.ieta();
70  if(ieta > 0) ieta -= 1;
71  int iphi = idT.iphi();
72  */
73 
74  metx += mom.x();
75  mety += mom.y();
76  sumEt += et;
77 
78  // Towers approx. in the region of BSC Paddles and Rings
79  if( en > towercut && eta > 3.1 && eta < 3.5 ) nplusP++;
80  if( en > towercut && eta < -3.1 && eta > -3.5 ) nminusP++;
81  if( en > towercut && eta > 3.9 && eta < 4.6 ) nplusR++;
82  if( en > towercut && eta < -3.9 && eta > -4.6 ) nminusR++;
83 
84 
85  } // towers cycle
86 
87  if( (nplusP * nminusP >= 1 ) || (nplusR * nminusR >= 1 ) ||
88  (nplusP * nminusR >= 1 ) || (nplusR * nminusP >= 1 )) {
89  // std::cout << "... passed" << std::endl;
90  result = true;
91  npassed++;
92  }
93 
94  return result;
95 
96 }
std::vector< CaloTower >::const_iterator const_iterator
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:32
const_iterator end() const
et
define resolution functions of each parameter
const_iterator begin() const

Member Data Documentation

int cms::FastSimDataFilter::npassed
private

Definition at line 42 of file FastSimDataFilter.h.

int cms::FastSimDataFilter::ntotal
private

Definition at line 42 of file FastSimDataFilter.h.

double cms::FastSimDataFilter::towercut
private

Definition at line 41 of file FastSimDataFilter.h.