LDMX Software
EcalWABRecProcessor.h
Go to the documentation of this file.
1
7#ifndef EVENTPROC_ECALWABROCESSOR_H_
8#define EVENTPROC_ECALWABROCESSOR_H_
9
10// LDMX
12#include "DetDescr/EcalID.h"
13#include "DetDescr/SimSpecialID.h"
14#include "Ecal/Event/EcalHit.h"
17#include "SimCore/Event/SimParticle.h"
19#include "Tracking/Event/StraightTrack.h"
20
21/*~~~~~~~~~~~*/
22/* Tools */
23/*~~~~~~~~~~~*/
24#include "Eigen/Dense"
25
26// C++
27#include <stdlib.h>
28
29#include <iomanip>
30#include <map>
31#include <memory>
32#include <numbers> // For std::numbers::pi
33#include <numeric>
34
35namespace ecal {
36
38 public:
39 EcalWABRecProcessor(const std::string& name, framework::Process& process)
40 : Producer(name, process) {}
41
42 virtual ~EcalWABRecProcessor() = default;
43
44 void onProcessEnd() override;
45
46 void configure(framework::config::Parameters& parameters) override;
47
48 void produce(framework::Event& event) override;
49
50 private:
51 std::string sp_pass_name_;
52 std::string rec_pass_name_;
53 std::string rec_coll_name_;
54 std::string track_pass_name_;
55 std::string track_coll_name_;
56 int nevents_{0};
57 float processing_time_{0.};
58
59 std::tuple<Eigen::VectorXd, float, int, Eigen::MatrixXd, int>
60 fit2DTracksConstrained(const std::vector<float>& x1,
61 const std::vector<float>& y1,
62 const std::vector<float>& s1,
63 const std::vector<float>& x2,
64 const std::vector<float>& y2,
65 const std::vector<float>& s2,
66 const std::vector<double>& guess, int maxIter,
67 int verbosity, float dchisq, float abs_lim);
68
69 std::pair<Eigen::VectorXd, Eigen::VectorXd> polyfitXYvsZ(
70 const std::vector<float>& x, const std::vector<float>& y,
71 const std::vector<float>& z, int degree);
72
74 std::string collection_name_{"EcalWABRec"};
75
76}; // EcalWABRecProcessor
77
78} // namespace ecal
79
80#endif
Class that translates raw positions of ECal module hits into cells in a hexagonal readout.
Class that defines an ECal detector ID with a cell number.
Class used to encapsulate the results obtained from EcalWABRecProcessor.
Base classes for all user event processing components to extend.
Class which encapsulates information from a hit in a simulated tracking detector.
void produce(framework::Event &event) override
Process the event and put new data products into it.
std::string collection_name_
Name of the collection which will contain the results.
void onProcessEnd() override
Callback for the EventProcessor to take any necessary action when the processing of events finishes,...
void configure(framework::config::Parameters &parameters) override
Callback for the EventProcessor to configure itself from the given set of parameters.
Implements an event buffer system for storing event data.
Definition Event.h:42
Class which represents the process under execution.
Definition Process.h:36
Base class for a module which produces a data product.
Producer(const std::string &name, Process &process)
Class constructor.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29