Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:57

0001 #ifndef Validation_CSCRecHits_CSCSegmentValidation_h
0002 #define Validation_CSCRecHits_CSCSegmentValidation_h
0003 
0004 #include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"
0005 #include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 
0008 class CSCSegmentValidation : public CSCBaseValidation {
0009 public:
0010   CSCSegmentValidation(const edm::ParameterSet &, edm::ConsumesCollector &&iC);
0011   ~CSCSegmentValidation() override;
0012   void bookHistograms(DQMStore::IBooker &);
0013   void analyze(const edm::Event &, const edm::EventSetup &) override;
0014 
0015 private:
0016   void plotResolution(const PSimHit &simHit, const CSCSegment &recHit, const CSCLayer *layer, int chamberType);
0017 
0018   bool hasSegment(int chamberId) const;
0019 
0020   edm::EDGetTokenT<CSCSegmentCollection> segments_Token_;
0021   edm::InputTag inputTag_;
0022 
0023   // map to count how many layers are hit.
0024   // First index is chamber detId
0025   // second is layers that have hits
0026   typedef std::map<int, std::vector<int>> ChamberHitMap;
0027   ChamberHitMap theLayerHitsPerChamber;
0028   void fillLayerHitsPerChamber();
0029   void fillEfficiencyPlots();
0030   // decide which SimHit to use for the direction
0031   const PSimHit *keyHit(int chamberId) const;
0032 
0033   typedef std::map<int, std::vector<CSCSegment>> ChamberSegmentMap;
0034   ChamberSegmentMap theChamberSegmentMap;
0035   // the number of hits in a chamber to make it a shower
0036   int theShowerThreshold;
0037 
0038   MonitorElement *theNPerEventPlot;
0039   MonitorElement *theNRecHitsPlot;
0040   MonitorElement *theNPerChamberTypePlot;
0041   MonitorElement *theRdPhiResolutionPlots[10];
0042   MonitorElement *theRdPhiPullPlots[10];
0043   MonitorElement *theThetaResolutionPlots[10];
0044   MonitorElement *thedXdZResolutionPlots[10];
0045   MonitorElement *thedXdZPullPlots[10];
0046   MonitorElement *thedYdZResolutionPlots[10];
0047   MonitorElement *thedYdZPullPlots[10];
0048 
0049   MonitorElement *theTypePlot4HitsNoShower;
0050   MonitorElement *theTypePlot4HitsNoShowerSeg;
0051   MonitorElement *theTypePlot4HitsShower;
0052   MonitorElement *theTypePlot4HitsShowerSeg;
0053   MonitorElement *theTypePlot5HitsNoShower;
0054   MonitorElement *theTypePlot5HitsNoShowerSeg;
0055   MonitorElement *theTypePlot5HitsShower;
0056   MonitorElement *theTypePlot5HitsShowerSeg;
0057   MonitorElement *theTypePlot6HitsNoShower;
0058   MonitorElement *theTypePlot6HitsNoShowerSeg;
0059   MonitorElement *theTypePlot6HitsShower;
0060   MonitorElement *theTypePlot6HitsShowerSeg;
0061 };
0062 
0063 #endif