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 
45 
46 #include <iostream>
47 #include <string>
48 #include <map>
49 #include <vector>
50 
55 
56 #include <Math/VectorUtil.h>
57 #include "TLorentzVector.h"
58 #include "TMath.h"
59 
61 {
62  public:
63  explicit PFPhotonTranslator(const edm::ParameterSet&);
65 
66  virtual void produce(edm::Event &, const edm::EventSetup&) override;
67 
68  typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsolationValueMaps;
69 
70  private:
71  // to retrieve the collection from the event
73  const edm::InputTag& tag,
74  const edm::Event& iEvent) const;
75 
76 
77  // makes a basic cluster from PFBlockElement and add it to the collection ; the corrected energy is taken
78  // from the PFCandidate
80  std::vector<const reco::PFCluster *> &,
81  const reco::PFCandidate & coCandidate) const;
82  // makes a preshower cluster from of PFBlockElement and add it to the collection
84  reco::PreshowerClusterCollection& preshowerClusters,
85  unsigned plane) const;
86 
87  // create the basic cluster Ptr
89 
90  // create the preshower cluster Refs
92 
93  // make a super cluster from its ingredients and add it to the collection
95  reco::SuperClusterCollection &superClusters) const;
96 
98 
99  //create photon cores
100  void createPhotonCores(const edm::OrphanHandle<reco::SuperClusterCollection> & superClustersHandle, const edm::OrphanHandle<reco::ConversionCollection> & oneLegConversionHandle, reco::PhotonCoreCollection &photonCores) ;
101 
102  //create photons
103  //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) ;
105 
107 
109  std::vector<edm::InputTag> inputTagIsoVals_;
122 
123  // the collection of basic clusters associated to a photon
124  std::vector<reco::BasicClusterCollection> basicClusters_;
125  // the correcsponding PFCluster ref
126  std::vector<std::vector<const reco::PFCluster *> > pfClusters_;
127  // the collection of preshower clusters associated to a photon
128  std::vector<reco::PreshowerClusterCollection> preshowerClusters_;
129  // the super cluster collection (actually only one) associated to a photon
130  std::vector<reco::SuperClusterCollection> superClusters_;
131  // the references to the basic clusters associated to a photon
132  std::vector<reco::CaloClusterPtrVector> basicClusterPtr_;
133  // the references to the basic clusters associated to a photon
134  std::vector<reco::CaloClusterPtrVector> preshowerClusterPtr_;
135  // keep track of the index of the PF Candidate
136  std::vector<int> photPFCandidateIndex_;
137  // the list of candidatePtr
138  std::vector<reco::CandidatePtr> CandidatePtr_;
139  // the e/g SC associated
140  std::vector<reco::SuperClusterRef> egSCRef_;
141  // the e/g photon associated
142  std::vector<reco::PhotonRef> egPhotonRef_;
143  // the PF MVA and regression
144  std::vector<float> pfPhotonMva_;
145  std::vector<float> energyRegression_;
146  std::vector<float> energyRegressionError_;
147 
148  //Vector of vector of Conversions Refs
149  std::vector<reco::ConversionRefVector > pfConv_;
150  std::vector< std::vector<reco::TrackRef> > pfSingleLegConv_;
151  std::vector< std::vector<float> > pfSingleLegConvMva_;
152  //std::vector<reco::TrackRef> * pfSingleLegConv_;
153 
154  std::vector<int> conv1legPFCandidateIndex_;
155  std::vector<int> conv2legPFCandidateIndex_;
156 
159 
161 
162 };
163 
165 
166 #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_
std::vector< reco::ConversionRefVector > pfConv_
std::vector< float > pfPhotonMva_
edm::ESHandle< CaloTopology > theCaloTopo_
std::string PFConversionCollection_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
edm::InputTag hcalTowers_
edm::InputTag endcapEcalHits_
std::vector< int > conv2legPFCandidateIndex_
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< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
std::vector< edm::InputTag > inputTagIsoVals_
std::vector< reco::PhotonRef > egPhotonRef_
std::vector< reco::SuperClusterRef > egSCRef_
std::vector< std::vector< reco::TrackRef > > pfSingleLegConv_
std::vector< reco::SuperClusterCollection > superClusters_
int iEvent
Definition: GenABIO.cc:230
std::string PFBasicClusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
PFPhotonTranslator(const edm::ParameterSet &)
std::string PFSuperClusterCollection_
std::vector< std::vector< float > > pfSingleLegConvMva_
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
edm::ESHandle< CaloGeometry > theCaloGeom_
void createPhotonCores(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, const edm::OrphanHandle< reco::ConversionCollection > &oneLegConversionHandle, reco::PhotonCoreCollection &photonCores)
std::vector< int > conv1legPFCandidateIndex_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
virtual void produce(edm::Event &, const edm::EventSetup &) override
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< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
void createPhotons(reco::VertexCollection &vertexCollection, edm::Handle< reco::PhotonCollection > &egPhotons, const edm::OrphanHandle< reco::PhotonCoreCollection > &photonCoresHandle, const IsolationValueMaps &isolationValues, reco::PhotonCollection &photons)
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
void createOneLegConversions(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::ConversionCollection &oneLegConversions)
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
Definition: PhotonCoreFwd.h:9
std::vector< float > energyRegression_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::CandidatePtr > CandidatePtr_
std::string EGPhotonCollection_
std::vector< float > energyRegressionError_