Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:20

0001 #ifndef SiPixelMonitorRecHits_SiPixelRecHitSource_h
0002 #define SiPixelMonitorRecHits_SiPixelRecHitSource_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     SiPixelMonitorRecHits
0006 // Class  :     SiPixelRecHitSource
0007 //
0008 /**
0009 
0010  Description: header file for Pixel Monitor Rec Hits
0011 
0012  Usage:
0013     see description
0014 
0015 */
0016 //
0017 // Original Author:  Vincenzo Chiochia
0018 //         Created:
0019 //
0020 // Updated by: Keith Rose
0021 // for use in SiPixelMonitorRecHits
0022 // Updated by: Lukas Wehrli
0023 // for pixel offline DQM
0024 
0025 #include <memory>
0026 
0027 // user include files
0028 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0029 
0030 #include "DQM/SiPixelMonitorRecHit/interface/SiPixelRecHitModule.h"
0031 
0032 #include "DataFormats/Common/interface/DetSetVector.h"
0033 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0034 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0035 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
0036 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0037 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0038 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0039 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0040 #include <cstdint>
0041 
0042 class SiPixelRecHitSource : public DQMEDAnalyzer {
0043 public:
0044   explicit SiPixelRecHitSource(const edm::ParameterSet &conf);
0045   ~SiPixelRecHitSource() override;
0046 
0047   //       typedef edm::DetSet<PixelRecHit>::const_iterator    RecHitIterator;
0048 
0049   void analyze(const edm::Event &, const edm::EventSetup &) override;
0050   void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override;
0051   void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override;
0052 
0053   virtual void buildStructure(edm::EventSetup const &);
0054   virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup);
0055 
0056   std::string topFolderName_;
0057 
0058 private:
0059   edm::ParameterSet conf_;
0060   edm::EDGetTokenT<SiPixelRecHitCollection> src_;
0061   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerTopoTokenBeginRun_;
0062   edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomTokenBeginRun_;
0063 
0064   bool saveFile;
0065   bool isPIB;
0066   bool slowDown;
0067   int eventNo;
0068   std::map<uint32_t, SiPixelRecHitModule *> thePixelStructure;
0069   std::map<uint32_t, int> rechit_count;
0070   bool modOn;
0071   bool twoDimOn;
0072   bool reducedSet;
0073   // barrel:
0074   bool ladOn, layOn, phiOn;
0075   // forward:
0076   bool ringOn, bladeOn, diskOn;
0077 
0078   bool firstRun;
0079   bool isUpgrade;
0080 };
0081 
0082 #endif