|
|
Go to the documentation of this file.
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);
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * theTypePlot5HitsNoShowerSeg
void fillEfficiencyPlots()
T const * product() const
void plotResolution(const PSimHit &simHit, const CSCSegment &recHit, const CSCLayer *layer, int chamberType)
void bookHistograms(DQMStore::IBooker &)
MonitorElement * theTypePlot6HitsNoShowerSeg
Geom::Theta< T > theta() const
const PSimHit * keyHit(int chamberId) const
MonitorElement * theTypePlot5HitsShower
MonitorElement * thedYdZResolutionPlots[10]
MonitorElement * theRdPhiPullPlots[10]
MonitorElement * theNPerChamberTypePlot
~CSCSegmentValidation() override
edm::EDGetTokenT< CSCSegmentCollection > segments_Token_
MonitorElement * theRdPhiResolutionPlots[10]
ChamberHitMap theLayerHitsPerChamber
unsigned short iChamberType() const
MonitorElement * theTypePlot5HitsNoShower
bool hasSegment(int chamberId) const
MonitorElement * theTypePlot4HitsShower
const CSCLayer * findLayer(int detId) const
MonitorElement * theNPerEventPlot
MonitorElement * theNRecHitsPlot
MonitorElement * theTypePlot4HitsNoShower
constexpr std::array< uint8_t, layerIndexSize > layer
const PSimHitMap * theSimHitMap
MonitorElement * theTypePlot6HitsNoShower
std::vector< int > detsWithHits() const
LocalVector localDirection() const override
Local direction.
LocalError localDirectionError() const override
Error on the local direction.
MonitorElement * theTypePlot6HitsShower
void fillLayerHitsPerChamber()
MonitorElement * thedXdZPullPlots[10]
CSCDetId chamberId() const
MonitorElement * theTypePlot4HitsNoShowerSeg
CSCSegmentValidation(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
constexpr uint32_t rawId() const
get the raw id
MonitorElement * theTypePlot5HitsShowerSeg
def unique(seq, keepstr=True)
std::string chamberName() const
ChamberSegmentMap theChamberSegmentMap
const edm::PSimHitContainer & hits(int detId) const
MonitorElement * thedXdZResolutionPlots[10]
MonitorElement * thedYdZPullPlots[10]
MonitorElement * theTypePlot4HitsShowerSeg
LocalPoint localPosition() const override
MonitorElement * theThetaResolutionPlots[10]
Geom::Phi< T > phi() const
ParameterSet const & getParameterSet(std::string const &) const
LocalError localPositionError() const override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * theTypePlot6HitsShowerSeg