Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:39

0001 #ifndef PileupVertexAccumulator_h
0002 #define PileupVertexAccumulator_h
0003 
0004 /** \class PileupVertexAccumulator
0005  *
0006  * PileupVertexAccumulator saves some pileup vertex information which is passed to
0007  * PileupSummaryInformation
0008  *
0009  * \author Mike Hildreth
0010  *
0011  * \version   Jan 22 2015  
0012 
0013  *
0014  ************************************************************/
0015 
0016 #include <memory>
0017 #include <string>
0018 #include <vector>
0019 
0020 #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h"
0021 #include "FWCore/Framework/interface/ESHandle.h"
0022 #include "FWCore/Framework/interface/ProducesCollector.h"
0023 
0024 #include "DataFormats/Provenance/interface/EventID.h"
0025 #include "FWCore/Utilities/interface/InputTag.h"
0026 
0027 namespace edm {
0028   class ConsumesCollector;
0029   class ProducerBase;
0030   class Event;
0031   class EventSetup;
0032   class ParameterSet;
0033   template <typename T>
0034   class Handle;
0035   class StreamID;
0036 }  // namespace edm
0037 
0038 class PileUpEventPrincipal;
0039 
0040 namespace cms {
0041   class PileupVertexAccumulator : public DigiAccumulatorMixMod {
0042   public:
0043     explicit PileupVertexAccumulator(const edm::ParameterSet& conf, edm::ProducesCollector, edm::ConsumesCollector& iC);
0044 
0045     ~PileupVertexAccumulator() override;
0046 
0047     void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
0048     void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
0049     void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
0050     void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
0051 
0052     virtual void beginJob() {}
0053 
0054   private:
0055     std::vector<float> pT_Hats_;
0056     std::vector<float> z_posns_;
0057     std::vector<float> t_posns_;
0058     edm::InputTag Mtag_;
0059     edm::InputTag fallbackMtag_;
0060     bool saveVtxTimes_;
0061   };
0062 }  // namespace cms
0063 
0064 #endif