All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
NNClusterProcessor.h
Go to the documentation of this file.
1 #ifndef NNClusterProcessor_h
2 #define NNClusterProcessor_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 
8 
9 using namespace lcio ;
10 using namespace marlin ;
11 
12 
13 /**
14 \addtogroup Clustering Clustering
15 @{
16 
17 \addtogroup NNClusterProcessor NNClusterProcessor
18 @{
19 Example processor that does a simple nearest neighbour (NN) clustering on one or more CalorimeterHit collections.
20  * It uses a simple euclididan distance cut.
21  *
22  * @param HitCollections - Name of the input collection(s) (CalorimeterHit)
23  * @param OutputCollection - Name of the output collection (Cluster)
24  * @param DistanceCut - Cut for distance between hits in mm
25  * @param EnergyCut - Cut for hit energy in GeV
26  *
27  * @author F.Gaede (DESY)
28  * @version $Id$
29  */
30 class NNClusterProcessor : public Processor {
31 
32  public:
33 
34  virtual Processor* newProcessor() { return new NNClusterProcessor ; }
35 
36 
38 
39  /** Called at the begin of the job before anything is read.
40  * Use to initialize the processor, e.g. book histograms.
41  */
42  virtual void init() ;
43 
44  /** Called for every run.
45  */
46  virtual void processRunHeader( LCRunHeader* run ) ;
47 
48  /** Called for every event - the working horse.
49  */
50  virtual void processEvent( LCEvent * evt ) ;
51 
52 
53  virtual void check( LCEvent * evt ) ;
54 
55 
56  /** Called after data processing for clean up.
57  */
58  virtual void end() ;
59 
60 
61  protected:
62 
63  /** Input collection name.
64  */
65  StringVec _colNames{};
66 
67  std::string _outputColName{};
68 
69  float _distCut{};
70  float _eCut{};
71 
72  int _nThetaPhi{};
73 
74  int _nRun{};
75  int _nEvt{};
76 
77 // NNClusterer* _clusterer ;
78 
79 } ;
80 
81 /** @} @} */
82 
83 #endif
virtual Processor * newProcessor()
std::vector< std::string > StringVec
Definition: SiStripClus.h:56