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 | onProcessStart () override |
update the labels of some categorial histograms | |
virtual void | produce (framework::Event &e) override |
extract the kinematics of the dark brem interaction from the SimParticles | |
Public Member Functions inherited from framework::Producer | |
Producer (const std::string &name, Process &process) | |
Class constructor. | |
virtual void | beforeNewRun (ldmx::RunHeader &header) |
Handle allowing producers to modify run headers before the run begins. | |
Public Member Functions inherited from framework::EventProcessor | |
EventProcessor (const std::string &name, Process &process) | |
Class constructor. | |
virtual | ~EventProcessor () |
Class destructor. | |
virtual void | configure (framework::config::Parameters ¶meters) |
Callback for the EventProcessor to configure itself from the given set of parameters. | |
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 | 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 Member Functions | |
void | setHistLabels (const std::string &name, const std::vector< std::string > &labels) |
Set the labels of the histogram of the input name with the input labels. | |
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. | |
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::Producer | |
static const int | CLASSTYPE {1} |
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. | |
NtupleManager & | ntuple_ {NtupleManager::getInstance()} |
Manager for any ntuples. | |
logging::logger | theLog_ |
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 30 of file DarkBremInteraction.h.
|
inline |
Definition at line 32 of file DarkBremInteraction.h.
|
overridevirtual |
update the labels of some categorial histograms
This is helpful for downstream viewers of the histograms so that ROOT will display the bins properly.
Reimplemented from framework::EventProcessor.
Definition at line 47 of file DarkBremInteraction.cxx.
References setHistLabels().
|
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 56 of file DarkBremInteraction.cxx.
References framework::HistogramHelper::fill(), framework::Event::getEventHeader(), ldmx::EventHeader::getWeight(), framework::EventProcessor::histograms_, known_elements_, known_materials_, and framework::HistogramHelper::setWeight().
|
private |
Set the labels of the histogram of the input name with the input labels.
We could probably move this into Framework since it is a relatively common task. I could even imagine a way of constructing a StrCategory histogram.
Definition at line 34 of file DarkBremInteraction.cxx.
References framework::HistogramHelper::get(), and framework::EventProcessor::histograms_.
Referenced by onProcessStart().
|
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 : 'W 74', 9 : 'unlisted' }
Definition at line 140 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 95 of file DarkBremInteraction.h.
Referenced by produce().