CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/FastSimulation/PileUpProducer/interface/PileUpSimulator.h

Go to the documentation of this file.
00001 #ifndef FastSimulation_PileUpProducer_PileUpSimulator_H
00002 #define FastSimulation_PileUpProducer_PileUpSimulator_H
00003 
00012 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 
00014 #include <vector>
00015 #include <string>
00016 #include <fstream>
00017 
00018 class TFile;
00019 class TTree;
00020 class TBranch;
00021 class PUEvent;
00022 
00023 namespace edm { 
00024   class ParameterSet;
00025 } 
00026 
00027 namespace HepMC { 
00028   class GenEvent;
00029 }
00030 
00031 class FSimEvent;
00032 
00033 class PileUpSimulator
00034 {
00035  public:
00036 
00038   PileUpSimulator(FSimEvent* aSimEvent);
00039 
00041   ~PileUpSimulator();
00042 
00044   void produce(const HepMC::GenEvent* pu);
00045 
00046  private:
00047 
00048   double averageNumber_;
00049   FSimEvent* mySimEvent;
00050   std::vector<std::string> theFileNames;
00051   std::string inputFile;
00052   unsigned theNumberOfFiles;
00053 
00054   std::vector<TFile*> theFiles;
00055   std::vector<TTree*> theTrees;
00056   std::vector<TBranch*> theBranches;
00057   std::vector<PUEvent*> thePUEvents;
00058   std::vector<unsigned> theCurrentEntry;
00059   std::vector<unsigned> theCurrentMinBiasEvt;
00060   std::vector<unsigned> theNumberOfEntries;
00061   std::vector<unsigned> theNumberOfMinBiasEvts;
00062 
00063   std::ofstream myOutputFile;
00064   unsigned myOutputBuffer;
00065 
00066 };
00067 #endif