1 #ifndef RecoMCTruthLinker_h
2 #define RecoMCTruthLinker_h
4 #include "marlin/Processor.h"
6 #include <EVENT/MCParticle.h>
7 #include <IMPL/LCCollectionVec.h>
9 #include "EVENT/TrackerHit.h"
11 #include "UTIL/LCTrackerConf.h"
12 #include "UTIL/ILDConf.h"
20 class LCRelationNavigator ;
23 using namespace lcio ;
124 virtual void init() ;
128 virtual void processRunHeader( LCRunHeader* run ) ;
133 virtual void processEvent( LCEvent * evt ) ;
135 virtual void trackLinker( LCEvent * evt, LCCollection* mcpCol , LCCollection* trackCol, LCCollection** ttrcol , LCCollection** trtcol ) ;
136 virtual void clusterLinker( LCEvent * evt, LCCollection* mcpCol , LCCollection* clusterCol,
137 LCCollection** ctrcol, LCCollection** trccol,LCCollection** chittrlcol) ;
138 virtual void particleLinker( LCCollection* mcpCol , LCCollection* particleCol ,
139 LCCollection* ttrcol, LCCollection* ctrlcol,
140 LCCollection* trtlcol, LCCollection* trclcol,
141 LCCollection** ptrlcol , LCCollection** trplcol ) ;
142 virtual void linkPrinter ( LCCollection* mcpCol, LCCollection* particleCol, LCCollection* ptrlcol, LCCollection* trplcol) ;
143 virtual void check( LCEvent * evt ) ;
145 virtual void makeSkim( LCCollection* mcpCol , LCCollection* ttrcol, LCCollection* ctrcol ,
LCCollectionVec** skimVec) ;
154 virtual void mergeTrackerHitRelations(LCEvent * evt);
155 virtual void mergeCaloHitRelations(LCEvent * evt);
157 void keepMCParticle( MCParticle* mcp ) ;
159 const LCObjectVec* getSimHits( TrackerHit* trkhit,
const FloatVec* weights = NULL);
160 const LCObjectVec* getCaloHits( CalorimeterHit* calohit,
const FloatVec* weights = NULL);
163 static UTIL::BitField64 _encoder = UTIL::BitField64(lcio::LCTrackerCellID::encoding_string());
164 _encoder.setValue(hit->getCellID0());
165 return _encoder[lcio::LCTrackerCellID::subdet()];
171 std::string _mcParticleCollectionName{};
172 std::string _trackCollectionName{};
173 std::string _clusterCollectionName{};
174 std::string _recoParticleCollectionName{};
183 LCRelationNavigator* _navMergedTrackerHitRel=
nullptr;
185 LCRelationNavigator* _navMergedCaloHitRel=
nullptr;
187 bool _use_tracker_hit_relations{};
190 std::string _trackMCTruthLinkName{};
191 std::string _mCTruthTrackLinkName{};
192 std::string _clusterMCTruthLinkName{};
193 std::string _mCTruthClusterLinkName{};
194 std::string _recoMCTruthLinkName{};
195 std::string _mCTruthRecoLinkName{};
196 std::string _mcParticlesSkimmedName{};
197 std::string _calohitMCTruthLinkName{};
199 bool _FullRecoRelation{};
200 bool _OutputTrackTruthRelation{};
201 bool _OutputTruthTrackRelation{};
202 bool _OutputClusterTruthRelation{};
203 bool _OutputTruthClusterRelation{};
204 bool _OutputCalohitRelation{};
205 bool _OutputTruthRecoRelation{};
207 bool _saveBremsstrahlungPhotons{};
208 float _bremsstrahlungEnergyCut{};
209 bool _invertedNonDestructiveInteractionLogic{};
211 bool _using_particle_gun{};
virtual Processor * newProcessor()
std::vector< LCCollection * > LCCollectionVec
Optionally creates four collections of LCRelations ("recoMCTruthLink", "trackMCTruthLink", "mcTruthTrackLink", "clusterMCTruthLink", ""clusterMCTruthLink" and "calohitMCTruthLink") with weighetd relations between true particles and reconstructed particles, tracks, clusters, and calorimeter hits, respectively.
int getDetectorID(TrackerHit *hit)
std::set< unsigned > PDGSet
std::vector< std::string > StringVec