CMS 3D CMS Logo

CaloSimInfoExtra.h
Go to the documentation of this file.
1 #ifndef CalibrationIsolatedParticlesCaloSimInfoExtra_h
2 #define CalibrationIsolatedParticlesCaloSimInfoExtra_h
3 
4 // system include files
5 #include <memory>
6 #include <map>
7 #include <vector>
8 #include <string>
9 
10 // user include files
12 
14 
20 
26 
32 
33 namespace spr{
34 
35  struct energyMap {
37  int pdgId;
38  std::vector<std::pair<DetId,double> > matched;
39  std::vector<std::pair<DetId,double> > gamma;
40  std::vector<std::pair<DetId,double> > charged;
41  std::vector<std::pair<DetId,double> > neutral;
42  std::vector<std::pair<DetId,double> > rest;
43  std::vector<std::pair<DetId,double> > all;
44  };
45 
46  // takes the EcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc.
47  template< typename T>
48  std::map<std::string,double> eECALSimInfo(const edm::Event&, CaloNavigator<DetId>& navigator, const CaloGeometry* geo, edm::Handle<T>& hits, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, double timeCut=150, bool debug=false);
49 
50  template< typename T>
51  std::map<std::string,double> eECALSimInfoTotal(const edm::Event&, const DetId& det, const CaloGeometry* geo, const CaloTopology* caloTopology, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, int itry=-1, double timeCut=150, bool debug=false);
52 
53  template< typename T>
54  energyMap eECALSimInfoMatrix(const edm::Event&, const DetId& det, const CaloGeometry* geo, const CaloTopology* caloTopology, edm::Handle<T>& hitsEB, edm::Handle<T>& hitsEE, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, double timeCut=150, bool debug=false);
55 
56  // takes the HcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc.
57  template <typename T>
58  std::map<std::string,double> eHCALSimInfoTotal(const edm::Event&, const HcalTopology* topology, const DetId& det, const CaloGeometry* geo, edm::Handle<T>& hits,edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, int itry=-1, double timeCut=150, bool includeHO=false, bool debug=false);
59 
60  template <typename T>
61  energyMap eHCALSimInfoMatrix(const edm::Event&, const HcalTopology* topology, const DetId& det, const CaloGeometry* geo, edm::Handle<T>& hits,edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, double timeCut=150, bool includeHO=false, bool debug=false);
62 
63  // Actual function which does the matching of SimHits to SimTracks using geantTrackId
64  template <typename T>
65  energyMap caloSimInfoMatrix(const CaloGeometry* geo, edm::Handle<T>& hits, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, std::vector< typename T::const_iterator> hit, edm::SimTrackContainer::const_iterator trkInfo, double timeCut=150, bool includeHO=false, bool debug=false);
66 
67  // Functions to study the Hits for which history cannot be traced back
68  template <typename T>
69  std::vector<typename T::const_iterator> missedECALHits(const edm::Event&, CaloNavigator<DetId>& navigator, edm::Handle<T>& hits, edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, bool flag, bool debug=false);
70 
71  template <typename T>
72  std::vector<typename T::const_iterator> missedHCALHits(const edm::Event&, const HcalTopology* topology, const DetId& det, edm::Handle<T>& hits,edm::Handle<edm::SimTrackContainer>& SimTk, edm::Handle<edm::SimVertexContainer>& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, bool flag, bool includeHO=false, bool debug=false);
73 
74  template <typename T>
75  std::vector<typename T::const_iterator> missedCaloHits(edm::Handle<T>& hits, std::vector<int> matchedId, std::vector< typename T::const_iterator> caloHits, bool flag, bool includeHO=false, bool debug=false);
76 }
77 
78 #include "Calibration/IsolatedParticles/interface/CaloSimInfoExtra.icc"
79 #endif
Handle.h
spr
Definition: CaloConstants.h:6
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HLT_FULL_cff.navigator
navigator
Definition: HLT_FULL_cff.py:13108
HcalTopology
Definition: HcalTopology.h:26
spr::eHCALSimInfoTotal
std::map< std::string, double > eHCALSimInfoTotal(const edm::Event &, const HcalTopology *topology, const DetId &det, const CaloGeometry *geo, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, int itry=-1, double timeCut=150, bool includeHO=false, bool debug=false)
spr::energyMap::matched
std::vector< std::pair< DetId, double > > matched
Definition: CaloSimInfoExtra.h:38
spr::energyMap::all
std::vector< std::pair< DetId, double > > all
Definition: CaloSimInfoExtra.h:43
TrackerHitAssociator.h
spr::energyMap::charged
std::vector< std::pair< DetId, double > > charged
Definition: CaloSimInfoExtra.h:40
edm::Handle
Definition: AssociativeIterator.h:50
CaloTopology
Definition: CaloTopology.h:19
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
CaloGeometry
Definition: CaloGeometry.h:21
debug
#define debug
Definition: HDRShower.cc:19
Track.h
TrackFwd.h
spr::missedCaloHits
std::vector< typename T::const_iterator > missedCaloHits(edm::Handle< T > &hits, std::vector< int > matchedId, std::vector< typename T::const_iterator > caloHits, bool flag, bool includeHO=false, bool debug=false)
SimVertex.h
spr::caloSimInfoMatrix
energyMap caloSimInfoMatrix(const CaloGeometry *geo, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, std::vector< typename T::const_iterator > hit, edm::SimTrackContainer::const_iterator trkInfo, double timeCut=150, bool includeHO=false, bool debug=false)
reco::Track
Definition: Track.h:27
spr::missedHCALHits
std::vector< typename T::const_iterator > missedHCALHits(const edm::Event &, const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, bool flag, bool includeHO=false, bool debug=false)
spr::eHCALSimInfoMatrix
energyMap eHCALSimInfoMatrix(const edm::Event &, const HcalTopology *topology, const DetId &det, const CaloGeometry *geo, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, double timeCut=150, bool includeHO=false, bool debug=false)
spr::eECALSimInfoMatrix
energyMap eECALSimInfoMatrix(const edm::Event &, const DetId &det, const CaloGeometry *geo, const CaloTopology *caloTopology, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, double timeCut=150, bool debug=false)
spr::energyMap::pdgId
int pdgId
Definition: CaloSimInfoExtra.h:37
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
Event.h
spr::eECALSimInfo
void eECALSimInfo(const edm::Event &, const DetId &det, const CaloGeometry *geo, const CaloTopology *caloTopology, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, caloSimInfo &info, double timeCut=150, bool debug=false)
spr::missedECALHits
std::vector< typename T::const_iterator > missedECALHits(const edm::Event &, CaloNavigator< DetId > &navigator, edm::Handle< T > &hits, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, bool flag, bool debug=false)
spr::energyMap::energyMap
energyMap()
Definition: CaloSimInfoExtra.h:36
CaloTowerNavigator.h
spr::eECALSimInfoTotal
std::map< std::string, double > eECALSimInfoTotal(const edm::Event &, const DetId &det, const CaloGeometry *geo, const CaloTopology *caloTopology, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const reco::Track *pTrack, TrackerHitAssociator &associate, int ieta, int iphi, int itry=-1, double timeCut=150, bool debug=false)
CaloTopology.h
TrackerHitAssociator
Definition: TrackerHitAssociator.h:55
spr::energyMap::rest
std::vector< std::pair< DetId, double > > rest
Definition: CaloSimInfoExtra.h:42
HcalTopology.h
CaloSimInfo.h
CaloNavigator
Definition: CaloNavigator.h:7
DetId.h
Frameworkfwd.h
spr::energyMap
Definition: CaloSimInfoExtra.h:35
CaloGeometry.h
spr::energyMap::gamma
std::vector< std::pair< DetId, double > > gamma
Definition: CaloSimInfoExtra.h:39
Candidate.h
SimTrack.h
spr::energyMap::neutral
std::vector< std::pair< DetId, double > > neutral
Definition: CaloSimInfoExtra.h:41
edm::Event
Definition: Event.h:73
SimTrackContainer.h
SimVertexContainer.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117