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&);
67  virtual void beginRun(edm::Run & run,const edm::EventSetup & c);
68  //virtual void endRun (edm::Run& run, const edm::EventSetup & c);
69 
70  typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsolationValueMaps;
71 
72  private:
73  // to retrieve the collection from the event
75  const edm::InputTag& tag,
76  const edm::Event& iEvent) const;
77 
78 
79  // makes a basic cluster from PFBlockElement and add it to the collection ; the corrected energy is taken
80  // from the PFCandidate
82  std::vector<const reco::PFCluster *> &,
83  const reco::PFCandidate & coCandidate) const;
84  // makes a preshower cluster from of PFBlockElement and add it to the collection
86  reco::PreshowerClusterCollection& preshowerClusters,
87  unsigned plane) const;
88 
89  // create the basic cluster Ptr
91 
92  // create the preshower cluster Refs
94 
95  // make a super cluster from its ingredients and add it to the collection
97  reco::SuperClusterCollection &superClusters) const;
98 
100 
101  //create photon cores
102  void createPhotonCores(const edm::OrphanHandle<reco::SuperClusterCollection> & superClustersHandle, const edm::OrphanHandle<reco::ConversionCollection> & oneLegConversionHandle, reco::PhotonCoreCollection &photonCores) ;
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) ;
107 
109 
111  std::vector<edm::InputTag> inputTagIsoVals_;
116  std::string PFPhotonCollection_;
118  std::string EGPhotonCollection_;
119  std::string vertexProducer_;
124 
125  // the collection of basic clusters associated to a photon
126  std::vector<reco::BasicClusterCollection> basicClusters_;
127  // the correcsponding PFCluster ref
128  std::vector<std::vector<const reco::PFCluster *> > pfClusters_;
129  // the collection of preshower clusters associated to a photon
130  std::vector<reco::PreshowerClusterCollection> preshowerClusters_;
131  // the super cluster collection (actually only one) associated to a photon
132  std::vector<reco::SuperClusterCollection> superClusters_;
133  // the references to the basic clusters associated to a photon
134  std::vector<reco::CaloClusterPtrVector> basicClusterPtr_;
135  // the references to the basic clusters associated to a photon
136  std::vector<reco::CaloClusterPtrVector> preshowerClusterPtr_;
137  // keep track of the index of the PF Candidate
138  std::vector<int> photPFCandidateIndex_;
139  // the list of candidatePtr
140  std::vector<reco::CandidatePtr> CandidatePtr_;
141  // the e/g SC associated
142  std::vector<reco::SuperClusterRef> egSCRef_;
143  // the e/g photon associated
144  std::vector<reco::PhotonRef> egPhotonRef_;
145  // the PF MVA and regression
146  std::vector<float> pfPhotonMva_;
147  std::vector<float> energyRegression_;
148  std::vector<float> energyRegressionError_;
149 
150  //Vector of vector of Conversions Refs
151  std::vector<reco::ConversionRefVector > pfConv_;
152  std::vector< std::vector<reco::TrackRef> > pfSingleLegConv_;
153  std::vector< std::vector<float> > pfSingleLegConvMva_;
154  //std::vector<reco::TrackRef> * pfSingleLegConv_;
155 
156  std::vector<int> conv1legPFCandidateIndex_;
157  std::vector<int> conv2legPFCandidateIndex_;
158 
161 
163 
164 };
165 #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_
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:243
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
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_
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
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
void createOneLegConversions(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle, reco::ConversionCollection &oneLegConversions)
virtual void produce(edm::Event &, const edm::EventSetup &)
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:33
virtual void beginRun(edm::Run &run, const edm::EventSetup &c)
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::CandidatePtr > CandidatePtr_
std::string EGPhotonCollection_
std::vector< float > energyRegressionError_
Definition: Run.h:33