All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
VTXNoiseClusters.h
Go to the documentation of this file.
1 #ifndef VTXNoiseClusters_h
2 #define VTXNoiseClusters_h 1
3 
4 
5 //#ifdef USE_ROOT
6 // we need some root histograms with cluster size distribution for this processor
7 
8 #include "marlin/Processor.h"
9 #include "marlin/EventModifier.h"
10 #include "lcio.h"
11 #include <string>
12 #include <vector>
13 #include <gsl/gsl_rng.h>
14 
15 #include "TH2F.h"
16 #include "TFile.h"
17 
18 #ifdef MARLIN_USE_AIDA
19 #include <AIDA/AIDA.h>
20 typedef std::vector< AIDA::IHistogram1D* > Hist1DVec ;
21 typedef std::vector< AIDA::IHistogram2D* > Hist2DVec ;
22 #endif
23 
24 using namespace lcio ;
25 using namespace marlin ;
26 
27 class VXDGeometry ;
28 
29 
30 /**
31 \addtogroup TrackDigi TrackDigi
32 @{
33 \addtogroup VTXNoiseClusters VTXNoiseClusters
34 @{
35 Adds random noise hits to collection of SimTrackerHits of the vertex detector.
36 ======= VTXNoiseClusters ========== <br>
37  * Adds random noise hits to collection of SimTrackerHits of the vertex detector.
38  * The number of noise hits are given by the parameter HitDensityPerLayer (hits/cm^2).
39  * The noise hits are created with a uniform distribution over the ladder
40  * surface. An object of type VXDClusterParameters is added to every hit to describe the
41  * extension of the cluster on the ladder surface.
42  * The distribution of the cluster sizes is read from ROOT histograms - one per layer.
43  *
44  * @param RootHistograms root file name and histogram names (one per layer)
45  * @param HitDensityPerLayer hit densities (hits/cm^2) per VXD layer
46  * @param VTXCollectionName collection of VXD SimTrackerhits
47  * @param RandomSeed random number seed
48  *
49  * <br>
50  * @version $Id$
51  * @author F.Gaede, DESY
52  */
53 
54 class VTXNoiseClusters : public Processor, public EventModifier{
55 
56  public:
57  VTXNoiseClusters(const VTXNoiseClusters&) = delete;
58  VTXNoiseClusters& operator=(const VTXNoiseClusters&) = delete;
59 
60  virtual Processor* newProcessor() { return new VTXNoiseClusters ; }
61 
62 
64 
65  virtual const std::string & name() const { return Processor::name() ; }
66 
67  /** Called at the begin of the job before anything is read.
68  * Use to initialize the processor, e.g. book histograms.
69  */
70  virtual void init() ;
71 
72  /** Called for every run.
73  */
74  virtual void processRunHeader( LCRunHeader* run ) ;
75 
76  /** Called for every event - the working horse.
77  */
78  void modifyEvent( LCEvent * evt ) ;
79 
80  virtual void processEvent( LCEvent * evt ) ;
81 
82 
83  virtual void check( LCEvent * evt ) ;
84 
85 
86  /** Called after data processing for clean up.
87  */
88  virtual void end() ;
89 
90 
91  protected:
92 
93  std::string _colNameVTX{};
94  FloatVec _densities{};
95  StringVec _rootNames{};
96 // float _pointResoRPhiVTX ;
97 // float _pointResoZVTX ;
98  int _ranSeed{};
99 
100  int _nRun{};
101  int _nEvt{};
102 
103  gsl_rng* _rng{};
104  VXDGeometry* _vxdGeo{};
105 
106  std::vector<TH2F*> _hist{};
107  TFile* _hfile{};
108 
109 #ifdef MARLIN_USE_AIDA
110  Hist1DVec _hist1DVec{};
111  Hist2DVec _hist2DVec{};
112 #endif
113 
114 } ;
115 /** @} @} */
116 #endif
117 //#endif // USE_ROOT
======= VXDGeometry ========== Helper class for VXD geomtry transformations: from lab frame to ladd...
Definition: VXDGeometry.h:53
virtual Processor * newProcessor()
virtual const std::string & name() const
std::vector< std::string > StringVec
Definition: SiStripClus.h:56