Overlay  0.16.0
FPCCDOverlayBX.h
1 #ifndef FPCCDOverlayBX_h
2 #define FPCCDOverlayBX_h 1
3 
4 #include "marlin/Processor.h"
5 #include "marlin/EventModifier.h"
6 #include "lcio.h"
7 #include <string>
8 #include <vector>
9 
10 #ifdef MARLIN_USE_AIDA
11 #include <vector>
12 #include <AIDA/AIDA.h>
13 typedef std::vector< AIDA::IHistogram1D* > Hist1DVec ;
14 #endif
15 
16 namespace overlay{
17 
18 
44  class FPCCDOverlayBX : public marlin::Processor, public marlin::EventModifier {
45 
46  public:
47 
48  virtual marlin::Processor* newProcessor() { return new FPCCDOverlayBX ; }
49 
50 
51  FPCCDOverlayBX() ;
52 
53  virtual const std::string & name() const { return Processor::name() ; }
54 
55  virtual void modifyEvent( LCEvent * evt ) ;
56 
60  virtual void init() ;
61 
64  virtual void processRunHeader( LCRunHeader* run ) ;
65 
66  virtual void check( LCEvent * evt ) ;
67 
68 
71  virtual void end() ;
72 
73 
74  protected:
75 
77  // LCEvent* readNextEvent() ;
78 
80  // LCEvent* readNextEvent(int bxNum) ;
81 
82  LCEvent* readNextEvent(int bxNum) ;
83 
85  void init_geometry() ;
86 
87  // ---- variables for processor parameters -----
88  StringVec _inputFileNames ;
89  StringVec _tmpInputFileNames ; // not read same file twice or more.
90  int _eventsPerBX;
91  int _numBX ;
92  bool _removeVTX;
93 
94  std::string _vxdCollection ;
95  std::string _vtxPixelHitsCollection ;
96  StringVec _mergeCollections ;
97  int _nLayer;
98  int _maxLadder;
99  //---- class member variables ------
100  typedef std::map<std::string, std::string> StrMap ;
101  StrMap _colMap;
102  // std::map<std::string, std::string> _colMap;
103 
104  std::vector< LCReader* > _lcReaders ;
105  int _maxBXs ;
106  int _nRun ;
107  int _nEvt ;
108 
109  struct GeoData_t {
110  int nladder;
111  };
112  std::vector<GeoData_t> _geodata;
113 
114 #ifdef MARLIN_USE_AIDA
115  Hist1DVec _hist1DVec ;
116 #endif
117 
118  } ;
119 
120 } // namespace
121 
122 #endif
LCEvent * readNextEvent(int bxNum)
helper function for (randomly) reading the next event
Definition: FPCCDOverlayBX.cc:146
virtual void processRunHeader(LCRunHeader *run)
Called for every run.
Definition: FPCCDOverlayBX.cc:141
FPCCDOverlayBX processor for overlaying (pair) background from many bunch crossings.
Definition: FPCCDOverlayBX.h:44
virtual void init()
Called at the begin of the job before anything is read.
Definition: FPCCDOverlayBX.cc:92
void init_geometry()
helper function
Definition: FPCCDOverlayBX.cc:349
virtual void end()
Called after data processing for clean up.
Definition: FPCCDOverlayBX.cc:342
Definition: FPCCDOverlayBX.h:109