1 #ifndef CalcTrackerHitResiduals_h
2 #define CalcTrackerHitResiduals_h 1
4 #include "marlin/Processor.h"
8 #include <EVENT/TrackerHit.h>
9 #include <EVENT/SimTrackerHit.h>
10 #include <IMPL/LCCollectionVec.h>
12 #include <UTIL/BitField64.h>
13 #include <UTIL/ILDConf.h>
25 class LCRelationNavigator ;
30 class IMarlinTrkSystem ;
36 #define MAXBUFFERSIZE 100
79 virtual void check( LCEvent * evt ) ;
90 void createHistogramBuffers();
92 void fill_histo(
const std::string& name,
float value);
94 void write_buffer_to_histo( std::map<std::string, std::list<float>*>::iterator it_buffer );
96 const LCObjectVec* getSimHits( TrackerHit* trkhit,
const FloatVec* weights = NULL);
100 UTIL::BitField64* _encoder;
101 int getDetectorID(TrackerHit* hit) { _encoder->setValue(hit->getCellID0());
return (*_encoder)[lcio::ILDCellID0::subdet]; }
102 int getSideID(TrackerHit* hit) { _encoder->setValue(hit->getCellID0());
return (*_encoder)[lcio::ILDCellID0::side]; };
103 int getLayerID(TrackerHit* hit) { _encoder->setValue(hit->getCellID0());
return (*_encoder)[lcio::ILDCellID0::layer]; };
104 int getModuleID(TrackerHit* hit) { _encoder->setValue(hit->getCellID0());
return (*_encoder)[lcio::ILDCellID0::module]; };
105 int getSensorID(TrackerHit* hit) { _encoder->setValue(hit->getCellID0());
return (*_encoder)[lcio::ILDCellID0::sensor]; };
109 LCCollection*
GetCollection( LCEvent * evt, std::string colName ) ;
112 LCRelationNavigator*
GetRelations( LCEvent * evt, std::string RelName ) ;
130 int _current_evt_number ;
133 std::vector< LCCollection* > _colTrackerHits;
134 std::vector< LCRelationNavigator* > _navTrackerHitRel;
139 std::map<std::string, TH1F*> _histo_map;
140 std::map<std::string, TH1F*>::iterator _histo_map_it;
142 std::map<std::string, std::list<float>*> _histo_buffer_map;
virtual void processEvent(LCEvent *evt)
Called for every event - the working horse.
Definition: CalcTrackerHitResiduals.cc:136
LCRelationNavigator * GetRelations(LCEvent *evt, std::string RelName)
helper function to get relations using try catch block
Definition: CalcTrackerHitResiduals.cc:464
virtual void processRunHeader(LCRunHeader *run)
Called for every run.
Definition: CalcTrackerHitResiduals.cc:131
Set the LCIO Extensions to relate SimTrackerHits to TrackerHits via a pointer.
Definition: CalcTrackerHitResiduals.h:56
virtual void end()
Called after data processing for clean up.
Definition: CalcTrackerHitResiduals.cc:375
std::vector< std::string > _colNamesTrackerHits
input TrackerHit collections
Definition: CalcTrackerHitResiduals.h:120
LCCollection * GetCollection(LCEvent *evt, std::string colName)
helper function to get collection using try catch block
Definition: CalcTrackerHitResiduals.cc:445
std::vector< std::string > _colNamesTrackerHitRelations
input relation collections
Definition: CalcTrackerHitResiduals.h:124
virtual void init()
Called at the begin of the job before anything is read.
Definition: CalcTrackerHitResiduals.cc:100
void SetupInputCollections(LCEvent *evt)
sets up the different collections
Definition: CalcTrackerHitResiduals.cc:410