|
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.
|
#include <PreselectAndCategorize2021.h>
Public Member Functions | |
| PreselectAndCategorize2021 (const std::string &name, Process &process) | |
| ~PreselectAndCategorize2021 ()=default | |
| virtual void | configure (const ParameterSet ¶meters) final |
| Callback for the Processor to configure itself from the given set of parameters. | |
| virtual void | initialize (TTree *tree) final |
| Callback for the Processor to take any necessary action when the processing of events starts, such as creating histograms. | |
| virtual void | setFile (TFile *out_file) final |
| Set output TFile for AnaProcessors. | |
| virtual bool | process (IEvent *ievent) final |
| Process the event and put new data products into it. | |
| virtual void | finalize () final |
| Callback for the Processor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities. | |
| Public Member Functions inherited from PreselectAndCategorize | |
| PreselectAndCategorize (const std::string &name, Process &process) | |
| ~PreselectAndCategorize ()=default | |
| virtual void | setVtxColl (std::string vtx_coll) |
| virtual void | setMCColl (std::string mc_coll) |
| json | preselect_json_load (const std::string &filepath) |
| bool | getIsSignal () const |
| bool | getIsData () const |
| Public Member Functions inherited from Processor | |
| Processor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~Processor () |
| virtual void | initialize (std::string inFilename, std::string outFilename) |
| Callback for the Processor to take any necessary action when the processing of events starts, such as initializing files. | |
| virtual bool | process () |
| Process the histograms and generate analysis output. | |
Private Member Functions | |
| std::vector< double > | determine_time_cuts (bool isData, int runNumber) |
| double | calculate_theta_R (const TVector3 &ele_mom, const TVector3 &pos_mom) const |
| Track | createInferredTrack (Vertex *vtx, Track *ele_track, Track *pos_track) |
| bool | isQualityTrack (Track *trk, const Particle &pos) const |
| void | calculatePairwiseQuantities (const std::vector< Track * > &all_tracks, Particle &ele, Particle &pos) |
Private Attributes | |
| std::string | trkColl_ {"KalmanFullTracks"} |
| std::string | trackCorrectionsCfg_ {""} |
| std::shared_ptr< TrackCorrector > | corrector_ |
| int | smearingSeed_ {42} |
| bool | doSmearing_ {true} |
| int | requireTruthMatch_ {-1} |
| bool | isSimpSignal_ {false} |
| bool | isApSignal_ {false} |
| int | apPDG_ {622} |
| bool | debug_ {false} |
| bool | disablePreselection_ {false} |
| bool | disableTimingCuts_ {false} |
| bool | disableVertexChi2Cut_ {false} |
| bool | requireSingleVertex_ {true} |
| bool | useVertexMomentum_ {true} |
| int | minHits_ {10} |
| int | eleMinHits_ {10} |
| int | posMinHits_ {10} |
| std::string | triggerSelection_ {"singles2"} |
| double | psumCut_ {-1.0} |
| double | beamE_ {3.74} |
| double | thetaBeamMrad_ {30.5} |
| std::vector< double > | time_cuts_ {6.9, 5.2, 9.0} |
| std::unique_ptr< TH1F > | multivtx_chosen_chi2_h_ |
| std::unique_ptr< TH1F > | multivtx_discarded_chi2_h_ |
| bool | saveAllTracks_ {false} |
| bool | calcMultiTrackVars_ {false} |
| int | extraTrackMinHits_ {-1} |
| int | input_entry_ {-1} |
Additional Inherited Members | |
| Static Public Member Functions inherited from Processor | |
| static void | declare (const std::string &classname, ProcessorMaker *) |
| Internal function which is part of the ProcessorFactory machinery. | |
| Protected Attributes inherited from PreselectAndCategorize | |
| EventBus | bus_ |
| std::unique_ptr< TTree > | output_tree_ |
| std::string | vtxColl_ {"UnconstrainedV0Vertices_KF"} |
| std::string | mcColl_ {"MCParticle"} |
| description | |
| bool | isData_ {false} |
| bool | isSignal_ {false} |
| double | calTimeOffset_ {0.0} |
| Cutflow | vertex_cf_ {"vertex", "reconstructed"} |
| Cutflow | event_cf_ {"event", "readout"} |
| std::unique_ptr< TH2F > | n_vertices_h_ |
| std::shared_ptr< TrackSmearingTool > | smearingTool_ |
| std::shared_ptr< AnaHelpers > | _ah |
| description | |
| std::map< int, std::vector< double > > | beamspot_corrections_ |
| json | v0proj_fits_ |
| std::map< std::string, double > | track_corrections_ |
| Protected Attributes inherited from Processor | |
| Process & | process_ |
| TFile * | outF_ {nullptr} |
| std::string | name_ |
Definition at line 25 of file PreselectAndCategorize2021.h.
|
inline |
Definition at line 27 of file PreselectAndCategorize2021.h.
|
default |
|
private |
Definition at line 124 of file PreselectAndCategorize2021.cxx.
|
private |
Definition at line 259 of file PreselectAndCategorize2021.cxx.
|
finalvirtual |
Callback for the Processor to configure itself from the given set of parameters.
| parameters | ParameterSet for configuration. |
Reimplemented from PreselectAndCategorize.
Definition at line 9 of file PreselectAndCategorize2021.cxx.
Definition at line 149 of file PreselectAndCategorize2021.cxx.
|
private |
Definition at line 108 of file PreselectAndCategorize2021.cxx.
|
finalvirtual |
Callback for the Processor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities.
Reimplemented from PreselectAndCategorize.
Definition at line 1418 of file PreselectAndCategorize2021.cxx.
|
finalvirtual |
Callback for the Processor to take any necessary action when the processing of events starts, such as creating histograms.
| tree |
Reimplemented from PreselectAndCategorize.
Definition at line 386 of file PreselectAndCategorize2021.cxx.
Definition at line 222 of file PreselectAndCategorize2021.cxx.
|
finalvirtual |
Process the event and put new data products into it.
| event | The Event to process. |
pre-selection on vertices defining "quality" vertices
In this process of pre-selecting vertices, we also apply corrections and momentum smearing to the underlying particle tracks and clusters. These are then stored in our new copy of these objects in the resulting preselected_vtx collection (vtx, ele, pos).
We need to keep the particles separately since the particles "stored" within Vertex are references to the collections. We make a copy here to apply corrections and do not modify the collections referenced elsewhere in memory.
Per-vertex quantities destined for the output tree are carried along here as well, rather than published from inside the loop below. The loop runs over every raw v0 candidate, so a bus_.set() inside it survives only until the next iteration overwrites it – what reaches TTree::Fill() is the last raw candidate iterated, which need not be the selected vertex and need not even have passed preselection. Stashing them here and publishing after the best-chi2 vertex is chosen keeps every branch on an entry describing the same vertex.
This is where the output TTree is filled, if we leave before this point, then the event will not be kept as part of pre-selection.
We wait until here to copy over the MCParticles to avoid unnecessary copying if the event is not going to be kept anyways.
Before we loop through the MCParticles we go through the the hits on the electron track in this vertex and find out which MCParticle has the most hits on the track.
The implementation of the beam-overlay mechanism very rarely causes two signal events to occur within the same software event (or no signal event to happen at all). The complexity of handling these cases is too high and the rarity (both in simulation and expected due to small cross section) motivates just removing these events from the sample.
The warnings are still printed so an estimate on the number of events being dropped can be retrieved from the logs.
Truth-link flags for the selected vertex. Computed here rather than in the vertex loop above: that loop runs over every raw vertex, so a bus_.set() from inside it describes the last candidate iterated rather than the one eventually selected.
Reimplemented from PreselectAndCategorize.
Definition at line 603 of file PreselectAndCategorize2021.cxx.
|
finalvirtual |
Set output TFile for AnaProcessors.
| pointer | to output TFile |
Event identity. Without these an entry in this tree cannot be traced back to the LCIO event it came from, which makes it impossible to inspect an interesting candidate at any earlier stage of the chain (recon, readout, generation) or to put two processings of the same events side by side.
Reimplemented from PreselectAndCategorize.
Definition at line 471 of file PreselectAndCategorize2021.cxx.
|
private |
Definition at line 46 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 63 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 81 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 40 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 47 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 48 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 49 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 50 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 42 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 58 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 85 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 87 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 45 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 44 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 57 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 71 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 72 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 59 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 62 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 51 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 43 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 80 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 41 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 64 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 66 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 39 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 60 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 36 of file PreselectAndCategorize2021.h.
|
private |
Definition at line 54 of file PreselectAndCategorize2021.h.