CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackMTCCFilter.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripChannelChargeFilter
4 // Class : TrackMTCCFilter
5 //
6 //
7 // Original Author: dkcira
8 
14 
15 namespace cms
16 {
17 
19  TrackProducer = ps.getParameter<std::string>("TrackProducer");
20  TrackLabel = ps.getParameter<std::string>("TrackLabel");
21  MinNrOfTracks = ps.getParameter<int>("MinNrOfTracks");
22  produces <int>();
23  edm::LogInfo("TrackMTCCFilter")<<"TrackProducer = "<<TrackProducer;
24  edm::LogInfo("TrackMTCCFilter")<<"TrackLabel = " <<TrackLabel;
25  edm::LogInfo("TrackMTCCFilter")<<"MinNrOfTracks = "<<MinNrOfTracks;
26 }
27 
29  bool decision=false; // default value, only accept if set true in this loop
30 
31  //get SiStripCluster
33  e.getByLabel(TrackProducer,TrackLabel,trackCollection);
34 
35  unsigned int nroftracks = trackCollection->size();
36 // edm::LogInfo("TrackMTCCFilter")<<"trackCollection->size()="<<nroftracks;
37  if(nroftracks>=MinNrOfTracks) decision = true;
38 
39  std::auto_ptr< int > output_decision( new int(decision) );
40  e.put(output_decision);
41  return decision;
42 }
43 
44 }
T getParameter(std::string const &) const
TrackMTCCFilter(const edm::ParameterSet &ps)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
virtual bool filter(edm::Event &e, edm::EventSetup const &c)
unsigned int MinNrOfTracks
std::string TrackProducer