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) {
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();
94 std::vector<int>
v = mapItr->second;
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) {
193 auto SimHitPabsLessThan = [](
const PSimHit &
p1,
const PSimHit &
p2) ->
bool {
return p1.pabs() <
p2.pabs(); };
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
MonitorElement * theTypePlot4HitsShowerSeg
MonitorElement * theNPerChamberTypePlot
MonitorElement * theTypePlot6HitsShower
Geom::Phi< T > phi() const
T const * product() const
ParameterSet const & getParameterSet(std::string const &) const
MonitorElement * theTypePlot5HitsNoShower
edm::EDGetTokenT< CSCSegmentCollection > segments_Token_
MonitorElement * theNRecHitsPlot
MonitorElement * theTypePlot4HitsShower
MonitorElement * theRdPhiResolutionPlots[10]
unsigned short iChamberType() const
MonitorElement * theTypePlot6HitsShowerSeg
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
bool hasSegment(int chamberId) const
LocalVector localDirection() const override
Local direction.
MonitorElement * theTypePlot4HitsNoShower
std::string chamberName() const
const PSimHitMap * theSimHitMap
def unique(seq, keepstr=True)
MonitorElement * theTypePlot6HitsNoShowerSeg
const CSCLayer * findLayer(int detId) const
void fillLayerHitsPerChamber()
const edm::PSimHitContainer & hits(int detId) const
MonitorElement * theTypePlot6HitsNoShower
ChamberHitMap theLayerHitsPerChamber
MonitorElement * thedYdZResolutionPlots[10]
MonitorElement * theRdPhiPullPlots[10]
LocalError localDirectionError() const override
Error on the local direction.
constexpr uint32_t rawId() const
get the raw id
CSCDetId chamberId() const
MonitorElement * thedXdZPullPlots[10]
const PSimHit * keyHit(int chamberId) const
MonitorElement * theTypePlot5HitsShowerSeg
void fillEfficiencyPlots()
std::vector< int > detsWithHits() const
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
Geom::Theta< T > theta() const
MonitorElement * thedXdZResolutionPlots[10]
MonitorElement * thedYdZPullPlots[10]