19 #include "art_root_io/TFileService.h" 21 #include "canvas/Persistency/Common/FindManyP.h" 45 #include "dune/DuneObj/ProtoDUNEBeamEvent.h" 50 #include "dune/Protodune/singlephase/DataUtils/ProtoDUNEDataUtils.h" 57 #include "TTimeStamp.h" 75 class ProtoDUNEAnalysisTree;
90 virtual void endJob()
override;
133 int daughterID,
int gdaughterID);
518 for(
int k=0;
k < 6;
k++)
522 for(
int k=0;
k < 6;
k++)
529 if(!isbeamTriggerEvent)
return;
581 std::cout <<
"INFO::Number of daughters is " << particle->NumDaughters() <<
". Only the first NMAXDAUGTHERS are processed." <<
std::endl;
584 for(
const int daughterID : particle->Daughters()){
596 for(
const int gdaughterID : daughterParticle->
Daughters()){
628 bool beamTriggerEvent =
false;
641 if(geantGoodParticle != 0x0){
643 beamTriggerEvent =
true;
676 if(trajintpcactivevol > 0){
695 std::vector<art::Ptr<simb::MCParticle> > mcbeampartilelist;
699 for(
size_t p=0;
p < mcbeampartilelist.size();
p++){
700 auto & beamprim_mcparticle = mcbeampartilelist[
p];
701 if(beamprim_mcparticle->Mother() == geantGoodParticle->
TrackId()){
734 for(
size_t pp=0; pp < mcbeampartilelist.size(); pp++){
735 auto & decay_beamprim_mcparticle = mcbeampartilelist[pp];
736 if(decay_beamprim_mcparticle->Mother() == beamprim_mcparticle->TrackId()){
781 std::vector< art::Ptr<beam::ProtoDUNEBeamEvent> > beaminfo;
789 for(
unsigned int i = 0; i < beaminfo.size(); ++i){
795 if(beaminfo[i]->GetTOFChan() >= 0)
796 ftof = beaminfo[i]->GetTOF();
799 if(beaminfo[i]->GetBITrigger() == 1){
809 auto &
tracks = beaminfo[i]->GetBeamTracks();
820 auto & beammom = beaminfo[i]->GetRecoBeamMomenta();
821 if(!beammom.empty()){
837 return beamTriggerEvent;
874 if(thisTrack != 0x0){
901 if(calovector.size() != 3 &&
fVerbose > 0)
902 std::cerr <<
"WARNING::Calorimetry vector size for primary is = " << calovector.size() <<
std::endl;
904 for(
size_t k = 0;
k < calovector.size() &&
k<3;
k++){
905 int plane = calovector[
k].PlaneID().Plane;
906 if(plane < 0)
continue;
907 if(plane > 2)
continue;
915 if(pids.size() != 3 &&
fVerbose > 0)
916 std::cerr <<
"WARNING::PID vector size for primary is = " << pids.size() <<
std::endl;
918 for(
size_t k = 0;
k < pids.size() &&
k<3;
k++){
919 int plane = pids[
k].PlaneID().Plane;
920 if(plane < 0)
continue;
921 if(plane > 2)
continue;
939 else if(thisShower != 0x0){
957 for(
size_t k = 0;
k < (thisShower->
dEdx()).
size() &&
k<3;
k++)
965 std::cout <<
"INFO::Primary pfParticle is not track or shower!" <<
std::endl;
970 if(mcparticle != 0x0){
1006 if(trajintpcactivevol > 0){
1029 std::vector<art::Ptr<simb::MCParticle> > mcprimarypartilelist;
1033 for(
size_t p=0;
p < mcprimarypartilelist.size();
p++){
1034 auto & primary_mcparticle = mcprimarypartilelist[
p];
1036 if(primary_mcparticle->Mother() == mcparticle->
TrackId()){
1069 for(
size_t pp=0; pp < mcprimarypartilelist.size(); pp++){
1070 auto & decay_primary_mcparticle = mcprimarypartilelist[pp];
1072 if(decay_primary_mcparticle->Mother() == primary_mcparticle->TrackId()){
1110 std::cout <<
"INFO::Process = " << (mcparticle->
Process()).c_str() <<
" , End process = " << (mcparticle->
EndProcess()).c_str()
1111 <<
" , track ID = " << mcparticle->
TrackId()
1117 std::cout <<
"INFO::No MCParticle for primary found!" <<
std::endl;
1134 if(daughterTrack != 0x0){
1160 if(daughtercalovector.size() != 3 &&
fVerbose > 0)
1161 std::cerr <<
"WARNING::Calorimetry vector size for daughter is = " << daughtercalovector.size() <<
std::endl;
1163 for(
size_t k = 0;
k < daughtercalovector.size() &&
k<3;
k++){
1164 int plane = daughtercalovector[
k].PlaneID().Plane;
1165 if(plane < 0)
continue;
1166 if(plane > 2)
continue;
1174 if(daughterpids.size() != 3 &&
fVerbose > 0)
1175 std::cerr <<
"WARNING::PID vector size for daughter is = " << daughterpids.size() <<
std::endl;
1177 for(
size_t k = 0;
k < daughterpids.size() &&
k<3;
k++){
1178 int plane = daughterpids[
k].PlaneID().Plane;
1179 if(plane < 0)
continue;
1180 if(plane > 2)
continue;
1198 else if(daughterShower != 0x0){
1210 for(
size_t k = 0;
k < (daughterShower->
Energy()).
size() &&
k<3;
k++)
1214 for(
size_t k = 0;
k < (daughterShower->
dEdx()).
size() &&
k<3;
k++)
1223 std::cout <<
"INFO::Daughter pfParticle is not track or shower!" <<
std::endl;
1233 if(!pfdaughterT0vec.empty())
1236 if(mcdaughterparticle != 0x0){
1267 std::cout <<
"INFO::No MCParticle for daughter found!" <<
std::endl;
1281 int daughterID,
int gdaughterID){
1287 if(gdaughterTrack != 0x0){
1313 if(daughtercalovector.size() != 3 &&
fVerbose > 0)
1314 std::cerr <<
"WARNING::Calorimetry vector size for grand-daughter is = " << daughtercalovector.size() <<
std::endl;
1316 for(
size_t k = 0;
k < daughtercalovector.size() &&
k<3;
k++){
1317 int plane = daughtercalovector[
k].PlaneID().Plane;
1318 if(plane < 0)
continue;
1319 if(plane > 2)
continue;
1327 if(daughterpids.size() != 3 &&
fVerbose > 0)
1328 std::cerr <<
"WARNING::PID vector size for grand-daughter is = " << daughterpids.size() <<
std::endl;
1330 for(
size_t k = 0;
k < daughterpids.size() &&
k<3;
k++){
1331 int plane = daughterpids[
k].PlaneID().Plane;
1332 if(plane < 0)
continue;
1333 if(plane > 2)
continue;
1351 else if(gdaughterShower != 0x0){
1363 for(
size_t k = 0;
k < (gdaughterShower->
Energy()).
size() &&
k<3;
k++)
1367 for(
size_t k = 0;
k < (gdaughterShower->
dEdx()).
size() &&
k<3;
k++)
1376 std::cout <<
"INFO::GrandDaughter pfParticle is not track or shower!" <<
std::endl;
1387 if(!pfdaughterT0vec.empty())
1390 if(mcdaughterparticle != 0x0){
1421 std::cout <<
"INFO::No MCParticle for granddaughter found!" <<
std::endl;
1453 TPC.LocalToWorld(origin, center);
1454 double tpc[3] = {
TPC.HalfWidth(),
TPC.HalfHeight(), 0.5*
TPC.Length() };
1473 fConfigTree = tfs->make<TTree>(
"Config",
"Configuration Tree");
1487 fBeamTrack = tfs->make<TTree>(
"BeamTrack",
"Beam track tree");
1567 fPandoraBeam = tfs->make<TTree>(
"ReconstructedBeamEvents",
"Reconstructed Beam events");
1676 fDaughterTree = tfs->make<TTree>(
"ReconstructedDaughters",
"Reconstructed Daughters");
1732 fGrandDaughterTree = tfs->make<TTree>(
"ReconstructedGrandDaughters",
"Reconstructed GrandDaughters");
1800 for(
int k=0;
k < 5;
k++)
1803 for(
int k=0;
k < 3;
k++){
1837 for(
int k=0;
k < 2;
k++){
1859 for(
int l=0;
l < 3;
l++){
1863 for(
int l=0;
l < 4;
l++){
1895 for(
int l=0;
l < 4;
l++){
1939 for(
int l=0;
l < 4;
l++){
1947 for(
int l=0;
l < 3;
l++){
1979 for(
int l=0;
l < 4;
l++){
2003 for(
int l=0;
l < 3;
l++){
2046 for(
int l=0;
l < 4;
l++){
2062 for(
int l=0;
l < 3;
l++){
2105 for(
int l=0;
l < 4;
l++){
double fgranddaughter_truth_Pt[NMAXDAUGTHERS]
double E(const int i=0) const
double fprimaryShowerEnergy[3]
double fdaughter_truth_TotalLength[NMAXDAUGTHERS]
Store parameters for running LArG4.
double fdaughterPID_Chi2Proton[NMAXDAUGTHERS][3]
int fdaughter_truth_EndProcess[NMAXDAUGTHERS]
double fbeamtrack_truth_KinEnergy
double fdaughterShowerMIPEnergy[NMAXDAUGTHERS][3]
double fprimaryStartPosition[3]
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
double fdaughterMomentumByRangeMuon[NMAXDAUGTHERS]
double fprimary_truth_Phi_InTPCActive
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.
double EndMomentum() const
constexpr std::uint32_t timeLow() const
double fdaughterMomentum[NMAXDAUGTHERS]
double fprimaryEndMomentum
double Py(const int i=0) const
int fgranddaughterNHits[NMAXDAUGTHERS]
double fprimaryKineticEnergy[3]
double fdaughter_truth_Phi[NMAXDAUGTHERS]
int fdaughterShowerBestPlane[NMAXDAUGTHERS]
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 fdaughterVertex[3]
protoana::ProtoDUNEDataUtils dataUtil
double fprimary_truthdecaydaughter_Pt[NMAXTRUTHDAUGTHERS]
int fgranddaughter_truth_Process[NMAXDAUGTHERS]
int fbeamtrack_truthdaughter_Process[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truthdecaydaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
const simb::MCParticle * GetGeantGoodParticle(const simb::MCTruth &genTruth, const art::Event &evt) const
double fbeamtrack_truthdaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
double fprimary_truthdecaydaughter_TotalLength[NMAXTRUTHDAUGTHERS]
int fprimary_truthdaughter_EndProcess[NMAXTRUTHDAUGTHERS]
double fprimary_truthdecaydaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fprimary_truth_EkinAtVertex_notcorrected
ProtoDUNEAnalysisTree(fhicl::ParameterSet const &p)
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 fprimaryPID_MissingE[3]
double fprimary_truthdaughter_TotalLength[NMAXTRUTHDAUGTHERS]
Handle< PROD > getHandle(SelectorBase const &) const
double fprimaryMomentumByRangeMuon
double fgranddaughter_truth_StartPosition[NMAXDAUGTHERS][4]
double fgranddaughter_truth_EndMomentum[NMAXDAUGTHERS][4]
int fgranddaughterMotherID[NMAXDAUGTHERS]
double fprimary_truthdecaydaughter_P[NMAXTRUTHDAUGTHERS]
const simb::MCTrajectory & Trajectory() const
double fdaughterTheta[NMAXDAUGTHERS]
double fdaughter_truth_Pt[NMAXDAUGTHERS]
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
double fgranddaughter_truth_Theta[NMAXDAUGTHERS]
int fbeamtrack_truthdaughter_TrackId[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truth_Momentum[4]
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.
double fbeamtrack_truthdaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fbeamtrackMomentum
int fprimary_truth_NDECAYDAUGTHERS
double fbeamtrack_truth_TotalLength_InTPCActive
double fbeamtrack_truth_P_InTPCActive
double fprimaryEndDirection[3]
int fbeamtrack_truthdecaydaughter_Process[NMAXTRUTHDAUGTHERS]
constexpr std::uint32_t timeHigh() const
double fActiveTPCBoundsX[2]
double fprimary_truth_Theta
double fbeamtrack_truthdaughter_Theta[NMAXTRUTHDAUGTHERS]
Geometry information for a single TPC.
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
int fbeamtrack_truthdecaydaughter_Mother[NMAXTRUTHDAUGTHERS]
int fgranddaughterID[NMAXDAUGTHERS]
double fprimaryEarliestHitPeakTime
void FillPrimaryDaughterPFParticle(art::Event const &evt, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const recob::PFParticle *daughterParticle, int daughterID)
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.
double fgranddaughter_truth_Phi[NMAXDAUGTHERS]
double fgranddaughterPID_Chi2Pion[NMAXDAUGTHERS][3]
double fdaughterPID_Chi2Muon[NMAXDAUGTHERS][3]
double fgranddaughterMomentumByRangeMuon[NMAXDAUGTHERS]
int fdaughter_truth_Process[NMAXDAUGTHERS]
double fprimary_truthdecaydaughter_Theta[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truthdecaydaughter_Phi[NMAXTRUTHDAUGTHERS]
double fprimary_truthdaughter_Phi[NMAXTRUTHDAUGTHERS]
double fgranddaughterOpeningAngle[NMAXDAUGTHERS]
double fdaughterLength[NMAXDAUGTHERS]
double fprimary_truthdecaydaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
const art::InputTag fBeamModuleLabel
int fbeamtrack_truth_Origin
double fdaughterRange[NMAXDAUGTHERS][3]
int fprimary_truthdaughter_Process[NMAXTRUTHDAUGTHERS]
double fprimary_truthdaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fgranddaughterEndMomentum[NMAXDAUGTHERS]
double fActiveTPCBoundsZ[2]
double fgranddaughterLength[NMAXDAUGTHERS]
double fprimary_truthdecaydaughter_Phi[NMAXTRUTHDAUGTHERS]
double fprimary_truthdaughter_Pt[NMAXTRUTHDAUGTHERS]
EDAnalyzer(fhicl::ParameterSet const &pset)
const double GetPFParticleEarliestHitPeakTime(const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const
Get the earliest hit peak time.
double fprimaryPID_Chi2Muon[3]
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
std::string Process() const
double fprimary_truthdaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
trkf::TrackMomentumCalculator trmom
int fgranddaughter_truth_EndProcess[NMAXDAUGTHERS]
double fprimary_truthdaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
double fdaughterT0[NMAXDAUGTHERS]
void FillPrimaryGrandDaughterPFParticle(art::Event const &evt, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const recob::PFParticle *gdaughterParticle, int daughterID, int gdaughterID)
int fgranddaughter_truth_TrackId[NMAXDAUGTHERS]
std::string fPFParticleTag
int fbeamtrack_truthdecaydaughter_EndProcess[NMAXTRUTHDAUGTHERS]
std::string fGeneratorTag
double fgranddaughterStartDirection[NMAXDAUGTHERS][3]
double fprimary_truth_Momentum_InTPCActive[4]
int fprimary_truth_Mother
int fdaughterIstrack[NMAXDAUGTHERS]
art::ServiceHandle< cheat::ParticleInventoryService > pi_service
double fdaughterPID_Chi2Kaon[NMAXDAUGTHERS][3]
double fgranddaughterPID_PIDA[NMAXDAUGTHERS][3]
int fprimary_truth_EndProcess
double fprimaryPID_MinChi2[3]
double fdaughterEndDirection[NMAXDAUGTHERS][3]
double fgranddaughterPID_MissingEavg[NMAXDAUGTHERS][3]
double fprimaryShowerMIPEnergy[3]
double fdaughterStartDirection[NMAXDAUGTHERS][3]
int fbeamtrack_truthdecaydaughter_Pdg[NMAXTRUTHDAUGTHERS]
double fbeamtrack_truthdaughter_TotalLength[NMAXTRUTHDAUGTHERS]
art framework interface to geometry description
double fprimary_truth_Momentum[4]
double fbeamtrack_truthdecaydaughter_P[NMAXTRUTHDAUGTHERS]
double fgranddaughterShowerEnergy[NMAXDAUGTHERS][3]
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.
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)
geo::GeometryCore const * fGeometry
double fprimaryStartDirection[3]
double fprimaryEndPosition[3]
int fprimary_truthdecaydaughter_Pdg[NMAXTRUTHDAUGTHERS]
int fbeamtrack_truth_EndProcess
double fdaughterPID_MissingEavg[NMAXDAUGTHERS][3]
double fdaughter_truth_Mass[NMAXDAUGTHERS]
double fgranddaughterVertex[NMAXDAUGTHERS][3]
std::string fParticleIDTag
double fdaughterPhi[NMAXDAUGTHERS]
double fdaughterPID_PIDA[NMAXDAUGTHERS][3]
double fprimaryPID_PIDA[3]
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
double fprimary_truth_Phi
double fdaughterStartPosition[NMAXDAUGTHERS][3]
std::string GDMLFile() const
Returns the full directory path to the GDML file source.
void FillPrimaryPFParticle(art::Event const &evt, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const recob::PFParticle *particle)
double fgranddaughterT0[NMAXDAUGTHERS]
double fgranddaughterStartPosition[NMAXDAUGTHERS][3]
int fbeamtrack_truth_NDECAYDAUGTHERS
int fdaughterPID_Pdg[NMAXDAUGTHERS][3]
double fbeamtrack_truth_Pt_InTPCActive
double fprimaryMomentumByRangeProton
double Pt(const int i=0) const
double fbeamtrack_truth_Theta
const int NMAXTRUTHDAUGTHERS
double fgranddaughterMomentumByRangeProton[NMAXDAUGTHERS]
double fprimary_truth_KinEnergy_InTPCActive
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
double fprimary_truth_StartPosition[4]
int fprimary_truth_Isbeammatched
double Length(size_t p=0) const
Access to various track properties.
int fprimary_truthdecaydaughter_Process[NMAXTRUTHDAUGTHERS]
double fgranddaughterTheta[NMAXDAUGTHERS]
double fdaughterPID_DeltaChi2[NMAXDAUGTHERS][3]
const std::vector< double > & dEdx() const
#define DEFINE_ART_MODULE(klass)
double fdaughterTrkPitchC[NMAXDAUGTHERS][3]
int fprimary_truthdaughter_TrackId[NMAXTRUTHDAUGTHERS]
const std::vector< double > & MIPEnergy() const
std::string EndProcess() const
int fgranddaughterIsshower[NMAXDAUGTHERS]
protoana::ProtoDUNEBeamlineUtils beamlineUtil
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
double fdaughterMomentumByRangeProton[NMAXDAUGTHERS]
int fdaughterPID_Ndf[NMAXDAUGTHERS][3]
double fprimaryPID_Chi2Pion[3]
double fcerenkovPressure[2]
double fActiveTPCBoundsY[2]
double fgranddaughterRange[NMAXDAUGTHERS][3]
double fgranddaughterKineticEnergy[NMAXDAUGTHERS][3]
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 fprimary_truthdaughter_P[NMAXTRUTHDAUGTHERS]
double fdaughterPID_MissingE[NMAXDAUGTHERS][3]
double Theta() const
Access to spherical or geographical angles at vertex or at any point.
double fbeamtrack_truth_Phi
double fdaughterPID_Chi2Pion[NMAXDAUGTHERS][3]
double fprimary_truth_Pos_InTPCActive[4]
double fgranddaughterShowerMIPEnergy[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.
double fprimary_truthdaughter_Theta[NMAXTRUTHDAUGTHERS]
protoana::ProtoDUNETrackUtils trackUtil
double T(const int i=0) const
int fbeamtrack_truthdecaydaughter_TrackId[NMAXTRUTHDAUGTHERS]
double fgranddaughterPID_MissingE[NMAXDAUGTHERS][3]
int fprimary_truthdaughter_Mother[NMAXTRUTHDAUGTHERS]
int fdaughter_truth_Pdg[NMAXDAUGTHERS]
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
double fbeamtrack_truthdaughter_Mass[NMAXTRUTHDAUGTHERS]
double fprimary_truthdecaydaughter_Momentum[NMAXTRUTHDAUGTHERS][4]
double fgranddaughter_truth_EndPosition[NMAXDAUGTHERS][4]
virtual void beginJob() override
SubRunNumber_t subRun() const
double fprimary_truth_Pt_InTPCActive
int fgranddaughterShowerBestPlane[NMAXDAUGTHERS]
const simb::MCParticle * GetMCParticleFromRecoTrack(detinfo::DetectorClocksData const &clockData, const recob::Track &track, art::Event const &evt, std::string trackModule) const
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
double fdaughterKineticEnergy[NMAXDAUGTHERS][3]
int fbeamtrack_truthdaughter_Mother[NMAXTRUTHDAUGTHERS]
int fprimaryShowerBestPlane
double fbeamtrack_truthdaughter_Pt[NMAXTRUTHDAUGTHERS]
int fgranddaughter_truth_Mother[NMAXDAUGTHERS]
double fprimary_truth_Theta_InTPCActive
double fbeamtrack_truth_Phi_InTPCActive
double fbeamtrack_truthdecaydaughter_Pt[NMAXTRUTHDAUGTHERS]
int fdaughterID[NMAXDAUGTHERS]
Description of geometry of one entire detector.
double fgranddaughterPhi[NMAXDAUGTHERS]
double fgranddaughterPID_MinChi2[NMAXDAUGTHERS][3]
double fprimary_truthdecaydaughter_Mass[NMAXTRUTHDAUGTHERS]
double fdaughter_truth_P[NMAXDAUGTHERS]
double fbeamtrack_truth_Momentum_InTPCActive[4]
Definition of data types for geometry description.
double fprimary_truth_P_InTPCActive
bool FillPrimaryBeamParticle(art::Event const &evt)
double fbeamtrack_truth_Theta_InTPCActive
double fprimary_truthdaughter_Mass[NMAXTRUTHDAUGTHERS]
double fgranddaughterShowerdEdx[NMAXDAUGTHERS][3]
double fprimaryPID_Chi2Proton[3]
double fprimaryPID_Chi2Kaon[3]
int fgranddaughterIstrack[NMAXDAUGTHERS]
double fdaughter_truth_Theta[NMAXDAUGTHERS]
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
double fbeamtrack_truthdecaydaughter_TotalLength[NMAXTRUTHDAUGTHERS]
double fprimary_truthdaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
double fprimaryPID_DeltaChi2[3]
int fprimary_truth_Origin
Vector_t EndDirection() const
Returns the direction of the trajectory at the last point.
double fdaughterEndMomentum[NMAXDAUGTHERS]
int fdaughterNHits[NMAXDAUGTHERS]
double fprimaryShowerdEdx[3]
double fdaughterPID_MinChi2[NMAXDAUGTHERS][3]
double fbeamtrack_truthdecaydaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
double Vx(const int i=0) const
double fbeamtrack_truthdaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
int fprimary_truthdaughter_Pdg[NMAXTRUTHDAUGTHERS]
int fprimary_truth_TrackId
double fbeamtrack_truthdecaydaughter_Mass[NMAXTRUTHDAUGTHERS]
std::string fCalorimetryTag
Declaration of signal hit object.
TTree * fGrandDaughterTree
double fprimary_truth_TotalLength
double StartMomentum() const
double fgranddaughterMomentum[NMAXDAUGTHERS]
double fprimaryTrkPitchC[3]
double fgranddaughterTrkPitchC[NMAXDAUGTHERS][3]
double fgranddaughterPID_Chi2Kaon[NMAXDAUGTHERS][3]
Hierarchical representation of particle flow.
double fbeamtrack_truthdaughter_EndMomentum[NMAXTRUTHDAUGTHERS][4]
double fbeamtrack_truth_Pt
double fdaughter_truth_EndPosition[NMAXDAUGTHERS][4]
double fdaughter_truth_StartPosition[NMAXDAUGTHERS][4]
int fgranddaughterPID_Ndf[NMAXDAUGTHERS][3]
Contains all timing reference information for the detector.
int fdaughterIsshower[NMAXDAUGTHERS]
double fdaughter_truth_EndMomentum[NMAXDAUGTHERS][4]
int GetNActiveFembsForAPA(art::Event const &evt, int apa) const
Get number of active fembs in an APA.
double TotalLength() const
double fgranddaughter_truth_Momentum[NMAXDAUGTHERS][4]
double ComputeTOF(int pdg, double momentum)
double fbeamtrack_truthdecaydaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
protoana::ProtoDUNEPFParticleUtils pfpUtil
int fbeamtrack_truth_NDAUGTHERS
Point_t const & End() const
Returns the position of the last valid point of the trajectory [cm].
double fbeamtrack_truth_TotalLength
double fbeamtrack_truth_Pos_InTPCActive[4]
const TLorentzVector & Momentum(const int i=0) const
double fgranddaughter_truth_P[NMAXDAUGTHERS]
double fgranddaughter_truth_Mass[NMAXDAUGTHERS]
double Pz(const int i=0) const
Provides recob::Track data product.
double fprimary_truth_EkinAtVertex
double fprimaryOpeningAngle
double Vz(const int i=0) const
int fdaughter_truth_TrackId[NMAXDAUGTHERS]
double fbeamtrack_truth_KinEnergy_InTPCActive
void analyze(art::Event const &evt) override
int GetFirstTrajectoryPointInTPCActiveVolume(const simb::MCParticle &mcpart, double tpcactiveXlow, double tpcactiveXhigh, double tpcactiveYlow, double tpcactiveYhigh, double tpcactiveZlow, double tpcactiveZhigh)
double fgranddaughterPID_DeltaChi2[NMAXDAUGTHERS][3]
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
virtual void endJob() override
double fgranddaughterPID_Chi2Muon[NMAXDAUGTHERS][3]
int fbeamtrack_truthdaughter_Pdg[NMAXTRUTHDAUGTHERS]
double fprimary_truthdecaydaughter_EndPosition[NMAXTRUTHDAUGTHERS][4]
double fgranddaughter_truth_TotalLength[NMAXDAUGTHERS]
Access the description of detector geometry.
int fbeamtrack_truth_Process
protoana::ProtoDUNETruthUtils truthUtil
double fgranddaughterEndDirection[NMAXDAUGTHERS][3]
double fprimary_truth_EndMomentum[4]
double fbeamtrack_truthdecaydaughter_Theta[NMAXTRUTHDAUGTHERS]
double fprimary_truth_Mass
std::string fSimulationTag
ProtoDUNEAnalysisTree & operator=(ProtoDUNEAnalysisTree const &)=delete
double fdaughter_truth_Momentum[NMAXDAUGTHERS][4]
double fbeamtrack_truthdaughter_P[NMAXTRUTHDAUGTHERS]
const simb::MCParticle * GetMCParticleFromRecoShower(detinfo::DetectorClocksData const &clockData, const recob::Shower &shower, art::Event const &evt, std::string showerModule) const
int fdaughter_truth_Mother[NMAXDAUGTHERS]
auto const & get(AssnsNode< L, R, D > const &r)
int fprimary_truthdecaydaughter_Mother[NMAXTRUTHDAUGTHERS]
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
int fprimary_truthdecaydaughter_TrackId[NMAXTRUTHDAUGTHERS]
int fprimary_truth_Process
void beginRun(const art::Run &run) override
int fgranddaughterPID_Pdg[NMAXDAUGTHERS][3]
double fprimary_truth_TotalLength_InTPCActive
double fbeamtrack_truthdaughter_Phi[NMAXTRUTHDAUGTHERS]
Vector_t StartDirection() const
Returns the direction of the trajectory at the first point.
Point_t const & Start() const
Returns the position of the first valid point of the trajectory [cm].
int fbeamtrack_truthdaughter_EndProcess[NMAXTRUTHDAUGTHERS]
double fdaughterShowerEnergy[NMAXDAUGTHERS][3]
double fdaughterEndPosition[NMAXDAUGTHERS][3]
double fbeamtrack_truthdecaydaughter_StartPosition[NMAXTRUTHDAUGTHERS][4]
double fdaughterOpeningAngle[NMAXDAUGTHERS]
int fgranddaughter_truth_Pdg[NMAXDAUGTHERS]
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 fprimary_truth_EndPosition[4]
double Vy(const int i=0) const
int fprimary_truthdecaydaughter_EndProcess[NMAXTRUTHDAUGTHERS]
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
double fprimaryPID_MissingEavg[3]
constexpr Point origin()
Returns a origin position with a point of the specified type.
double GetTrackMomentum(double trkrange, int pdg) const
int GetProcessKey(std::string process)
QTextStream & endl(QTextStream &s)
bool IsBeamTrigger(art::Event const &evt) const
double fbeamtrack_truth_Mass
double fbeamtrack_truth_EndPos[4]
double fgranddaughterEndPosition[NMAXDAUGTHERS][3]
int fprimary_truth_NDAUGTHERS
double fgranddaughterPID_Chi2Proton[NMAXDAUGTHERS][3]
double fdaughterShowerdEdx[NMAXDAUGTHERS][3]