// $Id$ // // File: DReaction_factory_bcal_eta.cc // Created: Fri Jul 18 12:21:01 EDT 2014 // Creator: jrsteven (on Linux ifarm1102 2.6.32-220.7.1.el6.x86_64 x86_64) // #include "DReaction_factory_bcal_eta.h" //------------------ // brun //------------------ jerror_t DReaction_factory_bcal_eta::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_bcal_eta::evnt(JEventLoop* locEventLoop, uint64_t locEventNumber) { // Make as many DReaction objects as desired DReactionStep* locReactionStep = NULL; DReaction* locReaction; // DOCUMENTATION: // ANALYSIS library: https://halldweb1.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb1.jlab.org/wiki/index.php/Analysis_DReaction //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 /**************************************************** bcal_eta_prime Reaction Steps ****************************************************/ //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 locReaction = new DReaction("BTbcal_eta_prime"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> eta' + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta' -> pi+, pi-, eta locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(PiPlus); locReactionStep->Add_FinalParticleID(PiMinus); locReactionStep->Add_FinalParticleID(Eta); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** bcal_eta_prime Control Variables ****************************************************/ // 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/DKinFitResults.h locReaction->Set_KinFitType(d_P4AndVertexFit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaPrime.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_eta_prime 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); locReaction->Set_EventStoreSkims("eta_2g,q-,2q+"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(3); locReaction->Set_InvariantMassCut(Eta, 0.4, 0.7);//(Pi0, 0.05, 0.22); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by default // locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory /**************************************************** bcal_eta_3pi Reaction Steps ****************************************************/ //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 locReaction = new DReaction("BTbcal_eta_3pi"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> eta + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Eta); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta -> pi+, pi-, pi0 locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Add_FinalParticleID(PiPlus); locReactionStep->Add_FinalParticleID(PiMinus); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Set_KinFitConstrainInitMassFlag(false); // ? locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); /**************************************************** bcal_eta_3pi Control Variables ****************************************************/ // 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/DKinFitResults.h locReaction->Set_KinFitType(d_P4AndVertexFit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaRatios.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_eta_3pi 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); locReaction->Set_EventStoreSkims("pi0,q-,2q+"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(3); locReaction->Set_InvariantMassCut(Eta, 0.3, 1.2); locReaction->Set_InvariantMassCut(Pi0, 0.1, 0.17);//(Pi0, 0.05, 0.22); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by default // locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory /**************************************************** bcal_eta_3pi0 Reaction Steps ****************************************************/ //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 locReaction = new DReaction("BTbcal_eta_3pi0"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> eta + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Eta); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta -> pi0, pi0, pi0 locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Set_KinFitConstrainInitMassFlag(false); // ? locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** bcal_eta_3pi0 Control Variables ****************************************************/ // 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/DKinFitResults.h locReaction->Set_KinFitType(d_P4Fit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaRatios.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_eta_3pi0 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); locReaction->Set_EventStoreSkims("eta_3pi0"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(2); locReaction->Set_InvariantMassCut(Eta, 0.3, 0.8); locReaction->Set_InvariantMassCut(Pi0, 0.1, 0.17);//(Pi0, 0.05, 0.22); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by default // locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory /**************************************************** bcal_eta_primeneutral Reaction Steps ****************************************************/ //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 locReaction = new DReaction("BTbcal_eta_primeneutral"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> etaprime + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: etaprime -> eta, pi0, pi0 locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(Eta); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Set_KinFitConstrainInitMassFlag(false); // ? locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** bcal_eta_primeneutral Control Variables ****************************************************/ // 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/DKinFitResults.h locReaction->Set_KinFitType(d_P4Fit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaPrime.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_eta_primeneutral 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); locReaction->Set_EventStoreSkims("etaprm_2pi0eta_2g"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(2); // locReaction->Set_InvariantMassCut(EtaPrime, 0.75, 1.12); locReaction->Set_InvariantMassCut(Eta, 0.3, 0.8); locReaction->Set_InvariantMassCut(Pi0, 0.1, 0.17);//(Pi0, 0.05, 0.22); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by default // locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory /**************************************************** bcal_eta_2g Reaction Steps ****************************************************/ //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 locReaction = new DReaction("BTbcal_eta_2g"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> eta + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Eta); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Eta); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** bcal_eta_2g Control Variables ****************************************************/ // 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/DKinFitResults.h locReaction->Set_KinFitType(d_P4Fit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaRatios.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_eta_2g 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); locReaction->Set_EventStoreSkims("eta_2g"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(2); locReaction->Set_InvariantMassCut(Eta, 0.3, 0.8); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by deafult // locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory /**************************************************** bcal_eta_prime2g Reaction Steps ****************************************************/ //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 locReaction = new DReaction("BTbcal_eta_prime2g"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> etaprime + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: etaprime -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** bcal_eta_prime2g Control Variables ****************************************************/ // 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/DKinFitResults.h locReaction->Set_KinFitType(d_P4Fit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaPrime.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_eta_prime2g 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); locReaction->Set_EventStoreSkims("q+,2q0"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(2); locReaction->Set_InvariantMassCut(EtaPrime, 0.7, 1.3); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by default // locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory /**************************************************** bcal_etaprimepi0 Reaction Steps ****************************************************/ //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 /* locReaction = new DReaction("BTbcal_etaprimepi0"); //needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown" //Example: g, p -> eta' + pi0 + X locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(Pi0); locReactionStep->Add_FinalParticleID(Proton); //true: proton missing // locReactionStep->Add_FinalParticleID(Unknown, true); //true: other final state particles may exist locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: eta' -> pi+, pi-, eta locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(EtaPrime); locReactionStep->Add_FinalParticleID(PiPlus); locReactionStep->Add_FinalParticleID(PiMinus); locReactionStep->Add_FinalParticleID(Eta); locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Example: 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); //register so will be deleted later: prevent memory leak //Example: pi0 -> g, g locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Pi0); locReactionStep->Add_FinalParticleID(Gamma); locReactionStep->Add_FinalParticleID(Gamma); //optional: in a p4 kinematic fit, this will disable the constraint on the mass of the eta //default is enabled, but you don't need to worry about setting false for the beam particle step //note that the omega and phi will always be false, regardless of what you set below locReactionStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** bcal_etaprimepi0 Control Variables ****************************************************/ // 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/DKinFitResults.h /* locReaction->Set_KinFitType(d_P4AndVertexFit); // Highly Recommended: When generating particle combinations, reject all tracks with a tracking confidence level < 0.27% (+/- 3-sigma) // locReaction->Set_MinTrackingFOM(0.0027); // Highly Recommended: When generating particle combinations, reject all tracks without a matching hit in a detector system (ST/TOF/BCAL/FCAL) // locReaction->Set_HasDetectorMatchFlag(true); // Highly Recommended: When generating particle combinations, reject all photon candidates with a PID confidence level < 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinPhotonPIDFOM(5.73303E-7); // Useful for MC, but not for data at the moment. // Highly Recommended: When recording thrown/reconstructed matches in ROOT TTree, only register matches with match FOM > 5.73303E-7 (+/- 5-sigma) // locReaction->Set_MinThrownMatchFOMForROOT(5.73303E-7); // Recommended: Enable ROOT TTree output for this DReaction locReaction->Enable_TTreeOutput("BTtree_bcal_etaPrimePi0.root", false); //string is file name (must end in ".root"!!): doen't need to be unique, feel free to change /**************************************************** bcal_etaprimepi0 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 // locReaction->Add_AnalysisAction(new DCutAction_ThrownTopology(locReaction,true,"TruthTopology")); /* locReaction->Set_EventStoreSkims("eta_2g,pi0,q-,2q+"); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch (delta_t > 2.004 ns) locReaction->Set_MaxPhotonRFDeltaT(5.5*dBeamBunchPeriod); //beam bunches are every 4.008 ns, (2.004 should be minimum cut value) locReaction->Set_MaxExtraGoodTracks(3); locReaction->Set_InvariantMassCut(Eta, 0.4, 0.7);//(Pi0, 0.05, 0.22); locReaction->Set_InvariantMassCut(Pi0, 0.05, 0.22); locReaction->Set_InvariantMassCut(EtaPrime, 0.7, 1.5); locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMassSquared(locReaction, false, -0.05, 0.05)); // Fiducial PID delta T cuts handled by default locReaction->Add_AnalysisAction(new DHistogramAction_KinFitResults(locReaction, 0.05)); locReaction->Add_AnalysisAction(new DCutAction_KinFitFOM(locReaction,5.0E-7,"KinFitFOM")); _data.push_back(locReaction); //Register the DReaction with the factory */ return NOERROR; } //------------------ // fini //------------------ jerror_t DReaction_factory_bcal_eta::fini(void) { for(size_t loc_i = 0; loc_i < dReactionStepPool.size(); ++loc_i) delete dReactionStepPool[loc_i]; //cleanup memory return NOERROR; }