CMS 3D CMS Logo

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 public:
29  typedef std::pair<uint32_t, EncodedEventId> SimHitIdpr;
30 
31  MuonTruth(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &);
33 
34  void initEvent(const edm::Event &, const edm::EventSetup &);
35 
36  void analyze(const CSCRecHit2D &recHit);
37  void analyze(const CSCStripDigi &stripDigi, int rawDetIdCorrespondingToCSCLayer);
38  void analyze(const CSCWireDigi &wireDigi, int rawDetIdCorrespondingToCSCLayer);
39 
41  float muonFraction();
42 
43  std::vector<PSimHit> muonHits();
44 
45  std::vector<PSimHit> simHits();
46 
48 
49 private:
50  std::vector<PSimHit> hitsFromSimTrack(SimHitIdpr truthId);
51  // goes to SimHits for information
52  int particleType(SimHitIdpr truthId);
53 
54  void addChannel(const LayerLinks &layerLinks, int channel, float weight = 1.);
55 
56  std::map<SimHitIdpr, float> theChargeMap;
58 
59  unsigned int theDetId;
60 
63 
66 
70 
71  std::map<unsigned int, edm::PSimHitContainer> theSimHitMap;
72 
74 };
75 
76 #endif
edm::DetSetVector
Definition: DetSetVector.h:61
MuonTruth::initEvent
void initEvent(const edm::Event &, const edm::EventSetup &)
Definition: MuonTruth.cc:42
MuonTruth::wireLinksTag
edm::InputTag wireLinksTag
Definition: MuonTruth.h:65
MuonTruth::theDetId
unsigned int theDetId
Definition: MuonTruth.h:59
edm::DetSet< StripDigiSimLink >
MuonTruth::hitsFromSimTrack
std::vector< PSimHit > hitsFromSimTrack(SimHitIdpr truthId)
Definition: MuonTruth.cc:130
CSCStripDigi.h
CSCWireDigi.h
CrossingFrame.h
MuonTruth::theDigiSimLinks
const DigiSimLinks * theDigiSimLinks
Definition: MuonTruth.h:61
PSimHitContainer.h
MuonTruth::CSCsimHitsXFTag
edm::InputTag CSCsimHitsXFTag
Definition: MuonTruth.h:69
MuonTruth::linksTag
edm::InputTag linksTag
Definition: MuonTruth.h:64
CSCBadChambers
Definition: CSCBadChambers.h:9
MuonTruth::theSimHitMap
std::map< unsigned int, edm::PSimHitContainer > theSimHitMap
Definition: MuonTruth.h:71
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
MuonTruth::theWireDigiSimLinks
const DigiSimLinks * theWireDigiSimLinks
Definition: MuonTruth.h:62
CSCGeometry
Definition: CSCGeometry.h:24
TrackingRecHit.h
MixCollection.h
MuonTruth::WireDigiSimLinks
edm::DetSetVector< StripDigiSimLink > WireDigiSimLinks
Definition: MuonTruth.h:27
CSCLayerGeometry.h
MuonTruth::simHits
std::vector< PSimHit > simHits()
Definition: MuonTruth.cc:105
MuonTruth::analyze
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:156
MuonTruth::crossingframe
bool crossingframe
Definition: MuonTruth.h:67
edm::ParameterSet
Definition: ParameterSet.h:47
CSCRecHit2D
Definition: CSCRecHit2D.h:18
Event.h
MuonTruth::theTotalCharge
float theTotalCharge
Definition: MuonTruth.h:57
MuonTruth::theChargeMap
std::map< SimHitIdpr, float > theChargeMap
Definition: MuonTruth.h:56
MuonTruth
Definition: MuonTruth.h:24
CSCWireDigi
Definition: CSCWireDigi.h:14
MuonTruth::cscgeom
const CSCGeometry * cscgeom
Definition: MuonTruth.h:73
MuonTruth::addChannel
void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.)
Definition: MuonTruth.cc:206
edm::EventSetup
Definition: EventSetup.h:58
DetSetVector.h
InputTag.h
CSCBadChambersRcd.h
MuonTruth::DigiSimLinks
edm::DetSetVector< StripDigiSimLink > DigiSimLinks
Definition: MuonTruth.h:26
CSCStripDigi
Definition: CSCStripDigi.h:17
EventSetup.h
MuonTruth::particleType
int particleType(SimHitIdpr truthId)
Definition: MuonTruth.cc:147
MuonTruth::cscBadChambers
const CSCBadChambers * cscBadChambers
Definition: MuonTruth.h:47
MuonTruth::muonFraction
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:89
CSCRecHit2D.h
ConsumesCollector.h
MuonTruth::CSCsimHitsTag
edm::InputTag CSCsimHitsTag
Definition: MuonTruth.h:68
ParameterSet.h
MuonTruth::MuonTruth
MuonTruth(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &)
Definition: MuonTruth.cc:8
edm::Event
Definition: Event.h:73
MuonTruth::muonHits
std::vector< PSimHit > muonHits()
Definition: MuonTruth.cc:117
SimTrackContainer.h
edm::InputTag
Definition: InputTag.h:15
MuonTruth::SimHitIdpr
std::pair< uint32_t, EncodedEventId > SimHitIdpr
Definition: MuonTruth.h:29
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
CSCBadChambers.h
weight
Definition: weight.py:1
MuonTruth::LayerLinks
edm::DetSet< StripDigiSimLink > LayerLinks
Definition: MuonTruth.h:28
CSCGeometry.h