#include <ProtoDUNEBeamlineUtils.h>
Public Member Functions | |
ProtoDUNEBeamlineUtils (fhicl::ParameterSet const &pset) | |
~ProtoDUNEBeamlineUtils () | |
void | reconfigure (fhicl::ParameterSet const &pset) |
const beam::ProtoDUNEBeamEvent | GetBeamEvent (art::Event const &evt) const |
void | GetFibers (art::Event const &evt) |
void | GetCurrent (art::Event const &evt) |
std::vector< recob::Track > | MakeTracks (art::Event const &evt) |
double | GetPosition (short) |
TVector3 | ConvertMonitorCoordinates (double, double, double, double) |
void | BeamMonitorBasisVectors () |
void | RotateMonitorVector (TVector3 &) |
TVector3 | ProjectToTPC (TVector3, TVector3) |
std::vector< double > | MomentumSpec (art::Event const &evt) |
double | MomentumCosTheta (double, double, double) |
std::vector< int > | GetPID (beam::ProtoDUNEBeamEvent const &beamevt, double nominal_momentum) |
std::vector< int > | GetPID (art::Event const &evt, double nominal_momentum) |
PossibleParticleCands | GetPIDCandidates (beam::ProtoDUNEBeamEvent const &beamevt, double nominal_momentum) |
PossibleParticleCands | GetPIDCandidates (art::Event const &beamevt, double nominal_momentum) |
double | ComputeMomentum (int pdg, double tof) |
double | ComputeTOF (int pdg, double momentum) |
bool | IsGoodBeamlineTrigger (art::Event const &evt) const |
bool | IsGoodBeamlineTrigger (beam::ProtoDUNEBeamEvent const &beamEvent) const |
bool | HasPerfectBeamMomentum (art::Event const &evt) const |
bool | HasPerfectBeamMomentum (beam::ProtoDUNEBeamEvent const &beamEvent) const |
std::vector< double > | GetBeamlineMass (art::Event const &evt) const |
std::vector< double > | GetBeamlineMassSquared (art::Event const &evt) const |
const std::tuple< double, double, int, int > | GetBeamlineVars (art::Event const &evt) const |
const std::tuple< double, double, int, int, int, double, double, int, int, bool > | GetBeamlineVarsAndStatus (art::Event const &evt) const |
Private Member Functions | |
std::vector< int > | GetPID_CERNCalib (beam::ProtoDUNEBeamEvent const &beamevt, double nominal_momentum) |
PossibleParticleCands | GetPIDCandidates_CERNCalib (beam::ProtoDUNEBeamEvent const &beamevt, double nominal_momentum) |
Definition at line 76 of file ProtoDUNEBeamlineUtils.h.
protoana::ProtoDUNEBeamlineUtils::ProtoDUNEBeamlineUtils | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 10 of file ProtoDUNEBeamlineUtils.cxx.
protoana::ProtoDUNEBeamlineUtils::~ProtoDUNEBeamlineUtils | ( | ) |
Definition at line 14 of file ProtoDUNEBeamlineUtils.cxx.
void protoana::ProtoDUNEBeamlineUtils::BeamMonitorBasisVectors | ( | ) |
Definition at line 267 of file ProtoDUNEBeamlineUtils.cxx.
double protoana::ProtoDUNEBeamlineUtils::ComputeMomentum | ( | int | pdg, |
double | tof | ||
) |
Compute what the beamline momentum SHOULD BE given a certain pdg and beamline TOF
Definition at line 632 of file ProtoDUNEBeamlineUtils.cxx.
double protoana::ProtoDUNEBeamlineUtils::ComputeTOF | ( | int | pdg, |
double | momentum | ||
) |
Compute what the TOF SHOULD BE given a certain pdg and beamline momentum
Definition at line 614 of file ProtoDUNEBeamlineUtils.cxx.
TVector3 protoana::ProtoDUNEBeamlineUtils::ConvertMonitorCoordinates | ( | double | x, |
double | y, | ||
double | z, | ||
double | zOffset | ||
) |
Definition at line 247 of file ProtoDUNEBeamlineUtils.cxx.
const beam::ProtoDUNEBeamEvent protoana::ProtoDUNEBeamlineUtils::GetBeamEvent | ( | art::Event const & | evt | ) | const |
Definition at line 18 of file ProtoDUNEBeamlineUtils.cxx.
std::vector< double > protoana::ProtoDUNEBeamlineUtils::GetBeamlineMass | ( | art::Event const & | evt | ) | const |
Uses the beamline momentum and time of flight measurements to estimate the beamline particle mass in GeV/c^2
Returns a list of all possible cominations (there can be multiple momenta).
Definition at line 695 of file ProtoDUNEBeamlineUtils.cxx.
std::vector< double > protoana::ProtoDUNEBeamlineUtils::GetBeamlineMassSquared | ( | art::Event const & | evt | ) | const |
Uses the beamline momentum and time of flight measurements to estimate the beamline particle mass^2 in (GeV/c^2)^2
This can be more useful than the mass since measurement fluctuations can make it negative.
Returns a list of all possible cominations (there can be multiple momenta).
Definition at line 707 of file ProtoDUNEBeamlineUtils.cxx.
const std::tuple< double, double, int, int > protoana::ProtoDUNEBeamlineUtils::GetBeamlineVars | ( | art::Event const & | evt | ) | const |
Get reconstructed beamline momentum (in GeV/c), tof (in ns), and flags for if the ckov's fired. Will be < 0 if invalid.
C++ structured binding, so call like: const auto [momentum, tof, ckov0, ckov1] = dataUtils.GetBeamlineInformation(e);
then you have the normal float momentum, int ckov0 variables, etc. in the current scope.
Definition at line 742 of file ProtoDUNEBeamlineUtils.cxx.
const std::tuple< double, double, int, int, int, double, double, int, int, bool > protoana::ProtoDUNEBeamlineUtils::GetBeamlineVarsAndStatus | ( | art::Event const & | evt | ) | const |
Get reconstructed beamline momentum (in GeV/c), tof (in ns), flags for the tofChannel and ckov's. Also the timing trigger (12 means beam), the beam instrumentation trigger (1 means beam trigger), and whether the timing and beam instrumentation triggers are matched.
All values will be < 0 if invalid.
C++ structured binding, so call like: const auto [momentum, tof, tofChannel,ckov0,ckov1,ckov0Pressure,ckov1Pressure,timingTrigger,BITrigger,areBIAndTimingMatched] = dataUtils.GetBeamlineInformation(e);
then you have the normal float momentum, int ckov0 variables, etc. in the current scope. You can use (void) variable; lines to get rid of unused var warnings.
Definition at line 771 of file ProtoDUNEBeamlineUtils.cxx.
void protoana::ProtoDUNEBeamlineUtils::GetCurrent | ( | art::Event const & | evt | ) |
Definition at line 27 of file ProtoDUNEBeamlineUtils.cxx.
void protoana::ProtoDUNEBeamlineUtils::GetFibers | ( | art::Event const & | evt | ) |
Definition at line 42 of file ProtoDUNEBeamlineUtils.cxx.
std::vector< int > protoana::ProtoDUNEBeamlineUtils::GetPID | ( | beam::ProtoDUNEBeamEvent const & | beamevt, |
double | nominal_momentum | ||
) |
Get the particle ID from beamline instrumentation info (returns PDG IDs)
Make sure to set fcl param UseCERNCalibSelection=true if the beam reco is done after ~v08_07_00 otherwise if using an old reco'd BeamEvent (e.g. you are using the first central reco) set it to false
Definition at line 459 of file ProtoDUNEBeamlineUtils.cxx.
std::vector< int > protoana::ProtoDUNEBeamlineUtils::GetPID | ( | art::Event const & | evt, |
double | nominal_momentum | ||
) |
Definition at line 465 of file ProtoDUNEBeamlineUtils.cxx.
|
private |
Get the particle ID from beamline instrumentation info (this uses the official CERN cuts and assumes CERN calibrations)
Definition at line 608 of file ProtoDUNEBeamlineUtils.cxx.
protoana::PossibleParticleCands protoana::ProtoDUNEBeamlineUtils::GetPIDCandidates | ( | beam::ProtoDUNEBeamEvent const & | beamevt, |
double | nominal_momentum | ||
) |
Get the particle ID from beamline instrumentation info
Make sure to set fcl param UseCERNCalibSelection=true if the beam reco is done after ~v08_07_00 otherwise if using an old reco'd BeamEvent (e.g. you are using the first central reco) set it to false
Definition at line 445 of file ProtoDUNEBeamlineUtils.cxx.
protoana::PossibleParticleCands protoana::ProtoDUNEBeamlineUtils::GetPIDCandidates | ( | art::Event const & | beamevt, |
double | nominal_momentum | ||
) |
Definition at line 449 of file ProtoDUNEBeamlineUtils.cxx.
|
private |
Get the particle ID from beamline instrumentation info (this uses the official CERN cuts and assumes CERN calibrations) if fUseCERNCalibSelection is set, otherwise uses old values.
Definition at line 474 of file ProtoDUNEBeamlineUtils.cxx.
double protoana::ProtoDUNEBeamlineUtils::GetPosition | ( | short | theFiber | ) |
Definition at line 242 of file ProtoDUNEBeamlineUtils.cxx.
bool protoana::ProtoDUNEBeamlineUtils::HasPerfectBeamMomentum | ( | art::Event const & | evt | ) | const |
Returns true if only 1 fiber is activated in each of the momentum spectrometer monitors
Definition at line 658 of file ProtoDUNEBeamlineUtils.cxx.
bool protoana::ProtoDUNEBeamlineUtils::HasPerfectBeamMomentum | ( | beam::ProtoDUNEBeamEvent const & | beamEvent | ) | const |
Definition at line 662 of file ProtoDUNEBeamlineUtils.cxx.
bool protoana::ProtoDUNEBeamlineUtils::IsGoodBeamlineTrigger | ( | art::Event const & | evt | ) | const |
Returns true if the beamline instrumentation has a good trigger that matches the ProtoDUNE trigger.
Definition at line 649 of file ProtoDUNEBeamlineUtils.cxx.
bool protoana::ProtoDUNEBeamlineUtils::IsGoodBeamlineTrigger | ( | beam::ProtoDUNEBeamEvent const & | beamEvent | ) | const |
Definition at line 653 of file ProtoDUNEBeamlineUtils.cxx.
std::vector< recob::Track > protoana::ProtoDUNEBeamlineUtils::MakeTracks | ( | art::Event const & | evt | ) |
Definition at line 72 of file ProtoDUNEBeamlineUtils.cxx.
double protoana::ProtoDUNEBeamlineUtils::MomentumCosTheta | ( | double | X1, |
double | X2, | ||
double | X3 | ||
) |
std::vector< double > protoana::ProtoDUNEBeamlineUtils::MomentumSpec | ( | art::Event const & | evt | ) |
Definition at line 297 of file ProtoDUNEBeamlineUtils.cxx.
TVector3 protoana::ProtoDUNEBeamlineUtils::ProjectToTPC | ( | TVector3 | firstPoint, |
TVector3 | secondPoint | ||
) |
Definition at line 286 of file ProtoDUNEBeamlineUtils.cxx.
void protoana::ProtoDUNEBeamlineUtils::reconfigure | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 205 of file ProtoDUNEBeamlineUtils.cxx.
void protoana::ProtoDUNEBeamlineUtils::RotateMonitorVector | ( | TVector3 & | vec | ) |
Definition at line 280 of file ProtoDUNEBeamlineUtils.cxx.
|
private |
Definition at line 227 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 235 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 254 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 255 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 256 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 295 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 230 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 276 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 222 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 273 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 273 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 273 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 278 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 278 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 278 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 270 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 302 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 301 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 272 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 266 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 268 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 267 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 271 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 296 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 304 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 303 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 224 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 250 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 248 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 277 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 277 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 277 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 281 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 283 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 284 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 260 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 261 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 262 of file ProtoDUNEBeamlineUtils.h.
|
private |
|
private |
Definition at line 264 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 251 of file ProtoDUNEBeamlineUtils.h.
|
private |
Definition at line 249 of file ProtoDUNEBeamlineUtils.h.