All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CommonAmps.h
Go to the documentation of this file.
1 /**
2  * \file CommonAmps.h
3  *
4  * \ingroup Algorithms
5  *
6  * \brief Class def header for a class CommonAmps
7  *
8  * @author ariana Hackenburg
9  */
10 
11 /** \addtogroup Algorithms
12 
13  @{*/
14 #ifndef OPT0FINDER_COMMONAMPS_H
15 #define OPT0FINDER_COMMONAMPS_H
16 
19 #include "TH1D.h"
20 
21 namespace flashmatch {
22 
23  /**
24  \class CommonAmps
25  Implementation of flashmatch::BaseFlashHypothesis algorithm class. \n
26  The goal of this algorithm is to compare the most prominent pieces of opflash spectra,
27  and spectra produced by photon library given QCluster points.
28  Tpc_point calculated as in QWeightPoint and stored based on the best match amplitudes.
29 
30  Only works with Photon Library currently
31  */
32  class CommonAmps : public BaseFlashMatch {
33 
34  public:
35 
36  /// Default constructor
37  CommonAmps(const std::string name="CommonAmps");
38 
39  /// Default destructor
41 
42  FlashMatch_t Match(const QCluster_t&, const Flash_t&);
43 
44  protected:
45 
46  void _Configure_(const Config_t &pset);
47 
48  private:
49 
50  float _percent;
51  float _score ;
52  float _x_step_size;
55 
56  };
57 
58  /**
59  \class flashmatch::CommonAmpsFactory
60  */
62  public:
63  /// ctor
65  /// dtor
67  /// creation method
68  BaseFlashMatch* create(const std::string instance_name) { return new CommonAmps(instance_name); }
69  };
70 }
71 #endif
72 /** @} */ // end of doxygen group
73 
void _Configure_(const Config_t &pset)
Definition: CommonAmps.cxx:20
CommonAmps(const std::string name="CommonAmps")
Default constructor.
Definition: CommonAmps.cxx:13
Abstract base class for factory (to be implemented per flash)
FlashMatch_t Match(const QCluster_t &, const Flash_t &)
Definition: CommonAmps.cxx:27
static FlashMatchFactory & get()
Static sharable instance getter.
void add_factory(const std::string name, flashmatch::FlashMatchFactoryBase *factory)
Factory registration method (should be called by global factory instance in algorithm header) ...
fhicl::ParameterSet Config_t
Configuration object.
Definition: FMWKInterface.h:31
flashmatch::QCluster_t _tpc_qcluster
Definition: CommonAmps.h:53
Struct to represent an optical flash.
BaseFlashMatch * create(const std::string instance_name)
creation method
Definition: CommonAmps.h:68
Class def header for a class FlashMatchFactory.
Collection of charge deposition 3D point (cluster)
flashmatch::Flash_t _vis_array
Definition: CommonAmps.h:54
Class def header for a class BaseFlashMatch.
Flash-TPC match info.
const std::string & name() const
Name getter, defined in a logger instance attribute.
Definition: LoggerFeature.h:51
~CommonAmps()
Default destructor.
Definition: CommonAmps.h:40