4 #include "marlin/Processor.h"
14 #include <EVENT/LCCollection.h>
15 #include <EVENT/SimCalorimeterHit.h>
16 #include <IMPL/CalorimeterHitImpl.h>
17 #include <IMPL/LCCollectionVec.h>
18 #include <IMPL/LCFlagImpl.h>
20 #include <marlin/Global.h>
26 #include "CalorimeterHitType.h"
27 #include "marlinutil/LCGeometryTypes.h"
29 #include <AIDA/IHistogramFactory.h>
30 #include <AIDA/IHistogram1D.h>
46 using namespace lcio ;
47 using namespace marlin ;
68 : step{vec} , stepLength{_length} , time{_time}
72 float stepLength = 0 ;
78 AsicKey(
int l ,
int aI = -1 ,
int aJ = -1) : layerID(l) , asicI(aI) , asicJ(aJ) {}
85 return std::tie( layerID , asicI , asicJ ) < std::tie(b.
layerID , b.
asicI , b.
asicJ ) ;
89 return std::tie( layerID , asicI , asicJ ) == std::tie(b.
layerID , b.
asicI , b.
asicJ ) ;
108 virtual void init() ;
112 virtual void processEvent( LCEvent * evt ) ;
115 void operator=(
const SimDigital &toCopy) = delete ;
123 : ahit(nullptr) , relatedHits() , maxEnergydueToHit(-1) , rawHit(-1)
126 std::unique_ptr<CalorimeterHitImpl> ahit = nullptr ;
128 std::set<int> relatedHits{};
129 float maxEnergydueToHit = -1 ;
142 void removeAdjacentStep(std::vector<StepAndCharge>& vec) ;
143 void fillTupleStep(
const std::vector<StepAndCharge>& vec ,
int level) ;
144 void removeHitsBelowThreshold(
cellIDHitMap& myHitMap ,
float threshold) ;
147 std::vector<std::string> _inputCollections{};
149 std::vector<std::string> _outputCollections{};
150 std::vector<std::string> _outputRelCollections{};
153 LCFlagImpl flagRel {} ;
155 std::map<std::string, int> _counters{};
156 std::vector<float> _thresholdHcal{};
158 std::vector<double> _hitCharge = {};
160 std::map<dd4hep::long64 , std::vector<LCGenericObject*>> geneMap = {};
162 float _cellSize = 0 ;
163 float _gasGapWidth = 1.2f ;
166 std::string chargeSpreaderOption =
"Uniform" ;
167 std::string spreaderMapFile =
"" ;
171 std::string polyaOption =
"Uniform" ;
172 std::string polyaMapFile =
"" ;
173 float polyaQbar = 0.0f ;
174 float polyaTheta = 0.0f ;
176 int _polyaRandomSeed = 1 ;
178 float _angleCorrPow = 0.4f ;
180 double timeCut = std::numeric_limits<double>::max() ;
181 double stepLengthCut = -1.0 ;
183 bool _linkSteps = false ;
184 bool _doThresholds = true ;
186 std::string efficiencyOption =
"Uniform" ;
187 std::string effMapFile =
"" ;
189 float _constEffMapValue = 0.97f ;
191 float _absZstepFilter = 0.0005f ;
192 float _minXYdistanceBetweenStep = 0.5f ;
193 bool _keepAtLeastOneStep = true ;
195 AIDA::ITuple* _debugTupleStepFilter = nullptr ;
196 AIDA::ITuple* _tupleStepFilter = nullptr ;
197 AIDA::ITuple* _tupleCollection = nullptr ;
199 AIDA::IHistogram1D* _histoCellCharge = nullptr ;
201 std::string _encodingType =
"LCGEO" ;
AsicKey(int l, int aI=-1, int aJ=-1)
std::map< dd4hep::long64, hitMemory > cellIDHitMap
bool operator<(const AsicKey &b) const
StepAndCharge(LCVector3D vec, float _length, float _time)
std::vector< LCCollection * > LCCollectionVec
ChargeSpreaderParameters chargeSpreaderParameters
virtual Processor * newProcessor()
bool operator==(const AsicKey &b) const