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 Types | Private Attributes
cms::FastSimDataFilter Class Reference

#include <FastSimDataFilter.h>

Inheritance diagram for cms::FastSimDataFilter:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
 FastSimDataFilter (const edm::ParameterSet &pset)
 
virtual bool filter (edm::Event &, const edm::EventSetup &)
 
virtual ~FastSimDataFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- 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 Types

typedef math::RhoEtaPhiVector Vector
 

Private Attributes

int npassed
 
int ntotal
 
double towercut
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
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 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().

21 {
22  towercut= conf.getUntrackedParameter<double>("towercut", 1.4);
23 }
tuple conf
Definition: dbtoconf.py:185
cms::FastSimDataFilter::~FastSimDataFilter ( )
virtual

Definition at line 25 of file FastSimDataFilter.cc.

25 {}

Member Function Documentation

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

Reimplemented from edm::EDFilter.

Definition at line 27 of file FastSimDataFilter.cc.

References groupFilesInBlocks::ntotal.

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

Reimplemented from edm::EDFilter.

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  }
tuple cout
Definition: gather_cfg.py:121
bool cms::FastSimDataFilter::filter ( edm::Event event,
const edm::EventSetup setup 
)
virtual

Implements edm::EDFilter.

Definition at line 34 of file FastSimDataFilter.cc.

References eta(), groupFilesInBlocks::ntotal, and query::result.

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
T eta() const
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:33
tuple result
Definition: query.py:137

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.