-
Notifications
You must be signed in to change notification settings - Fork 4.4k
/
Copy pathPFClusterToRefCandidate.h
32 lines (27 loc) · 1.21 KB
/
PFClusterToRefCandidate.h
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
#ifndef RecoAlgos_PFClusterToRefCandidate_h
#define RecoAlgos_PFClusterToRefCandidate_h
#include "CommonTools/RecoAlgos/interface/MassiveCandidateConverter.h"
#include "CommonTools/RecoAlgos/interface/CandidateProducer.h"
#include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
#include "DataFormats/ParticleFlowReco/interface/RecoPFClusterRefCandidate.h"
#include "DataFormats/ParticleFlowReco/interface/RecoPFClusterRefCandidateFwd.h"
#include "DataFormats/Candidate/interface/CandidateFwd.h"
namespace converter {
struct PFClusterToRefCandidate : public MassiveCandidateConverter {
typedef reco::PFCluster value_type;
typedef reco::PFClusterCollection Components;
typedef reco::RecoPFClusterRefCandidate Candidate;
PFClusterToRefCandidate(const edm::ParameterSet& cfg, edm::ConsumesCollector iC)
: MassiveCandidateConverter(cfg, iC) {}
void convert(reco::PFClusterRef pfclusterRef, reco::RecoPFClusterRefCandidate& c) const {
c = reco::RecoPFClusterRefCandidate(pfclusterRef, sqrt(massSqr_));
}
};
namespace helper {
template <>
struct CandConverter<reco::PFCluster> {
typedef PFClusterToRefCandidate type;
};
} // namespace helper
} // namespace converter
#endif