CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFPhotonTranslator.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFProducer_PFPhotonTranslator_H
2 #define RecoParticleFlow_PFProducer_PFPhotonTranslator_H
19 //#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
21 
24 
28 
43 
44 #include <iostream>
45 #include <string>
46 #include <map>
47 #include <vector>
48 
53 
54 #include <Math/VectorUtil.h>
55 #include "TLorentzVector.h"
56 #include "TMath.h"
57 
58 
59 
60 
61 
63 {
64  public:
65  explicit PFPhotonTranslator(const edm::ParameterSet&);
67 
68  virtual void produce(edm::Event &, const edm::EventSetup&);
69  virtual void beginRun(edm::Run & run,const edm::EventSetup & c);
70  //virtual void endRun (edm::Run& run, const edm::EventSetup & c);
71 
72  typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsolationValueMaps;
73 
74  private:
75  // to retrieve the collection from the event
77  const edm::InputTag& tag,
78  const edm::Event& iEvent) const;
79 
80 
81  // makes a basic cluster from PFBlockElement and add it to the collection ; the corrected energy is taken
82  // from the PFCandidate
84  std::vector<const reco::PFCluster *> &,
85  const reco::PFCandidate & coCandidate) const;
86  // makes a preshower cluster from of PFBlockElement and add it to the collection
88  reco::PreshowerClusterCollection& preshowerClusters,
89  unsigned plane) const;
90 
91  // create the basic cluster Ptr
93 
94  // create the preshower cluster Refs
96 
97  // make a super cluster from its ingredients and add it to the collection
99  reco::SuperClusterCollection &superClusters) const;
100 
101  //create photon cores
103 
104  //create photons
105  void createPhotons(reco::VertexCollection &vertexCollection, const edm::OrphanHandle<reco::PhotonCoreCollection> & superClustersHandle, const CaloTopology* topology, const EcalRecHitCollection * barrelRecHits, const EcalRecHitCollection * endcapRecHits, const edm::Handle<CaloTowerCollection> & hcalTowersHandle, const IsolationValueMaps& isolationValues, reco::PhotonCollection &photons) ;
106 
107 
109 
110 
112  std::vector<edm::InputTag> inputTagIsoVals_;
117  std::string PFPhotonCollection_;
118  std::string vertexProducer_;
123 
124  // the collection of basic clusters associated to a photon
125  std::vector<reco::BasicClusterCollection> basicClusters_;
126  // the correcsponding PFCluster ref
127  std::vector<std::vector<const reco::PFCluster *> > pfClusters_;
128  // the collection of preshower clusters associated to a photon
129  std::vector<reco::PreshowerClusterCollection> preshowerClusters_;
130  // the super cluster collection (actually only one) associated to a photon
131  std::vector<reco::SuperClusterCollection> superClusters_;
132  // the references to the basic clusters associated to a photon
133  std::vector<reco::CaloClusterPtrVector> basicClusterPtr_;
134  // the references to the basic clusters associated to a photon
135  std::vector<reco::CaloClusterPtrVector> preshowerClusterPtr_;
136  // keep track of the index of the PF Candidate
137  std::vector<int> photPFCandidateIndex_;
138  // the list of candidatePtr
139  std::vector<reco::CandidatePtr> CandidatePtr_;
140  // the e/g SC associated
141  std::vector<reco::SuperClusterRef> egSCRef_;
142 
145 
147 
148 };
149 #endif
Abstract base class for a PFBlock element (track, cluster...)
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
std::string PFPhotonCoreCollection_
edm::ESHandle< CaloTopology > theCaloTopo_
void createPhotons(reco::VertexCollection &vertexCollection, const edm::OrphanHandle< reco::PhotonCoreCollection > &superClustersHandle, const CaloTopology *topology, const EcalRecHitCollection *barrelRecHits, const EcalRecHitCollection *endcapRecHits, const edm::Handle< CaloTowerCollection > &hcalTowersHandle, const IsolationValueMaps &isolationValues, reco::PhotonCollection &photons)
edm::InputTag hcalTowers_
edm::InputTag endcapEcalHits_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::string PFPhotonCollection_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
tuple vertexCollection
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster * > &, const reco::PFCandidate &coCandidate) const
std::vector< edm::InputTag > inputTagIsoVals_
std::vector< reco::SuperClusterRef > egSCRef_
std::vector< reco::SuperClusterCollection > superClusters_
int iEvent
Definition: GenABIO.cc:243
std::string PFBasicClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
PFPhotonTranslator(const edm::ParameterSet &)
std::string PFSuperClusterCollection_
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
edm::ESHandle< CaloGeometry > theCaloGeom_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
edm::InputTag barrelEcalHits_
std::string PFPreshowerClusterCollection_
std::vector< int > photPFCandidateIndex_
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::InputTag inputTagPFCandidates_
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< reco::BasicClusterCollection > basicClusters_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
Definition: PhotonCoreFwd.h:9
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:33
virtual void beginRun(edm::Run &run, const edm::EventSetup &c)
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::PhotonCoreCollection &photonCores)
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::CandidatePtr > CandidatePtr_
Definition: Run.h:32