LDMX Software
Public Member Functions | Private Attributes | List of all members
dqm::EcalMipTrackingFeatures Class Reference

Generate histograms to check MIP tracking features. More...

#include <EcalMipTrackingFeatures.h>

Public Member Functions

 EcalMipTrackingFeatures (const std::string &name, framework::Process &process)
 Constructor.
 
virtual void configure (framework::config::Parameters &ps)
 Input python configuration parameters.
 
virtual void analyze (const framework::Event &event)
 Fills histograms.
 
- Public Member Functions inherited from framework::Analyzer
 Analyzer (const std::string &name, Process &process)
 Class constructor.
 
- Public Member Functions inherited from framework::EventProcessor
 EventProcessor (const std::string &name, Process &process)
 Class constructor.
 
virtual ~EventProcessor ()
 Class destructor.
 
virtual void onNewRun (const ldmx::RunHeader &runHeader)
 Callback for the EventProcessor to take any necessary action when the run being processed changes.
 
virtual void onFileOpen (EventFile &eventFile)
 Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened.
 
virtual void onFileClose (EventFile &eventFile)
 Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed.
 
virtual void onProcessStart ()
 Callback for the EventProcessor to take any necessary action when the processing of events starts, such as creating histograms.
 
virtual void onProcessEnd ()
 Callback for the EventProcessor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities.
 
template<class T >
const T & getCondition (const std::string &condition_name)
 Access a conditions object for the current event.
 
TDirectory * getHistoDirectory ()
 Access/create a directory in the histogram file for this event processor to create histograms and analysis tuples.
 
void setStorageHint (framework::StorageControl::Hint hint)
 Mark the current event as having the given storage control hint from this module.
 
void setStorageHint (framework::StorageControl::Hint hint, const std::string &purposeString)
 Mark the current event as having the given storage control hint from this module and the given purpose string.
 
int getLogFrequency () const
 Get the current logging frequency from the process.
 
int getRunNumber () const
 Get the run number from the process.
 
std::string getName () const
 Get the processor name.
 
void createHistograms (const std::vector< framework::config::Parameters > &histos)
 Internal function which is used to create histograms passed from the python configuration @parma histos vector of Parameters that configure histograms to create.
 

Private Attributes

std::string ecal_veto_name_
 Collection Name for veto object.
 
std::string ecal_veto_pass_
 Pass Name for veto object.
 

Additional Inherited Members

- Static Public Member Functions inherited from framework::EventProcessor
static void declare (const std::string &classname, int classtype, EventProcessorMaker *)
 Internal function which is part of the PluginFactory machinery.
 
- Static Public Attributes inherited from framework::Analyzer
static const int CLASSTYPE {2}
 Constant used to track EventProcessor types by the PluginFactory.
 
- Protected Member Functions inherited from framework::EventProcessor
void abortEvent ()
 Abort the event immediately.
 
- Protected Attributes inherited from framework::EventProcessor
HistogramHelper histograms_
 Interface class for making and filling histograms.
 
NtupleManagerntuple_ {NtupleManager::getInstance()}
 Manager for any ntuples.
 
logging::logger theLog_
 The logger for this EventProcessor.
 

Detailed Description

Generate histograms to check MIP tracking features.

Definition at line 14 of file EcalMipTrackingFeatures.h.

Constructor & Destructor Documentation

◆ EcalMipTrackingFeatures()

dqm::EcalMipTrackingFeatures::EcalMipTrackingFeatures ( const std::string &  name,
framework::Process process 
)
inline

Constructor.

Blank Analyzer constructor

Definition at line 21 of file EcalMipTrackingFeatures.h.

22 : framework::Analyzer(name, process) {}
Base class for a module which does not produce a data product.

Member Function Documentation

◆ analyze()

void dqm::EcalMipTrackingFeatures::analyze ( const framework::Event event)
virtual

Fills histograms.

Implements framework::Analyzer.

Definition at line 15 of file EcalMipTrackingFeatures.cxx.

15 {
16 const auto &veto{
18
19 histograms_.fill("n_straight_tracks", veto.getNStraightTracks());
20 histograms_.fill("n_linreg_tracks", veto.getNLinRegTracks());
21 histograms_.fill("first_near_photon_layer", veto.getFirstNearPhLayer());
22 histograms_.fill("ep_ang", veto.getEPAng());
23 histograms_.fill("ep_sep", veto.getEPSep());
24 auto recoil_mom = veto.getRecoilMomentum();
25 histograms_.fill("recoil_pz", recoil_mom[2]);
26 histograms_.fill("recoil_pt", std::sqrt(recoil_mom[0] * recoil_mom[0] +
27 recoil_mom[1] * recoil_mom[1]));
28 histograms_.fill("recoil_x", veto.getRecoilX());
29 histograms_.fill("recoil_y", veto.getRecoilY());
30
31 return;
32}
std::string ecal_veto_pass_
Pass Name for veto object.
std::string ecal_veto_name_
Collection Name for veto object.
HistogramHelper histograms_
Interface class for making and filling histograms.
void fill(const std::string &name, const double &val)
Fill a 1D histogram.
Definition Histograms.h:166

References ecal_veto_name_, ecal_veto_pass_, framework::HistogramHelper::fill(), and framework::EventProcessor::histograms_.

◆ configure()

void dqm::EcalMipTrackingFeatures::configure ( framework::config::Parameters ps)
virtual

Input python configuration parameters.

Reimplemented from framework::EventProcessor.

Definition at line 8 of file EcalMipTrackingFeatures.cxx.

8 {
9 ecal_veto_name_ = ps.getParameter<std::string>("ecal_veto_name");
10 ecal_veto_pass_ = ps.getParameter<std::string>("ecal_veto_pass");
11
12 return;
13}
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:89

References ecal_veto_name_, ecal_veto_pass_, and framework::config::Parameters::getParameter().

Member Data Documentation

◆ ecal_veto_name_

std::string dqm::EcalMipTrackingFeatures::ecal_veto_name_
private

Collection Name for veto object.

Definition at line 36 of file EcalMipTrackingFeatures.h.

Referenced by analyze(), and configure().

◆ ecal_veto_pass_

std::string dqm::EcalMipTrackingFeatures::ecal_veto_pass_
private

Pass Name for veto object.

Definition at line 39 of file EcalMipTrackingFeatures.h.

Referenced by analyze(), and configure().


The documentation for this class was generated from the following files: