6 :
CSCBaseValidation(ps), theLayerHitsPerChamber(), theChamberSegmentMap(), theShowerThreshold(10) {
16 theNRecHitsPlot = iBooker.
book1D(
"CSCRecHitsPerSegment",
"Number of CSC rec hits per segment", 8, 0, 7);
18 iBooker.
book1D(
"CSCSegmentsPerChamberType",
"Number of CSC segments per chamber type", 11, 0, 10);
32 for (
int i = 1;
i <= 10; ++
i) {
35 const std::string t1(
"CSCSegmentRdPhiResolution_" + cn);
37 const std::string t3(
"CSCSegmentThetaResolution_" + cn);
38 const std::string t5(
"CSCSegmentdXdZResolution_" + cn);
40 const std::string t7(
"CSCSegmentdYdZResolution_" + cn);
60 unsigned nPerEvent = 0;
61 for (
auto segmentItr = cscRecHits->begin(); segmentItr != cscRecHits->end(); segmentItr++) {
63 int detId = segmentItr->geographicalId().rawId();
64 int chamberType = segmentItr->cscDetId().iChamberType();
88 int chamberId = mapItr->first;
89 int nHitsInChamber = mapItr->second.size();
92 int chamberType =
CSCDetId(chamberId).iChamberType();
94 std::vector<int>
v = mapItr->second;
95 std::sort(v.begin(), v.end());
98 int nLayersHit = v.size();
100 if (nLayersHit == 4) {
114 if (nLayersHit == 5) {
128 if (nLayersHit == 6) {
157 double dphi = segmentPos.
phi() - simHitPos.
phi();
158 double rdphi = segmentPos.
perp() * dphi;
159 double dtheta = segmentPos.
theta() - simHitPos.
theta();
163 double ddxdz = segmentDir.
x() / segmentDir.
z() - simHitDir.
x() / simHitDir.
z();
164 double ddydz = segmentDir.
y() / segmentDir.
z() - simHitDir.
y() / simHitDir.
z();
181 for (
auto layerItr = layersHit.begin(), layersHitEnd = layersHit.end(); layerItr != layersHitEnd; ++layerItr) {
196 int layerId = chamberId + 3;
199 if (!layerHits.empty()) {
201 auto hitItr = std::max_element(layerHits.begin(), layerHits.end(), SimHitPabsLessThan);
MonitorElement * theNPerEventPlot
void plotResolution(const PSimHit &simHit, const CSCSegment &recHit, const CSCLayer *layer, int chamberType)
MonitorElement * theTypePlot5HitsNoShowerSeg
CSCSegmentValidation(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
LocalPoint localPosition() const override
~CSCSegmentValidation() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * theTypePlot4HitsShowerSeg
MonitorElement * theNPerChamberTypePlot
MonitorElement * theTypePlot6HitsShower
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Geom::Phi< T > phi() const
constexpr uint32_t rawId() const
get the raw id
MonitorElement * theTypePlot5HitsNoShower
edm::EDGetTokenT< CSCSegmentCollection > segments_Token_
MonitorElement * theNRecHitsPlot
MonitorElement * theTypePlot4HitsShower
MonitorElement * theRdPhiResolutionPlots[10]
MonitorElement * theTypePlot6HitsShowerSeg
constexpr std::array< uint8_t, layerIndexSize > layer
Geom::Theta< T > theta() const
LocalVector localDirection() const override
Local direction.
MonitorElement * theTypePlot4HitsNoShower
Local3DPoint localPosition() const
const PSimHitMap * theSimHitMap
MonitorElement * theTypePlot6HitsNoShowerSeg
const edm::PSimHitContainer & hits(int detId) const
CSCDetId chamberId() const
void fillLayerHitsPerChamber()
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
MonitorElement * theTypePlot6HitsNoShower
ChamberHitMap theLayerHitsPerChamber
MonitorElement * thedYdZResolutionPlots[10]
std::vector< int > detsWithHits() const
MonitorElement * theRdPhiPullPlots[10]
LocalVector localDirection() const
Obsolete. Same as momentumAtEntry().unit(), for backward compatibility.
LocalError localDirectionError() const override
Error on the local direction.
std::string chamberName() const
T const * product() const
const PSimHit * keyHit(int chamberId) const
ParameterSet const & getParameterSet(std::string const &) const
MonitorElement * thedXdZPullPlots[10]
bool hasSegment(int chamberId) const
MonitorElement * theTypePlot5HitsShowerSeg
void fillEfficiencyPlots()
MonitorElement * theThetaResolutionPlots[10]
ChamberSegmentMap theChamberSegmentMap
MonitorElement * theTypePlot4HitsNoShowerSeg
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
LocalError localPositionError() const override
void bookHistograms(DQMStore::IBooker &)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * theTypePlot5HitsShower
const CSCLayer * findLayer(int detId) const
unsigned int detUnitId() const
MonitorElement * thedXdZResolutionPlots[10]
MonitorElement * thedYdZPullPlots[10]