CMS 3D CMS Logo

CSCSimHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_MuonHits_CSCSimHitMatcher_h
2 #define Validation_MuonHits_CSCSimHitMatcher_h
3 
13 
15 public:
16  // constructor
18 
19  // destructor
21 
22  // initialize the event
23  void init(const edm::Event& e, const edm::EventSetup& eventSetup);
24 
25  // do the matching
26  void match(const SimTrack& t, const SimVertex& v);
27 
28  // partitions' detIds with SimHits
29  std::set<unsigned int> detIds(int type = MuonHitHelper::CSC_ALL) const;
30 
31  // chamber detIds with SimHits
32  std::set<unsigned int> chamberIds(int type = MuonHitHelper::CSC_ALL) const;
33 
34  // CSC station detIds with SimHits
35  std::set<unsigned int> chamberIdsStation(int station) const;
36 
37  // was there a hit in a particular CSC station?
38  bool hitStation(int, int) const;
39 
40  // number of stations with hits in at least X layers
41  int nStations(int nl = 4) const;
42 
43  // #layers with hits
44  int nLayersWithHitsInChamber(unsigned int) const;
45 
46  // How many CSC chambers with minimum number of layer with simhits did this
47  // simtrack get?
48  int nCoincidenceChambers(int min_n_layers = 4) const;
49 
50  // calculated the fitted position in a given layer for CSC simhits in a
51  // chamber
52  GlobalPoint simHitPositionKeyLayer(unsigned int chamberid) const;
53 
54  // local bending in a CSC chamber
55  float LocalBendingInChamber(unsigned int detid) const;
56 
57  // calculate average strip number for a provided collection of simhits
58  float simHitsMeanStrip(const edm::PSimHitContainer& sim_hits) const;
59 
60  // calculate average wg number for a provided collection of simhits (for CSC)
61  float simHitsMeanWG(const edm::PSimHitContainer& sim_hits) const;
62 
63  void chamberIdsToString(const std::set<unsigned int>& set) const;
64 
65  // calculate the average position at the second station
67 
68  std::set<int> hitStripsInDetId(unsigned int, int margin_n_strips = 0) const;
69  std::set<int> hitWiregroupsInDetId(unsigned int, int margin_n_wg = 0) const;
70 
71  void camberIdsToString(const std::set<unsigned int>&) const;
72 
73 private:
75 
77 };
78 
79 #endif
CSCSimHitMatcher::simHitsMeanStrip
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
Definition: CSCSimHitMatcher.cc:207
SimVertex
Definition: SimVertex.h:5
CSCSimHitMatcher
Definition: CSCSimHitMatcher.h:14
CSCSimHitMatcher::csc_geom_
edm::ESHandle< CSCGeometry > csc_geom_
Definition: CSCSimHitMatcher.h:76
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
CSCSimHitMatcher::LocalBendingInChamber
float LocalBendingInChamber(unsigned int detid) const
Definition: CSCSimHitMatcher.cc:157
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCSimHitMatcher::hitWiregroupsInDetId
std::set< int > hitWiregroupsInDetId(unsigned int, int margin_n_wg=0) const
Definition: CSCSimHitMatcher.cc:269
CSCSimHitMatcher::simHitPositionKeyLayer
GlobalPoint simHitPositionKeyLayer(unsigned int chamberid) const
CSCSimHitMatcher::~CSCSimHitMatcher
~CSCSimHitMatcher()
Definition: CSCSimHitMatcher.h:20
MuonHitHelper::CSC_ALL
Definition: MuonHitHelper.h:15
CSCSimHitMatcher::hitStripsInDetId
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
Definition: CSCSimHitMatcher.cc:251
findQualityFiles.v
v
Definition: findQualityFiles.py:179
MuonSimHitMatcher.h
CSCSimHitMatcher::detIds
std::set< unsigned int > detIds(int type=MuonHitHelper::CSC_ALL) const
Definition: CSCSimHitMatcher.cc:79
CSCSimHitMatcher::camberIdsToString
void camberIdsToString(const std::set< unsigned int > &) const
edm::ESHandle< CSCGeometry >
Point3DBase< float, GlobalTag >
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::ParameterSet
Definition: ParameterSet.h:36
CSCSimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: CSCSimHitMatcher.cc:28
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:33
CSCSimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: CSCSimHitMatcher.cc:59
CSCSimHitMatcher::nStations
int nStations(int nl=4) const
Definition: CSCSimHitMatcher.cc:153
edm::EventSetup
Definition: EventSetup.h:57
CSCSimHitMatcher::nCoincidenceChambers
int nCoincidenceChambers(int min_n_layers=4) const
Definition: CSCSimHitMatcher.cc:288
CSCSimHitMatcher::chamberIdsStation
std::set< unsigned int > chamberIdsStation(int station) const
Definition: CSCSimHitMatcher.cc:305
CSCSimHitMatcher::simHitsMeanWG
float simHitsMeanWG(const edm::PSimHitContainer &sim_hits) const
Definition: CSCSimHitMatcher.cc:228
type
type
Definition: HCALResponse.h:21
SimTrack
Definition: SimTrack.h:6
CSCSimHitMatcher::hitStation
bool hitStation(int, int) const
Definition: CSCSimHitMatcher.cc:116
options_cfi.eventSetup
eventSetup
Definition: options_cfi.py:12
CSCSimHitMatcher::CSCSimHitMatcher
CSCSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: CSCSimHitMatcher.cc:5
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
CSCSimHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
initialize the event
Definition: CSCSimHitMatcher.cc:16
edm::Event
Definition: Event.h:73
CSCSimHitMatcher::chamberIds
std::set< unsigned int > chamberIds(int type=MuonHitHelper::CSC_ALL) const
Definition: CSCSimHitMatcher.cc:93
CSCSimHitMatcher::simHitsMeanPositionStation
GlobalPoint simHitsMeanPositionStation(int n) const
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
CSCGeometry.h
CSCSimHitMatcher::nLayersWithHitsInChamber
int nLayersWithHitsInChamber(unsigned int) const
Definition: CSCSimHitMatcher.cc:107
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CSCSimHitMatcher::chamberIdsToString
void chamberIdsToString(const std::set< unsigned int > &set) const
Definition: CSCSimHitMatcher.cc:298