6 :
CSCBaseValidation(inputTag), theLayerHitsPerChamber(), theChamberSegmentMap(), theShowerThreshold(10) {
14 theNRecHitsPlot = iBooker.
book1D(
"CSCRecHitsPerSegment",
"Number of CSC rec hits per segment", 8, 0, 7);
16 iBooker.
book1D(
"CSCSegmentsPerChamberType",
"Number of CSC segments per chamber type", 11, 0, 10);
29 for (
int i = 0;
i < 10; ++
i) {
30 char title1[200], title2[200], title3[200], title4[200], title5[200], title6[200], title7[200], title8[200];
31 sprintf(title1,
"CSCSegmentRdPhiResolution%d",
i + 1);
32 sprintf(title2,
"CSCSegmentRdPhiPull%d",
i + 1);
33 sprintf(title3,
"CSCSegmentThetaResolution%d",
i + 1);
34 sprintf(title4,
"CSCSegmentThetaPull%d",
i + 1);
35 sprintf(title5,
"CSCSegmentdXdZResolution%d",
i + 1);
36 sprintf(title6,
"CSCSegmentdXdZPull%d",
i + 1);
37 sprintf(title7,
"CSCSegmentdYdZResolution%d",
i + 1);
38 sprintf(title8,
"CSCSegmentdYdZPull%d",
i + 1);
58 unsigned nPerEvent = 0;
62 int detId = segmentItr->geographicalId().rawId();
88 int chamberId = mapItr->first;
89 int nHitsInChamber = mapItr->second.size();
94 std::vector<int>
v = mapItr->second;
98 int nLayersHit = v.size();
100 if (nLayersHit == 4) {
114 if (nLayersHit == 5) {
128 if (nLayersHit == 6) {
162 double dphi = segmentPos.
phi() - simHitPos.
phi();
163 double rdphi = segmentPos.
perp() * dphi;
164 double dtheta = segmentPos.
theta() - simHitPos.
theta();
169 double ddxdz = segmentDir.
x() / segmentDir.
z() - simHitDir.
x() / simHitDir.
z();
170 double ddydz = segmentDir.
y() / segmentDir.
z() - simHitDir.
y() / simHitDir.
z();
188 for (std::vector<int>::const_iterator layerItr = layersHit.begin(), layersHitEnd = layersHit.end();
189 layerItr != layersHitEnd;
207 int layerId = chamberId + 3;
210 if (!layerHits.empty()) {
212 edm::PSimHitContainer::const_iterator hitItr =
MonitorElement * theNPerEventPlot
void plotResolution(const PSimHit &simHit, const CSCSegment &recHit, const CSCLayer *layer, int chamberType)
MonitorElement * theTypePlot5HitsNoShowerSeg
LocalVector localDirection() const override
Local direction.
~CSCSegmentValidation() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * theTypePlot4HitsShowerSeg
MonitorElement * theNPerChamberTypePlot
static int whatChamberType(int istation, int iring)
static int whatChamberType(int detId)
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
LocalError localDirectionError() const override
Error on the local direction.
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
Geom::Theta< T > theta() const
C::const_iterator const_iterator
constant access iterator type
MonitorElement * theTypePlot4HitsNoShower
Local3DPoint localPosition() const
const PSimHitMap * theSimHitMap
def unique(seq, keepstr=True)
MonitorElement * theTypePlot6HitsNoShowerSeg
MonitorElement * book1D(Args &&...args)
const edm::PSimHitContainer & hits(int detId) const
LocalPoint localPosition() const override
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.
MonitorElement * theThetaPullPlots[10]
T const * product() const
const PSimHit * keyHit(int chamberId) const
MonitorElement * thedXdZPullPlots[10]
bool hasSegment(int chamberId) const
MonitorElement * theTypePlot5HitsShowerSeg
void fillEfficiencyPlots()
MonitorElement * theThetaResolutionPlots[10]
ChamberSegmentMap theChamberSegmentMap
std::vector< PSimHit > PSimHitContainer
MonitorElement * theTypePlot4HitsNoShowerSeg
LocalError localPositionError() const override
void bookHistograms(DQMStore::IBooker &)
bool SimHitPabsLessThan(const PSimHit &p1, const PSimHit &p2)
CSCSegmentValidation(const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
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]