LDMX Software
EcalMipTrackingFeatures.cxx
1
2#include "DQM/EcalMipTrackingFeatures.h"
3
4#include <cmath>
5
8
9namespace dqm {
10
12 ecal_mip_name_ = ps.get<std::string>("ecal_mip_name");
13 ecal_mip_pass_ = ps.get<std::string>("ecal_mip_pass");
14 // Maybe create two objects for the second recoil information
15 ecal_veto_name_ = ps.get<std::string>("ecal_veto_name");
16 ecal_veto_pass_ = ps.get<std::string>("ecal_veto_pass");
17
18 return;
19}
20
22 const auto& mip_result{
24 const auto& veto{
26
27 histograms_.fill("n_straight_tracks", mip_result.getNStraightTracks());
28 histograms_.fill("n_linreg_segments", mip_result.getNLinRegTracks());
29 histograms_.fill("first_near_photon_layer", mip_result.getFirstNearPhLayer());
30 histograms_.fill("n_tracking_hits", veto.getNHitsInPhotonTerritory());
31 histograms_.fill("ep_ang", veto.getEPAng());
32 histograms_.fill("ep_sep", veto.getEPSep());
33 auto recoil_mom = veto.getRecoilMomentum();
34 histograms_.fill("recoil_pz", recoil_mom[2]);
35 histograms_.fill("recoil_pt", std::sqrt(recoil_mom[0] * recoil_mom[0] +
36 recoil_mom[1] * recoil_mom[1]));
37 histograms_.fill("recoil_x", veto.getRecoilX());
38 histograms_.fill("recoil_y", veto.getRecoilY());
39
40 return;
41}
42
43} // namespace dqm
44
Class used to encapsulate the results obtained from EcalMipTrackingProcessor.
Class used to encapsulate the results obtained from EcalVetoProcessor.
#define DECLARE_ANALYZER(CLASS)
Macro which allows the framework to construct an analyzer given its name during configuration.
Generate histograms to check MIP tracking features.
std::string ecal_mip_pass_
Pass Name for mip result object.
virtual void configure(framework::config::Parameters &ps)
Input python configuration parameters.
std::string ecal_veto_pass_
Pass Name for veto object.
std::string ecal_veto_name_
Collection Name for veto object.
virtual void analyze(const framework::Event &event)
Fills histograms.
std::string ecal_mip_name_
Collection Name for mip result object.
HistogramPool histograms_
helper object for making and filling histograms
Implements an event buffer system for storing event data.
Definition Event.h:40
void fill(const std::string &name, const T &val)
Fill a 1D histogram.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:75