77
88#include " DReaction_factory_p3pi_hists.h"
99#include " DCustomAction_HistOmegaVsMissProton.h"
10+ #include " DCustomAction_p3pi_Pi0Cuts_FCAL2.h"
1011#include " DCustomAction_CutExtraPi0.h"
1112#include " DCustomAction_CutExtraTrackPID.h"
1213
@@ -37,9 +38,9 @@ void DReaction_factory_p3pi_hists::Process(const std::shared_ptr<const JEvent> &
3738 // ANALYSIS library: https://halldweb1.jlab.org/wiki/index.php/GlueX_Analysis_Software
3839 // DReaction factory: https://halldweb1.jlab.org/wiki/index.php/Analysis_DReaction
3940
40- /* *************************************************** p3pi_preco_2FCAL Reaction Steps ****************************************************/
41+ /* *************************************************** p3pi_preco_2FCAL2 Reaction Steps ****************************************************/
4142
42- locReaction = new DReaction (" p3pi_preco_2FCAL " ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
43+ locReaction = new DReaction (" p3pi_preco_2FCAL2 " ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
4344
4445 // g, p -> omega, p
4546 locReactionStep = new DReactionStep ();
@@ -67,6 +68,103 @@ void DReaction_factory_p3pi_hists::Process(const std::shared_ptr<const JEvent> &
6768 locReaction->Add_ReactionStep (locReactionStep);
6869 dReactionStepPool.push_back (locReactionStep); // register so will be deleted later: prevent memory leak
6970
71+ /* *************************************************** p3pi_preco_2FCAL2 Control Settings ****************************************************/
72+
73+ // Event Store
74+ locReaction->Set_EventStoreSkims (" 2q+,q-,pi0" ); // boolean-AND of skims
75+
76+ // KINFIT
77+ locReaction->Set_KinFitType (d_P4AndVertexFit); // simultaneously constrain apply four-momentum conservation, invariant masses, and common-vertex constraints
78+
79+ // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch
80+ locReaction->Set_NumPlusMinusRFBunches (0 );
81+
82+ /* *************************************************** p3pi_preco_2FCAL2 Analysis Actions ****************************************************/
83+
84+ // Require 2 photons in FCAL2 (FCAL+ECAL)
85+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts_FCAL2 (locReaction, false , 2 ));
86+
87+ // PID
88+ locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
89+
90+ // MASSES
91+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0" ));
92+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 ));
93+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega" ));
94+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit" ));
95+
96+ // Kinematic Fit Results
97+ locReaction->Add_AnalysisAction (new DHistogramAction_KinFitResults (locReaction, 0.05 , true )); // 5% confidence level cut on pull histograms only
98+ locReaction->Add_AnalysisAction (new DCutAction_KinFitFOM (locReaction, 5.73303E-7 )); // confidence level cut //+/- 5 sigma
99+
100+ // MASSES, POST-KINFIT
101+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0_PostKinFitCut" ));
102+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 , " PostKinFitCut" ));
103+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega_PostKinFitCut" ));
104+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit_PostKinFitCut" ));
105+
106+ // Kinematics of final selection
107+ locReaction->Add_AnalysisAction (new DHistogramAction_ParticleComboKinematics (locReaction, false , " Final" )); // false: fill histograms with measured particle data
108+
109+ Insert (locReaction); // Register the DReaction with the factory
110+
111+
112+
113+ /* *************************************************** p3pi_preco_FCAL2-BCAL Reaction Steps ****************************************************/
114+
115+ locReaction = new DReaction (" p3pi_preco_FCAL2-BCAL" ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
116+ locReaction->Add_ReactionStep (dReactionStepPool[0 ]);
117+ locReaction->Add_ReactionStep (dReactionStepPool[1 ]);
118+ locReaction->Add_ReactionStep (dReactionStepPool[2 ]);
119+
120+ /* *************************************************** p3pi_preco_FCAL-BCAL Control Settings ****************************************************/
121+
122+ // Event Store
123+ locReaction->Set_EventStoreSkims (" 2q+,q-,pi0" ); // boolean-AND of skims
124+
125+ // KINFIT
126+ locReaction->Set_KinFitType (d_P4AndVertexFit); // simultaneously constrain apply four-momentum conservation, invariant masses, and common-vertex constraints
127+
128+ // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch
129+ locReaction->Set_NumPlusMinusRFBunches (0 );
130+
131+ /* *************************************************** p3pi_preco FCAL2-BCAL Analysis Actions ****************************************************/
132+
133+ // Require 1 photon in FCAL2 and 1 photon in BCAL
134+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts_FCAL2 (locReaction, false , 1 ));
135+
136+ // PID
137+ locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
138+
139+ // MASSES
140+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0" ));
141+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 ));
142+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega" ));
143+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit" ));
144+
145+ // Kinematic Fit Results
146+ locReaction->Add_AnalysisAction (new DHistogramAction_KinFitResults (locReaction, 0.05 , true )); // 5% confidence level cut on pull histograms only
147+ locReaction->Add_AnalysisAction (new DCutAction_KinFitFOM (locReaction, 5.73303E-7 )); // confidence level cut //+/- 5 sigma
148+
149+ // MASSES, POST-KINFIT
150+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0_PostKinFitCut" ));
151+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 , " PostKinFitCut" ));
152+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega_PostKinFitCut" ));
153+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit_PostKinFitCut" ));
154+
155+ // Kinematics of final selection
156+ locReaction->Add_AnalysisAction (new DHistogramAction_ParticleComboKinematics (locReaction, false , " Final" )); // false: fill histograms with measured particle data
157+
158+ Insert (locReaction); // Register the DReaction with the factory
159+
160+
161+ /* *************************************************** p3pi_preco_2FCAL Reaction Steps ****************************************************/
162+
163+ locReaction = new DReaction (" p3pi_preco_2FCAL" ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
164+ locReaction->Add_ReactionStep (dReactionStepPool[0 ]);
165+ locReaction->Add_ReactionStep (dReactionStepPool[1 ]);
166+ locReaction->Add_ReactionStep (dReactionStepPool[2 ]);
167+
70168 /* *************************************************** p3pi_preco_2FCAL Control Settings ****************************************************/
71169
72170 // Event Store
@@ -81,7 +179,57 @@ void DReaction_factory_p3pi_hists::Process(const std::shared_ptr<const JEvent> &
81179 /* *************************************************** p3pi_preco_2FCAL Analysis Actions ****************************************************/
82180
83181 // Require 2 photons in FCAL
84- locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 2 ));
182+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 2 , 0 ));
183+
184+ // PID
185+ locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
186+
187+ // MASSES
188+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0" ));
189+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 ));
190+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega" ));
191+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit" ));
192+
193+ // Kinematic Fit Results
194+ locReaction->Add_AnalysisAction (new DHistogramAction_KinFitResults (locReaction, 0.05 , true )); // 5% confidence level cut on pull histograms only
195+ locReaction->Add_AnalysisAction (new DCutAction_KinFitFOM (locReaction, 5.73303E-7 )); // confidence level cut //+/- 5 sigma
196+
197+ // MASSES, POST-KINFIT
198+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0_PostKinFitCut" ));
199+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 , " PostKinFitCut" ));
200+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega_PostKinFitCut" ));
201+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit_PostKinFitCut" ));
202+
203+ // Kinematics of final selection
204+ locReaction->Add_AnalysisAction (new DHistogramAction_ParticleComboKinematics (locReaction, false , " Final" )); // false: fill histograms with measured particle data
205+
206+ Insert (locReaction); // Register the DReaction with the factory
207+
208+
209+
210+ /* *************************************************** p3pi_preco_2ECAL Reaction Steps ****************************************************/
211+
212+ locReaction = new DReaction (" p3pi_preco_2ECAL" ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
213+ locReaction->Add_ReactionStep (dReactionStepPool[0 ]);
214+ locReaction->Add_ReactionStep (dReactionStepPool[1 ]);
215+ locReaction->Add_ReactionStep (dReactionStepPool[2 ]);
216+
217+
218+ /* *************************************************** p3pi_preco_2ECAL Control Settings ****************************************************/
219+
220+ // Event Store
221+ locReaction->Set_EventStoreSkims (" 2q+,q-,pi0" ); // boolean-AND of skims
222+
223+ // KINFIT
224+ locReaction->Set_KinFitType (d_P4AndVertexFit); // simultaneously constrain apply four-momentum conservation, invariant masses, and common-vertex constraints
225+
226+ // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch
227+ locReaction->Set_NumPlusMinusRFBunches (0 );
228+
229+ /* *************************************************** p3pi_preco_2ECAL Analysis Actions ****************************************************/
230+
231+ // Require 2 photons in ECAL
232+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 0 , 2 ));
85233
86234 // PID
87235 locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
@@ -130,7 +278,105 @@ void DReaction_factory_p3pi_hists::Process(const std::shared_ptr<const JEvent> &
130278 /* *************************************************** p3pi_preco FCAL-BCAL Analysis Actions ****************************************************/
131279
132280 // Require 1 photon in FCAL and 1 photon in BCAL
133- locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 1 ));
281+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 1 , 0 ));
282+
283+ // PID
284+ locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
285+
286+ // MASSES
287+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0" ));
288+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 ));
289+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega" ));
290+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit" ));
291+
292+ // Kinematic Fit Results
293+ locReaction->Add_AnalysisAction (new DHistogramAction_KinFitResults (locReaction, 0.05 , true )); // 5% confidence level cut on pull histograms only
294+ locReaction->Add_AnalysisAction (new DCutAction_KinFitFOM (locReaction, 5.73303E-7 )); // confidence level cut //+/- 5 sigma
295+
296+ // MASSES, POST-KINFIT
297+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0_PostKinFitCut" ));
298+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 , " PostKinFitCut" ));
299+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega_PostKinFitCut" ));
300+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit_PostKinFitCut" ));
301+
302+ // Kinematics of final selection
303+ locReaction->Add_AnalysisAction (new DHistogramAction_ParticleComboKinematics (locReaction, false , " Final" )); // false: fill histograms with measured particle data
304+
305+ Insert (locReaction); // Register the DReaction with the factory
306+
307+
308+
309+ /* *************************************************** p3pi_preco_ECAL-BCAL Reaction Steps ****************************************************/
310+
311+ locReaction = new DReaction (" p3pi_preco_ECAL-BCAL" ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
312+ locReaction->Add_ReactionStep (dReactionStepPool[0 ]);
313+ locReaction->Add_ReactionStep (dReactionStepPool[1 ]);
314+ locReaction->Add_ReactionStep (dReactionStepPool[2 ]);
315+
316+ /* *************************************************** p3pi_preco_ECAL-BCAL Control Settings ****************************************************/
317+
318+ // Event Store
319+ locReaction->Set_EventStoreSkims (" 2q+,q-,pi0" ); // boolean-AND of skims
320+
321+ // KINFIT
322+ locReaction->Set_KinFitType (d_P4AndVertexFit); // simultaneously constrain apply four-momentum conservation, invariant masses, and common-vertex constraints
323+
324+ // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch
325+ locReaction->Set_NumPlusMinusRFBunches (0 );
326+
327+ /* *************************************************** p3pi_preco ECAL-BCAL Analysis Actions ****************************************************/
328+
329+ // Require 1 photon in ECAL and 1 photon in BCAL
330+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 0 , 1 ));
331+
332+ // PID
333+ locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
334+
335+ // MASSES
336+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0" ));
337+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 ));
338+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega" ));
339+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit" ));
340+
341+ // Kinematic Fit Results
342+ locReaction->Add_AnalysisAction (new DHistogramAction_KinFitResults (locReaction, 0.05 , true )); // 5% confidence level cut on pull histograms only
343+ locReaction->Add_AnalysisAction (new DCutAction_KinFitFOM (locReaction, 5.73303E-7 )); // confidence level cut //+/- 5 sigma
344+
345+ // MASSES, POST-KINFIT
346+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, Pi0, false , 850 , 0.05 , 0.22 , " Pi0_PostKinFitCut" ));
347+ locReaction->Add_AnalysisAction (new DHistogramAction_MissingMassSquared (locReaction, false , 1000 , -0.1 , 0.1 , " PostKinFitCut" ));
348+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, false , 600 , 0.5 , 1.1 , " Omega_PostKinFitCut" ));
349+ locReaction->Add_AnalysisAction (new DHistogramAction_InvariantMass (locReaction, omega, true , 600 , 0.5 , 1.1 , " Omega_KinFit_PostKinFitCut" ));
350+
351+ // Kinematics of final selection
352+ locReaction->Add_AnalysisAction (new DHistogramAction_ParticleComboKinematics (locReaction, false , " Final" )); // false: fill histograms with measured particle data
353+
354+ Insert (locReaction); // Register the DReaction with the factory
355+
356+
357+
358+ /* *************************************************** p3pi_preco_FCAL-ECAL Reaction Steps ****************************************************/
359+
360+ locReaction = new DReaction (" p3pi_preco_FCAL-ECAL" ); // needs to be a unique name for each DReaction object, CANNOT (!) be "Thrown"
361+ locReaction->Add_ReactionStep (dReactionStepPool[0 ]);
362+ locReaction->Add_ReactionStep (dReactionStepPool[1 ]);
363+ locReaction->Add_ReactionStep (dReactionStepPool[2 ]);
364+
365+ /* *************************************************** p3pi_preco_FCAL-ECAL Control Settings ****************************************************/
366+
367+ // Event Store
368+ locReaction->Set_EventStoreSkims (" 2q+,q-,pi0" ); // boolean-AND of skims
369+
370+ // KINFIT
371+ locReaction->Set_KinFitType (d_P4AndVertexFit); // simultaneously constrain apply four-momentum conservation, invariant masses, and common-vertex constraints
372+
373+ // Highly Recommended: When generating particle combinations, reject all beam photons that match to a different RF bunch
374+ locReaction->Set_NumPlusMinusRFBunches (0 );
375+
376+ /* *************************************************** p3pi_preco FCAL-ECAL Analysis Actions ****************************************************/
377+
378+ // Require 1 photon in FCAL and 1 photon in ECAL
379+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 1 , 1 ));
134380
135381 // PID
136382 locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
@@ -178,8 +424,8 @@ void DReaction_factory_p3pi_hists::Process(const std::shared_ptr<const JEvent> &
178424
179425 /* *************************************************** p3pi_preco_2BCAL Analysis Actions ****************************************************/
180426
181- // Require 1 photon in FCAL and 1 photon in BCAL
182- locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 0 ));
427+ // Require 2 photons in BCAL
428+ locReaction->Add_AnalysisAction (new DCustomAction_p3pi_Pi0Cuts (locReaction, false , 0 , 0 ));
183429
184430 // PID
185431 locReaction->Add_AnalysisAction (new DHistogramAction_PID (locReaction, false ));
0 commit comments