All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
SimpleCaloDigi.h
Go to the documentation of this file.
1 
2 #ifndef DIGITIZERAR_H
3 #define DIGITIZERAR_H 1
4 
5 #include "marlin/Processor.h"
6 #include "lcio.h"
7 #include <string>
8 #include <vector>
9 
10 using namespace lcio ;
11 using namespace marlin ;
12 
13 
14 /**
15 \addtogroup CaloDigi CaloDigi
16 @{
17 
18 \addtogroup SimpleCaloDigi SimpleCaloDigi
19 @{
20 Simple calorimeter digitizer Processor.
21 === SimpleCaloDigi Processor === <br>
22  * Simple calorimeter digitizer Processor. <br>
23  * Takes SimCalorimeterHit Collections and <br>
24  * produces CalorimeterHit Collections. <br>
25  * Simulated energy depositions in active <br>
26  * layers of calorimeters are <br>
27  * converted into physical energy. This is done <br>
28  * taking into account sampling fractions of <br>
29  * ECAL and HCAL. <br>
30  * User has to specify ECAL and HCAL SimCalorimeterHit <br>
31  * collections with processor parameters <br>
32  * HCALCollections and ECALCollections. <br>
33  * The names of the output CalorimeterHit Collections <br>
34  * are specified with processor parameters <br>
35  * ECALOutputCollection and HCALOutputCollection. <br>
36  * Conversion factors for ECAL and HCAL <br>
37  * are specified via processor parameters <br>
38  * CalibrECAL and CalibrHCAL. <br>
39  * It should be noted that ECAL and HCAL may consist <br>
40  * of several sections with different sampling fractions. <br>
41  * To handle this situation, calibration coefficients for <br>
42  * ECAL and HCAL are passed as arrays of floats with each element <br>
43  * in this array corresponding to certain section with <br>
44  * a given sampling fraction. <br>
45  * List of layer numbers terminating each section are given through <br>
46  * processor parameters ECALLayers and HCALLayers <br>
47  * There is an option to perform digitization of <br>
48  * both ECAL and HCAL in a digital mode. <br>
49  * Digital mode is activated by <br>
50  * setting processor parameters <br>
51  * IfDigitalEcal / IfDigitalHcal to 1. <br>
52  * In this case CalibrECAL / CalibrHCAL will <br>
53  * convert the number of hits into physical energy. <br>
54  * Thresholds on hit energies in ECAL and HCAL <br>
55  * are set with processor parameters <br>
56  * ECALThreshold and HCALThreshold. <br>
57  * Relations between CalorimeterHits and SimCalorimeterHits <br>
58  * are held in the corresponding relation collection. <br>
59  * The name of this relation collection is specified <br>
60  * via processor parameter RelationOutputCollection. <br>
61  * <h4>Input collections and prerequisites</h4>
62  * SimCalorimeterHit collections <br>
63  * <h4>Output</h4>
64  * CalorimeterHit collections for ECal and HCal. <br>
65  * Collection of relations <br>
66  * between CalorimeterHits and SimCalorimeterHits. <br>
67  * For ECal Calorimeter hits the variable type is set to 0, <br>
68  * whereas for HCal Calorimeter hits the type is set to 1 <br>
69  * @author A. Raspereza (DESY) <br>
70  * @version $Id$ <br>
71  */
72 class SimpleCaloDigi : public Processor {
73 
74  public:
75 
76  virtual Processor* newProcessor() { return new SimpleCaloDigi ; }
77 
78 
79  SimpleCaloDigi() ;
80 
81  virtual void init() ;
82 
83  virtual void processRunHeader( LCRunHeader* run ) ;
84 
85  virtual void processEvent( LCEvent * evt ) ;
86 
87 
88  virtual void check( LCEvent * evt ) ;
89 
90 
91  virtual void end() ;
92 
93 
94  protected:
95 
96  int _nRun{};
97  int _nEvt{};
98 
99  std::vector<std::string> _ecalCollections{};
100  std::vector<std::string> _hcalCollections{};
101 
102  std::string _outputEcalCollection{};
103  std::string _outputHcalCollection{};
104  std::string _outputRelCollection{};
105 
106 
107  float _thresholdEcal{};
108  float _thresholdHcal{};
109 
110  int _digitalEcal{};
111  int _digitalHcal{};
112 
113 
114  std::vector<float> _calibrCoeffEcal{};
115  std::vector<float> _calibrCoeffHcal{};
116 
117  std::vector<int> _ecalLayers{};
118  std::vector<int> _hcalLayers{};
119 
120 
121 } ;
122 
123 /** @} @}*/
124 
125 #endif
virtual Processor * newProcessor()