![]() |
|
|||
File indexing completed on 2024-04-06 12:06:49
0001 // -*- C++ -*- 0002 // 0003 // Package: TagProbeEdmFilter 0004 // Class: TagProbeEdmFilter 0005 // 0006 /**\class TagProbeEdmFilter TagProbeEdmFilter.cc PhysicsTools/TagProbeEdmFilter/src/TagProbeEdmFilter.cc 0007 0008 Description: <one line class summary> 0009 0010 Implementation: 0011 <Notes on implementation> 0012 */ 0013 // 0014 // Original Author: Nadia Adam 0015 // Created: Fri Jun 6 09:10:41 CDT 2008 0016 // $Id: TagProbeMassEDMFilter.cc,v 1.2 2010/08/07 14:55:55 wmtan Exp $ 0017 // 0018 // 0019 0020 // system include files 0021 0022 // Include files 0023 #include "DPGAnalysis/Skims/interface/TagProbeMassEDMFilter.h" 0024 0025 // 0026 // constants, enums and typedefs 0027 // 0028 0029 // 0030 // static data member definitions 0031 // 0032 0033 // 0034 // constructors and destructor 0035 // 0036 TagProbeMassEDMFilter::TagProbeMassEDMFilter(const edm::ParameterSet& iConfig) { 0037 //now do what ever initialization is needed 0038 tpMapName = iConfig.getParameter<std::string>("tpMapName"); 0039 } 0040 0041 TagProbeMassEDMFilter::~TagProbeMassEDMFilter() { 0042 // do anything here that needs to be done at desctruction time 0043 // (e.g. close files, deallocate resources etc.) 0044 } 0045 0046 // 0047 // member functions 0048 // 0049 0050 // ------------ method called on each new Event ------------ 0051 bool TagProbeMassEDMFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) { 0052 using namespace edm; 0053 using namespace std; 0054 0055 // Pass the event if there are some TP pairs ... 0056 Handle<std::vector<float> > tp_mass; 0057 0058 iEvent.getByLabel(tpMapName, "TPmass", tp_mass); 0059 if (!tp_mass.isValid()) { 0060 LogWarning("TagAndProbeFilter") << "Could not extract TP pairs "; 0061 return false; 0062 } 0063 0064 int nrTP = tp_mass->size(); 0065 0066 if (nrTP > 0) 0067 return true; 0068 else 0069 return false; 0070 } 0071 0072 // ------------ method called once each job just before starting event loop ------------ 0073 void TagProbeMassEDMFilter::beginJob() {} 0074 0075 // ------------ method called once each job just after ending the event loop ------------ 0076 void TagProbeMassEDMFilter::endJob() {} 0077 0078 //define this as a plug-in 0079 DEFINE_FWK_MODULE(TagProbeMassEDMFilter);
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |