CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/Validation/EventGenerator/interface/DuplicationChecker.h

Go to the documentation of this file.
00001 #ifndef DUPLICATIONCHECKER_H
00002 #define DUPLICATIONCHECKER_H
00003 
00004 /*class DuplicationChecker
00005  *  
00006  *  Class to monitor duplication of events
00007  *
00008  *  $Date: 2011/12/29 10:53:10 $
00009  *  $Revision: 1.2 $
00010  *
00011  */
00012 
00013 // framework & common header files
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "FWCore/Framework/interface/EventSetup.h"
00017 #include "FWCore/Framework/interface/Run.h"
00018 
00019 #include "DataFormats/Common/interface/Handle.h"
00020 #include "FWCore/Framework/interface/ESHandle.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 #include "FWCore/Utilities/interface/InputTag.h"
00023 
00024 //DQM services
00025 #include "DQMServices/Core/interface/DQMStore.h"
00026 #include "FWCore/ServiceRegistry/interface/Service.h"
00027 #include "DQMServices/Core/interface/MonitorElement.h"
00028 
00029 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00030 
00031 #include <map>
00032 #include <vector>
00033 
00034 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00035 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
00036 #include "DataFormats/Provenance/interface/EventID.h"
00037 
00038 #include "Validation/EventGenerator/interface/WeightManager.h"
00039 
00040 class DuplicationChecker : public edm::EDAnalyzer
00041 {
00042   
00043  public:
00044 
00045   typedef std::multimap<double,edm::EventID> associationMap;
00046   typedef std::vector<associationMap::iterator> itemList;
00047 
00048   explicit DuplicationChecker(const edm::ParameterSet&);
00049   virtual ~DuplicationChecker();
00050   void beginJob();
00051   void endJob();  
00052   void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup);
00053   virtual void beginRun(const edm::Run&, const edm::EventSetup&){ return;}
00054   virtual void endRun(const edm::Run&, const edm::EventSetup&){ return;}
00055   void findValuesAssociatedWithKey(associationMap &mMap, double &key, itemList &theObjects);  
00056   
00057  private:
00058   WeightManager _wmanager;
00059   
00060   edm::InputTag generatedCollection_;
00061   
00062   bool searchForLHE_;
00063 
00064   associationMap xBjorkenHistory;
00065         
00066   DQMStore *dbe;
00067 
00068   MonitorElement* xBjorkenME;
00069 
00070 };
00071 
00072 #endif