// $Id$ // // File: DReaction_factory_phi_Beta.cc // Created: Wed Oct 19 17:45:32 EDT 2016 // Creator: cfanelli (on Linux ifarm1101 2.6.32-431.el6.x86_64 x86_64) // #include "DReaction_factory_phi_Beta.h" #include "DCustomAction_dEdxCut.h" #include "DCustomAction_BVsEta_hists.h" //------------------ // brun //------------------ jerror_t DReaction_factory_phi_Beta::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_phi_Beta::evnt(JEventLoop* locEventLoop, uint64_t locEventNumber) { // Make as many DReaction objects as desired DReactionStep* locReactionStep = NULL; DReaction* locReaction = NULL; //create with a unique name for each DReaction object. CANNOT (!) be "Thrown" // DOCUMENTATION: // ANALYSIS library: https://halldweb1.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb1.jlab.org/wiki/index.php/Analysis_DReaction //========== // All cases //========== //B->pi0g //Eta->pi+pi-pi0 (23%), Eta->3pi0 (33%), Eta->gg (39%) //Chosen to select Eta->gg channel instead of 3pi0, 5 gammas in final state instead of 9 //with/without mass constraints of Pi0, Eta, phiMeson //with preco or pmiss //tot=12 cases //Eta->pi+pi-pi0 //============================== phi_Beta_pi0g_3pi_preco_noMKF Reaction Definition // locReaction = new DReaction("phi_Beta_pi0g_3pi_preco_noMKF"); //Example: g, p -> phi, (p) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(phiMeson); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //phi -> B eta locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(phiMeson); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(omega); locReactionStep->Add_FinalParticleID(Eta); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // B -> pi0, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(omega); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // eta -> pi+, pi-, pi0 locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(PiPlus); locReactionStep->Add_FinalParticleID(PiMinus); locReactionStep->Add_FinalParticleID(Pi0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); /* //Example: g, p -> phi, (p) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing //B decay locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); //eta decay locReactionStep->Add_FinalParticleID(PiPlus); locReactionStep->Add_FinalParticleID(PiMinus); locReactionStep->Add_FinalParticleID(Pi0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); */ //======================== phi_Beta_pi0g_3pi_preco_noMKF Control Settings // // Highly Recommended: Set EventStore skim query (use with "eventstore" source) // This will skip creating particle combos for events that aren't in the skims you list // Query should be comma-separated list of skims to boolean-AND together //locReaction->Set_EventStoreSkims("myskim1,myskim2,myskim3"); //boolean-AND of skims // 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 locReaction->Set_KinFitType(d_P4AndVertexFit); locReaction->Set_EventStoreSkims("2q+,q-"); //locReaction->Set_EventStoreSkims("eta_3piq"); //event store skim for 3π decay mode with charged π's. //eta_2g, eta_3pi0 locReaction->Set_EventStoreSkims("3q0"); //in the case 1 pi0 produces a "single" shower // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->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. locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // 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. locReaction->Set_MinChargedPIDFOM(5.73303E-7); // 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" locReaction->Set_MaxExtraGoodTracks(3); // Highly Recommended: Enable ROOT TTree output for this DReaction // string is file name (must end in ".root"!!): doen't need to be unique, feel free to change locReaction->Enable_TTreeOutput("tree_phi_Beta_pi0g_3pi_preco_noMKF.root", false); //true/false: do/don't save unused hypotheses //====================== phi_Beta_pi0g_3pi_preco_noMKF Pre-Combo Custom Cuts // // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Pi0, 0.05, 0.20); locReaction->Set_InvariantMassCut(Eta, 0.40, 1.00); //check if omega locReaction->Set_InvariantMassCut(phiMeson, 0.85, 1.50); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton //locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, 0.7, 1.2)); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.06, 0.06)); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.06, 0.06)); //======================== phi_Beta_pi0g_3pi_preco_noMKF Analysis Actions // // HISTOGRAM PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); //locReaction->Add_AnalysisAction(new DCustomAction_dEdxCut(locReaction, true)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,3.0,Gamma,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,Gamma,SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiPlus,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiPlus,SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.0,PiPlus,SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiMinus,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiMinus,SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.0,PiMinus,SYS_TOF)); //Require proton locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_BeamEnergy(locReaction, false, 3.0, 12.0)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // locReaction->Add_AnalysisAction(new DCutAction_EachPIDFOM(locReaction, 5.73303E-7)); // locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data // locReaction->Add_AnalysisAction(new DCutAction_PIDTimingBeta(locReaction, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons // locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 500, 0.05, 0.20, "Pi0_PreKinFit")); //locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PreKinFit")); // KINEMATIC FIT locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); //5% confidence level cut on pull histograms only locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction, -1.)); //0% confidence level cut //require kinematic fit converges choose (-1.0) (0.01) // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 500, 0.05, 0.20, "Pi0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, phiMeson, false, 700, 0.85, 1.20, "phiMeson_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Eta, false, 600, 0.40, 0.70, "Eta_PostKinFit")); //locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, f 600, 0.0, 0.3alse, 1000, -1.0, 1.0, "PostKinFit")); //locReaction->Add_AnalysisAction(new DCustomAction_BVsEta_hists(locReaction, false, "NoKinFit_Measured")); // Kinematics locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, false)); //false: measured data //locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, true, "KinFit")); //true: kinematic-fit data locReaction->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(locReaction)); // B mass measured spectrum (Hist) //locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, false, 1000, 0., 2.0, "B_mass")); //false: measured data // B mass kinfit spectrum (Hist) //locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, true, 1000, 0., 2.0, "B_mass_Kinfit")); // B mass measured spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, false, 1000, 0., 2.0, "B_mass")); //false: measured data // B mass kinfit spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, true, 1000, 0., 2.0, "B_mass_Kinfit")); _data.push_back(locReaction); //Register the DReaction with the factory //======================== phi_Beta_pi0g_3pi_preco_withMKF Reaction Definition // locReaction = new DReaction("phi_Beta_pi0g_3pi_preco_withMKF"); //constraining pi0 mass //Example: g, p -> phi, (p) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(phiMeson); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //phi -> B eta locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(phiMeson); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReactionStep->Add_FinalParticleID(omega); locReactionStep->Add_FinalParticleID(Eta); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // B -> pi0, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(omega); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // eta -> pi+, pi-, pi0 locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReactionStep->Add_FinalParticleID(PiPlus); locReactionStep->Add_FinalParticleID(PiMinus); locReactionStep->Add_FinalParticleID(Pi0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //================== phi_Beta_pi0g_3pi_preco_withMKF Control Settings // // Highly Recommended: Set EventStore skim query (use with "eventstore" source) // This will skip creating particle combos for events that aren't in the skims you list // Query should be comma-separated list of skims to boolean-AND together //locReaction->Set_EventStoreSkims("myskim1,myskim2,myskim3"); //boolean-AND of skims // 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 locReaction->Set_KinFitType(d_P4AndVertexFit); locReaction->Set_EventStoreSkims("2q+,q-"); //locReaction->Set_EventStoreSkims("eta_3piq"); //event store skim for 3π decay mode with charged π's. //eta_2g, eta_3pi0 locReaction->Set_EventStoreSkims("3q0"); //in the case 1 pi0 produces a "single" shower // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->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. locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // 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. locReaction->Set_MinChargedPIDFOM(5.73303E-7); // 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" locReaction->Set_MaxExtraGoodTracks(4); // Highly Recommended: Enable ROOT TTree output for this DReaction // string is file name (must end in ".root"!!): doen't need to be unique, feel free to change locReaction->Enable_TTreeOutput("tree_phi_Beta_pi0g_3pi_preco_withMKF.root", false); //true/false: do/don't save unused hypotheses //==================== phi_Beta_pi0g_3pi_preco_withMKF Pre-Combo Custom Cuts // // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Pi0, 0.05, 0.25); locReaction->Set_InvariantMassCut(Eta, 0.40, 1.20); //check if omega locReaction->Set_InvariantMassCut(phiMeson, 0.50, 1.50); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton //locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, 0.7, 1.2)); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.08, 0.08)); //================== phi_Beta_pi0g_3pi_preco_withMKF Analysis Actions // // HISTOGRAM PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); /* locReaction->Add_AnalysisAction(new DCustomAction_dEdxCut(locReaction, true)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Unknown, SYS_TOF)); //false: measured data //Unknown: All PIDs locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_BCAL)); //false: measured data //Unknown: All PIDs locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_FCAL)); //false: measured data //Unknown: All PIDs //Require proton locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); //false: measured data */ // HISTOGRAM PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); //locReaction->Add_AnalysisAction(new DCustomAction_dEdxCut(locReaction, true)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,3.0,Gamma,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,Gamma,SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiPlus,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiPlus,SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.0,PiPlus,SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiMinus,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,PiMinus,SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.0,PiMinus,SYS_TOF)); //Require proton locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_BeamEnergy(locReaction, false, 3.0, 12.0));//8.0,9.1 // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // locReaction->Add_AnalysisAction(new DCutAction_EachPIDFOM(locReaction, 5.73303E-7)); // locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data // locReaction->Add_AnalysisAction(new DCutAction_PIDTimingBeta(locReaction, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons // locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 600, 0.0, 0.3, "Pi0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PreKinFit")); // KINEMATIC FIT locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); //5% confidence level cut on pull histograms only locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction, -1.)); //0% confidence level cut //require kinematic fit converges -1.0 // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 600, 0.0, 0.3, "Pi0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, phiMeson, false, 1000, 0.5, 1.5, "phiMeson_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Eta, false, 1000, 0., 1.0, "Eta_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PostKinFit")); // Kinematics locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, false)); //false: measured data //locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, true, "KinFit")); //true: kinematic-fit data locReaction->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(locReaction)); // B mass measured spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, false, 1000, 0., 2.0, "B_mass")); //false: measured data // B mass kinfit spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, true, 1000, 0., 2.0, "B_mass_Kinfit")); _data.push_back(locReaction); //Register the DReaction with the factory //----------- // eta->gg //----------- //======================== phi_Beta_pi0g_gg_preco_noMKF Reaction Definition // locReaction = new DReaction("phi_Beta_pi0g_gg_preco_noMKF"); //Example: g, p -> phi, (p) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(phiMeson); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //phi -> B eta locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(phiMeson); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(omega); locReactionStep->Add_FinalParticleID(Eta); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // B -> pi0, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(omega); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // eta -> g,g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //============================ phi_Beta_pi0g_gg_preco_noMKF Control Settings // // Highly Recommended: Set EventStore skim query (use with "eventstore" source) // This will skip creating particle combos for events that aren't in the skims you list // Query should be comma-separated list of skims to boolean-AND together //locReaction->Set_EventStoreSkims("myskim1,myskim2,myskim3"); //boolean-AND of skims // 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 locReaction->Set_KinFitType(d_P4AndVertexFit); locReaction->Set_EventStoreSkims("q+");//require proton //locReaction->Set_EventStoreSkims("eta_2g"); //event store skim for 2g decay//eta_2g, eta_3pi0 locReaction->Set_EventStoreSkims("4q0"); //in the case 1 pi0 can produce a shower // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->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. locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // 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. locReaction->Set_MinChargedPIDFOM(5.73303E-7); // 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" locReaction->Set_MaxExtraGoodTracks(4); // I don't really want here charged tracks; they may be accidentals // Highly Recommended: Enable ROOT TTree output for this DReaction // string is file name (must end in ".root"!!): doen't need to be unique, feel free to change locReaction->Enable_TTreeOutput("tree_phi_Beta_pi0g_gg_preco_noMKF.root", false); //true/false: do/don't save unused hypotheses //============================= phi_Beta_pi0g_gg_preco_noMKF Pre-Combo Custom Cuts // // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Pi0, 0.05, 0.25); locReaction->Set_InvariantMassCut(Eta, 0.40, 1.00); locReaction->Set_InvariantMassCut(phiMeson, 0.50, 1.50); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton //locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, 0.7, 1.2)); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.08, 0.08)); //============================== phi_Beta_pi0g_gg_preco_noMKF Analysis Actions // // HISTOGRAM PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); /* //locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Unknown, SYS_TOF)); //false: measured data //Unknown: All PIDs locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 6.0, Unknown, SYS_BCAL)); //false: measured data //Unknown: All PIDs locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_FCAL)); //false: measured data //Unknown: All PIDs */ locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,3.0,Gamma,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,Gamma,SYS_FCAL)); //Require proton locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_BeamEnergy(locReaction, false, 3.0, 12.0));//8.0,9.1 //select coherent peak (8.4-9.0 nominally) // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // locReaction->Add_AnalysisAction(new DCutAction_EachPIDFOM(locReaction, 5.73303E-7)); // locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data // locReaction->Add_AnalysisAction(new DCutAction_PIDTimingBeta(locReaction, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons // locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 600, 0.0, 0.3, "Pi0_PreKinFit")); //locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PreKinFit")); // KINEMATIC FIT locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); //5% confidence level cut on pull histograms only locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction, -1.)); //0% confidence level cut //require kinematic fit converges //-1.0 // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 600, 0.0, 0.3, "Pi0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, phiMeson, false, 1000, 0.5, 1.5, "phiMeson_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Eta, false, 1000, 0., 1.0, "Eta_PostKinFit")); //locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PostKinFit")); // Kinematics locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, false)); //false: measured data //locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, true, "KinFit")); //true: kinematic-fit data locReaction->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(locReaction)); // B mass measured spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, false, 1000, 0., 2.0, "B_mass")); //false: measured data // B mass kinfit spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, true, 1000, 0., 2.0, "B_mass_Kinfit")); _data.push_back(locReaction); //Register the DReaction with the factory //================================= phi_Beta_pi0g_gg_preco_withMKF Reaction Definition// locReaction = new DReaction("phi_Beta_pi0g_gg_preco_withMKF"); //constraining pi0 mass //Example: g, p -> phi, (p) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(phiMeson); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //phi -> B eta locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(phiMeson); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReactionStep->Add_FinalParticleID(omega); locReactionStep->Add_FinalParticleID(Eta); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // B -> pi0, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(omega); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak // eta -> g,g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //================================== phi_Beta_pi0g_gg_preco_withMKF Control Settings // // Highly Recommended: Set EventStore skim query (use with "eventstore" source) // This will skip creating particle combos for events that aren't in the skims you list // Query should be comma-separated list of skims to boolean-AND together //locReaction->Set_EventStoreSkims("myskim1,myskim2,myskim3"); //boolean-AND of skims // 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 locReaction->Set_KinFitType(d_P4AndVertexFit); locReaction->Set_EventStoreSkims("q+"); //locReaction->Set_EventStoreSkims("eta_2g"); //event store skim for 3π decay mode with charged π's. //eta_2g, eta_3pi0 locReaction->Set_EventStoreSkims("4q0"); //in the case 1 pi0 can produce a shower // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->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. locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // 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. locReaction->Set_MinChargedPIDFOM(5.73303E-7); // 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" locReaction->Set_MaxExtraGoodTracks(4); // Highly Recommended: Enable ROOT TTree output for this DReaction // string is file name (must end in ".root"!!): doen't need to be unique, feel free to change locReaction->Enable_TTreeOutput("tree_phi_Beta_pi0g_gg_preco_withMKF.root", false); //true/false: do/don't save unused hypotheses //================================ phi_Beta_pi0g_gg_preco_withMKF Pre-Combo Custom Cuts // // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Pi0, 0.05, 0.25); locReaction->Set_InvariantMassCut(Eta, 0.40, 1.20); locReaction->Set_InvariantMassCut(phiMeson, 0.50, 1.50); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) // Example: Missing mass of proton //locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, 0.7, 1.2)); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.08, 0.08)); //=============================== phi_Beta_pi0g_gg_preco_withMKF Analysis Actions // // HISTOGRAM PID /* locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); //locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Unknown, SYS_TOF)); //false: measured data //Unknown: All PIDs locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_BCAL)); //false: measured data //Unknown: All PIDs locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 10.0, Unknown, SYS_FCAL)); //false: measured data //Unknown: All PIDs */ locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,3.0,Gamma,SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction,false,2.5,Gamma,SYS_FCAL)); //Require proton locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); //false: measured data locReaction->Add_AnalysisAction(new DCutAction_BeamEnergy(locReaction, false, 3.0, 12.0));//8.0, 9.1 // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h // locReaction->Add_AnalysisAction(new DCutAction_EachPIDFOM(locReaction, 5.73303E-7)); // locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 1.0, Proton, SYS_TOF)); //cut at delta-t +/- 1.0 //false: measured data // locReaction->Add_AnalysisAction(new DCutAction_PIDTimingBeta(locReaction, 0.0, 0.9, Neutron, SYS_BCAL)); //min/max beta cut for neutrons // locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); //for K+ candidates, cut tracks with no PID hit // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 600, 0.0, 0.3, "Pi0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PreKinFit")); // KINEMATIC FIT locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); //5% confidence level cut on pull histograms only locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction, -1.)); //0% confidence level cut //require kinematic fit converges //-1.0 // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Pi0, false, 600, 0.0, 0.3, "Pi0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, phiMeson, false, 1000, 0.5, 1.5, "phiMeson_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Eta, false, 1000, 0., 1.0, "Eta_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 1000, -1.0, 1.0, "PostKinFit")); // Kinematics locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, false)); //false: measured data //locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, true, "KinFit")); //true: kinematic-fit data locReaction->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(locReaction)); // B mass measured spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, false, 1000, 0., 2.0, "B_mass")); //false: measured data // B mass kinfit spectrum (Hist) locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, omega, true, 1000, 0., 2.0, "B_mass_Kinfit")); _data.push_back(locReaction); //Register the DReaction with the factory return NOERROR; } //------------------ // fini //------------------ jerror_t DReaction_factory_phi_Beta::fini(void) { for(size_t loc_i = 0; loc_i < dReactionStepPool.size(); ++loc_i) delete dReactionStepPool[loc_i]; //cleanup memory return NOERROR; }