1 #ifndef PROTODUNE_BEAMLINE_UTILS_H 2 #define PROTODUNE_BEAMLINE_UTILS_H 17 #include "dune/DuneObj/ProtoDUNEBeamEvent.h" 55 if (electron) result +=
"e ";
56 if (muon) result +=
"mu ";
57 if (pion) result +=
"pi ";
58 if (kaon) result +=
"k ";
59 if (proton) result +=
"p ";
60 if (deuteron) result +=
"e ";
66 if (electron) result.push_back(
kElectron);
67 if (muon) result.push_back(
kMuon);
68 if (pion) result.push_back(
kPion);
69 if (kaon) result.push_back(
kKaon);
70 if (proton) result.push_back(
kProton);
71 if (deuteron) result.push_back(
kDeuteron);
100 std::vector< recob::Track> MakeTracks(
art::Event const & evt);
103 double GetPosition(
short );
105 TVector3 ConvertMonitorCoordinates(
double,
double,
double,
double );
107 void BeamMonitorBasisVectors();
109 void RotateMonitorVector(TVector3&);
111 TVector3 ProjectToTPC(TVector3, TVector3);
114 std::vector< double > MomentumSpec(
art::Event const & evt);
116 double MomentumCosTheta(
double,
double,
double );
125 std::vector< int > GetPID(
art::Event const & evt,
double nominal_momentum );
140 double ComputeMomentum(
int pdg,
double tof );
145 double ComputeTOF (
int pdg,
double momentum );
151 bool IsGoodBeamlineTrigger(
art::Event const & evt)
const;
158 bool HasPerfectBeamMomentum(
art::Event const & evt)
const;
168 std::vector<double> GetBeamlineMass(
art::Event const & evt)
const;
180 std::vector<double> GetBeamlineMassSquared(
art::Event const & evt)
const;
191 const std::tuple<double,double,int,int> GetBeamlineVars(
art::Event const & evt)
const;
207 const std::tuple<double,double,int,int,int,double,double,int,int,bool> GetBeamlineVarsAndStatus(
art::Event const & evt)
const;
235 std::vector< std::string > AllDevices = {
264 bool rotated =
false;
286 std::map< int, double > particle_mass = {
288 {
kMuon, .1056583745},
295 double c = 299792458.;
296 const double fTOFDist = 28.575;
float fMomentumScaleFactor
double fSecondTrackingProfZ
art::InputTag fBeamEventTag
virtual void reconfigure(fhicl::ParameterSet const &pset)
PossibleParticleCands operator||(const PossibleParticleCands &b) const
double fFirstTrackingProfZ
std::vector< int > getPDGCodes() const
bool fUseCERNCalibSelection
Provides recob::Track data product.
PossibleParticleCands operator&&(const PossibleParticleCands &b) const
std::map< std::string, std::vector< short > > ActiveFibers
def momentum(x1, x2, x3, scale=1.)