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  void analyze(const CSCRecHit2D & recHit);
38  void analyze(const CSCStripDigi & stripDigi, int rawDetIdCorrespondingToCSCLayer);
39  void analyze(const CSCWireDigi & wireDigi , int rawDetIdCorrespondingToCSCLayer);
40 
42  float muonFraction();
43 
44  std::vector<PSimHit> muonHits();
45 
46  std::vector<PSimHit> simHits();
47 
49 
50 private:
51 
52  std::vector<PSimHit> hitsFromSimTrack(SimHitIdpr truthId) ;
53  // goes to SimHits for information
54  int particleType(SimHitIdpr truthId);
55 
56  void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.);
57 
58  std::map<SimHitIdpr, float> theChargeMap;
60 
61  unsigned int theDetId;
62 
65 
68 
72 
73  std::map<unsigned int, edm::PSimHitContainer> theSimHitMap;
74 
76 };
77 
78 #endif
std::map< unsigned int, edm::PSimHitContainer > theSimHitMap
Definition: MuonTruth.h:73
std::pair< uint32_t, EncodedEventId > SimHitIdpr
Definition: MuonTruth.h:30
edm::DetSet< StripDigiSimLink > LayerLinks
Definition: MuonTruth.h:29
edm::InputTag CSCsimHitsTag
Definition: MuonTruth.h:70
edm::InputTag linksTag
Definition: MuonTruth.h:66
int particleType(SimHitIdpr truthId)
Definition: MuonTruth.cc:170
edm::InputTag CSCsimHitsXFTag
Definition: MuonTruth.h:71
edm::InputTag wireLinksTag
Definition: MuonTruth.h:67
const DigiSimLinks * theWireDigiSimLinks
Definition: MuonTruth.h:64
const CSCGeometry * cscgeom
Definition: MuonTruth.h:75
std::map< SimHitIdpr, float > theChargeMap
Definition: MuonTruth.h:58
std::vector< PSimHit > muonHits()
Definition: MuonTruth.cc:130
std::vector< PSimHit > simHits()
Definition: MuonTruth.cc:116
bool crossingframe
Definition: MuonTruth.h:69
const CSCBadChambers * cscBadChambers
Definition: MuonTruth.h:48
unsigned int theDetId
Definition: MuonTruth.h:61
std::vector< PSimHit > hitsFromSimTrack(SimHitIdpr truthId)
Definition: MuonTruth.cc:148
edm::DetSetVector< StripDigiSimLink > WireDigiSimLinks
Definition: MuonTruth.h:28
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:182
float theTotalCharge
Definition: MuonTruth.h:59
MuonTruth(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &)
Definition: MuonTruth.cc:8
edm::DetSetVector< StripDigiSimLink > DigiSimLinks
Definition: MuonTruth.h:27
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:98
const DigiSimLinks * theDigiSimLinks
Definition: MuonTruth.h:63
void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.)
Definition: MuonTruth.cc:240
void initEvent(const edm::Event &, const edm::EventSetup &)
Definition: MuonTruth.cc:43