// $Id$ // // File: DReaction_factory_Nfinal.cc // Created: Thu Jul 28 16:09:13 EDT 2016 // Creator: dalton (on Linux gluon100.jlab.org 2.6.32-431.20.3.el6.x86_64 x86_64) // #include "DReaction_factory_Nfinal.h" //------------------ // brun //------------------ jerror_t DReaction_factory_Nfinal::brun(JEventLoop* locEventLoop, int32_t locRunNumber) { vector locBeamPeriodVector; locEventLoop->GetCalib("PHOTON_BEAM/RF/beam_period", locBeamPeriodVector); dBeamBunchPeriod = locBeamPeriodVector[0]; return NOERROR; } //------------------ // evnt //------------------ jerror_t DReaction_factory_Nfinal::evnt(JEventLoop* locEventLoop, uint64_t locEventNumber) { /* // __ __ _ _ _ // | \/ (_)_____(_)_ _ __ _ _ _ ___ _ _| |_ _ _ ___ _ _ // | |\/| | (_-<_-< | ' \/ _` | | ' \/ -_) || | _| '_/ _ \ ' \ // |_| |_|_/__/__/_|_||_\__, | |_||_\___|\_,_|\__|_| \___/_||_| // |___/ */ // // 2 pi : piplus pi0 // // Make as many DReaction objects as desired DReactionStep* missnPiPi0_reacStep = NULL; DReaction* missnPiPi0_reac = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** neutron2pi Reaction Definition *************************************************/ missnPiPi0_reac = new DReaction("missnPiPi0"); //Required: DReactionSteps to specify the channel and decay chain you want to study //Particles are of type Particle_t, an enum defined in sim-recon/src/libraries/include/particleType.h //Example: g, p -> pi+, pi-, pi0, (p) missnPiPi0_reacStep = new DReactionStep(); missnPiPi0_reacStep->Set_InitialParticleID(Gamma); missnPiPi0_reacStep->Set_TargetParticleID(Proton); missnPiPi0_reacStep->Add_FinalParticleID(PiPlus); // missnPiPi0_reacStep->Add_FinalParticleID(PiMinus); // missnPiPi0_reacStep->Add_FinalParticleID(Proton); //true: missing missnPiPi0_reacStep->Add_FinalParticleID(Pi0); missnPiPi0_reacStep->Add_FinalParticleID(Neutron, true); //true: missing missnPiPi0_reac->Add_ReactionStep(missnPiPi0_reacStep); dReactionStepPool.push_back(missnPiPi0_reacStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g missnPiPi0_reacStep = new DReactionStep(); missnPiPi0_reacStep->Set_InitialParticleID(Pi0); missnPiPi0_reacStep->Add_FinalParticleID(Gamma); missnPiPi0_reacStep->Add_FinalParticleID(Gamma); //missnPiPi0_reacStep->Set_KinFitConstrainInitMassFlag(false); //default: true //ignored if p4 not fit or is beam //phi, omega not constrained regardless missnPiPi0_reac->Add_ReactionStep(missnPiPi0_reacStep); dReactionStepPool.push_back(missnPiPi0_reacStep); //register so will be deleted later: prevent memory leak /**************************************************** neutron2pi Control Settings ****************************************************/ // Recommended: Type of kinematic fit to perform (default is d_NoFit) //fit types are of type DKinFitType, an enum defined in sim-recon/src/libraries/ANALYSIS/DReaction.h //Options: d_NoFit (default), d_P4Fit, d_VertexFit, d_P4AndVertexFit //P4 fits automatically constrain decaying particle masses, unless they are manually disabled missnPiPi0_reac->Set_KinFitType(d_P4AndVertexFit); //missnPiPi0_reac->Set_KinFitType(d_VertexFit); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 1.002 ns) missnPiPi0_reac->Set_MaxPhotonRFDeltaT(0.5*dBeamBunchPeriod); //should be minimum cut value // Optional: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. missnPiPi0_reac->Set_MinPhotonPIDFOM(5.73303E-7); //missnPiPi0_reac->Set_MinPhotonPIDFOM(5.E-3); // 3 sigma // Optional: When generating particle combinations, reject all charged track candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. missnPiPi0_reac->Set_MinChargedPIDFOM(5.73303E-7); //missnPiPi0_reac->Set_MinChargedPIDFOM(5.E-3); // 3 sigma // Highly Recommended: Cut on number of extra "good" tracks. "Good" tracks are ones that survive the "PreSelect" (or user custom) factory. // Important: Keep cut large: Can have many ghost and accidental tracks that look "good" missnPiPi0_reac->Set_MaxExtraGoodTracks(0); // Highly Recommended: Enable ROOT TTree output for this DReaction missnPiPi0_reac->Enable_TTreeOutput("tree_nPiPi0.root"); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /************************************************** neutron2pi Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut missnPiPi0_reac->Set_InvariantMassCut(Pi0, 0.09, 0.18); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton missnPiPi0_reac->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(missnPiPi0_reac, false, -2.0, 4.0)); /**************************************************** neutron2pi Analysis Actions ****************************************************/ // Recommended: Analysis actions automatically performed by the DAnalysisResults factories to histogram useful quantities. //These actions are executed sequentially, and are executed on each surviving (non-cut) particle combination //Pre-defined actions can be found in ANALYSIS/DHistogramActions_*.h and ANALYSIS/DCutActions.h //If a histogram action is repeated, it should be created with a unique name (string) to distinguish them // HISTOGRAM PID missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_PID(missnPiPi0_reac)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // missnPiPi0_reac->Add_AnalysisAction(new DCutAction_EachPIDFOM(missnPiPi0_reac, 5.73303E-7)); // missnPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDDeltaT(missnPiPi0_reac, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data missnPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(missnPiPi0_reac, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons missnPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(missnPiPi0_reac, 0.0, 0.9, Neutron, SYS_FCAL)); //min/max beta cut for neutrons // missnPiPi0_reac->Add_AnalysisAction(new DCutAction_NoPIDHit(missnPiPi0_reac, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PreKinFit")); //missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(missnPiPi0_reac, false, 1000, -5.0, 5.0, "PreKinFit")); missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(missnPiPi0_reac, false, 1000, -5, 5, "PreKinFit")); // RESONANCES // deque nPiPi0_NeutronPiPlus; nPiPi0_NeutronPiPlus.push_back(Neutron); nPiPi0_NeutronPiPlus.push_back(PiPlus); // deque nPiPi0_NeutronPi0; nPiPi0_NeutronPi0.push_back(Neutron); nPiPi0_NeutronPi0.push_back(Pi0); // deque nPiPi0_NeutronPiPlusPi0; nPiPi0_NeutronPiPlusPi0.push_back(Neutron); nPiPi0_NeutronPiPlusPi0.push_back(PiPlus); nPiPi0_NeutronPiPlusPi0.push_back(Pi0); // deque nPiPi0_PiPlusPi0; nPiPi0_PiPlusPi0.push_back(PiPlus); nPiPi0_PiPlusPi0.push_back(Pi0); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PreKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_NeutronPi0, false, 1000, 1.0, 3.0, "NeutronPi0_PreKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_NeutronPiPlusPi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPi0_PreKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_PiPlusPi0, false, 1000, 0.0, 2.0, "NeutronPiPlusPi0_PreKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(missnPiPi0_reac, 0, nPiPi0_NeutronPi0, nPiPi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz_PreKinFit")); // KINEMATIC FIT missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_KinFitResults(missnPiPi0_reac, 0.05)); //5% confidence level cut on pull histograms only missnPiPi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(missnPiPi0_reac, 0.0)); //0% confidence level cut //require kinematic fit converges //missnPiPi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(missnPiPi0_reac, 5.73303E-7)); // 5 sigma // HISTOGRAM MASSES //false/true: measured/kinfit data missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PostKinFit")); //missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(missnPiPi0_reac, false, 1000, -5.0, 5.0, "PostKinFit")); missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(missnPiPi0_reac, false, 1000, -5, 5, "PostKinFit")); // RESONANCES // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PostKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_NeutronPi0, false, 1000, 1.0, 3.0, "NeutronPi0_PostKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_NeutronPiPlusPi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPi0_PostKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(missnPiPi0_reac, 0, nPiPi0_PiPlusPi0, false, 1000, 0.0, 2.0, "NeutronPiPlusPi0_PreKinFit")); // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(missnPiPi0_reac, 0, nPiPi0_NeutronPi0, nPiPi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz_PostKinFit")); // Kinematics missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(missnPiPi0_reac, false)); //false: measured data // missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(missnPiPi0_reac, true, "KinFit")); //true: kinematic-fit data missnPiPi0_reac->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(missnPiPi0_reac)); _data.push_back(missnPiPi0_reac); //Register the DReaction with the factory /* // _ // _ _ ___ _ _| |_ _ _ ___ _ _ // | ' \/ -_) || | _| '_/ _ \ ' \ // |_||_\___|\_,_|\__|_| \___/_||_| // */ // // 1 pi : piplus // // Make as many DReaction objects as desired DReactionStep* NPi_reacStep = NULL; DReaction* NPi_reac = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** neutron2pi Reaction Definition *************************************************/ NPi_reac = new DReaction("NPi"); //Required: DReactionSteps to specify the channel and decay chain you want to study //Particles are of type Particle_t, an enum defined in sim-recon/src/libraries/include/particleType.h //Example: g, p -> pi+, pi-, pi0, (p) NPi_reacStep = new DReactionStep(); NPi_reacStep->Set_InitialParticleID(Gamma); NPi_reacStep->Set_TargetParticleID(Proton); NPi_reacStep->Add_FinalParticleID(PiPlus); NPi_reacStep->Add_FinalParticleID(Neutron,false); //true: missing NPi_reac->Add_ReactionStep(NPi_reacStep); dReactionStepPool.push_back(NPi_reacStep); //register so will be deleted later: prevent memory leak /**************************************************** neutron2pi Control Settings ****************************************************/ // Recommended: Type of kinematic fit to perform (default is d_NoFit) //fit types are of type DKinFitType, an enum defined in sim-recon/src/libraries/ANALYSIS/DReaction.h //Options: d_NoFit (default), d_P4Fit, d_VertexFit, d_P4AndVertexFit //P4 fits automatically constrain decaying particle masses, unless they are manually disabled NPi_reac->Set_KinFitType(d_P4AndVertexFit); //NPi_reac->Set_KinFitType(d_VertexFit); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 1.002 ns) NPi_reac->Set_MaxPhotonRFDeltaT(0.5*dBeamBunchPeriod); //should be minimum cut value // Optional: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPi_reac->Set_MinPhotonPIDFOM(5.73303E-7); //NPi_reac->Set_MinPhotonPIDFOM(5.E-3); // 3 sigma // Optional: When generating particle combinations, reject all charged track candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPi_reac->Set_MinChargedPIDFOM(5.73303E-7); //NPi_reac->Set_MinChargedPIDFOM(5.E-3); // 3 sigma // Highly Recommended: Cut on number of extra "good" tracks. "Good" tracks are ones that survive the "PreSelect" (or user custom) factory. // Important: Keep cut large: Can have many ghost and accidental tracks that look "good" NPi_reac->Set_MaxExtraGoodTracks(0); // Highly Recommended: Enable ROOT TTree output for this DReaction NPi_reac->Enable_TTreeOutput("tree_NPi.root"); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /************************************************** neutron2pi Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut //NPi_reac->Set_InvariantMassCut(Pi0, 0.09, 0.18); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton NPi_reac->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(NPi_reac, false, -2.0, 2.0)); /**************************************************** neutron2pi Analysis Actions ****************************************************/ // Recommended: Analysis actions automatically performed by the DAnalysisResults factories to histogram useful quantities. //These actions are executed sequentially, and are executed on each surviving (non-cut) particle combination //Pre-defined actions can be found in ANALYSIS/DHistogramActions_*.h and ANALYSIS/DCutActions.h //If a histogram action is repeated, it should be created with a unique name (string) to distinguish them // HISTOGRAM PID NPi_reac->Add_AnalysisAction(new DHistogramAction_PID(NPi_reac)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // NPi_reac->Add_AnalysisAction(new DCutAction_EachPIDFOM(NPi_reac, 5.73303E-7)); // NPi_reac->Add_AnalysisAction(new DCutAction_PIDDeltaT(NPi_reac, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data NPi_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPi_reac, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons NPi_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPi_reac, 0.0, 0.9, Neutron, SYS_FCAL)); //min/max beta cut for neutrons // NPi_reac->Add_AnalysisAction(new DCutAction_NoPIDHit(NPi_reac, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data //NPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPi_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PreKinFit")); //NPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPi_reac, false, 1000, -5.0, 5.0, "PreKinFit")); NPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPi_reac, false, 1000, -5, 5, "PreKinFit")); // RESONANCES // deque NPi_NeutronPiPlus; NPi_NeutronPiPlus.push_back(Neutron); NPi_NeutronPiPlus.push_back(PiPlus); // NPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPi_reac, 0, NPi_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PreKinFit")); // KINEMATIC FIT NPi_reac->Add_AnalysisAction(new DHistogramAction_KinFitResults(NPi_reac, 0.05)); //5% confidence level cut on pull histograms only NPi_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPi_reac, 0.0)); //0% confidence level cut //require kinematic fit converges //NPi_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPi_reac, 5.73303E-7)); // 5 sigma // HISTOGRAM MASSES //false/true: measured/kinfit data //NPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPi_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PostKinFit")); //NPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPi_reac, false, 1000, -5.0, 5.0, "PostKinFit")); NPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPi_reac, false, 1000, -5, 5, "PostKinFit")); // RESONANCES // NPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPi_reac, 0, NPi_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PostKinFit")); // Kinematics NPi_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPi_reac, false)); //false: measured data // NPi_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPi_reac, true, "KinFit")); //true: kinematic-fit data NPi_reac->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(NPi_reac)); _data.push_back(NPi_reac); //Register the DReaction with the factory // // 2 pi : piplus pi0 // // Make as many DReaction objects as desired DReactionStep* NPiPi0_reacStep = NULL; DReaction* NPiPi0_reac = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** neutron2pi Reaction Definition *************************************************/ NPiPi0_reac = new DReaction("NPiPi0"); //Required: DReactionSteps to specify the channel and decay chain you want to study //Particles are of type Particle_t, an enum defined in sim-recon/src/libraries/include/particleType.h //Example: g, p -> pi+, pi-, pi0, (p) NPiPi0_reacStep = new DReactionStep(); NPiPi0_reacStep->Set_InitialParticleID(Gamma); NPiPi0_reacStep->Set_TargetParticleID(Proton); NPiPi0_reacStep->Add_FinalParticleID(PiPlus); // NPiPi0_reacStep->Add_FinalParticleID(PiMinus); // NPiPi0_reacStep->Add_FinalParticleID(Proton); //true: missing NPiPi0_reacStep->Add_FinalParticleID(Pi0); NPiPi0_reacStep->Add_FinalParticleID(Neutron,false); //true: missing NPiPi0_reac->Add_ReactionStep(NPiPi0_reacStep); dReactionStepPool.push_back(NPiPi0_reacStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g NPiPi0_reacStep = new DReactionStep(); NPiPi0_reacStep->Set_InitialParticleID(Pi0); NPiPi0_reacStep->Add_FinalParticleID(Gamma); NPiPi0_reacStep->Add_FinalParticleID(Gamma); //NPiPi0_reacStep->Set_KinFitConstrainInitMassFlag(false); //default: true //ignored if p4 not fit or is beam //phi, omega not constrained regardless NPiPi0_reac->Add_ReactionStep(NPiPi0_reacStep); dReactionStepPool.push_back(NPiPi0_reacStep); //register so will be deleted later: prevent memory leak /**************************************************** neutron2pi Control Settings ****************************************************/ // Recommended: Type of kinematic fit to perform (default is d_NoFit) //fit types are of type DKinFitType, an enum defined in sim-recon/src/libraries/ANALYSIS/DReaction.h //Options: d_NoFit (default), d_P4Fit, d_VertexFit, d_P4AndVertexFit //P4 fits automatically constrain decaying particle masses, unless they are manually disabled NPiPi0_reac->Set_KinFitType(d_P4AndVertexFit); //NPiPi0_reac->Set_KinFitType(d_VertexFit); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 1.002 ns) NPiPi0_reac->Set_MaxPhotonRFDeltaT(0.5*dBeamBunchPeriod); //should be minimum cut value // Optional: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPi0_reac->Set_MinPhotonPIDFOM(5.73303E-7); //NPiPi0_reac->Set_MinPhotonPIDFOM(5.E-3); // 3 sigma // Optional: When generating particle combinations, reject all charged track candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPi0_reac->Set_MinChargedPIDFOM(5.73303E-7); //NPiPi0_reac->Set_MinChargedPIDFOM(5.E-3); // 3 sigma // Highly Recommended: Cut on number of extra "good" tracks. "Good" tracks are ones that survive the "PreSelect" (or user custom) factory. // Important: Keep cut large: Can have many ghost and accidental tracks that look "good" NPiPi0_reac->Set_MaxExtraGoodTracks(0); // Highly Recommended: Enable ROOT TTree output for this DReaction NPiPi0_reac->Enable_TTreeOutput("tree_NPiPi0.root"); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /************************************************** neutron2pi Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut NPiPi0_reac->Set_InvariantMassCut(Pi0, 0.09, 0.18); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton NPiPi0_reac->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(NPiPi0_reac, false, -2.0, 2.0)); /**************************************************** neutron2pi Analysis Actions ****************************************************/ // Recommended: Analysis actions automatically performed by the DAnalysisResults factories to histogram useful quantities. //These actions are executed sequentially, and are executed on each surviving (non-cut) particle combination //Pre-defined actions can be found in ANALYSIS/DHistogramActions_*.h and ANALYSIS/DCutActions.h //If a histogram action is repeated, it should be created with a unique name (string) to distinguish them // HISTOGRAM PID NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_PID(NPiPi0_reac)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // NPiPi0_reac->Add_AnalysisAction(new DCutAction_EachPIDFOM(NPiPi0_reac, 5.73303E-7)); // NPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDDeltaT(NPiPi0_reac, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data NPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPi0_reac, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons NPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPi0_reac, 0.0, 0.9, Neutron, SYS_FCAL)); //min/max beta cut for neutrons // NPiPi0_reac->Add_AnalysisAction(new DCutAction_NoPIDHit(NPiPi0_reac, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PreKinFit")); //NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPi0_reac, false, 1000, -5.0, 5.0, "PreKinFit")); NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPi0_reac, false, 1000, -5, 5, "PreKinFit")); // RESONANCES // deque NPiPi0_NeutronPiPlus; NPiPi0_NeutronPiPlus.push_back(Neutron); NPiPi0_NeutronPiPlus.push_back(PiPlus); // deque NPiPi0_NeutronPi0; NPiPi0_NeutronPi0.push_back(Neutron); NPiPi0_NeutronPi0.push_back(Pi0); // deque NPiPi0_NeutronPiPlusPi0; NPiPi0_NeutronPiPlusPi0.push_back(Neutron); NPiPi0_NeutronPiPlusPi0.push_back(PiPlus); NPiPi0_NeutronPiPlusPi0.push_back(Pi0); // deque NPiPi0_PiPlusPi0; NPiPi0_PiPlusPi0.push_back(PiPlus); NPiPi0_PiPlusPi0.push_back(Pi0); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PreKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_NeutronPi0, false, 1000, 1.0, 3.0, "NeutronPi0_PreKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_NeutronPiPlusPi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPi0_PreKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_PiPlusPi0, false, 1000, 0.0, 2.0, "PiPlusPi0_PreKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0_reac, 0, NPiPi0_NeutronPi0, NPiPi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PreKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0_reac, 0, NPiPi0_NeutronPiPlusPi0, NPiPi0_PiPlusPi0, false, 750, 1.0, 4.0, 500, 0.0, 2.0, "Dalitz2_PreKinFit")); // KINEMATIC FIT NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_KinFitResults(NPiPi0_reac, 0.05)); //5% confidence level cut on pull histograms only NPiPi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPi0_reac, 0.0)); //0% confidence level cut //require kinematic fit converges //NPiPi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPi0_reac, 5.73303E-7)); // 5 sigma // HISTOGRAM MASSES //false/true: measured/kinfit data NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PostKinFit")); //NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPi0_reac, false, 1000, -5.0, 5.0, "PostKinFit")); NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPi0_reac, false, 1000, -5, 5, "PostKinFit")); // RESONANCES // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PostKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_NeutronPi0, false, 1000, 1.0, 3.0, "NeutronPi0_PostKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_NeutronPiPlusPi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPi0_PostKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0_reac, 0, NPiPi0_PiPlusPi0, false, 1000, 0.0, 2.0, "PiPlusPi0_PostKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0_reac, 0, NPiPi0_NeutronPi0, NPiPi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PostKinFit")); // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0_reac, 0, NPiPi0_NeutronPiPlusPi0, NPiPi0_PiPlusPi0, false, 750, 1.0, 4.0, 500, 0.0, 2.0, "Dalitz2_PostKinFit")); // Kinematics NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPi0_reac, false)); //false: measured data // NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPi0_reac, true, "KinFit")); //true: kinematic-fit data NPiPi0_reac->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(NPiPi0_reac)); _data.push_back(NPiPi0_reac); //Register the DReaction with the factory // // 3 pi : piplus pi0 pi0 // // Make as many DReaction objects as desired DReactionStep* NPiPi0Pi0_reacStep = NULL; DReaction* NPiPi0Pi0_reac = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** neutron3pi Reaction Definition *************************************************/ NPiPi0Pi0_reac = new DReaction("NPiPi0Pi0"); //Required: DReactionSteps to specify the channel and decay chain you want to study //Particles are of type Particle_t, an enum defined in sim-recon/src/libraries/include/particleType.h //Example: g, p -> pi+, pi-, pi0, (p) NPiPi0Pi0_reacStep = new DReactionStep(); NPiPi0Pi0_reacStep->Set_InitialParticleID(Gamma); NPiPi0Pi0_reacStep->Set_TargetParticleID(Proton); NPiPi0Pi0_reacStep->Add_FinalParticleID(PiPlus); NPiPi0Pi0_reacStep->Add_FinalParticleID(Pi0); NPiPi0Pi0_reacStep->Add_FinalParticleID(Pi0); NPiPi0Pi0_reacStep->Add_FinalParticleID(Neutron,false); //true: proton missing NPiPi0Pi0_reac->Add_ReactionStep(NPiPi0Pi0_reacStep); dReactionStepPool.push_back(NPiPi0Pi0_reacStep); //register so will be deleted later: prevent memory leak NPiPi0Pi0_reacStep = new DReactionStep(); NPiPi0Pi0_reacStep->Set_InitialParticleID(Pi0); NPiPi0Pi0_reacStep->Add_FinalParticleID(Gamma); NPiPi0Pi0_reacStep->Add_FinalParticleID(Gamma); //NPiPi0Pi0_reacStep->Set_KinFitConstrainInitMassFlag(false); //default: true //ignored if p4 not fit or is beam //phi, omega not constrained regardless NPiPi0Pi0_reac->Add_ReactionStep(NPiPi0Pi0_reacStep); dReactionStepPool.push_back(NPiPi0Pi0_reacStep); //register so will be deleted later: prevent memory leak /**************************************************** neutron3pi Control Settings ****************************************************/ // Recommended: Type of kinematic fit to perform (default is d_NoFit) //fit types are of type DKinFitType, an enum defined in sim-recon/src/libraries/ANALYSIS/DReaction.h //Options: d_NoFit (default), d_P4Fit, d_VertexFit, d_P4AndVertexFit //P4 fits automatically constrain decaying particle masses, unless they are manually disabled NPiPi0Pi0_reac->Set_KinFitType(d_P4AndVertexFit); //NPiPi0Pi0_reac->Set_KinFitType(d_VertexFit); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 1.002 ns) NPiPi0Pi0_reac->Set_MaxPhotonRFDeltaT(0.5*dBeamBunchPeriod); //should be minimum cut value // Optional: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPi0Pi0_reac->Set_MinPhotonPIDFOM(5.73303E-7); //NPiPi0Pi0_reac->Set_MinPhotonPIDFOM(5.E-3); // 3 sigma // Optional: When generating particle combinations, reject all charged track candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPi0Pi0_reac->Set_MinChargedPIDFOM(5.73303E-7); //NPiPi0Pi0_reac->Set_MinChargedPIDFOM(5.E-3); // 3 sigma // Highly Recommended: Cut on number of extra "good" tracks. "Good" tracks are ones that survive the "PreSelect" (or user custom) factory. // Important: Keep cut large: Can have many ghost and accidental tracks that look "good" NPiPi0Pi0_reac->Set_MaxExtraGoodTracks(0); // Highly Recommended: Enable ROOT TTree output for this DReaction NPiPi0Pi0_reac->Enable_TTreeOutput("tree_NPiPi0Pi0.root"); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /************************************************** neutron3pi Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut NPiPi0Pi0_reac->Set_InvariantMassCut(Pi0, 0.09, 0.18); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton NPiPi0Pi0_reac->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(NPiPi0Pi0_reac, false, -2.0, 2.0)); /**************************************************** neutron3pi Analysis Actions ****************************************************/ // Recommended: Analysis actions automatically performed by the DAnalysisResults factories to histogram useful quantities. //These actions are executed sequentially, and are executed on each surviving (non-cut) particle combination //Pre-defined actions can be found in ANALYSIS/DHistogramActions_*.h and ANALYSIS/DCutActions.h //If a histogram action is repeated, it should be created with a unique name (string) to distinguish them // HISTOGRAM PID NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_PID(NPiPi0Pi0_reac)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_EachPIDFOM(NPiPi0Pi0_reac, 5.73303E-7)); // NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_PIDDeltaT(NPiPi0Pi0_reac, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPi0Pi0_reac, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPi0Pi0_reac, 0.0, 0.9, Neutron, SYS_FCAL)); //min/max beta cut for neutrons // NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_NoPIDHit(NPiPi0Pi0_reac, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data //NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PreKinFit")); //NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPi0Pi0_reac, false, 1000, -5.0, 5.0, "PreKinFit")); NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPi0Pi0_reac, false, 1000, -5, 5, "PreKinFit")); // Resonances // deque NPiPi0Pi0_NeutronPiPlus; NPiPi0Pi0_NeutronPiPlus.push_back(Neutron); NPiPi0Pi0_NeutronPiPlus.push_back(PiPlus); // deque NPiPi0Pi0_NeutronPi0; NPiPi0Pi0_NeutronPi0.push_back(Neutron); NPiPi0Pi0_NeutronPi0.push_back(Pi0); // deque NPiPi0Pi0_NeutronPiPlusPi0; NPiPi0Pi0_NeutronPiPlusPi0.push_back(Neutron); // NPiPi0Pi0_NeutronPiPlusPi0.push_back(PiPlus); NPiPi0Pi0_NeutronPiPlusPi0.push_back(Pi0); // deque NPiPi0Pi0_NeutronPiPlusPi0Pi0; NPiPi0Pi0_NeutronPiPlusPi0Pi0.push_back(Neutron); // NPiPi0Pi0_NeutronPiPlusPi0Pi0.push_back(PiPlus); NPiPi0Pi0_NeutronPiPlusPi0Pi0.push_back(Pi0); NPiPi0Pi0_NeutronPiPlusPi0Pi0.push_back(Pi0); // deque NPiPi0Pi0_PiPlusPi0; NPiPi0Pi0_PiPlusPi0.push_back(PiPlus); NPiPi0Pi0_PiPlusPi0.push_back(Pi0); // deque NPiPi0Pi0_Pi0Pi0; NPiPi0Pi0_Pi0Pi0.push_back(Pi0); NPiPi0Pi0_Pi0Pi0.push_back(Pi0); // deque NPiPi0Pi0_PiPlusPi0Pi0; NPiPi0Pi0_PiPlusPi0Pi0.push_back(PiPlus); NPiPi0Pi0_PiPlusPi0Pi0.push_back(Pi0); NPiPi0Pi0_PiPlusPi0Pi0.push_back(Pi0); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPi0, false, 1000, 1.0, 3.0, "NeutronPi0_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlusPi0, false, 1000, 1.0, 3.0, "NeutronPiPlusPi0_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlusPi0Pi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPi0Pi0_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0, false, 1000, 0.0, 2.0, "PiPlusPi0_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0Pi0, false, 1000, 0.0, 2.0, "PiPlusPi0Pi0_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_Pi0Pi0, false, 1000, 0.0, 2.0, "Pi0Pi0_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPi0, NPiPi0Pi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlusPi0, NPiPi0Pi0_NeutronPiPlus, false, 500, 1.0, 4.0, 500, 1.0, 3.0, "Dalitz2_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0, NPiPi0Pi0_NeutronPiPlus, false, 500, 0.0, 2.0, 500, 1.0, 3.0, "Dalitz3_PreKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0, NPiPi0Pi0_NeutronPiPlusPi0, false, 500, 0.0, 2.0, 500, 1.0, 4.0, "Dalitz4_PreKinFit")); // KINEMATIC FIT NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_KinFitResults(NPiPi0Pi0_reac, 0.05)); //5% confidence level cut on pull histograms only NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPi0Pi0_reac, 0.0)); //0% confidence level cut //require kinematic fit converges //NPiPi0Pi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPi0Pi0_reac, 5.73303E-7)); // 5 sigma // HISTOGRAM MASSES //false/true: measured/kinfit data //NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PostKinFit")); //NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPi0Pi0_reac, false, 1000, -5.0, 5.0, "PostKinFit")); NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPi0Pi0_reac, false, 1000, -5, 5, "PostKinFit")); // Resonances // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPi0, false, 1000, 1.0, 3.0, "NeutronPi0_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlusPi0, false, 1000, 1.0, 3.0, "NeutronPiPlusPi0_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlusPi0Pi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPi0Pi0_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0, false, 1000, 0.0, 2.0, "PiPlusPi0_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0Pi0, false, 1000, 0.0, 2.0, "PiPlusPi0Pi0_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPi0Pi0_reac, 0, NPiPi0Pi0_Pi0Pi0, false, 1000, 0.0, 2.0, "Pi0Pi0_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPi0, NPiPi0Pi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_NeutronPiPlusPi0, NPiPi0Pi0_NeutronPiPlus, false, 500, 1.0, 4.0, 500, 1.0, 3.0, "Dalitz2_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0, NPiPi0Pi0_NeutronPiPlus, false, 500, 0.0, 2.0, 500, 1.0, 3.0, "Dalitz3_PostKinFit")); // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPi0Pi0_reac, 0, NPiPi0Pi0_PiPlusPi0, NPiPi0Pi0_NeutronPiPlusPi0, false, 500, 0.0, 2.0, 500, 1.0, 4.0, "Dalitz4_PostKinFit")); // Kinematics NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPi0Pi0_reac, false)); //false: measured data // NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPi0Pi0_reac, true, "KinFit")); //true: kinematic-fit data NPiPi0Pi0_reac->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(NPiPi0Pi0_reac)); _data.push_back(NPiPi0Pi0_reac); //Register the DReaction with the factory /* // __ __ _ _ // \ \ / /__ _ _| |_ _____ _(_)_ _ __ _ // \ V / -_) '_| _/ -_) \ / | ' \/ _` | // \_/\___|_| \__\___/_\_\_|_||_\__, | // |___/ */ // // 3 pi : piplus piplus piminus // // Make as many DReaction objects as desired DReactionStep* NPiPiPi_reacStep = NULL; DReaction* NPiPiPi_reac = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** neutron3pi Reaction Definition *************************************************/ NPiPiPi_reac = new DReaction("NPiPiPi"); //Required: DReactionSteps to specify the channel and decay chain you want to study //Particles are of type Particle_t, an enum defined in sim-recon/src/libraries/include/particleType.h //Example: g, p -> pi+, pi-, pi0, (p) NPiPiPi_reacStep = new DReactionStep(); NPiPiPi_reacStep->Set_InitialParticleID(Gamma); NPiPiPi_reacStep->Set_TargetParticleID(Proton); NPiPiPi_reacStep->Add_FinalParticleID(PiPlus); NPiPiPi_reacStep->Add_FinalParticleID(PiPlus); NPiPiPi_reacStep->Add_FinalParticleID(PiMinus); NPiPiPi_reacStep->Add_FinalParticleID(Neutron,false); //true: proton missing NPiPiPi_reac->Add_ReactionStep(NPiPiPi_reacStep); dReactionStepPool.push_back(NPiPiPi_reacStep); //register so will be deleted later: prevent memory leak /**************************************************** neutron3pi Control Settings ****************************************************/ // Recommended: Type of kinematic fit to perform (default is d_NoFit) //fit types are of type DKinFitType, an enum defined in sim-recon/src/libraries/ANALYSIS/DReaction.h //Options: d_NoFit (default), d_P4Fit, d_VertexFit, d_P4AndVertexFit //P4 fits automatically constrain decaying particle masses, unless they are manually disabled NPiPiPi_reac->Set_KinFitType(d_P4AndVertexFit); //NPiPiPi_reac->Set_KinFitType(d_VertexFit); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 1.002 ns) NPiPiPi_reac->Set_MaxPhotonRFDeltaT(0.5*dBeamBunchPeriod); //should be minimum cut value // Optional: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPiPi_reac->Set_MinPhotonPIDFOM(5.73303E-7); //NPiPiPi_reac->Set_MinPhotonPIDFOM(5.E-3); // 3 sigma // Optional: When generating particle combinations, reject all charged track candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPiPi_reac->Set_MinChargedPIDFOM(5.73303E-7); //NPiPiPi_reac->Set_MinChargedPIDFOM(5.E-3); // 3 sigma // Highly Recommended: Cut on number of extra "good" tracks. "Good" tracks are ones that survive the "PreSelect" (or user custom) factory. // Important: Keep cut large: Can have many ghost and accidental tracks that look "good" NPiPiPi_reac->Set_MaxExtraGoodTracks(0); // Highly Recommended: Enable ROOT TTree output for this DReaction NPiPiPi_reac->Enable_TTreeOutput("tree_NPiPiPi.root"); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /************************************************** neutron3pi Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut // NPiPiPi_reac->Set_InvariantMassCut(Pi0, 0.09, 0.18); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton NPiPiPi_reac->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(NPiPiPi_reac, false, -2.0, 2.0)); /**************************************************** neutron3pi Analysis Actions ****************************************************/ // Recommended: Analysis actions automatically performed by the DAnalysisResults factories to histogram useful quantities. //These actions are executed sequentially, and are executed on each surviving (non-cut) particle combination //Pre-defined actions can be found in ANALYSIS/DHistogramActions_*.h and ANALYSIS/DCutActions.h //If a histogram action is repeated, it should be created with a unique name (string) to distinguish them // HISTOGRAM PID NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_PID(NPiPiPi_reac)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // NPiPiPi_reac->Add_AnalysisAction(new DCutAction_EachPIDFOM(NPiPiPi_reac, 5.73303E-7)); // NPiPiPi_reac->Add_AnalysisAction(new DCutAction_PIDDeltaT(NPiPiPi_reac, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data NPiPiPi_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPiPi_reac, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons NPiPiPi_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPiPi_reac, 0.0, 0.9, Neutron, SYS_FCAL)); //min/max beta cut for neutrons // NPiPiPi_reac->Add_AnalysisAction(new DCutAction_NoPIDHit(NPiPiPi_reac, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data //NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PreKinFit")); //NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPiPi_reac, false, 1000, -5.0, 5.0, "PreKinFit")); NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPiPi_reac, false, 1000, -5, 5, "PreKinFit")); // Resonances // deque NPiPiPi_NeutronPiPlus; NPiPiPi_NeutronPiPlus.push_back(Neutron); NPiPiPi_NeutronPiPlus.push_back(PiPlus); // deque NPiPiPi_NeutronPiMinus; NPiPiPi_NeutronPiMinus.push_back(Neutron); NPiPiPi_NeutronPiMinus.push_back(PiMinus); // deque NPiPiPi_NeutronPiPlusPiMinus; NPiPiPi_NeutronPiPlusPiMinus.push_back(Neutron); // NPiPiPi_NeutronPiPlusPiMinus.push_back(PiPlus); NPiPiPi_NeutronPiPlusPiMinus.push_back(PiMinus); // deque NPiPiPi_PiPlusPiMinus; NPiPiPi_PiPlusPiMinus.push_back(PiPlus); NPiPiPi_PiPlusPiMinus.push_back(PiMinus); // deque NPiPiPi_PiPlusPiPlusPiMinus; NPiPiPi_PiPlusPiPlusPiMinus.push_back(PiPlus); NPiPiPi_PiPlusPiPlusPiMinus.push_back(PiPlus); NPiPiPi_PiPlusPiPlusPiMinus.push_back(PiMinus); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_NeutronPiMinus, false, 1000, 1.0, 3.0, "NeutronPiMinus_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_NeutronPiPlusPiMinus, false, 1000, 1.0, 4.0, "NeutronPiPlusPiMinus_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiMinus, false, 1000, 0.0, 2.0, "PiPlusPiMinus_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiPlusPiMinus, false, 1000, 0.0, 3.0, "PiPlusPiMinus_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_NeutronPiMinus, NPiPiPi_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_NeutronPiPlusPiMinus, NPiPiPi_NeutronPiPlus, false, 500, 1.0, 4.0, 500, 1.0, 3.0, "Dalitz2_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiMinus, NPiPiPi_NeutronPiPlus, false, 500, 0.0, 2.0, 500, 1.0, 3.0, "Dalitz3_PreKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiMinus, NPiPiPi_NeutronPiPlusPiMinus, false, 500, 0.0, 2.0, 500, 1.0, 4.0, "Dalitz4_PreKinFit")); // KINEMATIC FIT NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_KinFitResults(NPiPiPi_reac, 0.05)); //5% confidence level cut on pull histograms only NPiPiPi_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPiPi_reac, 0.0)); //0% confidence level cut //require kinematic fit converges //NPiPiPi_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPiPi_reac, 5.73303E-7)); // 5 sigma // HISTOGRAM MASSES //false/true: measured/kinfit data //NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PostKinFit")); //NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPiPi_reac, false, 1000, -5.0, 5.0, "PostKinFit")); NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPiPi_reac, false, 1000, -5, 5, "PostKinFit")); // Resonances // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_NeutronPiMinus, false, 1000, 1.0, 3.0, "NeutronPiMinus_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_NeutronPiPlusPiMinus, false, 1000, 1.0, 4.0, "NeutronPiPlusPiMinus_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiMinus, false, 1000, 0.0, 2.0, "PiPlusPiMinus_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiPlusPiMinus, false, 1000, 0.0, 3.0, "PiPlusPiMinus_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_NeutronPiMinus, NPiPiPi_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_NeutronPiPlusPiMinus, NPiPiPi_NeutronPiPlus, false, 500, 1.0, 4.0, 500, 1.0, 3.0, "Dalitz2_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiMinus, NPiPiPi_NeutronPiPlus, false, 500, 0.0, 2.0, 500, 1.0, 3.0, "Dalitz3_PostKinFit")); // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPi_reac, 0, NPiPiPi_PiPlusPiMinus, NPiPiPi_NeutronPiPlusPiMinus, false, 500, 0.0, 2.0, 500, 1.0, 4.0, "Dalitz4_PostKinFit")); // Kinematics NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPiPi_reac, false)); //false: measured data // NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPiPi_reac, true, "KinFit")); //true: kinematic-fit data NPiPiPi_reac->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(NPiPiPi_reac)); _data.push_back(NPiPiPi_reac); //Register the DReaction with the factory // // 4 pi : piplus piplus piminus pi0 // // Make as many DReaction objects as desired DReactionStep* NPiPiPiPi0_reacStep = NULL; DReaction* NPiPiPiPi0_reac = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** NPiPiPiPi0 Reaction Definition *************************************************/ NPiPiPiPi0_reac = new DReaction("NPiPiPiPi0"); //Required: DReactionSteps to specify the channel and decay chain you want to study //Particles are of type Particle_t, an enum defined in sim-recon/src/libraries/include/particleType.h //Example: g, p -> pi+, pi-, pi0, (p) NPiPiPiPi0_reacStep = new DReactionStep(); NPiPiPiPi0_reacStep->Set_InitialParticleID(Gamma); NPiPiPiPi0_reacStep->Set_TargetParticleID(Proton); NPiPiPiPi0_reacStep->Add_FinalParticleID(PiPlus); NPiPiPiPi0_reacStep->Add_FinalParticleID(PiPlus); NPiPiPiPi0_reacStep->Add_FinalParticleID(PiMinus); NPiPiPiPi0_reacStep->Add_FinalParticleID(Pi0); NPiPiPiPi0_reacStep->Add_FinalParticleID(Neutron,false); //true: proton missing NPiPiPiPi0_reac->Add_ReactionStep(NPiPiPiPi0_reacStep); dReactionStepPool.push_back(NPiPiPiPi0_reacStep); //register so will be deleted later: prevent memory leak NPiPiPiPi0_reacStep = new DReactionStep(); NPiPiPiPi0_reacStep->Set_InitialParticleID(Pi0); NPiPiPiPi0_reacStep->Add_FinalParticleID(Gamma); NPiPiPiPi0_reacStep->Add_FinalParticleID(Gamma); //NPiPiPiPi0_reacStep->Set_KinFitConstrainInitMassFlag(false); //default: true //ignored if p4 not fit or is beam //phi, omega not constrained regardless NPiPiPiPi0_reac->Add_ReactionStep(NPiPiPiPi0_reacStep); dReactionStepPool.push_back(NPiPiPiPi0_reacStep); //register so will be deleted later: prevent memory leak /**************************************************** NPiPiPiPi0 Control Settings ****************************************************/ // Recommended: Type of kinematic fit to perform (default is d_NoFit) //fit types are of type DKinFitType, an enum defined in sim-recon/src/libraries/ANALYSIS/DReaction.h //Options: d_NoFit (default), d_P4Fit, d_VertexFit, d_P4AndVertexFit //P4 fits automatically constrain decaying particle masses, unless they are manually disabled NPiPiPiPi0_reac->Set_KinFitType(d_P4AndVertexFit); //NPiPiPiPi0_reac->Set_KinFitType(d_VertexFit); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 1.002 ns) NPiPiPiPi0_reac->Set_MaxPhotonRFDeltaT(0.5*dBeamBunchPeriod); //should be minimum cut value // Optional: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPiPiPi0_reac->Set_MinPhotonPIDFOM(5.73303E-7); //NPiPiPiPi0_reac->Set_MinPhotonPIDFOM(5.E-3); // 3 sigma // Optional: When generating particle combinations, reject all charged track candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // Make sure PID errors are calculated correctly before using. NPiPiPiPi0_reac->Set_MinChargedPIDFOM(5.73303E-7); //NPiPiPiPi0_reac->Set_MinChargedPIDFOM(5.E-3); // 3 sigma // Highly Recommended: Cut on number of extra "good" tracks. "Good" tracks are ones that survive the "PreSelect" (or user custom) factory. // Important: Keep cut large: Can have many ghost and accidental tracks that look "good" NPiPiPiPi0_reac->Set_MaxExtraGoodTracks(0); // Highly Recommended: Enable ROOT TTree output for this DReaction NPiPiPiPi0_reac->Enable_TTreeOutput("tree_NPiPiPiPi0.root"); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /************************************************** NPiPiPiPi0 Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut NPiPiPiPi0_reac->Set_InvariantMassCut(Pi0, 0.09, 0.18); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton NPiPiPiPi0_reac->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(NPiPiPiPi0_reac, false, -2.0, 2.0)); /**************************************************** NPiPiPiPi0 Analysis Actions ****************************************************/ // Recommended: Analysis actions automatically performed by the DAnalysisResults factories to histogram useful quantities. //These actions are executed sequentially, and are executed on each surviving (non-cut) particle combination //Pre-defined actions can be found in ANALYSIS/DHistogramActions_*.h and ANALYSIS/DCutActions.h //If a histogram action is repeated, it should be created with a unique name (string) to distinguish them // HISTOGRAM PID NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_PID(NPiPiPiPi0_reac)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_EachPIDFOM(NPiPiPiPi0_reac, 5.73303E-7)); // NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDDeltaT(NPiPiPiPi0_reac, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPiPiPi0_reac, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_PIDTimingBeta(NPiPiPiPi0_reac, 0.0, 0.9, Neutron, SYS_FCAL)); //min/max beta cut for neutrons // NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_NoPIDHit(NPiPiPiPi0_reac, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PreKinFit")); //NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPiPiPi0_reac, false, 1000, -5.0, 5.0, "PreKinFit")); NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPiPiPi0_reac, false, 1000, -5, 5, "PreKinFit")); // Resonances // deque NPiPiPiPi0_NeutronPiPlus; NPiPiPiPi0_NeutronPiPlus.push_back(Neutron); NPiPiPiPi0_NeutronPiPlus.push_back(PiPlus); // deque NPiPiPiPi0_NeutronPiMinus; NPiPiPiPi0_NeutronPiMinus.push_back(Neutron); NPiPiPiPi0_NeutronPiMinus.push_back(PiMinus); // deque NPiPiPiPi0_NeutronPiPlusPiMinus; NPiPiPiPi0_NeutronPiPlusPiMinus.push_back(Neutron); // NPiPiPiPi0_NeutronPiPlusPiMinus.push_back(PiPlus); NPiPiPiPi0_NeutronPiPlusPiMinus.push_back(PiMinus); // deque NPiPiPiPi0_NeutronPiPlusPiMinusPi0; NPiPiPiPi0_NeutronPiPlusPiMinusPi0.push_back(Neutron); // NPiPiPiPi0_NeutronPiPlusPiMinusPi0.push_back(PiPlus); NPiPiPiPi0_NeutronPiPlusPiMinusPi0.push_back(PiMinus); NPiPiPiPi0_NeutronPiPlusPiMinusPi0.push_back(Pi0); // deque NPiPiPiPi0_PiPlusPiMinus; NPiPiPiPi0_PiPlusPiMinus.push_back(PiPlus); NPiPiPiPi0_PiPlusPiMinus.push_back(PiMinus); // deque NPiPiPiPi0_PiPlusPiMinusPi0; NPiPiPiPi0_PiPlusPiMinusPi0.push_back(PiPlus); NPiPiPiPi0_PiPlusPiMinusPi0.push_back(PiMinus); NPiPiPiPi0_PiPlusPiMinusPi0.push_back(Pi0); // deque NPiPiPiPi0_PiPlusPiPlusPiMinusPi0; NPiPiPiPi0_PiPlusPiPlusPiMinusPi0.push_back(PiPlus); NPiPiPiPi0_PiPlusPiPlusPiMinusPi0.push_back(PiPlus); // NPiPiPiPi0_PiPlusPiPlusPiMinusPi0.push_back(PiMinus); NPiPiPiPi0_PiPlusPiPlusPiMinusPi0.push_back(Pi0); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiMinus, false, 1000, 1.0, 3.0, "NeutronPiMinus_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlusPiMinus, false, 1000, 1.0, 4.0, "NeutronPiPlusPiMinus_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlusPiMinusPi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPiMinus_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinus, false, 1000, 0.0, 3.0, "PiPlusPiMinus_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinusPi0, false, 1000, 0.0, 4.0, "PiPlusPiMinusPi0_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiPlusPiMinusPi0, false, 1000, 0.0, 4.0, "PiPlusPiPlusPiMinusPi0_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiMinus, NPiPiPiPi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlusPiMinus, NPiPiPiPi0_NeutronPiPlus, false, 500, 1.0, 4.0, 500, 1.0, 3.0, "Dalitz2_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinus, NPiPiPiPi0_NeutronPiPlus, false, 500, 0.0, 2.0, 500, 1.0, 3.0, "Dalitz3_PreKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinus, NPiPiPiPi0_NeutronPiPlusPiMinus, false, 500, 0.0, 2.0, 500, 1.0, 4.0, "Dalitz4_PreKinFit")); // KINEMATIC FIT NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_KinFitResults(NPiPiPiPi0_reac, 0.05)); //5% confidence level cut on pull histograms only NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPiPiPi0_reac, 0.0)); //0% confidence level cut //require kinematic fit converges //NPiPiPiPi0_reac->Add_AnalysisAction(new DCutAction_KinFitFOM(NPiPiPiPi0_reac, 5.73303E-7)); // 5 sigma // HISTOGRAM MASSES //false/true: measured/kinfit data NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, Pi0, false, 200, 0.09, 0.18, "Pi0_PostKinFit")); //NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMass(NPiPiPiPi0_reac, false, 1000, -5.0, 5.0, "PostKinFit")); NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(NPiPiPiPi0_reac, false, 1000, -5, 5, "PostKinFit")); // Resonances // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlus, false, 1000, 1.0, 3.0, "NeutronPiPlus_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiMinus, false, 1000, 1.0, 3.0, "NeutronPiMinus_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlusPiMinus, false, 1000, 1.0, 4.0, "NeutronPiPlusPiMinus_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlusPiMinusPi0, false, 1000, 1.0, 4.0, "NeutronPiPlusPiMinus_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinus, false, 1000, 0.0, 3.0, "PiPlusPiMinus_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinusPi0, false, 1000, 0.0, 4.0, "PiPlusPiMinusPi0_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_InvariantMass(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiPlusPiMinusPi0, false, 1000, 0.0, 4.0, "PiPlusPiPlusPiMinusPi0_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiMinus, NPiPiPiPi0_NeutronPiPlus, false, 500, 1.0, 3.0, 500, 1.0, 3.0, "Dalitz1_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_NeutronPiPlusPiMinus, NPiPiPiPi0_NeutronPiPlus, false, 500, 1.0, 4.0, 500, 1.0, 3.0, "Dalitz2_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinus, NPiPiPiPi0_NeutronPiPlus, false, 500, 0.0, 2.0, 500, 1.0, 3.0, "Dalitz3_PostKinFit")); // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_Dalitz(NPiPiPiPi0_reac, 0, NPiPiPiPi0_PiPlusPiMinus, NPiPiPiPi0_NeutronPiPlusPiMinus, false, 500, 0.0, 2.0, 500, 1.0, 4.0, "Dalitz4_PostKinFit")); // Kinematics NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPiPiPi0_reac, false)); //false: measured data // NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(NPiPiPiPi0_reac, true, "KinFit")); //true: kinematic-fit data NPiPiPiPi0_reac->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(NPiPiPiPi0_reac)); _data.push_back(NPiPiPiPi0_reac); //Register the DReaction with the factory return NOERROR; } //------------------ // fini //------------------ jerror_t DReaction_factory_Nfinal::fini(void) { for(size_t loc_i = 0; loc_i < dReactionStepPool.size(); ++loc_i) delete dReactionStepPool[loc_i]; //cleanup memory return NOERROR; }