rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_D_Dalitz

MC analysis of Dalitz plots in three-body $D$-meson decays
Experiment: ()
Status: VALIDATED
Authors:
  • Peter Richardson
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing D mesons

Monte Carlo analysis of $D^0\to \bar{K}^0\pi^+\pi^-$, $D^0\to K^-\pi^+\pi^0$, $D^+\to K^-\pi^+\pi^+$, $D^+\to\bar{K}^0\pi^+\pi^0$, $D^+\to K^+\pi^-\pi^+$ and $D_s^+\to K^+\pi^-\pi^+$ including kinematic distributions and Dalitz plots.

Source code: MC_D_Dalitz.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/FastJets.hh"
  5#include "Rivet/Projections/UnstableParticles.hh"
  6
  7namespace Rivet {
  8
  9
 10  /// @brief Add a short analysis description here
 11  class MC_D_Dalitz : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(MC_D_Dalitz);
 16
 17
 18    /// @name Analysis methods
 19    //@{
 20
 21    /// Book histograms and initialise projections before the run
 22    void init() {
 23
 24      // Initialise and register projections
 25      declare(UnstableParticles(), "UFS");
 26
 27      // Book histograms
 28      book(_h_plus1, "h_plus1"   ,200,0.,3. );
 29      book(_h_minus1, "h_minus1"  ,200,0.,3.2 );
 30      book(_h_pipi1, "h_pipi1"   ,200,0.,2. );
 31      book(_h_minus2, "h_minus2"  ,200,0.,3.2 );
 32      book(_h_neutral2, "h_neutral2",200,0.,3.2 );
 33      book(_h_pipi2, "h_pipi2"   ,200,0.,2. );
 34      book(_h_Kpilow3, "h_Kpilow3"  ,200,0.,2. );
 35      book(_h_Kpihigh3, "h_Kpihigh3" ,200,0.,3.2 );
 36      book(_h_Kpiall3, "h_Kpiall3"  ,200,0.,3. );
 37      book(_h_pipi3, "h_pipi3"    ,200,0.,2. );
 38      book(_h_Kpip4, "h_Kpip4"   ,200,0.,3.2 );
 39      book(_h_pipi4, "h_pipi4"   ,200,0.,2. );
 40      book(_h_Kpi04, "h_Kpi04"   ,200,0.,3.2);
 41      book(_h_kppim5, "h_kppim5"   ,200,0.,3. );
 42      book(_h_kppip5, "h_kppip5"   ,200,0.,3.1 );
 43      book(_h_pippim5, "h_pippim5"  ,200,0.,2. );
 44      book(_h_kppim6, "h_kppim6"   ,200,0.,3.5);
 45      book(_h_kppip6, "h_kppip6"   ,200,0.,3.5);
 46      book(_h_pippim6, "h_pippim6"  ,200,0.,2.5);
 47      book(_dalitz1, "dalitz1"    ,50,0.3,3.2,50,0.3,3.2);
 48      book(_dalitz2, "dalitz2"    ,50,0.3,3. ,50,0.3,3. );
 49      book(_dalitz3, "dalitz3"    ,50,0.3,2. ,50,0.07,2. );
 50      book(_dalitz4, "dalitz4"    ,50,0.3,3.1 ,50,0.07,2. );
 51      book(_dalitz5, "dalitz5"    ,50,0.,3. ,50,0.,2. );
 52      book(_dalitz6, "dalitz6"    ,50,0.3,3.5,50,0.07,2.5);
 53    }
 54
 55    void findDecayProducts(const Particle & mother, unsigned int & nstable,
 56			   Particles & pip , Particles & pim , Particles & pi0  ,
 57			   Particles & Kp  , Particles & Km  , Particles & K0) {
 58      for(const Particle & p : mother.children()) {
 59        int id = p.pid();
 60        if ( id == PID::KPLUS ) {
 61       	  Kp.push_back(p);
 62	  ++nstable;
 63	}
 64	else if (id == PID::KMINUS ) {
 65	  Km.push_back(p);
 66	  ++nstable;
 67	}
 68	else if (id == PID::PIPLUS) {
 69	  pip.push_back(p);
 70	  ++nstable;
 71	}
 72	else if (id == PID::PIMINUS) {
 73	  pim.push_back(p);
 74	  ++nstable;
 75	}
 76	else if (id == PID::PI0) {
 77	  pi0.push_back(p);
 78	  ++nstable;
 79	}
 80	else if (id == PID::K0S||id == PID::K0L) {
 81	  K0.push_back(p);
 82          ++nstable;
 83        }
 84	else if ( !p.children().empty() ) {
 85	  findDecayProducts(p, nstable, pip, pim, pi0, Kp , Km, K0);
 86	}
 87	else
 88	  ++nstable;
 89      }
 90    }
 91
 92    /// Perform the per-event analysis
 93    void analyze(const Event& event) {
 94      for(const Particle& meson : apply<UnstableParticles>(event, "UFS").
 95	    particles(Cuts::abspid== 411 ||Cuts::abspid== 421 ||Cuts::abspid== 431 )) {
 96	unsigned int nstable(0);
 97	Particles pip, pim, pi0, Kp , Km, K0;
 98	findDecayProducts(meson, nstable, pip, pim, pi0, Kp , Km, K0);
 99	if(meson.pid()<0) {
100	  swap(pim,pip);
101	  swap(Kp,Km);
102	}
103	if(abs(meson.pid())==421) {
104	  if(pim.size()==1&&pip.size()==1&&K0.size()==1) {
105	    double mminus = (pim[0].momentum()+K0[0].momentum() ).mass2();
106	    double mplus  = (pip[0].momentum()+K0[0].momentum() ).mass2();
107	    double mpipi  = (pip[0].momentum()+pim[0].momentum()).mass2();
108	    _h_plus1  ->fill(mplus);
109	    _h_minus1 ->fill(mminus);
110	    _h_pipi1  ->fill(mpipi);
111	    _dalitz1   ->fill(mplus,mminus);
112	  }
113	  else if (pip.size()==1&&Km.size()==1&&pi0.size()==1) {
114	    double mneut  = (Km[0].momentum()+pip[0].momentum()).mass2();
115	    double mminus = (Km[0].momentum()+pi0[0].momentum()).mass2();
116	    double mpipi  = (pip[0].momentum()+pi0[0].momentum()).mass2();
117	    _h_neutral2  ->fill(mneut);
118	    _h_minus2 ->fill(mminus);
119	    _h_pipi2  ->fill(mpipi);
120	    _dalitz2->fill(mminus,mneut);
121	  }
122	}
123	else if(abs(meson.pid())==411) {
124	  if(pip.size()==2&&Km.size()==1) {
125	    double mplus  = (Km[0].momentum() +pip[0].momentum()).mass2();
126	    double mminus = (Km[0].momentum() +pip[1].momentum()).mass2();
127	    double mpipi  = (pip[0].momentum()+pip[1].momentum()).mass2();
128	    if(mplus<mminus) swap(mplus,mminus);
129	    _h_Kpilow3 ->fill( mminus);
130	    _h_Kpihigh3->fill( mplus);
131	    _h_Kpiall3 ->fill( mminus);
132	    _h_Kpiall3 ->fill( mplus);
133	    _h_pipi3   ->fill( mpipi);
134	    _dalitz3->fill(mminus,mpipi);
135	  }
136	  else if (pip.size()==1&&pi0.size()==1&&K0.size()==1) {
137	    double mminus = (K0[0].momentum()+pip[0].momentum()).mass2();
138	    double mplus  = (K0[0].momentum()+pi0[0].momentum()).mass2();
139	    double mpipi  = (pip[0].momentum()+pi0[0].momentum()).mass2();
140	    _h_Kpip4 ->fill( mminus);
141	    _h_pipi4 ->fill( mpipi );
142	    _h_Kpi04 ->fill( mplus );
143	    _dalitz4->fill(mplus,mpipi);
144	  }
145	  else if (pim.size()==1&&Kp.size()==1&&pip.size()==1) {
146	    double mplus  = (Kp [0].momentum()+pip[0].momentum()).mass2();
147	    double mminus = (Kp [0].momentum()+pim[0].momentum()).mass2();
148	    double mpipi  = (pip[0].momentum()+pim[0].momentum()).mass2();
149	    _h_kppim5 ->fill(mminus);
150	    _h_kppip5 ->fill(mplus );
151	    _h_pippim5->fill(mpipi );
152	    _dalitz5->fill(mminus,mpipi);
153	  }
154	}
155	else if(abs(meson.pid())==431) {
156	  if (pim.size()==1&&Kp.size()==1&&pip.size()==1) {
157	    double mplus  = (Kp [0].momentum()+pip[0].momentum()).mass2();
158	    double mminus = (Kp [0].momentum()+pim[0].momentum()).mass2();
159	    double mpipi  = (pip[0].momentum()+pim[0].momentum()).mass2();
160	    _h_kppim6 ->fill(mminus);
161	    _h_kppip6 ->fill(mplus );
162	    _h_pippim6->fill(mpipi );
163	    _dalitz6->fill(mminus,mpipi);
164	  }
165	}
166      }
167    }
168
169    /// Normalise histograms etc., after the run
170    void finalize() {
171      normalize(_h_plus1);
172      normalize(_h_minus1);
173      normalize(_h_pipi1);
174      normalize(_dalitz1);
175      normalize(_h_minus2);
176      normalize(_h_pipi2);
177      normalize(_h_neutral2);
178      normalize(_dalitz2);
179      normalize(_h_Kpilow3);
180      normalize(_h_Kpihigh3);
181      normalize(_h_Kpiall3);
182      normalize(_h_pipi3);
183      normalize(_dalitz3);
184      normalize(_h_Kpip4);
185      normalize(_h_pipi4);
186      normalize(_h_Kpi04);
187      normalize(_dalitz4);
188      normalize(_h_kppim5);
189      normalize(_h_kppip5);
190      normalize(_h_pippim5);
191      normalize(_dalitz5);
192      normalize(_h_kppim6);
193      normalize(_h_kppip6);
194      normalize(_h_pippim6);
195      normalize(_dalitz6);
196    }
197    //@}
198
199    /// @name Histograms
200    //@{
201    // Histograms for D^0\to \bar{K}^0\pi^+\pi^-
202    //m^2_+
203    Histo1DPtr _h_plus1;
204    //m^2_+
205    Histo1DPtr _h_minus1;
206    //m^2_{\pi\pi}
207    Histo1DPtr _h_pipi1;
208    // Dalitz plot
209    Histo2DPtr _dalitz1;
210    
211    // Histograms for D^0\to K^-\pi^+\pi^0
212    // Histogram for the K^-\pi^+ mass
213    Histo1DPtr _h_minus2;
214    // Histogram for the \pi^+\pi^0 mass
215    Histo1DPtr _h_pipi2;
216    // Histogram for the K^-\pi^0 mass
217    Histo1DPtr _h_neutral2;
218    // Dalitz plot
219    Histo2DPtr _dalitz2;
220
221    // Histograms for D^+\to K^-\pi^+\pi^+
222    // Histogram for K^-\pi^+ low
223    Histo1DPtr _h_Kpilow3;
224    // Histogram for K^-\pi^+ high
225    Histo1DPtr _h_Kpihigh3;
226    // Histogram for K^-\pi^+ all
227    Histo1DPtr _h_Kpiall3;
228    // Histogram for \pi^+\pi^-
229    Histo1DPtr _h_pipi3;
230    // Dalitz plot
231    Histo2DPtr _dalitz3;
232
233    // Histograms for D^+\to\bar{K}^0\pi^+\pi^0
234    // Histogram for the \bar{K}^0\pi^+ mass
235    Histo1DPtr _h_Kpip4;
236    // Histogram for the \pi^+\pi^0 mass
237    Histo1DPtr _h_pipi4;
238    // Histogram for the \bar{K}^0\pi^0 mass
239    Histo1DPtr _h_Kpi04;
240    // Dalitz plot
241    Histo2DPtr _dalitz4;
242
243    // Histograms for D^+\to K^+\pi^-\pi^+
244    // Histogram for K^+\pi^-
245    Histo1DPtr _h_kppim5;
246    // Histogram for K^+\pi^+
247    Histo1DPtr _h_kppip5;
248    // Histogram for \pi^+\pi^-
249    Histo1DPtr _h_pippim5;
250    // Dalitz plot
251    Histo2DPtr _dalitz5;
252
253    // Histograms for D_s^+\to K^+\pi^-\pi^+
254    // Histogram for K^+\pi^-
255    Histo1DPtr _h_kppim6;
256    // Histogram for K^+\pi^+
257    Histo1DPtr _h_kppip6;
258    // Histogram for \pi^+\pi^-
259    Histo1DPtr _h_pippim6;
260    // Dalitz plot
261    Histo2DPtr _dalitz6;
262    //@}
263
264  };
265
266
267  // The hook for the plugin system
268  RIVET_DECLARE_PLUGIN(MC_D_Dalitz);
269
270
271}