9 theLayerHitsPerChamber(),
10 theChamberSegmentMap(),
11 theShowerThreshold(10),
12 theNPerEventPlot(
dbe_->book1D(
"CSCSegmentsPerEvent",
"Number of CSC segments per event", 100, 0, 50) ),
13 theNRecHitsPlot(
dbe_->book1D(
"CSCRecHitsPerSegment",
"Number of CSC rec hits per segment" , 8, 0, 7) ),
14 theNPerChamberTypePlot(
dbe_->book1D(
"CSCSegmentsPerChamberType",
"Number of CSC segments per chamber type", 11, 0, 10) ),
15 theTypePlot4HitsNoShower(
dbe_->book1D(
"CSCSegments4HitsNoShower",
"", 100, 0, 10) ),
16 theTypePlot4HitsNoShowerSeg(
dbe_->book1D(
"CSCSegments4HitsNoShowerSeg",
"", 100, 0, 10) ),
17 theTypePlot4HitsShower(
dbe_->book1D(
"CSCSegments4HitsShower",
"", 100, 0, 10) ),
18 theTypePlot4HitsShowerSeg(
dbe_->book1D(
"CSCSegments4HitsShowerSeg",
"", 100, 0, 10) ),
19 theTypePlot5HitsNoShower(
dbe_->book1D(
"CSCSegments5HitsNoShower",
"", 100, 0, 10) ),
20 theTypePlot5HitsNoShowerSeg(
dbe_->book1D(
"CSCSegments5HitsNoShowerSeg",
"", 100, 0, 10) ),
21 theTypePlot5HitsShower(
dbe_->book1D(
"CSCSegments5HitsShower",
"", 100, 0, 10) ),
22 theTypePlot5HitsShowerSeg(
dbe_->book1D(
"CSCSegments5HitsShowerSeg",
"", 100, 0, 10) ),
23 theTypePlot6HitsNoShower(
dbe_->book1D(
"CSCSegments6HitsNoShower",
"", 100, 0, 10) ),
24 theTypePlot6HitsNoShowerSeg(
dbe_->book1D(
"CSCSegments6HitsNoShowerSeg",
"", 100, 0, 10) ),
25 theTypePlot6HitsShower(
dbe_->book1D(
"CSCSegments6HitsShower",
"", 100, 0, 10) ),
26 theTypePlot6HitsShowerSeg(
dbe_->book1D(
"CSCSegments6HitsShowerSeg",
"", 100, 0, 10) )
31 for(
int i = 0;
i < 10; ++
i)
33 char title1[200], title2[200], title3[200], title4[200],
34 title5[200], title6[200], title7[200], title8[200];
35 sprintf(title1,
"CSCSegmentRdPhiResolution%d",
i+1);
36 sprintf(title2,
"CSCSegmentRdPhiPull%d",
i+1);
37 sprintf(title3,
"CSCSegmentThetaResolution%d",
i+1);
38 sprintf(title4,
"CSCSegmentThetaPull%d",
i+1);
39 sprintf(title5,
"CSCSegmentdXdZResolution%d",
i+1);
40 sprintf(title6,
"CSCSegmentdXdZPull%d",
i+1);
41 sprintf(title7,
"CSCSegmentdYdZResolution%d",
i+1);
42 sprintf(title8,
"CSCSegmentdYdZPull%d",
i+1);
65 unsigned nPerEvent = 0;
67 segmentItr != cscRecHits->end(); segmentItr++)
70 int detId = segmentItr->geographicalId().rawId();
101 int chamberId = mapItr->first;
102 int nHitsInChamber = mapItr->second.size();
107 std::vector<int>
v = mapItr->second;
110 v.erase(std::unique(v.begin(), v.end()), v.end());
111 int nLayersHit = v.size();
170 const CSCLayer * layer,
int chamberType)
177 double dphi = segmentPos.
phi() - simHitPos.
phi();
178 double rdphi = segmentPos.
perp() * dphi;
179 double dtheta = segmentPos.
theta() - simHitPos.
theta();
184 double ddxdz = segmentDir.
x()/segmentDir.
z() - simHitDir.
x()/simHitDir.
z();
185 double ddydz = segmentDir.
y()/segmentDir.
z() - simHitDir.
y()/simHitDir.
z();
205 for(std::vector<int>::const_iterator layerItr = layersHit.begin(),
206 layersHitEnd = layersHit.end();
207 layerItr != layersHitEnd;
214 for(
int i = 0;
i < nhits; ++
i) {
221 namespace CSCSegmentValidationUtils {
232 int layerId = chamberId + 3;
235 if(!layerHits.empty())
238 edm::PSimHitContainer::const_iterator hitItr = std::max_element(layerHits.begin(), layerHits.end(),
MonitorElement * theNPerEventPlot
void plotResolution(const PSimHit &simHit, const CSCSegment &recHit, const CSCLayer *layer, int chamberType)
MonitorElement * theTypePlot5HitsNoShowerSeg
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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.
LocalError localPositionError() const
Geom::Phi< T > phi() const
MonitorElement * theTypePlot5HitsNoShower
edm::EDGetTokenT< CSCSegmentCollection > segments_Token_
MonitorElement * theNRecHitsPlot
MonitorElement * theTypePlot4HitsShower
MonitorElement * theRdPhiResolutionPlots[10]
CSCSegmentValidation(DQMStore *dbe, const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
MonitorElement * theTypePlot6HitsShowerSeg
Geom::Theta< T > theta() const
uint32_t rawId() const
get the raw id
LocalPoint localPosition() const
LocalVector localDirection() const
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.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * theThetaPullPlots[10]
const PSimHit * keyHit(int chamberId) const
MonitorElement * thedXdZPullPlots[10]
T const * product() const
bool hasSegment(int chamberId) const
MonitorElement * theTypePlot5HitsShowerSeg
void fillEfficiencyPlots()
MonitorElement * theThetaResolutionPlots[10]
ChamberSegmentMap theChamberSegmentMap
std::vector< PSimHit > PSimHitContainer
MonitorElement * theTypePlot4HitsNoShowerSeg
bool SimHitPabsLessThan(const PSimHit &p1, const PSimHit &p2)
MonitorElement * theTypePlot5HitsShower
const CSCLayer * findLayer(int detId) const
void setCurrentFolder(const std::string &fullpath)
LocalError localDirectionError() const
Error on the local direction.
unsigned int detUnitId() const
MonitorElement * thedXdZResolutionPlots[10]
MonitorElement * thedYdZPullPlots[10]