CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFElectronTranslator.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFProducer_PFElectronTranslator_H
2 #define RecoParticleFlow_PFProducer_PFElectronTranslator_H
15 #include <iostream>
16 #include <string>
17 #include <map>
18 
19 
20 
22 {
23  public:
24  explicit PFElectronTranslator(const edm::ParameterSet&);
26 
27  virtual void produce(edm::Event &, const edm::EventSetup&);
28  virtual void beginRun(edm::Run & run,const edm::EventSetup & c);
29 
30  private:
31  // to retrieve the collection from the event
33  const edm::InputTag& tag,
34  const edm::Event& iEvent) const;
35  // to retrieve the collection from the event
37  const edm::InputTag& tag,
38  const edm::Event& iEvent) const ;
39 
40  // makes a basic cluster from PFBlockElement and add it to the collection ; the corrected energy is taken
41  // from the PFCandidate
43  std::vector<const reco::PFCluster *> &,
44  const reco::PFCandidate & coCandidate) const;
45  // makes a preshower cluster from of PFBlockElement and add it to the collection
47  reco::PreshowerClusterCollection& preshowerClusters,
48  unsigned plane) const;
49 
50  // make a super cluster from its ingredients and add it to the collection
52  reco::SuperClusterCollection &superClusters) const;
53 
54  // create the basic cluster Ptr
56 
57  // create the preshower cluster Refs
59 
60  // create the super cluster Refs
62 
63  // The following methods are used to fill the value maps
64  void fillMVAValueMap(edm::Event& iEvent, edm::ValueMap<float>::Filler & filler) const;
65  void fillValueMap(edm::Event& iEvent, edm::ValueMap<float>::Filler & filler) const;
66  void fillSCRefValueMap(edm::Event& iEvent,
68 
70  private:
76  std::string PFMVAValueMap_;
77  std::string PFSCValueMap_;
78  double MVACut_;
79 
80  // The following vectors correspond to a GSF track, but the order is not
81  // the order of the tracks in the GSF track collection
82  std::vector<reco::GsfTrackRef> GsfTrackRef_;
83  // the collection of basic clusters associated to a GSF track
84  std::vector<reco::BasicClusterCollection> basicClusters_;
85  // the correcsponding PFCluster ref
86  std::vector<std::vector<const reco::PFCluster *> > pfClusters_;
87  // the collection of preshower clusters associated to a GSF track
88  std::vector<reco::PreshowerClusterCollection> preshowerClusters_;
89  // the super cluster collection (actually only one) associated to a GSF trck
90  std::vector<reco::SuperClusterCollection> superClusters_;
91  // the references to the basic clusters associated to a GSF track
92  std::vector<reco::CaloClusterPtrVector> basicClusterPtr_;
93  // the references to the basic clusters associated to a GSF track
94  std::vector<reco::CaloClusterPtrVector> preshowerClusterPtr_;
95  // keep track of the index of the PF Candidate
96  std::vector<int> gsfPFCandidateIndex_;
97  // maps to ease the creation of the Value Maps
98  std::map<reco::GsfTrackRef,reco::SuperClusterRef> scMap_;
99  std::map<reco::GsfTrackRef,float> gsfMvaMap_;
100 };
101 #endif
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::string PFPreshowerClusterCollection_
Abstract base class for a PFBlock element (track, cluster...)
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
std::map< reco::GsfTrackRef, float > gsfMvaMap_
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
void fillSCRefValueMap(edm::Event &iEvent, edm::ValueMap< reco::SuperClusterRef >::Filler &filler) const
std::vector< reco::GsfTrackRef > GsfTrackRef_
int iEvent
Definition: GenABIO.cc:243
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
void fillValueMap(edm::Event &iEvent, edm::ValueMap< float >::Filler &filler) const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void fillMVAValueMap(edm::Event &iEvent, edm::ValueMap< float >::Filler &filler) const
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
void createSuperClusterGsfMapRefs(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle)
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< int > gsfPFCandidateIndex_
edm::InputTag inputTagPFCandidates_
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
edm::InputTag inputTagGSFTracks_
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
void fetchGsfCollection(edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
std::string PFBasicClusterCollection_
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster * > &, const reco::PFCandidate &coCandidate) const
std::vector< reco::SuperClusterCollection > superClusters_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
std::vector< reco::BasicClusterCollection > basicClusters_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:34
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
PFElectronTranslator(const edm::ParameterSet &)
std::string PFSuperClusterCollection_
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
virtual void beginRun(edm::Run &run, const edm::EventSetup &c)
Definition: Run.h:31