00001 #ifndef DataFormats_PatCandidates_TriggerObjectStandAlone_h 00002 #define DataFormats_PatCandidates_TriggerObjectStandAlone_h 00003 00004 00005 // -*- C++ -*- 00006 // 00007 // Package: PatCandidates 00008 // Class: pat::TriggerObjectStandAlone 00009 // 00010 // $Id: TriggerObjectStandAlone.h,v 1.1.2.1 2009/03/27 21:34:45 vadler Exp $ 00011 // 00026 #include "DataFormats/PatCandidates/interface/TriggerObject.h" 00027 00028 #include <map> 00029 #include <string> 00030 #include <vector> 00031 00032 #include "DataFormats/HLTReco/interface/TriggerObject.h" 00033 #include "DataFormats/Common/interface/Ref.h" 00034 #include "DataFormats/Common/interface/RefProd.h" 00035 #include "DataFormats/Common/interface/RefVector.h" 00036 #include "DataFormats/Common/interface/Association.h" 00037 00038 00039 namespace pat { 00040 00041 class TriggerObjectStandAlone : public TriggerObject { 00042 00044 std::vector< std::string > filterLabels_; // used for trigger match definition 00045 std::vector< std::string > pathNames_; // used for trigger match definition 00046 00047 public: 00048 00050 TriggerObjectStandAlone() : TriggerObject() {}; 00051 TriggerObjectStandAlone( const TriggerObject & trigObj ) : TriggerObject( trigObj ) {}; 00052 TriggerObjectStandAlone( const reco::Particle::LorentzVector & vec, int id = 0 ) : TriggerObject( vec, id ) {}; 00053 TriggerObjectStandAlone( const reco::Particle::PolarLorentzVector & vec, int id = 0 ) : TriggerObject( vec, id ) {}; 00054 TriggerObjectStandAlone( const trigger::TriggerObject & trigObj ) : TriggerObject( trigObj ) {}; 00055 virtual ~TriggerObjectStandAlone() {}; 00056 00058 void addFilterLabel( const std::string & filterLabel ) { if ( ! hasFilterLabel( filterLabel ) ) filterLabels_.push_back( filterLabel ); }; 00059 void addPathName( const std::string & pathName ) { if ( ! hasPathName( pathName ) ) pathNames_.push_back( pathName ); }; 00060 std::vector< std::string > filterLabels() const { return filterLabels_; }; 00061 std::vector< std::string > pathNames() const { return pathNames_; }; 00062 bool hasFilterLabel( const std::string & filterLabel ) const; 00063 bool hasPathName( const std::string & pathName ) const; 00064 TriggerObject triggerObject(); // returns "pure" pat::TriggerObject w/o add-on 00065 00066 }; 00067 00068 00070 typedef std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection; 00072 typedef edm::Ref< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRef; 00074 typedef edm::RefProd< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefProd; 00076 typedef edm::RefVector< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefVector; 00078 typedef edm::Association< TriggerObjectStandAloneCollection > TriggerObjectStandAloneMatch; 00079 00080 } 00081 00082 00083 #endif