3 #ifndef PHOTOELECTRICPROJECTIONFINDER_H
4 #define PHOTOELECTRICPROJECTIONFINDER_H 1
7 #include <marlin/Processor.h>
13 #include <gearimpl/GlobalPadIndex.h>
39 class PhotoelectricProjectionFinder :
public marlin::Processor
44 PhotoelectricProjectionFinder() ;
48 virtual Processor* newProcessor()
50 return new PhotoelectricProjectionFinder();
53 virtual void processRunHeader(lcio::LCRunHeader* run);
55 virtual void processEvent(lcio::LCEvent * evt);
57 virtual void check(lcio::LCEvent * evt);
65 std::string _input_tracker_pulses_collection_name;
69 float _max_separation;
73 float _density_threshold;
77 std::string _projected_photogeometry_file_name;
81 std::string _photogeometry_file_name;
85 std::map< gear::GlobalPadIndex, int > _counts_by_pad;
89 int _total_event_count;
93 float _photopulse_interval_start;
97 float _photopulse_interval_end;
101 float _event_fraction_threshold;
105 float _maximum_dot_displacement;
109 std::string _distortion_file_name;
113 std::string _detectorName;
117 void create_points(std::vector<CLHEP::Hep2Vector*> &points, std::map< CLHEP::Hep2Vector*, gear::GlobalPadIndex> &pad_by_point);
121 void find_neighbours(
const std::vector<CLHEP::Hep2Vector*> &points,
const float max_seperation, std::map< CLHEP::Hep2Vector*, std::set<CLHEP::Hep2Vector*> > &neighbours_by_point);
125 void calculate_point_clusters(
const std::vector< CLHEP::Hep2Vector* > &points,
const std::map< CLHEP::Hep2Vector*, std::set< CLHEP::Hep2Vector* > > &neighbours_by_point, std::set< std::set< CLHEP::Hep2Vector* > > &point_clusters);
129 void classify_point_clusters(
const std::set< std::set< CLHEP::Hep2Vector* > > &point_clusters,
const std::map< CLHEP::Hep2Vector*, gear::GlobalPadIndex > pad_by_point, std::set<
const std::set< CLHEP::Hep2Vector*>* > &photodots, std::set<
const std::set< CLHEP::Hep2Vector* >* > &photolines);
133 void store_results(
const std::set<
const std::set< CLHEP::Hep2Vector* >* > &photodots,
const std::set<
const std::set< CLHEP::Hep2Vector* >* > &photolines, std::map< CLHEP::Hep2Vector*, gear::GlobalPadIndex > pad_by_point,
bool storeLCIO);
137 void produce_tuples(
const std::set<
const std::set< CLHEP::Hep2Vector* >* > &photodots,
const std::set<
const std::set< CLHEP::Hep2Vector* >* > &photolines);
142 #endif // PHOTOELECTRICPROJECTIONFINDER_H