Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:09

0001 #ifndef DUPLICATIONCHECKER_H
0002 #define DUPLICATIONCHECKER_H
0003 
0004 /*class DuplicationChecker
0005  *  
0006  *  Class to monitor duplication of events
0007  *
0008  *
0009  */
0010 
0011 // framework & common header files
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/Framework/interface/EventSetup.h"
0014 #include "FWCore/Framework/interface/Run.h"
0015 
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/Utilities/interface/InputTag.h"
0020 
0021 //DQM services
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023 #include "FWCore/ServiceRegistry/interface/Service.h"
0024 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0025 
0026 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0027 
0028 #include <map>
0029 #include <vector>
0030 
0031 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0032 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
0033 #include "DataFormats/Provenance/interface/EventID.h"
0034 
0035 #include "Validation/EventGenerator/interface/WeightManager.h"
0036 
0037 class DuplicationChecker : public DQMEDAnalyzer {
0038 public:
0039   typedef std::multimap<double, edm::EventID> associationMap;
0040   typedef std::vector<associationMap::iterator> itemList;
0041 
0042   explicit DuplicationChecker(const edm::ParameterSet &);
0043   ~DuplicationChecker() override;
0044 
0045   void analyze(const edm::Event &, const edm::EventSetup &) override;
0046   void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override;
0047 
0048   void findValuesAssociatedWithKey(associationMap &mMap, double &key, itemList &theObjects);
0049 
0050 private:
0051   WeightManager wmanager_;
0052 
0053   edm::InputTag generatedCollection_;
0054   edm::InputTag lheEventProduct_;
0055 
0056   bool searchForLHE_;
0057 
0058   associationMap xBjorkenHistory;
0059 
0060   MonitorElement *xBjorkenME;
0061 
0062   edm::EDGetTokenT<LHEEventProduct> lheEventProductToken_;
0063   edm::EDGetTokenT<edm::HepMCProduct> generatedCollectionToken_;
0064 };
0065 
0066 #endif