10 theLayerHitsPerChamber(),
11 theChamberSegmentMap(),
12 theShowerThreshold(10),
13 theNPerEventPlot(
dbe_->book1D(
"CSCSegmentsPerEvent",
"Number of CSC segments per event", 100, 0, 50) ),
14 theNRecHitsPlot(
dbe_->book1D(
"CSCRecHitsPerSegment",
"Number of CSC rec hits per segment" , 8, 0, 7) ),
15 theNPerChamberTypePlot(
dbe_->book1D(
"CSCSegmentsPerChamberType",
"Number of CSC segments per chamber type", 11, 0, 10) ),
16 theTypePlot4HitsNoShower(
dbe_->book1D(
"CSCSegments4HitsNoShower",
"", 100, 0, 10) ),
17 theTypePlot4HitsNoShowerSeg(
dbe_->book1D(
"CSCSegments4HitsNoShowerSeg",
"", 100, 0, 10) ),
18 theTypePlot4HitsShower(
dbe_->book1D(
"CSCSegments4HitsShower",
"", 100, 0, 10) ),
19 theTypePlot4HitsShowerSeg(
dbe_->book1D(
"CSCSegments4HitsShowerSeg",
"", 100, 0, 10) ),
20 theTypePlot5HitsNoShower(
dbe_->book1D(
"CSCSegments5HitsNoShower",
"", 100, 0, 10) ),
21 theTypePlot5HitsNoShowerSeg(
dbe_->book1D(
"CSCSegments5HitsNoShowerSeg",
"", 100, 0, 10) ),
22 theTypePlot5HitsShower(
dbe_->book1D(
"CSCSegments5HitsShower",
"", 100, 0, 10) ),
23 theTypePlot5HitsShowerSeg(
dbe_->book1D(
"CSCSegments5HitsShowerSeg",
"", 100, 0, 10) ),
24 theTypePlot6HitsNoShower(
dbe_->book1D(
"CSCSegments6HitsNoShower",
"", 100, 0, 10) ),
25 theTypePlot6HitsNoShowerSeg(
dbe_->book1D(
"CSCSegments6HitsNoShowerSeg",
"", 100, 0, 10) ),
26 theTypePlot6HitsShower(
dbe_->book1D(
"CSCSegments6HitsShower",
"", 100, 0, 10) ),
27 theTypePlot6HitsShowerSeg(
dbe_->book1D(
"CSCSegments6HitsShowerSeg",
"", 100, 0, 10) )
30 for(
int i = 0;
i < 10; ++
i)
32 char title1[200], title2[200], title3[200], title4[200],
33 title5[200], title6[200], title7[200], title8[200];
34 sprintf(title1,
"CSCSegmentRdPhiResolution%d",
i+1);
35 sprintf(title2,
"CSCSegmentRdPhiPull%d",
i+1);
36 sprintf(title3,
"CSCSegmentThetaResolution%d",
i+1);
37 sprintf(title4,
"CSCSegmentThetaPull%d",
i+1);
38 sprintf(title5,
"CSCSegmentdXdZResolution%d",
i+1);
39 sprintf(title6,
"CSCSegmentdXdZPull%d",
i+1);
40 sprintf(title7,
"CSCSegmentdYdZResolution%d",
i+1);
41 sprintf(title8,
"CSCSegmentdYdZPull%d",
i+1);
64 unsigned nPerEvent = 0;
66 segmentItr != cscRecHits->end(); segmentItr++)
69 int detId = segmentItr->geographicalId().rawId();
100 int chamberId = mapItr->first;
101 int nHitsInChamber = mapItr->second.size();
106 std::vector<int>
v = mapItr->second;
109 v.erase(std::unique(v.begin(), v.end()), v.end());
110 int nLayersHit = v.size();
169 const CSCLayer * layer,
int chamberType)
176 double dphi = segmentPos.
phi() - simHitPos.
phi();
177 double rdphi = segmentPos.
perp() * dphi;
178 double dtheta = segmentPos.
theta() - simHitPos.
theta();
180 double sigmax =
sqrt(segment.localPositionError().xx());
183 double ddxdz = segmentDir.
x()/segmentDir.
z() - simHitDir.
x()/simHitDir.
z();
184 double ddydz = segmentDir.
y()/segmentDir.
z() - simHitDir.
y()/simHitDir.
z();
185 double sigmadxdz =
sqrt(segment.localDirectionError().xx());
186 double sigmadydz =
sqrt(segment.localDirectionError().yy());
204 for(std::vector<int>::const_iterator layerItr = layersHit.begin(),
205 layersHitEnd = layersHit.end();
206 layerItr != layersHitEnd;
213 for(
int i = 0;
i < nhits; ++
i) {
220 namespace CSCSegmentValidationUtils {
231 int layerId = chamberId + 3;
234 if(!layerHits.empty())
237 edm::PSimHitContainer::const_iterator hitItr = std::max_element(layerHits.begin(), layerHits.end(),
MonitorElement * theNPerEventPlot
edm::InputTag theInputTag
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.
MonitorElement * theTypePlot4HitsShowerSeg
MonitorElement * theNPerChamberTypePlot
static int whatChamberType(int istation, int iring)
static int whatChamberType(int detId)
MonitorElement * theTypePlot6HitsShower
CSCSegmentValidation(DQMStore *dbe, const edm::InputTag &inputTag)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Geom::Phi< T > phi() const
MonitorElement * theTypePlot5HitsNoShower
MonitorElement * theNRecHitsPlot
MonitorElement * theTypePlot4HitsShower
MonitorElement * theRdPhiResolutionPlots[10]
MonitorElement * theTypePlot6HitsShowerSeg
Geom::Theta< T > theta() const
uint32_t rawId() const
get the raw id
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)
unsigned int detUnitId() const
MonitorElement * thedXdZResolutionPlots[10]
MonitorElement * thedYdZPullPlots[10]