19 #include "art_root_io/TFileService.h" 21 #include "canvas/Persistency/Common/FindManyP.h" 44 #include "dune/DuneObj/ProtoDUNEBeamEvent.h" 49 #include "dune/Protodune/singlephase/DataUtils/ProtoDUNEDataUtils.h" 56 #include "TTimeStamp.h" 74 class ProtoDUNEAnalTree;
89 virtual void endJob()
override;
128 int daughterID,
int gdaughterID);
513 for(
int k=0;
k < 6;
k++)
517 for(
int k=0;
k < 6;
k++)
524 if(!isbeamTriggerEvent)
return;
575 std::cout <<
"INFO::Number of daughters is " << particle->NumDaughters() <<
". Only the first NMAXDAUGTHERS are processed." <<
std::endl;
578 for(
const int daughterID : particle->Daughters()){
590 for(
const int gdaughterID : daughterParticle->
Daughters()){
622 bool beamTriggerEvent =
false;
635 if(geantGoodParticle != 0x0){
637 beamTriggerEvent =
true;
670 if(trajintpcactivevol > 0){
689 std::vector<art::Ptr<simb::MCParticle> > mcbeampartilelist;
693 for(
size_t p=0;
p < mcbeampartilelist.size();
p++){
694 auto & beamprim_mcparticle = mcbeampartilelist[
p];
695 if(beamprim_mcparticle->Mother() == geantGoodParticle->
TrackId()){
728 for(
size_t pp=0; pp < mcbeampartilelist.size(); pp++){
729 auto & decay_beamprim_mcparticle = mcbeampartilelist[pp];
730 if(decay_beamprim_mcparticle->Mother() == beamprim_mcparticle->TrackId()){
775 std::vector< art::Ptr<beam::ProtoDUNEBeamEvent> > beaminfo;
783 for(
unsigned int i = 0; i < beaminfo.size(); ++i){
789 if(beaminfo[i]->GetTOFChan() >= 0)
790 ftof = beaminfo[i]->GetTOF();
793 if(beaminfo[i]->GetBITrigger() == 1){
803 auto &
tracks = beaminfo[i]->GetBeamTracks();
814 auto & beammom = beaminfo[i]->GetRecoBeamMomenta();
815 if(!beammom.empty()){
831 return beamTriggerEvent;
866 if(thisTrack != 0x0){
893 if(calovector.size() != 3 &&
fVerbose > 0)
894 std::cerr <<
"WARNING::Calorimetry vector size for primary is = " << calovector.size() <<
std::endl;
896 for(
size_t k = 0;
k < calovector.size() &&
k<3;
k++){
897 int plane = calovector[
k].PlaneID().Plane;
898 if(plane < 0)
continue;
899 if(plane > 2)
continue;
907 if(pids.size() != 3 &&
fVerbose > 0)
908 std::cerr <<
"WARNING::PID vector size for primary is = " << pids.size() <<
std::endl;
910 for(
size_t k = 0;
k < pids.size() &&
k<3;
k++){
911 int plane = pids[
k].PlaneID().Plane;
912 if(plane < 0)
continue;
913 if(plane > 2)
continue;
931 else if(thisShower != 0x0){
949 for(
size_t k = 0;
k < (thisShower->
dEdx()).
size() &&
k<3;
k++)
957 std::cout <<
"INFO::Primary pfParticle is not track or shower!" <<
std::endl;
962 if(mcparticle != 0x0){
998 if(trajintpcactivevol > 0){
1021 std::vector<art::Ptr<simb::MCParticle> > mcprimarypartilelist;
1025 for(
size_t p=0;
p < mcprimarypartilelist.size();
p++){
1026 auto & primary_mcparticle = mcprimarypartilelist[
p];
1028 if(primary_mcparticle->Mother() == mcparticle->
TrackId()){
1061 for(
size_t pp=0; pp < mcprimarypartilelist.size(); pp++){
1062 auto & decay_primary_mcparticle = mcprimarypartilelist[pp];
1064 if(decay_primary_mcparticle->Mother() == primary_mcparticle->TrackId()){
1102 std::cout <<
"INFO::Process = " << (mcparticle->
Process()).c_str() <<
" , End process = " << (mcparticle->
EndProcess()).c_str()
1103 <<
" , track ID = " << mcparticle->
TrackId()
1109 std::cout <<
"INFO::No MCParticle for primary found!" <<
std::endl;
1125 if(daughterTrack != 0x0){
1151 if(daughtercalovector.size() != 3 &&
fVerbose > 0)
1152 std::cerr <<
"WARNING::Calorimetry vector size for daughter is = " << daughtercalovector.size() <<
std::endl;
1154 for(
size_t k = 0;
k < daughtercalovector.size() &&
k<3;
k++){
1155 int plane = daughtercalovector[
k].PlaneID().Plane;
1156 if(plane < 0)
continue;
1157 if(plane > 2)
continue;
1165 if(daughterpids.size() != 3 &&
fVerbose > 0)
1166 std::cerr <<
"WARNING::PID vector size for daughter is = " << daughterpids.size() <<
std::endl;
1168 for(
size_t k = 0;
k < daughterpids.size() &&
k<3;
k++){
1169 int plane = daughterpids[
k].PlaneID().Plane;
1170 if(plane < 0)
continue;
1171 if(plane > 2)
continue;
1189 else if(daughterShower != 0x0){
1201 for(
size_t k = 0;
k < (daughterShower->
Energy()).
size() &&
k<3;
k++)
1205 for(
size_t k = 0;
k < (daughterShower->
dEdx()).
size() &&
k<3;
k++)
1214 std::cout <<
"INFO::Daughter pfParticle is not track or shower!" <<
std::endl;
1224 if(!pfdaughterT0vec.empty())
1227 if(mcdaughterparticle != 0x0){
1258 std::cout <<
"INFO::No MCParticle for daughter found!" <<
std::endl;
1276 if(gdaughterTrack != 0x0){
1302 if(daughtercalovector.size() != 3 &&
fVerbose > 0)
1303 std::cerr <<
"WARNING::Calorimetry vector size for grand-daughter is = " << daughtercalovector.size() <<
std::endl;
1305 for(
size_t k = 0;
k < daughtercalovector.size() &&
k<3;
k++){
1306 int plane = daughtercalovector[
k].PlaneID().Plane;
1307 if(plane < 0)
continue;
1308 if(plane > 2)
continue;
1316 if(daughterpids.size() != 3 &&
fVerbose > 0)
1317 std::cerr <<
"WARNING::PID vector size for grand-daughter is = " << daughterpids.size() <<
std::endl;
1319 for(
size_t k = 0;
k < daughterpids.size() &&
k<3;
k++){
1320 int plane = daughterpids[
k].PlaneID().Plane;
1321 if(plane < 0)
continue;
1322 if(plane > 2)
continue;
1340 else if(gdaughterShower != 0x0){
1352 for(
size_t k = 0;
k < (gdaughterShower->
Energy()).
size() &&
k<3;
k++)
1356 for(
size_t k = 0;
k < (gdaughterShower->
dEdx()).
size() &&
k<3;
k++)
1365 std::cout <<
"INFO::GrandDaughter pfParticle is not track or shower!" <<
std::endl;
1376 if(!pfdaughterT0vec.empty())
1379 if(mcdaughterparticle != 0x0){
1410 std::cout <<
"INFO::No MCParticle for granddaughter found!" <<
std::endl;
1442 TPC.LocalToWorld(origin, center);
1443 double tpc[3] = {
TPC.HalfWidth(),
TPC.HalfHeight(), 0.5*
TPC.Length() };
1462 fConfigTree = tfs->make<TTree>(
"Config",
"Configuration Tree");
1476 fBeamTrack = tfs->make<TTree>(
"BeamTrack",
"Beam track tree");
1556 fPandoraBeam = tfs->make<TTree>(
"ReconstructedBeamEvents",
"Reconstructed Beam events");
1665 fDaughterTree = tfs->make<TTree>(
"ReconstructedDaughters",
"Reconstructed Daughters");
1721 fGrandDaughterTree = tfs->make<TTree>(
"ReconstructedGrandDaughters",
"Reconstructed GrandDaughters");
1789 for(
int k=0;
k < 5;
k++)
1792 for(
int k=0;
k < 3;
k++){
1826 for(
int k=0;
k < 2;
k++){
1848 for(
int l=0;
l < 3;
l++){
1852 for(
int l=0;
l < 4;
l++){
1884 for(
int l=0;
l < 4;
l++){
1928 for(
int l=0;
l < 4;
l++){
1936 for(
int l=0;
l < 3;
l++){
1968 for(
int l=0;
l < 4;
l++){
1992 for(
int l=0;
l < 3;
l++){
2035 for(
int l=0;
l < 4;
l++){
2051 for(
int l=0;
l < 3;
l++){
2094 for(
int l=0;
l < 4;
l++){
double E(const int i=0) const
double fdaughterStartDirection[NMAXDAUGTHERS][3]
double fprimary_truth_KinEnergy_InTPCActive
double fbeamtrack_truth_Theta
double fdaughterPID_MissingE[NMAXDAUGTHERS][3]
double fprimary_truthdecaydaughter_Mass[NMAXTRUTHDAUGTHERS]
Store parameters for running LArG4.
int fdaughter_truth_EndProcess[NMAXDAUGTHERS]
double fgranddaughterShowerMIPEnergy[NMAXDAUGTHERS][3]
int fprimary_truth_NDECAYDAUGTHERS
void FillPrimaryGrandDaughterPFParticle(art::Event const &evt, detinfo::DetectorClocksData const &clockData, const recob::PFParticle *gdaughterParticle, int daughterID, int gdaughterID)
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
int fgranddaughterMotherID[NMAXDAUGTHERS]
const TVector3 & ShowerStart() const
std::vector< anab::ParticleID > GetRecoTrackPID(const recob::Track &track, art::Event const &evt, const std::string trackModule, const std::string pidModule) const
Get the PID from a given track.
int fprimary_truthdaughter_Mother[NMAXTRUTHDAUGTHERS]
int fprimary_truth_Origin
double EndMomentum() const
constexpr std::uint32_t timeLow() const
double fbeamtrack_truth_Theta_InTPCActive
double fActiveTPCBoundsY[2]
double fprimaryMomentumByRangeMuon
int fprimary_truthdecaydaughter_Mother[NMAXTRUTHDAUGTHERS]
double fprimaryKineticEnergy[3]
int fdaughterIstrack[NMAXDAUGTHERS]
int fbeamtrack_truth_NDECAYDAUGTHERS
double Py(const int i=0) const
std::vector< anab::T0 > GetPFParticleT0(const recob::PFParticle &particle, art::Event const &evt, std::string particleLabel) const
Get the T0(s) from a given PFParticle.
double fbeamtrack_truthdaughter_Pt[NMAXTRUTHDAUGTHERS]
double fprimary_truth_Theta
double fgranddaughter_truth_Phi[NMAXDAUGTHERS]
double fprimaryPID_Chi2Pion[3]
double fprimaryStartPosition[3]
double fprimary_truthdecaydaughter_Pt[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truthdaughter_Mass[NMAXTRUTHDAUGTHERS]
const simb::MCParticle * GetGeantGoodParticle(const simb::MCTruth &genTruth, const art::Event &evt) const
int fprimary_truthdaughter_Pdg[NMAXTRUTHDAUGTHERS]
double fprimary_truth_EndPosition[4]
double fgranddaughterPID_DeltaChi2[NMAXDAUGTHERS][3]
int fbeamtrack_truthdecaydaughter_Process[NMAXTRUTHDAUGTHERS]
double fdaughterOpeningAngle[NMAXDAUGTHERS]
int fgranddaughterShowerBestPlane[NMAXDAUGTHERS]
int fdaughter_truth_Pdg[NMAXDAUGTHERS]
int fdaughter_truth_TrackId[NMAXDAUGTHERS]
double fprimary_truth_Momentum[4]
double fprimary_truthdaughter_Phi[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truth_Momentum_InTPCActive[4]
int fbeamtrack_truthdecaydaughter_Pdg[NMAXTRUTHDAUGTHERS]
const art::InputTag fBeamModuleLabel
double fdaughter_truth_EndPosition[NMAXDAUGTHERS][4]
const recob::Shower * GetPFParticleShower(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string showerLabel) const
Get the shower associated to this particle. Returns a null pointer if not found.
double fgranddaughter_truth_P[NMAXDAUGTHERS]
double fdaughter_truth_EndMomentum[NMAXDAUGTHERS][4]
Handle< PROD > getHandle(SelectorBase const &) const
double fdaughterLength[NMAXDAUGTHERS]
double fbeamtrack_truth_EndPos[4]
const simb::MCTrajectory & Trajectory() const
void FillPrimaryDaughterPFParticle(art::Event const &evt, detinfo::DetectorClocksData const &clockData, const recob::PFParticle *daughterParticle, int daughterID)
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
std::vector< anab::Calorimetry > GetRecoTrackCalorimetry(const recob::Track &track, art::Event const &evt, const std::string trackModule, const std::string caloModule) const
Get the Calorimetry(s) from a given reco track.
constexpr std::uint32_t timeHigh() const
int fdaughterShowerBestPlane[NMAXDAUGTHERS]
double fgranddaughterShowerEnergy[NMAXDAUGTHERS][3]
Geometry information for a single TPC.
double fActiveTPCBoundsZ[2]
const std::vector< const recob::Hit * > GetPFParticleHits(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const
Get the hits associated to the PFParticle.
const std::vector< double > & Energy() const
double Px(const int i=0) const
double fdaughterTheta[NMAXDAUGTHERS]
art::ServiceHandle< cheat::ParticleInventoryService > pi_service
const TVector3 GetPFParticleVertex(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const
Function to find the interaction vertex of a primary PFParticle.
int fgranddaughter_truth_Process[NMAXDAUGTHERS]
int fbeamtrack_truthdaughter_EndProcess[NMAXTRUTHDAUGTHERS]
double fgranddaughterPID_Chi2Proton[NMAXDAUGTHERS][3]
double fprimary_truthdaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fdaughterT0[NMAXDAUGTHERS]
double fdaughterMomentumByRangeProton[NMAXDAUGTHERS]
int fgranddaughterIstrack[NMAXDAUGTHERS]
double fbeamtrack_truthdaughter_P[NMAXTRUTHDAUGTHERS]
double fdaughterShowerdEdx[NMAXDAUGTHERS][3]
double fgranddaughterShowerdEdx[NMAXDAUGTHERS][3]
double fbeamtrack_truthdecaydaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
std::string fPFParticleTag
double fbeamtrack_truthdecaydaughter_P[NMAXTRUTHDAUGTHERS]
double fgranddaughterPID_PIDA[NMAXDAUGTHERS][3]
double fbeamtrack_truth_Pt
int fprimary_truth_TrackId
EDAnalyzer(fhicl::ParameterSet const &pset)
void beginRun(const art::Run &run) override
double fprimaryShowerdEdx[3]
double fgranddaughterPID_MissingEavg[NMAXDAUGTHERS][3]
double fprimaryMomentumByRangeProton
const double GetPFParticleEarliestHitPeakTime(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const
Get the earliest hit peak time.
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
std::string Process() const
double fprimary_truthdecaydaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fprimary_truthdaughter_TotalLength[NMAXTRUTHDAUGTHERS]
double fdaughterPID_DeltaChi2[NMAXDAUGTHERS][3]
double fprimary_truth_Pos_InTPCActive[4]
double fprimary_truthdecaydaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
int fprimary_truthdaughter_Process[NMAXTRUTHDAUGTHERS]
double fgranddaughterRange[NMAXDAUGTHERS][3]
double fdaughterEndMomentum[NMAXDAUGTHERS]
double fbeamtrack_truth_KinEnergy
int fbeamtrack_truth_Origin
void FillPrimaryPFParticle(art::Event const &evt, detinfo::DetectorClocksData const &clockData, const recob::PFParticle *particle)
double fprimaryEarliestHitPeakTime
double fprimary_truth_Pt_InTPCActive
double fgranddaughterTrkPitchC[NMAXDAUGTHERS][3]
art framework interface to geometry description
double fgranddaughterT0[NMAXDAUGTHERS]
double fprimary_truthdaughter_Mass[NMAXTRUTHDAUGTHERS]
double fprimary_truthdecaydaughter_Theta[NMAXTRUTHDAUGTHERS]
int fprimary_truth_NDAUGTHERS
double GetKinEnergyAtVertex(const simb::MCParticle &mcpart, double kinene_lastpoint=0.0)
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
int fdaughterPID_Pdg[NMAXDAUGTHERS][3]
double GetDepEnergyAtLastTrajPoint(const simb::MCParticle &mcpart, double tpcactiveXlow, double tpcactiveXhigh, double tpcactiveYlow, double tpcactiveYhigh, double tpcactiveZlow, double tpcactiveZhigh)
double GetMCParticleLengthInTPCActiveVolume(const simb::MCParticle &mcpart, double tpcactiveXlow, double tpcactiveXhigh, double tpcactiveYlow, double tpcactiveYhigh, double tpcactiveZlow, double tpcactiveZhigh)
double fgranddaughterPID_Chi2Kaon[NMAXDAUGTHERS][3]
double fgranddaughterVertex[NMAXDAUGTHERS][3]
double fdaughter_truth_StartPosition[NMAXDAUGTHERS][4]
double fbeamtrack_truthdaughter_TotalLength[NMAXTRUTHDAUGTHERS]
int fprimary_truthdecaydaughter_Pdg[NMAXTRUTHDAUGTHERS]
double fdaughter_truth_Pt[NMAXDAUGTHERS]
double fprimary_truth_Momentum_InTPCActive[4]
double fbeamtrack_truth_Phi
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
ProtoDUNEAnalTree & operator=(ProtoDUNEAnalTree const &)=delete
std::string GDMLFile() const
Returns the full directory path to the GDML file source.
int fgranddaughter_truth_EndProcess[NMAXDAUGTHERS]
double fdaughterEndDirection[NMAXDAUGTHERS][3]
double fgranddaughterMomentumByRangeProton[NMAXDAUGTHERS]
double fbeamtrack_truth_TotalLength
int fbeamtrack_truth_EndProcess
double fprimary_truthdaughter_Pt[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truthdaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
double Pt(const int i=0) const
double fprimary_truth_Theta_InTPCActive
double fprimaryStartDirection[3]
double fgranddaughter_truth_StartPosition[NMAXDAUGTHERS][4]
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
int fprimary_truthdecaydaughter_TrackId[NMAXTRUTHDAUGTHERS]
double fprimary_truth_Mass
double fbeamtrack_truthdecaydaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
double Length(size_t p=0) const
Access to various track properties.
double fdaughter_truth_Momentum[NMAXDAUGTHERS][4]
int fbeamtrack_truthdaughter_TrackId[NMAXTRUTHDAUGTHERS]
double fdaughter_truth_TotalLength[NMAXDAUGTHERS]
const std::vector< double > & dEdx() const
#define DEFINE_ART_MODULE(klass)
const std::vector< double > & MIPEnergy() const
std::string EndProcess() const
double fgranddaughter_truth_Momentum[NMAXDAUGTHERS][4]
double fbeamtrack_truthdaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
double fbeamtrack_truthdaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
int fgranddaughter_truth_Pdg[NMAXDAUGTHERS]
int fprimary_truthdecaydaughter_Process[NMAXTRUTHDAUGTHERS]
int fdaughter_truth_Process[NMAXDAUGTHERS]
double fbeamtrack_truthdaughter_Phi[NMAXTRUTHDAUGTHERS]
IteratorBox< TPC_iterator,&GeometryCore::begin_TPC,&GeometryCore::end_TPC > IterateTPCs() const
Enables ranged-for loops on all TPCs of the detector.
const art::Ptr< simb::MCTruth > & TrackIdToMCTruth_P(int id) const
double Theta() const
Access to spherical or geographical angles at vertex or at any point.
double fprimary_truth_Phi
double fdaughterPID_Chi2Muon[NMAXDAUGTHERS][3]
double P(const int i=0) const
const recob::Track * GetPFParticleTrack(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const
Get the track associated to this particle. Returns a null pointer if not found.
int fgranddaughterNHits[NMAXDAUGTHERS]
double fdaughterPID_Chi2Proton[NMAXDAUGTHERS][3]
double fdaughterShowerMIPEnergy[NMAXDAUGTHERS][3]
double fprimary_truth_P_InTPCActive
int fbeamtrack_truthdecaydaughter_EndProcess[NMAXTRUTHDAUGTHERS]
bool FillPrimaryBeamParticle(art::Event const &evt)
double fgranddaughterPID_Chi2Muon[NMAXDAUGTHERS][3]
double fprimaryEndDirection[3]
double fprimary_truthdecaydaughter_P[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truth_TotalLength_InTPCActive
int fbeamtrack_truthdecaydaughter_TrackId[NMAXTRUTHDAUGTHERS]
double T(const int i=0) const
int fprimary_truth_Isbeammatched
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
double fdaughterPID_MinChi2[NMAXDAUGTHERS][3]
int fgranddaughterID[NMAXDAUGTHERS]
double fprimaryPID_Chi2Kaon[3]
int fprimary_truthdaughter_EndProcess[NMAXTRUTHDAUGTHERS]
double fprimary_truth_Phi_InTPCActive
double fgranddaughter_truth_EndPosition[NMAXDAUGTHERS][4]
double fdaughterTrkPitchC[NMAXDAUGTHERS][3]
SubRunNumber_t subRun() const
int fbeamtrack_truth_Process
trkf::TrackMomentumCalculator trmom
double fbeamtrack_truthdecaydaughter_TotalLength[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truth_Pt_InTPCActive
const simb::MCParticle * GetMCParticleFromRecoTrack(detinfo::DetectorClocksData const &clockData, const recob::Track &track, art::Event const &evt, std::string trackModule) const
double fbeamtrackMomentum
int fgranddaughterIsshower[NMAXDAUGTHERS]
const std::vector< const recob::PFParticle * > GetPFParticlesFromBeamSlice(art::Event const &evt, const std::string particleLabel) const
Return the pointers for the PFParticles in the beam slice. Returns an empty vector is no beam slice w...
const TVector3 & Direction() const
int fgranddaughter_truth_Mother[NMAXDAUGTHERS]
double fprimaryEndMomentum
int fbeamtrack_truth_NDAUGTHERS
int fgranddaughterPID_Pdg[NMAXDAUGTHERS][3]
double fprimary_truth_EkinAtVertex_notcorrected
double fgranddaughterOpeningAngle[NMAXDAUGTHERS]
Description of geometry of one entire detector.
double fgranddaughter_truth_Theta[NMAXDAUGTHERS]
double fprimaryTrkPitchC[3]
int fprimaryShowerBestPlane
double fbeamtrack_truthdecaydaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
Definition of data types for geometry description.
double fgranddaughter_truth_Pt[NMAXDAUGTHERS]
double fgranddaughterMomentum[NMAXDAUGTHERS]
int fprimary_truth_EndProcess
double fdaughterMomentumByRangeMuon[NMAXDAUGTHERS]
protoana::ProtoDUNEPFParticleUtils pfpUtil
double fbeamtrack_truthdaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
protoana::ProtoDUNEDataUtils dataUtil
double fprimary_truthdaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
int fbeamtrack_truthdaughter_Process[NMAXTRUTHDAUGTHERS]
void analyze(art::Event const &evt) override
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
double fdaughter_truth_Mass[NMAXDAUGTHERS]
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
double fbeamtrack_truth_Phi_InTPCActive
double fgranddaughterEndMomentum[NMAXDAUGTHERS]
TTree * fGrandDaughterTree
std::string fSimulationTag
double fgranddaughterEndDirection[NMAXDAUGTHERS][3]
double fprimary_truthdecaydaughter_TotalLength[NMAXTRUTHDAUGTHERS]
double Vx(const int i=0) const
double fprimaryPID_MissingEavg[3]
double fdaughterPID_MissingEavg[NMAXDAUGTHERS][3]
double fdaughterEndPosition[NMAXDAUGTHERS][3]
Declaration of signal hit object.
double fprimaryShowerEnergy[3]
double fdaughterPhi[NMAXDAUGTHERS]
double fdaughterShowerEnergy[NMAXDAUGTHERS][3]
double StartMomentum() const
double fbeamtrack_truthdecaydaughter_Phi[NMAXTRUTHDAUGTHERS]
Hierarchical representation of particle flow.
double fbeamtrack_truthdecaydaughter_Mass[NMAXTRUTHDAUGTHERS]
double fgranddaughterPhi[NMAXDAUGTHERS]
Contains all timing reference information for the detector.
double fprimary_truthdaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
int GetNActiveFembsForAPA(art::Event const &evt, int apa) const
Get number of active fembs in an APA.
int fdaughterIsshower[NMAXDAUGTHERS]
double fdaughterRange[NMAXDAUGTHERS][3]
double TotalLength() const
protoana::ProtoDUNETruthUtils truthUtil
double fbeamtrack_truth_KinEnergy_InTPCActive
double fprimaryPID_Chi2Muon[3]
double fprimaryPID_Chi2Proton[3]
double ComputeTOF(int pdg, double momentum)
double fbeamtrack_truth_Pos_InTPCActive[4]
double fbeamtrack_truth_P_InTPCActive
double fdaughter_truth_Theta[NMAXDAUGTHERS]
double fdaughter_truth_P[NMAXDAUGTHERS]
int fbeamtrack_truthdaughter_Pdg[NMAXTRUTHDAUGTHERS]
double fprimary_truth_StartPosition[4]
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
const TLorentzVector & Momentum(const int i=0) const
double fprimary_truthdecaydaughter_Phi[NMAXTRUTHDAUGTHERS]
int fgranddaughterPID_Ndf[NMAXDAUGTHERS][3]
double Pz(const int i=0) const
Provides recob::Track data product.
double fdaughterPID_PIDA[NMAXDAUGTHERS][3]
double fprimaryPID_MissingE[3]
double Vz(const int i=0) const
double fgranddaughterPID_MinChi2[NMAXDAUGTHERS][3]
int fdaughter_truth_Mother[NMAXDAUGTHERS]
virtual void endJob() override
double fprimary_truthdaughter_Theta[NMAXTRUTHDAUGTHERS]
const int NMAXTRUTHDAUGTHERS
double fgranddaughterEndPosition[NMAXDAUGTHERS][3]
double fprimary_truthdaughter_P[NMAXTRUTHDAUGTHERS]
double fprimaryOpeningAngle
double fprimary_truth_TotalLength_InTPCActive
int fprimary_truthdaughter_TrackId[NMAXTRUTHDAUGTHERS]
double fprimary_truthdecaydaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
int GetFirstTrajectoryPointInTPCActiveVolume(const simb::MCParticle &mcpart, double tpcactiveXlow, double tpcactiveXhigh, double tpcactiveYlow, double tpcactiveYhigh, double tpcactiveZlow, double tpcactiveZhigh)
const TVector3 GetPFParticleSecondaryVertex(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const
Function to find the secondary interaction vertex of a primary PFParticle.
EventNumber_t event() const
std::string fParticleIDTag
double fprimary_truthdecaydaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
double fgranddaughterStartPosition[NMAXDAUGTHERS][3]
Access the description of detector geometry.
double fprimaryEndPosition[3]
double fdaughterVertex[3]
double fprimary_truth_EndMomentum[4]
double fdaughterPID_Chi2Kaon[NMAXDAUGTHERS][3]
double fdaughterMomentum[NMAXDAUGTHERS]
double fprimary_truth_TotalLength
int fprimary_truthdecaydaughter_EndProcess[NMAXTRUTHDAUGTHERS]
protoana::ProtoDUNEBeamlineUtils beamlineUtil
double fgranddaughterTheta[NMAXDAUGTHERS]
const simb::MCParticle * GetMCParticleFromRecoShower(detinfo::DetectorClocksData const &clockData, const recob::Shower &shower, art::Event const &evt, std::string showerModule) const
auto const & get(AssnsNode< L, R, D > const &r)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
double fbeamtrack_truth_Momentum[4]
double fdaughterStartPosition[NMAXDAUGTHERS][3]
double fgranddaughterKineticEnergy[NMAXDAUGTHERS][3]
double fbeamtrack_truthdecaydaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fprimaryShowerMIPEnergy[3]
double fbeamtrack_truthdecaydaughter_Theta[NMAXTRUTHDAUGTHERS]
double fgranddaughterStartDirection[NMAXDAUGTHERS][3]
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
double fprimaryPID_MinChi2[3]
int fgranddaughter_truth_TrackId[NMAXDAUGTHERS]
Point_t const & Start() const
Returns the position of the first valid point of the trajectory [cm].
double fgranddaughter_truth_Mass[NMAXDAUGTHERS]
virtual void beginJob() override
std::string fGeneratorTag
double fbeamtrack_truthdecaydaughter_Pt[NMAXTRUTHDAUGTHERS]
double fdaughterKineticEnergy[NMAXDAUGTHERS][3]
ProtoDUNEAnalTree(fhicl::ParameterSet const &p)
int fdaughterNHits[NMAXDAUGTHERS]
int fbeamtrack_truthdaughter_Mother[NMAXTRUTHDAUGTHERS]
double fgranddaughterMomentumByRangeMuon[NMAXDAUGTHERS]
double fgranddaughter_truth_TotalLength[NMAXDAUGTHERS]
double fbeamtrack_truth_Mass
double fcerenkovPressure[2]
int fbeamtrack_truthdecaydaughter_Mother[NMAXTRUTHDAUGTHERS]
double fprimaryPID_PIDA[3]
int fdaughterID[NMAXDAUGTHERS]
double fdaughterPID_Chi2Pion[NMAXDAUGTHERS][3]
float GetBeamCosmicScore(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const
Access the BDT output used to decide if a slice is beam-like or cosmic-like.
double fdaughter_truth_Phi[NMAXDAUGTHERS]
int fprimary_truth_Process
double Vy(const int i=0) const
double fbeamtrack_truthdaughter_Theta[NMAXTRUTHDAUGTHERS]
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
constexpr Point origin()
Returns a origin position with a point of the specified type.
double GetTrackMomentum(double trkrange, int pdg) const
double fprimary_truth_EkinAtVertex
int GetProcessKey(std::string process)
int fprimary_truth_Mother
QTextStream & endl(QTextStream &s)
bool IsBeamTrigger(art::Event const &evt) const
double fprimaryPID_DeltaChi2[3]
protoana::ProtoDUNETrackUtils trackUtil
double fprimary_truthdaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
double fActiveTPCBoundsX[2]
int fdaughterPID_Ndf[NMAXDAUGTHERS][3]
double fgranddaughter_truth_EndMomentum[NMAXDAUGTHERS][4]
std::string fCalorimetryTag
geo::GeometryCore const * fGeometry
double fgranddaughterPID_Chi2Pion[NMAXDAUGTHERS][3]
double fgranddaughterPID_MissingE[NMAXDAUGTHERS][3]
double fgranddaughterLength[NMAXDAUGTHERS]