|
LDMX Software
|
Go through the particle map and find the dark brem products, storing their vertex and the dark brem outgoing kinematics for further study. More...
#include <DarkBremInteraction.h>
Public Member Functions | |
| DarkBremInteraction (const std::string &n, framework::Process &p) | |
| virtual void | produce (framework::Event &e) override |
| extract the kinematics of the dark brem interaction from the SimParticles | |
| void | configure (framework::config::Parameters ¶meters) override |
| Callback for the EventProcessor to configure itself from the given set of parameters. | |
Public Member Functions inherited from framework::Producer | |
| Producer (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual void | process (Event &event) final |
| Processing an event for a Producer is calling produce. | |
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 | beforeNewRun (ldmx::RunHeader &run_header) |
| Callback for Producers to add parameters to the run header before conditions are initialized. | |
| 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 | 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::map< std::string, int > | known_materials_ |
| the list of known materials assigning them to material ID numbers | |
| std::map< int, int > | known_elements_ |
| The list of known elements assigning them to the bins that we are putting them into. | |
| std::string | particle_passname_ |
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 | |
| NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
| Manager for any ntuples. | |
| logging::logger | the_log_ |
| The logger for this EventProcessor. | |
Go through the particle map and find the dark brem products, storing their vertex and the dark brem outgoing kinematics for further study.
While histograms are filled to be automatically validated and plotted, we also put these values into the event tree so users can look at the variables related to the dark brem in detail.
APrime{Px,Py,Pz} - 3-vector momentum of A' at dark brem APrimeEnergy - energy of A' at dark brem Recoil{Px,Py,Pz} - 3-vector momentum of electron recoiling from dark brem RecoilEnergy - energy of recoil at dark brem Incident{Px,Py,Pz} - 3-vector momentum of electron incident to dark brem IncidentEnergy - energy of incident electron at dark brem APrimeParentID - TrackID of A' parent DarkBremVertexMaterial - integer corresponding to index of known_materials parameter OR -1 if not found in known_materials DarkBremVertexMaterialZ - elemental Z value for element chosen by random from the elements in the material DarkBrem{X,Y,Z} - physical space location where dark brem occurred
Definition at line 31 of file DarkBremInteraction.h.
|
inline |
Definition at line 33 of file DarkBremInteraction.h.
|
overridevirtual |
Callback for the EventProcessor to configure itself from the given set of parameters.
The parameters a processor has access to are the member variables of the python class in the sequence that has className equal to the EventProcessor class name.
For an example, look at MyProcessor.
| parameters | Parameters for configuration. |
Reimplemented from framework::EventProcessor.
Definition at line 5 of file DarkBremInteraction.cxx.
References framework::config::Parameters::get().
|
overridevirtual |
extract the kinematics of the dark brem interaction from the SimParticles
Sometimes the electron that undergoes the dark brem is not in a region where it should be saved (i.e. it is a shower electron inside of the ECal). In this case, we need to reconstruct the incident momentum from the outgoing products (the recoil electron and the dark photon) which should be saved by the biasing filter used during the simulation.
Since the dark brem model does not include a nucleus, it only is able to conserve momentum, so we need to reconstruct the incident particle's 3-momentum and then use the electron mass to calculate its total energy.
Implements framework::Producer.
Definition at line 37 of file DarkBremInteraction.cxx.
References framework::HistogramPool::fill(), framework::Event::getEventHeader(), ldmx::SimParticle::getMomentum(), ldmx::EventHeader::getWeight(), framework::EventProcessor::histograms_, known_elements_, known_materials_, and framework::HistogramPool::setWeight().
|
private |
The list of known elements assigning them to the bins that we are putting them into.
There are two failure modes for this:
The inverset LUT that can be used if studying the output tree is
element_lut = { 0 : 'did_not_happen', 1 : 'H 1', 2 : 'C 6', 3 : 'O 8', 4 : 'Na 11', 5 : 'Si 14', 6 : 'Ca 20', 7 : 'Cu 29', 8 : 'Y 39', 9 : 'Lu 71', 10 : 'W 74', 11 : 'unlisted' }
Definition at line 131 of file DarkBremInteraction.h.
Referenced by produce().
|
private |
the list of known materials assigning them to material ID numbers
During the simulation, we can store the name of the logical volume that the particle originated in. There can be many copies of logical volumes in different places but they all will be the same material by construction of how we designed our GDML. In the ecal GDML, the beginning the 'volume' tags list the logical volumes and you can see there which materials they all are in.
We go through this list on each event, checking if any of these entries match a substring of the logical volume name stored. If we don't find any, the integer ID is set to -1.
The inverse LUT that can be used on the plotting side is
material_lut = { 0 : 'Unknown', 1 : 'C', 2 : 'PCB', 3 : 'Glue', 4 : 'Si', 5 : 'Al', 6 : 'W', 7 : 'PVT' }
This is kind of lazy, we could instead do a full LUT where we list all known logical volume names and their associated materials but this analysis isn't as important so I haven't invested that much time in it yet.
Definition at line 84 of file DarkBremInteraction.h.
Referenced by produce().
|
private |
Definition at line 135 of file DarkBremInteraction.h.