// $Id$ // // File: DReaction_factory_LambdaC.cc // Created: Mon Aug 22 14:21:08 EDT 2016 // Creator: aaustreg (on Linux halld01.jlab.org 2.6.32-642.3.1.el6.x86_64 x86_64) // #include "DReaction_factory_LambdaC.h" //------------------ // brun //------------------ jerror_t DReaction_factory_LambdaC::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_LambdaC::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" DReactionStep* locD0Step = NULL; DReactionStep* locLambdaCStep = NULL; DReactionStep* locD0Cons = NULL; DReactionStep* locLambdaCCons = NULL; double kinFitCut = -1.0; // DOCUMENTATION: // ANALYSIS library: https://halldweb1.jlab.org/wiki/index.php/GlueX_Analysis_Software // DReaction factory: https://halldweb1.jlab.org/wiki/index.php/Analysis_DReaction /************************************************** Basic Reaction Definition *************************************************/ locReaction = new DReaction("unconst"); //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 //g, p -> Lambda_c, D0, p locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Lambda_c); locReactionStep->Add_FinalParticleID(D0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Lambda_c -> p pi+ K- locLambdaCStep = new DReactionStep(); locLambdaCStep->Set_InitialParticleID(Lambda_c); locLambdaCStep->Add_FinalParticleID(Proton); locLambdaCStep->Add_FinalParticleID(PiPlus); locLambdaCStep->Add_FinalParticleID(KMinus); locLambdaCStep->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locLambdaCStep); dReactionStepPool.push_back(locLambdaCStep); //register so will be deleted later: prevent memory leak //D0 -> pi- K+ locD0Step = new DReactionStep(); locD0Step->Set_InitialParticleID(D0); locD0Step->Add_FinalParticleID(PiMinus); locD0Step->Add_FinalParticleID(KPlus); locD0Step->Set_KinFitConstrainInitMassFlag(false); locReaction->Add_ReactionStep(locD0Step); dReactionStepPool.push_back(locD0Step); //register so will be deleted later: prevent memory leak /**************************************************** LambdaC 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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** LambdaC Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Lambda_c, 2.0, 2.6); locReaction->Set_InvariantMassCut(D0, 1.6, 2.1); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, -0.2, 0.2)); /**************************************************** LambdaC 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 locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiPlus, SYS_TOF)); 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, PiMinus, 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, 0.75, KPlus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KPlus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KPlus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 0.75, KMinus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KMinus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KMinus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KMinus)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "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, kinFitCut)); //0% confidence level cut //require kinematic fit converges // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, true, 600, 2.0, 2.6, "Lc_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, true, 500, 1.6, 2.1, "D0_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, true, 1000, -0.04, 0.04, "KinFit")); // 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)); _data.push_back(locReaction); //Register the DReaction with the factory /************************************************** Basic Reaction Definition *************************************************/ locReaction = new DReaction("constD0"); //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 //g, p -> Lambda_c, D0, p locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Lambda_c); locReactionStep->Add_FinalParticleID(D0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Lambda_c -> p pi+ K- locReaction->Add_ReactionStep(locLambdaCStep); //D0 -> pi- K+ locD0Cons = new DReactionStep(); locD0Cons->Set_InitialParticleID(D0); locD0Cons->Add_FinalParticleID(PiMinus); locD0Cons->Add_FinalParticleID(KPlus); locD0Cons->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locD0Cons); dReactionStepPool.push_back(locD0Cons); //register so will be deleted later: prevent memory leak /**************************************************** LambdaC 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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** LambdaC Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Lambda_c, 2.0, 2.6); locReaction->Set_InvariantMassCut(D0, 1.6, 2.1); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, -0.2, 0.2)); /**************************************************** LambdaC 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 locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiPlus, SYS_TOF)); 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, PiMinus, 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, 0.75, KPlus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KPlus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KPlus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 0.75, KMinus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KMinus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KMinus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KMinus)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "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, kinFitCut)); //0% confidence level cut //require kinematic fit converges // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, true, 600, 2.0, 2.6, "Lc_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, true, 500, 1.6, 2.1, "D0_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, true, 1000, -0.04, 0.04, "KinFit")); // 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)); _data.push_back(locReaction); //Register the DReaction with the factory /************************************************** Basic Reaction Definition *************************************************/ locReaction = new DReaction("constLc"); //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 //g, p -> Lambda_c, D0, p locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Lambda_c); locReactionStep->Add_FinalParticleID(D0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Lambda_c -> p pi+ K- locLambdaCCons = new DReactionStep(); locLambdaCCons->Set_InitialParticleID(Lambda_c); locLambdaCCons->Add_FinalParticleID(Proton); locLambdaCCons->Add_FinalParticleID(PiPlus); locLambdaCCons->Add_FinalParticleID(KMinus); locLambdaCCons->Set_KinFitConstrainInitMassFlag(true); locReaction->Add_ReactionStep(locLambdaCCons); dReactionStepPool.push_back(locLambdaCCons); //register so will be deleted later: prevent memory leak //D0 -> pi- K+ locReaction->Add_ReactionStep(locD0Step); /**************************************************** LambdaC 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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** LambdaC Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Lambda_c, 2.0, 2.6); locReaction->Set_InvariantMassCut(D0, 1.6, 2.1); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, -0.2, 0.2)); /**************************************************** LambdaC 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 locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiPlus, SYS_TOF)); 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, PiMinus, 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, 0.75, KPlus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KPlus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KPlus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 0.75, KMinus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KMinus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KMinus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KMinus)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "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, kinFitCut)); //0% confidence level cut //require kinematic fit converges // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, true, 600, 2.0, 2.6, "Lc_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, true, 500, 1.6, 2.1, "D0_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, true, 1000, -0.04, 0.04, "KinFit")); // 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)); _data.push_back(locReaction); //Register the DReaction with the factory /************************************************** Basic Reaction Definition *************************************************/ locReaction = new DReaction("constBoth"); //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 //g, p -> Lambda_c, D0, p locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Lambda_c); locReactionStep->Add_FinalParticleID(D0); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Lambda_c -> p pi+ K- locReaction->Add_ReactionStep(locLambdaCCons); //D0 -> pi- K+ locReaction->Add_ReactionStep(locD0Cons); /**************************************************** LambdaC 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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** LambdaC Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Lambda_c, 2.0, 2.6); locReaction->Set_InvariantMassCut(D0, 1.6, 2.1); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, -0.2, 0.2)); /**************************************************** LambdaC 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 locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiPlus, SYS_TOF)); 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, PiMinus, 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, 0.75, KPlus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KPlus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KPlus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 0.75, KMinus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KMinus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KMinus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KMinus)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "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, kinFitCut)); //0% confidence level cut //require kinematic fit converges // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, false, 1000, -0.04, 0.04, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, true, 600, 2.0, 2.6, "Lc_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, true, 500, 1.6, 2.1, "D0_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMassSquared(locReaction, true, 1000, -0.04, 0.04, "KinFit")); // 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)); _data.push_back(locReaction); //Register the DReaction with the factory /************************************************** Basic Reaction Definition *************************************************/ locReaction = new DReaction("missingD0"); //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 //g, p -> Lambda_c, (D0), p locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(Lambda_c); locReactionStep->Add_FinalParticleID(Unknown, true); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //Lambda_c -> p pi+ K- locReaction->Add_ReactionStep(locLambdaCCons); /**************************************************** LambdaC 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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** LambdaC Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(Lambda_c, 2.0, 2.6); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) locReaction->Add_ComboPreSelectionAction(new DCutAction_MissingMass(locReaction, false, 1.6, 2.1)); /**************************************************** LambdaC 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 locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); // CUT PID // SYS_TOF, SYS_BCAL, SYS_FCAL, ...: DetectorSystem_t: Defined in libraries/include/GlueX.h locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiPlus, SYS_TOF)); 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, 0.75, KMinus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KMinus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KMinus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KMinus)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 600, 1.6, 2.1, "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, kinFitCut)); //0% confidence level cut //require kinematic fit converges // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, false, 600, 2.0, 2.6, "Lc_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 600, 1.6, 2.1, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda_c, true, 600, 2.0, 2.6, "Lc_KinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, true, 600, 1.6, 2.1, "KinFit")); // 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)); _data.push_back(locReaction); //Register the DReaction with the factory /* PAUL -> */ /************************************************** d0lambdac_d0mm Reaction Definition *************************************************/ locReaction = new DReaction("missingLc"); //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 //g, p -> D0, (X) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(D0); locReactionStep->Add_FinalParticleID(Unknown, true); //true: inclusive missing locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //D0 -> K+, pi- locReaction->Add_ReactionStep(locD0Cons); /**************************************************** d0lambdac_d0mm 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(""); //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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** d0lambdac_d0mm Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(D0, 1.6, 2.1); // 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, 2.0, 2.6)); /**************************************************** d0lambdac_d0mm 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 // PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiMinus, 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, 0.75, KPlus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KPlus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KPlus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction, "PostPIDCuts")); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PreKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 600, 2.0, 2.6, "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, kinFitCut)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, false, 600, 2.0, 2.6, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, true, 600, 2.0, 2.6, "PostKinFit_KinFit")); // Kinematics locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, false)); //false: measured data locReaction->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(locReaction)); _data.push_back(locReaction); //Register the DReaction with the factory /************************************************** d0lambdac_d0lambdamm Reaction Definition *************************************************/ locReaction = new DReaction("D0Lambda"); //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 //g, p -> D0, Lambda, (X) locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Gamma); locReactionStep->Set_TargetParticleID(Proton); locReactionStep->Add_FinalParticleID(D0); locReactionStep->Add_FinalParticleID(Lambda); locReactionStep->Add_FinalParticleID(Unknown, true); //true: inclusive missing locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak //D0 -> K+, pi- locReaction->Add_ReactionStep(locD0Cons); //Lambda -> p, pi- locReactionStep = new DReactionStep(); locReactionStep->Set_InitialParticleID(Lambda); locReactionStep->Add_FinalParticleID(Proton); locReactionStep->Add_FinalParticleID(PiMinus); locReaction->Add_ReactionStep(locReactionStep); dReactionStepPool.push_back(locReactionStep); //register so will be deleted later: prevent memory leak /**************************************************** d0lambdac_d0lambdamm 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(""); //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); // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch locReaction->Set_MaxPhotonRFDeltaT(1.5*dBeamBunchPeriod); //should be minimum cut value // 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_LambdaC.root", false); //true/false: do/don't save unused hypotheses /************************************************** d0lambdac_d0lambdamm Pre-Combo Custom Cuts *************************************************/ // Highly Recommended: Very loose invariant mass cuts, applied during DParticleComboBlueprint construction // Example: pi0 -> g, g cut locReaction->Set_InvariantMassCut(D0, 1.6, 2.1); locReaction->Set_InvariantMassCut(Lambda, 1.0, 1.2); // Highly Recommended: Very loose DAnalysisAction cuts, applied just after creating the combination (before saving it) //Precombo cut DCutAction_MissingMass(locReaction, 0, deque(1, D0), false, 2.0, 2.6); /**************************************************** d0lambdac_d0lambdamm 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 // PID locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, Proton, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, PiMinus, 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, 0.75, KPlus, SYS_TOF)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.5, KPlus, SYS_BCAL)); locReaction->Add_AnalysisAction(new DCutAction_PIDDeltaT(locReaction, false, 2.0, KPlus, SYS_FCAL)); locReaction->Add_AnalysisAction(new DCutAction_NoPIDHit(locReaction, KPlus)); locReaction->Add_AnalysisAction(new DHistogramAction_PID(locReaction, "PostPIDCuts")); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda, false, 1000, 1.0, 1.2, "Lambda")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, 0, deque(1, D0), false, 600, 2.0, 2.6, "")); // 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, kinFitCut)); // HISTOGRAM MASSES //false/true: measured/kinfit data locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, D0, false, 500, 1.6, 2.1, "D0_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_InvariantMass(locReaction, Lambda, false, 1000, 1.0, 1.2, "Lambda_PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, 0, deque(1, D0), false, 600, 2.0, 2.6, "PostKinFit")); locReaction->Add_AnalysisAction(new DHistogramAction_MissingMass(locReaction, 0, deque(1, D0), true, 600, 2.0, 2.6, "PostKinFit_KinFit")); // Kinematics locReaction->Add_AnalysisAction(new DHistogramAction_ParticleComboKinematics(locReaction, false)); //false: measured data locReaction->Add_AnalysisAction(new DHistogramAction_TrackVertexComparison(locReaction)); // _data.push_back(locReaction); //Register the DReaction with the factory return NOERROR; } //------------------ // fini //------------------ jerror_t DReaction_factory_LambdaC::fini(void) { for(size_t loc_i = 0; loc_i < dReactionStepPool.size(); ++loc_i) delete dReactionStepPool[loc_i]; //cleanup memory return NOERROR; }