CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonTruth.h
Go to the documentation of this file.
1 #ifndef MCTruth_MuonTruth_h
2 #define MCTruth_MuonTruth_h
3 
23 
24 class MuonTruth
25 {
26 public:
30  typedef std::pair <uint32_t, EncodedEventId> SimHitIdpr;
31 
32  MuonTruth(const edm::Event&, const edm::EventSetup&, const edm::ParameterSet&);
34 
35  void initEvent(const edm::Event &, const edm::EventSetup& );
36 
37  std::vector<SimHitIdpr> associateHitId(const TrackingRecHit &);
38  std::vector<SimHitIdpr> associateCSCHitId(const CSCRecHit2D *);
39 
40  void analyze(const CSCRecHit2D & recHit);
41  void analyze(const CSCStripDigi & stripDigi, int rawDetIdCorrespondingToCSCLayer);
42  void analyze(const CSCWireDigi & wireDigi , int rawDetIdCorrespondingToCSCLayer);
43 
45  float muonFraction();
46 
47  std::vector<PSimHit> muonHits();
48 
49  std::vector<PSimHit> simHits();
50 
52 
53 private:
54 
55  std::vector<PSimHit> hitsFromSimTrack(SimHitIdpr truthId);
56  // goes to SimHits for information
57  int particleType(SimHitIdpr truthId);
58 
59  void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.);
60 
61  std::map<SimHitIdpr, float> theChargeMap;
63 
64  unsigned int theDetId;
65 
68 
71 
75 
76  std::map<unsigned int, edm::PSimHitContainer> theSimHitMap;
77 
79 };
80 
81 #endif
std::map< unsigned int, edm::PSimHitContainer > theSimHitMap
Definition: MuonTruth.h:76
std::pair< uint32_t, EncodedEventId > SimHitIdpr
Definition: MuonTruth.h:30
edm::DetSet< StripDigiSimLink > LayerLinks
Definition: MuonTruth.h:29
edm::InputTag CSCsimHitsTag
Definition: MuonTruth.h:73
edm::InputTag linksTag
Definition: MuonTruth.h:69
int particleType(SimHitIdpr truthId)
Definition: MuonTruth.cc:245
edm::InputTag CSCsimHitsXFTag
Definition: MuonTruth.h:74
edm::InputTag wireLinksTag
Definition: MuonTruth.h:70
const DigiSimLinks * theWireDigiSimLinks
Definition: MuonTruth.h:67
const CSCGeometry * cscgeom
Definition: MuonTruth.h:78
std::map< SimHitIdpr, float > theChargeMap
Definition: MuonTruth.h:61
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &)
Definition: MuonTruth.cc:180
std::vector< PSimHit > muonHits()
Definition: MuonTruth.cc:130
std::vector< PSimHit > simHits()
Definition: MuonTruth.cc:116
bool crossingframe
Definition: MuonTruth.h:72
const CSCBadChambers * cscBadChambers
Definition: MuonTruth.h:51
unsigned int theDetId
Definition: MuonTruth.h:64
std::vector< PSimHit > hitsFromSimTrack(SimHitIdpr truthId)
Definition: MuonTruth.cc:221
std::vector< SimHitIdpr > associateCSCHitId(const CSCRecHit2D *)
Definition: MuonTruth.cc:147
edm::DetSetVector< StripDigiSimLink > WireDigiSimLinks
Definition: MuonTruth.h:28
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:257
float theTotalCharge
Definition: MuonTruth.h:62
MuonTruth(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &)
Definition: MuonTruth.cc:8
edm::DetSetVector< StripDigiSimLink > DigiSimLinks
Definition: MuonTruth.h:27
int weight
Definition: histoStyle.py:50
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:98
const DigiSimLinks * theDigiSimLinks
Definition: MuonTruth.h:66
void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.)
Definition: MuonTruth.cc:315
void initEvent(const edm::Event &, const edm::EventSetup &)
Definition: MuonTruth.cc:43