Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#ifndef JetReco_JetFloatAssociation_h
#define JetReco_JetFloatAssociation_h

/** \class JetFloatAssociation
 *
 * \short Association between jets and float value
 *
 * \author Giovanni Petrucciani, Fedor Ratnikov, June 12, 2007
 *
 ************************************************************/

#include "DataFormats/Common/interface/AssociationVector.h"
#include "DataFormats/JetReco/interface/JetCollection.h"
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/Common/interface/RefToBase.h"
#include "DataFormats/Common/interface/RefVector.h"

namespace fwlite {
  class Event;
}

namespace reco {
  namespace JetFloatAssociation {
    typedef float Value;
    typedef std::vector<Value> Values;
    typedef edm::AssociationVector<reco::JetRefBaseProd, Values> Container;
    typedef Container::value_type value_type;
    typedef Container::transient_vector_type transient_vector_type;
    typedef edm::Ref<Container> Ref;
    typedef edm::RefProd<Container> RefProd;
    typedef edm::RefVector<Container> RefVector;

    /// get value for the association. Throw exception if no association found
    float getValue(const Container&, const reco::JetBaseRef&);
    /// get value for the association. Throw exception if no association found
    float getValue(const Container&, const reco::Jet&);
    /// associate jet with value
    bool setValue(Container&, const reco::JetBaseRef&, float);
    /// associate jet with value
    bool setValue(Container*, const reco::JetBaseRef&, float);
    /// fill list of all jets associated with values. Return # of jets in the list
    std::vector<reco::JetBaseRef> allJets(const Container&);
    /// check if jet is associated
    bool hasJet(const Container&, const reco::JetBaseRef&);
    /// check if jet is associated
    bool hasJet(const Container&, const reco::Jet&);
  }  // namespace JetFloatAssociation
}  // namespace reco

#endif