hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
Loading...
Searching...
No Matches
ClusterEfficiency2021.h
Go to the documentation of this file.
1/*
2 * @file ClusterEfficiency2021.h
3 * @brief Standalone study of positron-cluster (and v0) reconstruction efficiency
4 * for 2021 displaced A'/SIMP signal MC.
5 *
6 * Broken out of PreselectAndCategorize2021 so the common preselection code is
7 * not bloated with this study. We reuse the small EventBus/Cutflow helper
8 * classes defined in PreselectAndCategorize.h but do NOT inherit the
9 * preselection processor; this keeps the study lean (no smearing/correction
10 * machinery).
11 *
12 * @author Matthew Gignac
13 * @date May 2026
14 */
15
16#ifndef __CLUSTER_EFFICIENCY_2021_H__
17#define __CLUSTER_EFFICIENCY_2021_H__
18
19#include <memory>
20#include <string>
21
22#include "PreselectAndCategorize.h" // brings in EventBus, Cutflow, Processor, AnaHelpers, event classes
23#include "TruthMatchingUtils.h"
24#include "TVector3.h"
25
27 public:
28 ClusterEfficiency2021(const std::string& name, Process& process) : Processor(name, process) {}
30 virtual void configure(const ParameterSet& parameters) final;
31 virtual void initialize(TTree* tree) final;
32 virtual void setFile(TFile* out_file) final;
33 virtual bool process(IEvent* ievent) final;
34 virtual void finalize() final;
35
36 private:
38 std::unique_ptr<TTree> output_tree_;
39 Cutflow event_cf_{"event", "readout"};
40 std::shared_ptr<AnaHelpers> _ah;
41
42 std::string vtxColl_{"UnconstrainedV0Vertices_KF"};
43 std::string mcColl_{"MCParticle"};
44 std::string trkColl_{"KalmanFullTracks"};
45
46 bool isData_{false};
47 bool isApSignal_{false};
48 bool isSimpSignal_{false};
49 int apPDG_{622}; // 622 displaced A', 623 prompt A'
50 int signalMomPDG_{622}; // mother PDG of the signal e+/e- (apPDG_ for AP, 625 for SIMP)
51 double calTimeOffset_{0.0};
52 double clusterEnergyThresh_{0.0}; // a particle is considered to "have a cluster" if E > this
53 double eventClusterThresh_{0.2}; // "energetic cluster" threshold for the event-level and
54 // positron-matched cutflow steps (any/matched RecoEcalCluster E > this)
55 double drMatch_{30.0}; // track->cluster dr match radius at ECal [mm]
56 bool debug_{false};
57
58 // running counters for the terminal summary printed in finalize()
59 long n_triggered_{0}; // singles2/3 triggered events
60 long n_event_has_cluster_{0}; // ... with any RecoEcalCluster E > eventClusterThresh_
61 long n_has_v0_{0}; // ... with >=1 e+e- v0
62 long n_multi_v0_{0}; // ... with >1 e+e- v0
63 long n_first_pos_matched_{0}; // FIRST v0: e+ dr-matched to an energetic cluster
64 long n_first_ele_matched_{0}; // FIRST v0: e- dr-matched
65 long n_any_pos_matched_{0}; // ANY v0 (best case): some v0 has e+ dr-matched
66 long n_any_ele_matched_{0}; // ANY v0 (best case): some v0 has e- dr-matched
67 // track-level (KalmanFullTracks, no v0 required) -> isolates tracking vs vertexing
68 long n_trk_pos_matched_{0}; // >=1 positive track dr-matched to an energetic cluster
69 long n_trk_ele_matched_{0}; // >=1 negative track dr-matched
70 long n_trkpos_no_v0pos_{0}; // e+ track matched but NO v0 e+ matched <- vertexing loss
71 int n_printed_{0}; // per-event debug lines printed so far
72};
73
74#endif //__CLUSTER_EFFICIENCY_2021_H__
~ClusterEfficiency2021()=default
virtual void setFile(TFile *out_file) final
Set output TFile for AnaProcessors.
ClusterEfficiency2021(const std::string &name, Process &process)
std::shared_ptr< AnaHelpers > _ah
virtual bool process(IEvent *ievent) final
Process the event and put new data products into it.
virtual void initialize(TTree *tree) final
Callback for the Processor to take any necessary action when the processing of events starts,...
virtual void finalize() final
Callback for the Processor to take any necessary action when the processing of events finishes,...
virtual void configure(const ParameterSet &parameters) final
Callback for the Processor to configure itself from the given set of parameters.
std::unique_ptr< TTree > output_tree_
Definition IEvent.h:7
description
Processor(const std::string &name, Process &process)
Class constructor.
Definition Processor.cxx:10
virtual bool process()
Process the histograms and generate analysis output.
Definition Processor.h:95