CMS 3D CMS Logo

PFCandWithSuperClusterExtractor.h
Go to the documentation of this file.
1 #ifndef CommonToolsParticleFlow_PDCandWithSuperCluster_H
2 #define CommonToolsParticleFlow_PDCandWithSuperCluster_H
3 
4 #include <string>
5 #include <vector>
6 
8 
19 
21 public:
24 
26 
27  void fillVetos(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &cand) override {}
28 
30  const edm::EventSetup &evSetup,
31  const reco::Track &muon) const override {
32  return depositFromObject(ev, evSetup, muon);
33  }
34 
36  const edm::EventSetup &evSetup,
37  const reco::Candidate &cand) const override {
38  const reco::Photon *myPhoton = dynamic_cast<const reco::Photon *>(&cand);
39  if (myPhoton)
40  return depositFromObject(ev, evSetup, *myPhoton);
41 
42  const reco::GsfElectron *myElectron = dynamic_cast<const reco::GsfElectron *>(&cand);
43  if (myElectron)
44  return depositFromObject(ev, evSetup, *myElectron);
45 
46  const reco::PFCandidate *myPFCand = dynamic_cast<const reco::PFCandidate *>(&cand);
47  return depositFromObject(ev, evSetup, *myPFCand);
48  }
49 
50 private:
52 
54  const edm::EventSetup &evSetup,
55  const reco::Photon &cand) const;
56 
58  const edm::EventSetup &evSetup,
59  const reco::GsfElectron &cand) const;
60 
62  const edm::EventSetup &evSetup,
63  const reco::Track &cand) const;
64 
66  const edm::EventSetup &evSetup,
67  const reco::PFCandidate &cand) const;
68 
69  // Parameter set
71  std::string theDepositLabel; // name for deposit
72  bool theVetoSuperClusterMatch; //SuperClusterRef Check
73  bool theMissHitVetoSuperClusterMatch; // veto PF photons sharing SC with supercluster if misshits >0
74  double theDiff_r; // transverse distance to vertex
75  double theDiff_z; // z distance to vertex
76  double theDR_Max; // Maximum cone angle for deposits
77  double theDR_Veto; // Veto cone angle
78 };
79 
80 #endif
edm::EDGetTokenT< reco::PFCandidateCollection > thePFCandToken
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
void fillVetos(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &cand) override
reco::IsoDeposit depositFromObject(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Photon &cand) const
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &muon) const override
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &cand) const override
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
reco::IsoDeposit::Veto veto(const reco::IsoDeposit::Direction &dir) const