9 theNPerEventPlot(
dbe_->book1D(
"CSCRecHitsPerEvent",
"Number of CSC Rec Hits per event", 100, 0, 500) )
15 for(
int i = 0;
i < 10; ++
i)
17 char title1[200], title2[200], title3[200], title4[200], title5[200], title6[200], title7[200], title8[200], title9[200];
18 sprintf(title1,
"CSCRecHitResolution%d",
i+1);
19 sprintf(title2,
"CSCRecHitPull%d",
i+1);
20 sprintf(title3,
"CSCRecHitYResolution%d",
i+1);
21 sprintf(title4,
"CSCRecHitYPull%d",
i+1);
22 sprintf(title5,
"CSCRecHitPosInStrip%d",
i+1);
23 sprintf(title6,
"CSCSimHitPosInStrip%d",
i+1);
24 sprintf(title7,
"CSCRecHit%d",
i+1);
25 sprintf(title8,
"CSCSimHit%d",
i+1);
26 sprintf(title9,
"CSCTPeak%d",
i+1);
44 for(
int i = 0;
i < 10; ++
i)
59 unsigned nPerEvent = 0;
62 recHitItr != cscRecHits->end(); recHitItr++)
65 int detId = (*recHitItr).cscDetId().rawId();
70 if(simHits.size() == 1)
74 float localX = recHitItr->localPosition().x();
75 float localY = recHitItr->localPosition().y();
79 GlobalPoint axisThruChamber(globalR+localY, localX, 0.);
80 float localPhi = axisThruChamber.
phi().
degrees();
88 for(
unsigned i = 0;
i < layersWithSimHits.size(); ++
i)
91 for(edm::PSimHitContainer::const_iterator hitItr = simHits.begin(); hitItr != simHits.end(); ++hitItr)
95 float localX = hitItr->localPosition().x();
96 float localY = hitItr->localPosition().y();
100 GlobalPoint axisThruChamber(globalR+localY, localX, 0.);
101 float localPhi = axisThruChamber.
phi().
degrees();
111 const CSCLayer * layer,
int chamberType)
116 double dphi = recHitPos.
phi() - simHitPos.
phi();
117 double rdphi = recHitPos.
perp() * dphi;
MonitorElement * theSimHitScatterPlots[10]
MonitorElement * theYResolutionPlots[10]
const std::string & getName(void) const
get name of ME
MonitorElement * theScatterPlots[10]
void plotResolution(const PSimHit &simHit, const CSCRecHit2D &recHit, const CSCLayer *layer, int chamberType)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
edm::EDGetTokenT< CSCRecHit2DCollection > rechits_Token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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 * theResolutionPlots[10]
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * theSimHitPosInStrip[10]
MonitorElement * theYPullPlots[10]
const CSCChamberSpecs * specs() const
LocalError localPositionError() const
Local3DPoint localPosition() const
const PSimHitMap * theSimHitMap
virtual ~CSCRecHit2DValidation()
const edm::PSimHitContainer & hits(int detId) const
float strip(const LocalPoint &lp) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< int > detsWithHits() const
CSCRecHit2DValidation(DQMStore *dbe, const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
MonitorElement * theNPerEventPlot
T const * product() const
MonitorElement * thePullPlots[10]
MonitorElement * theRecHitPosInStrip[10]
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * theTPeaks[10]
std::vector< PSimHit > PSimHitContainer
LocalPoint localPosition() const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
const CSCChamber * chamber() const
const CSCLayerGeometry * geometry() const
const CSCLayer * findLayer(int detId) const
void setCurrentFolder(const std::string &fullpath)