All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CFAlgoShowerCompat.h
Go to the documentation of this file.
1 /**
2  * \file CFAlgoShowerCompat.h
3  *
4  * \ingroup CMTAlgMatch
5  *
6  * \brief This algo only matches clusters if they are not track-like.
7  * This is implemented in an algo because it allows the comparison of
8  * cluster parameters across planes, rather than individually.
9  * It is intended to be added as the last matching algo, with the
10  * "kLastAlgo" mode.
11  *
12  * @author davidkaleko_NAME
13  */
14 
15 /** \addtogroup CMTAlgMatch
16 
17  @{*/
18 #ifndef CFALGOSHOWERCOMPAT_HH
19 #define CFALGOSHOWERCOMPAT_HH
20 
21 class TFile;
22 class TTree;
23 
25 
26 namespace cmtool {
27  /**
28  \class CFAlgoShowerCompat
29  User implementation for CFloatAlgoBase class
30  doxygen documentation!
31  */
33  public:
34  /// Default constructor
36 
37  //
38  // Author should be aware of 3 functions at least: Float, Report,
39  // and Reset. More possibly-useful functions can be found in the later
40  // part but commented out. All of these functions are virtual and defined
41  // in the base class.
42 
43  /**
44  Core function: given a set of CPANs, return a float which indicates
45  the compatibility the cluster combination.
46  */
47  float Float(util::GeometryUtilities const&,
48  const std::vector<const cluster::ClusterParamsAlg*>& clusters) override;
49 
50  /**
51  Optional function: called after each iterative approach if a manager class is
52  run with verbosity level <= kPerIteration. Maybe useful for debugging.
53  */
54  void Report() override;
55 
56  /// Function to reset the algorithm instance, called together with manager's Reset()
57  void Reset() override;
58 
60 
61  void
63  {
64  _fout_hax->cd();
65  _ana_tree->Write();
66  _fout_hax->Close();
67  };
68 
69  /**
70  Optional function: called at the beginning of 1st iteration. This is called per event.
71  */
72  //virtual void EventBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
73 
74  /**
75  Optional function: called at the end of event ... after the last merging iteration is over.
76  */
77  //virtual void EventEnd();
78 
79  /**
80  Optional function: called at the beggining of each iterative loop.
81  This provides all clusters' information in case the algorithm need them. Note this
82  is called per iteration which may be more than once per event.
83  */
84  //virtual void IterationBegin(const std::vector<cluster::ClusterParamsAlg> &clusters);
85 
86  /**
87  Optional function: called at the end of each iterative loop.
88  */
89  //virtual void IterationEnd();
90 
91  private:
92  TTree* _ana_tree;
93  double _o_ang_avg;
94  double _o_ang_rms;
95  double _o_ang_wt_avg;
96  double _o_ang_wt_rms;
102 
103  TFile* _fout_hax;
104  };
105 }
106 #endif
107 /** @} */ // end of doxygen group
float Float(util::GeometryUtilities const &, const std::vector< const cluster::ClusterParamsAlg * > &clusters) override
Class def header for a class CFloatAlgoBase.
void Reset() override
Function to reset the algorithm instance, called together with manager&#39;s Reset()
void PrintClusterInfo(const cluster::ClusterParamsAlg &c)
CFAlgoShowerCompat()
Default constructor.