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 
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
CSCSimHitMatcher::simHitsMeanStrip
float simHitsMeanStrip(const edm::PSimHitContainer &sim_hits) const
Definition: CSCSimHitMatcher.cc:246
SimVertex
Definition: SimVertex.h:5
CSCSimHitMatcher
Definition: CSCSimHitMatcher.h:16
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
CSCSimHitMatcher::LocalBendingInChamber
float LocalBendingInChamber(unsigned int detid) const
Definition: CSCSimHitMatcher.cc:159
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCSimHitMatcher::hitWiregroupsInDetId
std::set< int > hitWiregroupsInDetId(unsigned int, int margin_n_wg=0) const
Definition: CSCSimHitMatcher.cc:308
CSCSimHitMatcher::simHitPositionKeyLayer
GlobalPoint simHitPositionKeyLayer(unsigned int chamberid) const
CSCSimHitMatcher::~CSCSimHitMatcher
~CSCSimHitMatcher()
Definition: CSCSimHitMatcher.h:22
MuonHitHelper::CSC_ALL
Definition: MuonHitHelper.h:15
CSCSimHitMatcher::clear
void clear()
Definition: CSCSimHitMatcher.cc:383
CSCSimHitMatcher::hitStripsInDetId
std::set< int > hitStripsInDetId(unsigned int, int margin_n_strips=0) const
Definition: CSCSimHitMatcher.cc:290
findQualityFiles.v
v
Definition: findQualityFiles.py:179
ESGetToken.h
MuonSimHitMatcher.h
CSCSimHitMatcher::detIds
std::set< unsigned int > detIds(int type=MuonHitHelper::CSC_ALL) const
Definition: CSCSimHitMatcher.cc:81
CSCSimHitMatcher::camberIdsToString
void camberIdsToString(const std::set< unsigned int > &) const
Point3DBase< float, GlobalTag >
CSCSimHitMatcher::fitHitsInChamber
void fitHitsInChamber(unsigned int detid, float &mean, float &slope) const
Definition: CSCSimHitMatcher.cc:210
edm::ParameterSet
Definition: ParameterSet.h:47
CSCSimHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: CSCSimHitMatcher.cc:25
MuonSimHitMatcher
Definition: MuonSimHitMatcher.h:32
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
CSCSimHitMatcher::matchSimHitsToSimTrack
void matchSimHitsToSimTrack()
Definition: CSCSimHitMatcher.cc:61
CSCSimHitMatcher::nStations
int nStations(int nl=4) const
Definition: CSCSimHitMatcher.cc:155
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< CSCGeometry, MuonGeometryRecord >
CSCSimHitMatcher::nCoincidenceChambers
int nCoincidenceChambers(int min_n_layers=4) const
Definition: CSCSimHitMatcher.cc:327
CSCSimHitMatcher::chamberIdsStation
std::set< unsigned int > chamberIdsStation(int station) const
Definition: CSCSimHitMatcher.cc:344
CSCSimHitMatcher::simHitsMeanWG
float simHitsMeanWG(const edm::PSimHitContainer &sim_hits) const
Definition: CSCSimHitMatcher.cc:267
CSCSimHitMatcher::geomToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
Definition: CSCSimHitMatcher.h:81
SimTrack
Definition: SimTrack.h:9
CSCSimHitMatcher::hitStation
bool hitStation(int, int) const
Definition: CSCSimHitMatcher.cc:118
CSCSimHitMatcher::CSCSimHitMatcher
CSCSimHitMatcher(const edm::ParameterSet &iPS, edm::ConsumesCollector &&iC)
Definition: CSCSimHitMatcher.cc:7
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:19
MuonGeometryRecord.h
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
edm::Event
Definition: Event.h:73
CSCSimHitMatcher::chamberIds
std::set< unsigned int > chamberIds(int type=MuonHitHelper::CSC_ALL) const
Definition: CSCSimHitMatcher.cc:95
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
CSCSimHitMatcher::simHitsMeanPositionStation
GlobalPoint simHitsMeanPositionStation(int n) const
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
CSCGeometry.h
CSCSimHitMatcher::nLayersWithHitsInChamber
int nLayersWithHitsInChamber(unsigned int) const
Definition: CSCSimHitMatcher.cc:109
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CSCSimHitMatcher::chamberIdsToString
void chamberIdsToString(const std::set< unsigned int > &set) const
Definition: CSCSimHitMatcher.cc:337