CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCSimHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_MuonHits_CSCSimHitMatcher_h
2 #define Validation_MuonHits_CSCSimHitMatcher_h
3 
15 
17 public:
18  // constructor
20 
21  // destructor
23 
24  // initialize the event
25  void init(const edm::Event& e, const edm::EventSetup& eventSetup);
26 
27  // do the matching
28  void match(const SimTrack& t, const SimVertex& v);
29 
30  // partitions' detIds with SimHits
31  std::set<unsigned int> detIds(int type = MuonHitHelper::CSC_ALL) const;
32 
33  // chamber detIds with SimHits
34  std::set<unsigned int> chamberIds(int type = MuonHitHelper::CSC_ALL) const;
35 
36  // CSC station detIds with SimHits
37  std::set<unsigned int> chamberIdsStation(int station) const;
38 
39  // was there a hit in a particular CSC station?
40  bool hitStation(int, int) const;
41 
42  // number of stations with hits in at least X layers
43  int nStations(int nl = 4) const;
44 
45  // #layers with hits
46  int nLayersWithHitsInChamber(unsigned int) const;
47 
48  // How many CSC chambers with minimum number of layer with simhits did this
49  // simtrack get?
50  int nCoincidenceChambers(int min_n_layers = 4) const;
51 
52  // calculated the fitted position in a given layer for CSC simhits in a
53  // chamber
54  GlobalPoint simHitPositionKeyLayer(unsigned int chamberid) const;
55 
56  // local bending in a CSC chamber
57  float LocalBendingInChamber(unsigned int detid) const;
58  void fitHitsInChamber(unsigned int detid, float& mean, float& slope) const;
59 
60  // calculate average strip number for a provided collection of simhits
61  float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
62 
63  // calculate average wg number for a provided collection of simhits (for CSC)
64  float simHitsMeanWG(const edm::PSimHitContainer& sim_hits) const;
65 
66  void chamberIdsToString(const std::set<unsigned int>& set) const;
67 
68  // calculate the average position at the second station
70 
71  std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
72  std::set<int> hitWiregroupsInDetId(unsigned int, int margin_n_wg = 0) const;
73 
74  void camberIdsToString(const std::set<unsigned int>&) const;
75 
76 private:
78 
79  void clear();
80 
82 };
83 
84 #endif
void match(const SimTrack &t, const SimVertex &v)
do the matching
std::set< unsigned int > detIds(int type=MuonHitHelper::CSC_ALL) const
static const double slope[3]
float LocalBendingInChamber(unsigned int detid) const
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
CSCSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
int nStations(int nl=4) const
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
std::set< int > hitWiregroupsInDetId(unsigned int, int margin_n_wg=0) const
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
float simHitsMeanWG(const edm::PSimHitContainer &sim_hits) const
int nCoincidenceChambers(int min_n_layers=4) const
GlobalPoint simHitsMeanPositionStation(int n) const
std::set< unsigned int > chamberIds(int type=MuonHitHelper::CSC_ALL) const
GlobalPoint simHitPositionKeyLayer(unsigned int chamberid) const
int nLayersWithHitsInChamber(unsigned int) const
void camberIdsToString(const std::set< unsigned int > &) const
void chamberIdsToString(const std::set< unsigned int > &set) const
void fitHitsInChamber(unsigned int detid, float &mean, float &slope) const
std::vector< PSimHit > PSimHitContainer
std::set< unsigned int > chamberIdsStation(int station) const
bool hitStation(int, int) const