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 class RandomEngine;
23 
25 {
26 
27  public:
28 
29  explicit PileUpProducer(edm::ParameterSet const & p);
30  virtual ~PileUpProducer();
31  virtual void beginRun(edm::Run const&, edm::EventSetup const&) override;
32  virtual void endRun(edm::Run const&, edm::EventSetup const&) override;
33  virtual void produce(edm::Event & e, const edm::EventSetup & c) override;
34 
35  private:
36 
38  void save();
39 
42 
43  private:
44 
46 
49  std::vector<std::string> theFileNames;
51  unsigned theNumberOfFiles;
53 
54  std::vector<TFile*> theFiles;
55  std::vector<TTree*> theTrees;
56  std::vector<TBranch*> theBranches;
57  std::vector<PUEvent*> thePUEvents;
58  std::vector<unsigned> theCurrentEntry;
59  std::vector<unsigned> theCurrentMinBiasEvt;
60  std::vector<unsigned> theNumberOfEntries;
61  std::vector<unsigned> theNumberOfMinBiasEvts;
62 
63  std::ofstream myOutputFile;
64  unsigned myOutputBuffer;
65 
66  TH1F * hprob;
67  std::vector<int> dataProbFunctionVar;
68  std::vector<double> dataProb;
69  int varSize;
70  int probSize;
71 };
72 
73 #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
const RandomEngine * random
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:36
std::vector< TFile * > theFiles
void save()
Save current minbias configuration (for later use)
std::vector< TBranch * > theBranches