LDMX Software
dqm::TrigScintTrackDQM Class Reference

Public Member Functions

 TrigScintTrackDQM (const std::string &name, framework::Process &process)
 Constructor.
 
 ~TrigScintTrackDQM ()=default
 Destructor.
 
void configure (framework::config::Parameters &pSet)
 Configure the processor using the given user specified parameters.
 
void analyze (const framework::Event &event)
 Process the event and make histograms ro summaries.
 
void onProcessStart ()
 Method executed before processing of events begins.
 
- Public Member Functions inherited from framework::Analyzer
 Analyzer (const std::string &name, Process &process)
 Class constructor.
 
virtual void process (Event &event) final
 Processing an event for an Analyzer is calling analyze.
 
virtual void beforeNewRun (ldmx::RunHeader &run_header) final
 Don't allow Analyzers to add parameters to the run header.
 
- Public Member Functions inherited from framework::EventProcessor
 DECLARE_FACTORY (EventProcessor, EventProcessor *, const std::string &, Process &)
 declare that we have a factory for this class
 
 EventProcessor (const std::string &name, Process &process)
 Class constructor.
 
virtual ~EventProcessor ()=default
 Class destructor.
 
virtual void onNewRun (const ldmx::RunHeader &run_header)
 Callback for the EventProcessor to take any necessary action when the run being processed changes.
 
virtual void onFileOpen (EventFile &event_file)
 Callback for the EventProcessor to take any necessary action when a new event input ROOT file is opened.
 
virtual void onFileClose (EventFile &event_file)
 Callback for the EventProcessor to take any necessary action when a event input ROOT file is closed.
 
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 track_collection_name_ {"TriggerPadTracks"}
 Name of trigger pad track collection.
 
std::string pass_name_ {""}
 

Additional Inherited Members

- Protected Member Functions inherited from framework::EventProcessor
void abortEvent ()
 Abort the event immediately.
 
- Protected Attributes inherited from framework::EventProcessor
HistogramPool histograms_
 helper object for making and filling histograms
 
NtupleManagerntuple_ {NtupleManager::getInstance()}
 Manager for any ntuples.
 
logging::logger the_log_
 The logger for this EventProcessor.
 

Detailed Description

Definition at line 19 of file TrigScintTrackDQM.h.

Constructor & Destructor Documentation

◆ TrigScintTrackDQM()

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

Constructor.

Definition at line 5 of file TrigScintTrackDQM.cxx.

Base class for a module which does not produce a data product.
virtual void process(Event &event) final
Processing an event for an Analyzer is calling analyze.

Member Function Documentation

◆ analyze()

void dqm::TrigScintTrackDQM::analyze ( const framework::Event & event)
virtual

Process the event and make histograms ro summaries.

Parameters
eventThe event to analyze.

Implements framework::Analyzer.

Definition at line 36 of file TrigScintTrackDQM.cxx.

36 {
37 // Get the collection of TrigScintTrack digitized tracks if the exists
38 const std::vector<ldmx::TrigScintTrack> trig_scint_tracks =
40 pass_name_);
41
42 // Loop through all TrigScint tracks in the event
43 for (const ldmx::TrigScintTrack &track : trig_scint_tracks) {
44 histograms_.fill("centroid", track.getCentroid());
45 histograms_.fill("residual", track.getResidual());
46 histograms_.fill("n_clusters", track.getNclusters());
47 histograms_.fill("beamEfrac", track.getBeamEfrac());
48
49 histograms_.fill("x", track.getCentroidX());
50 histograms_.fill("y", track.getCentroidY());
51 histograms_.fill("z", track.getCentroidZ());
52 }
53
54 histograms_.fill("n_tracks", trig_scint_tracks.size());
55}
std::string track_collection_name_
Name of trigger pad track collection.
HistogramPool histograms_
helper object for making and filling histograms
void fill(const std::string &name, const T &val)
Fill a 1D histogram.
Represents a track of trigger scintillator clusters.

References framework::HistogramPool::fill(), framework::EventProcessor::histograms_, and track_collection_name_.

◆ configure()

void dqm::TrigScintTrackDQM::configure ( framework::config::Parameters & pSet)
virtual

Configure the processor using the given user specified parameters.

Parameters
pSetSet of parameters used to configure this processor.

Reimplemented from framework::EventProcessor.

Definition at line 28 of file TrigScintTrackDQM.cxx.

28 {
29 track_collection_name_ = ps.get<std::string>("track_collection");
30 pass_name_ = ps.get<std::string>("passName").c_str();
31
32 ldmx_log(debug) << "Collection name = " << track_collection_name_
33 << " pass name =" << pass_name_;
34}

References framework::config::Parameters::get(), and track_collection_name_.

◆ onProcessStart()

void dqm::TrigScintTrackDQM::onProcessStart ( )
virtual

Method executed before processing of events begins.

Reimplemented from framework::EventProcessor.

Definition at line 9 of file TrigScintTrackDQM.cxx.

9 {
11
12 histograms_.create("centroid", "Track channel centroid", 500, 0, 100);
14 "n_tracks", "TrigScint track multiplicity in the pad/event", 25, 0, 25);
15 histograms_.create("n_clusters", "n_{clusters} forming the track", 4, 0, 4);
16 histograms_.create("residual", "Track residual [channels]", 100, 0., 2.);
17 histograms_.create("beamEfrac",
18 "Track edep fraction associated with beam electron", 101,
19 0., 1.01);
20 histograms_.create("x", "Track x position [mm]", 1000, -100, 100);
21 histograms_.create("y", "Track y position [mm]", 1000, -100, 100);
22 histograms_.create("z", "Track z position [mm]", 1000, -900, 100);
23
24 // TODO: implement getting a list of the constructed histograms, to iterate
25 // through and set overflow boolean.
26}
TDirectory * getHistoDirectory()
Access/create a directory in the histogram file for this event processor to create histograms and ana...
void create(const config::Parameters &p)
Create a histogram from the input configuration parameters.

References framework::HistogramPool::create(), framework::EventProcessor::getHistoDirectory(), and framework::EventProcessor::histograms_.

Member Data Documentation

◆ pass_name_

std::string dqm::TrigScintTrackDQM::pass_name_ {""}
private

Definition at line 47 of file TrigScintTrackDQM.h.

47{""};

◆ track_collection_name_

std::string dqm::TrigScintTrackDQM::track_collection_name_ {"TriggerPadTracks"}
private

Name of trigger pad track collection.

Definition at line 46 of file TrigScintTrackDQM.h.

46{"TriggerPadTracks"};

Referenced by analyze(), and configure().


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