8 theLayerHitsPerChamber(),
9 theChamberSegmentMap(),
10 theShowerThreshold(10)
22 theNRecHitsPlot = iBooker.
book1D(
"CSCRecHitsPerSegment",
"Number of CSC rec hits per segment" , 8, 0, 7);
36 for(
int i = 0;
i < 10; ++
i)
38 char title1[200], title2[200], title3[200], title4[200],
39 title5[200], title6[200], title7[200], title8[200];
40 sprintf(title1,
"CSCSegmentRdPhiResolution%d",
i+1);
41 sprintf(title2,
"CSCSegmentRdPhiPull%d",
i+1);
42 sprintf(title3,
"CSCSegmentThetaResolution%d",
i+1);
43 sprintf(title4,
"CSCSegmentThetaPull%d",
i+1);
44 sprintf(title5,
"CSCSegmentdXdZResolution%d",
i+1);
45 sprintf(title6,
"CSCSegmentdXdZPull%d",
i+1);
46 sprintf(title7,
"CSCSegmentdYdZResolution%d",
i+1);
47 sprintf(title8,
"CSCSegmentdYdZPull%d",
i+1);
68 unsigned nPerEvent = 0;
70 segmentItr != cscRecHits->end(); segmentItr++)
73 int detId = segmentItr->geographicalId().rawId();
103 int chamberId = mapItr->first;
104 int nHitsInChamber = mapItr->second.size();
109 std::vector<int>
v = mapItr->second;
112 v.erase(std::unique(v.begin(), v.end()), v.end());
113 int nLayersHit = v.size();
172 const CSCLayer * layer,
int chamberType)
179 double dphi = segmentPos.
phi() - simHitPos.
phi();
180 double rdphi = segmentPos.
perp() * dphi;
181 double dtheta = segmentPos.
theta() - simHitPos.
theta();
186 double ddxdz = segmentDir.
x()/segmentDir.
z() - simHitDir.
x()/simHitDir.
z();
187 double ddydz = segmentDir.
y()/segmentDir.
z() - simHitDir.
y()/simHitDir.
z();
207 for(std::vector<int>::const_iterator layerItr = layersHit.begin(),
208 layersHitEnd = layersHit.end();
209 layerItr != layersHitEnd;
223 namespace CSCSegmentValidationUtils {
234 int layerId = chamberId + 3;
237 if(!layerHits.empty())
240 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
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]
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
MonitorElement * book1D(Args &&...args)
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]
T const * product() const
const PSimHit * keyHit(int chamberId) const
virtual ~CSCSegmentValidation()
MonitorElement * thedXdZPullPlots[10]
bool hasSegment(int chamberId) const
MonitorElement * theTypePlot5HitsShowerSeg
void fillEfficiencyPlots()
MonitorElement * theThetaResolutionPlots[10]
ChamberSegmentMap theChamberSegmentMap
std::vector< PSimHit > PSimHitContainer
MonitorElement * theTypePlot4HitsNoShowerSeg
void bookHistograms(DQMStore::IBooker &)
bool SimHitPabsLessThan(const PSimHit &p1, const PSimHit &p2)
CSCSegmentValidation(const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
MonitorElement * theTypePlot5HitsShower
const CSCLayer * findLayer(int detId) const
LocalError localDirectionError() const
Error on the local direction.
unsigned int detUnitId() const
MonitorElement * thedXdZResolutionPlots[10]
MonitorElement * thedYdZPullPlots[10]