131 evttime = tts.AsDouble();
150 if (
evt.isRealData()){
154 auto beamHandle =
evt.getValidHandle<std::vector<beam::ProtoDUNEBeamEvent>>(
"beamevent");
156 std::vector<art::Ptr<beam::ProtoDUNEBeamEvent>> beamVec;
157 if( beamHandle.isValid()){
165 std::cout <<
"Number of reconstructed momenta: " << the_momenta.size() <<
std::endl;
174 const std::vector< double > & the_tofs = beamEvent.
GetTOFs();
176 if( the_tofs.size() > 0){
187 if(timeStamps.
isValid() && timeStamps->size() == 1){
194 std::vector< art::Ptr<recob::SpacePoint> > sps;
198 std::vector< art::Ptr<recob::PointCharge> > pcs;
210 for (
size_t i = 0; i<sps.size(); ++i){
211 vx.push_back(sps[i]->XYZ()[0]);
212 vy.push_back(sps[i]->XYZ()[1]);
213 vz.push_back(sps[i]->XYZ()[2]);
214 vcharge.push_back(pcs[i]->charge());
216 auto const& hits = fmhsp.at(i);
217 if (!
evt.isRealData()){
219 std::map<int,double> trkide;
220 for (
auto const &
hit : hits){
222 for(
size_t e = 0;
e < TrackIDs.size(); ++
e){
223 trkide[TrackIDs[
e].trackID] += TrackIDs[
e].energy;
231 if ((ii->second)>maxe){
237 vg4id.push_back(TrackID);
254 for (
auto const &
hit : hits){
255 spTPC =
hit->WireID().TPC;
257 vtpc.push_back(spTPC);
260 std::vector< art::Ptr<recob::Track> > trks;
264 for (
size_t i = 0; i<trks.size(); ++i){
265 auto &
trk = trks[i];
266 for (
size_t j = 0; j<
trk->NPoints(); ++j){
267 if (
trk->HasValidPoint(j)){
268 vx.push_back(
trk->TrajectoryPoint(j).position.X());
269 vy.push_back(
trk->TrajectoryPoint(j).position.Y());
270 vz.push_back(
trk->TrajectoryPoint(j).position.Z());
std::vector< double > beamPosx
constexpr std::uint32_t timeLow() const
uint16_t GetFlags() const
const std::vector< double > & GetTOFs() const
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
std::vector< double > beamDirz
std::vector< double > vcharge
std::vector< TrackID > TrackIDs
const simb::MCParticle * TrackIdToParticle_P(int id) const
protoana::ProtoDUNEBeamlineUtils fBeamlineUtils
const art::InputTag fTrackModuleLabel
constexpr std::uint32_t timeHigh() const
simb::Origin_t Origin() const
const short & GetCKov1Status() const
const art::InputTag fSpacePointModuleLabel
std::vector< double > beamMomentum
std::vector< double > beamDiry
const art::Ptr< simb::MCTruth > & ParticleToMCTruth_P(const simb::MCParticle *p) const
const art::InputTag fTimeDecoderModuleLabel
std::vector< double > beamDirx
std::vector< double > beamPosz
const std::vector< double > & GetRecoBeamMomenta() const
bool IsGoodBeamlineTrigger(art::Event const &evt) const
Detector simulation of raw signals on wires.
std::vector< int > vorigin
std::vector< double > beamPosy
const short & GetCKov0Status() const
std::vector< int > vtrackid
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
QTextStream & endl(QTextStream &s)