Skip to content

Commit

Permalink
Merge pull request #6266 from HuguesBrun/codeForMuonPFin73
Browse files Browse the repository at this point in the history
PF cluster isolation for muons + TimeCleaned RecHit producer.
  • Loading branch information
cmsbuild committed Nov 14, 2014
2 parents 4a80e5b + dc29ac0 commit c1df6e1
Show file tree
Hide file tree
Showing 18 changed files with 862 additions and 473 deletions.
@@ -0,0 +1,15 @@
#ifndef RecoCandidates_RecoChargedCandidateIsolationAssociation_h
#define RecoCandidates_RecoChargedCandidateIsolationAssociation_h
// \class RecoChargedCandidateIsolationAssociation
//
// \short association of Isolation to a RecoChargedCandidate
//

#include "DataFormats/Common/interface/AssociationMap.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
#include <vector>

namespace reco {
typedef edm::AssociationMap<edm::OneToValue<std::vector<reco::RecoChargedCandidate>, float > > RecoChargedCandidateIsolationMap;
}
#endif
5 changes: 5 additions & 0 deletions DataFormats/RecoCandidate/src/classes.h
Expand Up @@ -8,6 +8,7 @@
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedRefCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateIsolation.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedRefCandidateFwd.h"
#include "DataFormats/RecoCandidate/interface/RecoStandAloneMuonCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoStandAloneMuonCandidateFwd.h"
Expand Down Expand Up @@ -53,6 +54,10 @@ namespace DataFormats_RecoCandidate {
edm::RefProd<reco::RecoChargedRefCandidateCollection> rpr1;
edm::RefVector<reco::RecoChargedRefCandidateCollection> rvr1;

reco::RecoChargedCandidateIsolationMap vrm3;
edm::Wrapper<reco::RecoChargedCandidateIsolationMap> wrm3;
edm::helpers::Key<edm::RefProd<reco::RecoChargedCandidateCollection > > hrm3;

reco::RecoEcalCandidateCollection v2;
edm::Wrapper<reco::RecoEcalCandidateCollection> w2;
edm::Ref<reco::RecoEcalCandidateCollection> r2;
Expand Down
6 changes: 6 additions & 0 deletions DataFormats/RecoCandidate/src/classes_def.xml
Expand Up @@ -46,6 +46,12 @@
<class name="edm::RefProd<std::vector<reco::RecoChargedRefCandidate> >"/>
<class name="edm::RefVector<std::vector<reco::RecoChargedRefCandidate>,reco::RecoChargedRefCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::RecoChargedRefCandidate>,reco::RecoChargedRefCandidate> >"/>

<class name="edm::AssociationMap<edm::OneToValue<std::vector<reco::RecoChargedCandidate>, float, unsigned int> >">
<field name="transientMap_" transient="true" />
</class>
<class name="edm::Wrapper<edm::AssociationMap<edm::OneToValue<std::vector<reco::RecoChargedCandidate>, float, unsigned int> > >" />
<class name="edm::helpers::Key<edm::RefProd<std::vector<reco::RecoChargedCandidate> > >" />

<class name="std::vector<reco::RecoEcalCandidate>"/>
<class name="edm::Wrapper<std::vector<reco::RecoEcalCandidate> >"/>
<class name="edm::Ref<std::vector<reco::RecoEcalCandidate>,reco::RecoEcalCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::RecoEcalCandidate>,reco::RecoEcalCandidate> >"/>
Expand Down
55 changes: 0 additions & 55 deletions HLTrigger/Egamma/interface/HLTEgammaGenericFilter.h

This file was deleted.

75 changes: 75 additions & 0 deletions HLTrigger/Egamma/interface/HLTGenericFilter.h
@@ -0,0 +1,75 @@
#ifndef HLTGenericFilter_h
#define HLTGenericFilter_h

/** \class HLTGenericFilter
*
* \author Roberto Covarelli (CERN)
*
*/

#include "HLTrigger/HLTcore/interface/HLTFilter.h"

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateIsolation.h"

#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateIsolation.h"

#include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"

namespace edm {
class ConfigurationDescriptions;
}

//
// class declaration
//

template<typename T1>
class HLTGenericFilter : public HLTFilter {

typedef std::vector<T1> T1Collection;
typedef edm::Ref<T1Collection> T1Ref;
typedef edm::AssociationMap<edm::OneToValue<std::vector<T1>, float > > T1IsolationMap;

public:
explicit HLTGenericFilter(const edm::ParameterSet&);
~HLTGenericFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:

float getEnergy(T1Ref) const;
float getEt(T1Ref) const;

edm::InputTag candTag_; // input tag identifying product that contains filtered photons
edm::InputTag isoTag_; // input tag identifying product that contains isolated map
edm::InputTag nonIsoTag_; // input tag identifying product that contains non-isolated map
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> candToken_;
edm::EDGetTokenT<T1IsolationMap> isoToken_;
edm::EDGetTokenT<T1IsolationMap> nonIsoToken_;
bool lessThan_; // the cut is "<" or ">" ?
bool useEt_; // use E or Et in relative isolation cuts
double thrRegularEB_; // threshold for regular cut (x < thr) - ECAL barrel
double thrRegularEE_; // threshold for regular cut (x < thr) - ECAL endcap
double thrOverEEB_; // threshold for x/E < thr cut (isolations) - ECAL barrel
double thrOverEEE_; // threshold for x/E < thr cut (isolations) - ECAL endcap
double thrOverE2EB_; // threshold for x/E^2 < thr cut (isolations) - ECAL barrel
double thrOverE2EE_; // threshold for x/E^2 < thr cut (isolations) - ECAL endcap
int ncandcut_; // number of photons required
bool doIsolated_;

edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
};

#endif //HLTGenericFilter_h


161 changes: 0 additions & 161 deletions HLTrigger/Egamma/src/HLTEgammaGenericFilter.cc

This file was deleted.

0 comments on commit c1df6e1

Please sign in to comment.