CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PileUpProducer.h
Go to the documentation of this file.
1 #ifndef FastSimulation_PileUpProducer_PileUpProducer_H
2 #define FastSimulation_PileUpProducer_PileUpProducer_H
3 
6 
7 #include <vector>
8 #include <string>
9 #include <fstream>
10 #include "TH1F.h"
11 
12 class ParameterSet;
13 class Event;
14 class EventSetup;
15 
16 class TFile;
17 class TTree;
18 class TBranch;
19 class PUEvent;
20 
22 
24 {
25 
26  public:
27 
28  explicit PileUpProducer(edm::ParameterSet const & p);
29  virtual ~PileUpProducer();
30  virtual void beginRun(edm::Run const&, edm::EventSetup const&) override;
31  virtual void endRun(edm::Run const&, edm::EventSetup const&) override;
32  virtual void produce(edm::Event & e, const edm::EventSetup & c) override;
33 
34  private:
35 
37  void save();
38 
41 
42  private:
43 
45 
47  std::vector<std::string> theFileNames;
49  unsigned theNumberOfFiles;
51 
52  std::vector<TFile*> theFiles;
53  std::vector<TTree*> theTrees;
54  std::vector<TBranch*> theBranches;
55  std::vector<PUEvent*> thePUEvents;
56  std::vector<unsigned> theCurrentEntry;
57  std::vector<unsigned> theCurrentMinBiasEvt;
58  std::vector<unsigned> theNumberOfEntries;
59  std::vector<unsigned> theNumberOfMinBiasEvts;
60 
61  std::ofstream myOutputFile;
62  unsigned myOutputBuffer;
63 
64  TH1F * hprob;
65  std::vector<int> dataProbFunctionVar;
66  std::vector<double> dataProb;
67  int varSize;
68  int probSize;
69 };
70 
71 #endif
PileUpProducer(edm::ParameterSet const &p)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
std::vector< unsigned > theNumberOfMinBiasEvts
std::vector< std::string > theFileNames
bool read(std::string inputFile)
Read former minbias configuration (from previous run)
std::vector< int > dataProbFunctionVar
std::vector< unsigned > theNumberOfEntries
PrimaryVertexGenerator * theVertexGenerator
std::ofstream myOutputFile
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< unsigned > theCurrentMinBiasEvt
std::vector< PUEvent * > thePUEvents
std::string inputFile
std::vector< double > dataProb
std::vector< unsigned > theCurrentEntry
double averageNumber_
std::vector< TTree * > theTrees
virtual ~PileUpProducer()
Definition: PUEvent.h:6
unsigned theNumberOfFiles
unsigned myOutputBuffer
Definition: Run.h:41
std::vector< TFile * > theFiles
void save()
Save current minbias configuration (for later use)
std::vector< TBranch * > theBranches