rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_Meson_Meson_Leptons_Decay

MC analyis of $V\to P \ell^+\ell^-$ and $P\to V \ell^+\ell^-$ decays
Experiment: ()
Status: VALIDATED
Authors:
  • Peter Richardson
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing vector or scalar meson decays

A Monte Carlo analysis for the decay of vector mesons to a pseudoscalar meson, or a pseudoscalar meson to a vector meson, and an $e^+e^-$ or $\mu^+\mu^-$ pair. All such decays are automatically identified. Based on old Herwig++ internal analysis.

Source code: MC_Meson_Meson_Leptons_Decay.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"
#include "Rivet/Tools/ParticleIdUtils.hh"

namespace Rivet {


  /// @brief Add a short analysis description here
  class MC_Meson_Meson_Leptons_Decay : public Analysis {
  public:

    /// Constructor
    DEFAULT_RIVET_ANALYSIS_CTOR(MC_Meson_Meson_Leptons_Decay);


    /// @name Analysis methods
    //@{

    /// Book histograms and initialise projections before the run
    void init() {
      
      // Initialise and register projections
      declare(UnstableParticles(),"UFS");

    }

    void findDecayProducts(const Particle & mother,
			   unsigned int & nstable,
			   Particles& lp, Particles& lm,
			   Particles& scalar,
			   Particles& vector) {
      for(const Particle & p : mother.children()) {
        int id = p.pid();
	if ( id == PID::EMINUS || id == PID::MUON ) {
       	  lm.push_back(p);
       	  ++nstable;
       	}
	else if (id == PID::EPLUS || id == PID::ANTIMUON) {
	  lp.push_back(p);
	  ++nstable;
	}
	else if (abs(id)%10==1 && PID::isMeson(id)) {
	  scalar.push_back(p);
	  ++nstable;
	}
	else if ((abs(id)%10==3 && PID::isMeson(id)) ||
		 id==PID::PHOTON ) {
	  vector.push_back(p);
	  ++nstable;
	}
	else if ( !p.children().empty() ) {
	  findDecayProducts(p,nstable,lp,lm,scalar,vector);
	}
	else
	  ++nstable;
      }
    }
    
    /// Perform the per-event analysis
    void analyze(const Event& event) {
      // loop over unstable particles
      for(const Particle& iMeson : apply<UnstableParticles>(event, "UFS").particles()) {
	// only consider scalar/vector mesons
	long pid = iMeson.pid();
	if(!PID::isMeson(pid)) continue;
	if(abs(pid)%10!=3 and abs(pid)%10!=1 ) continue;
	Particles lp,lm,scalar,vector;
	unsigned int nstable(0);
	findDecayProducts(iMeson,nstable,lp,lm,scalar,vector);
	if(nstable!=3 || lp.size()!=1 || lm.size()!=1 || lp[0].pid()!=-lm[0].pid()) continue;
	if(scalar.size()==1) {
	  // check if we already have this decay
	  unsigned int ix=0; bool found(false); 
	  while(!found&&ix<_incomingV.size()) {
	    if(_incomingV[ix]==pid && _outgoingP[ix]==scalar[0].pid() &&
	       _outgoingf_V[ix]==lm[0].pid()) {
	      found=true;
	    }
	    else {
	      ++ix;
	    }
	  }
	  // create a new graph if needed
	  if(!found) {
	    ix=_incomingV.size();
	    _incomingV.push_back(pid);
	    _outgoingP.push_back(scalar[0].pid());
	    _outgoingf_V.push_back(lm[0].pid());
	    std::ostringstream title;
	    title << "h_" << abs(pid);
	    if(pid>0) title << "p";
	    else      title << "m";
	    title << "_" << abs(scalar[0].pid());
	    if(scalar[0].pid()>0) title << "p";
	    else                    title << "m";
	    title << "_" << lm[0].pid() << "_";
	    _mff_V   .push_back(Histo1DPtr());
            book(_mff_V.back(), title.str()+"mff"   , 200, 0., iMeson.mass());
            _mPf   .push_back(Histo1DPtr());
            book(_mPf.back(), title.str()+"mPf"   , 200, 0., iMeson.mass());
            _mPfbar.push_back(Histo1DPtr());
            book(_mPfbar.back(), title.str()+"mPfbar", 200, 0., iMeson.mass());
	  }
	  // add the results to the histogram
	  _mff_V   [ix]->fill((lm    [0].momentum()+lp[0].momentum()).mass());
	  _mPf   [ix]->fill((scalar[0].momentum()+lm[0].momentum()).mass());
	  _mPfbar[ix]->fill((scalar[0].momentum()+lp[0].momentum()).mass());
	}
	else if(vector.size()==1) {
	  // check if we already have this decay
	  unsigned int ix=0; bool found(false); 
	  while(!found&&ix<_incoming_P.size()) {
	    if(_incoming_P[ix]==pid && _outgoingV[ix]==vector[0].pid() &&
	       _outgoingf_P[ix]==lm[0].pid()) {
	      found=true;
	    }
	    else {
	      ++ix;
	    }
	  }
	  // create a new graph if needed
	  if(!found) {
	    ix=_incoming_P.size();
	    _incoming_P.push_back(pid);
	    _outgoingV.push_back(vector[0].pid());
	    _outgoingf_P.push_back(lm[0].pid());
	    std::ostringstream title;
	    title << "h2_" << abs(pid);
	    if(pid>0) title << "p";
	    else      title << "m";
	    title << "_" << abs(vector[0].pid());
	    if(vector[0].pid()>0) title << "p";
	    else                    title << "m";
	    title << "_" << lm[0].pid() << "_";
	    _mff_V   .push_back(Histo1DPtr());
            book(_mff_V.back(), title.str()+"mff"   , 200, 0., iMeson.mass());
            _mPf   .push_back(Histo1DPtr());
            book(_mPf.back(), title.str()+"mPf"   , 200, 0., iMeson.mass());
            _mPfbar.push_back(Histo1DPtr());
            book(_mPfbar.back(), title.str()+"mPfbar", 200, 0., iMeson.mass());
	  }
	  // add the results to the histogram
	  _mff_P   [ix]->fill((lm    [0].momentum()+lp[0].momentum()).mass());
	  _mVf   [ix]->fill((vector[0].momentum()+lm[0].momentum()).mass());
	  _mVfbar[ix]->fill((vector[0].momentum()+lp[0].momentum()).mass());
	}
      }
    }

    /// Normalise histograms etc., after the run
    void finalize() {
      
      // normalize to unity V->P
      for(unsigned int ix=0;ix<_mff_V.size();++ix) {
	normalize(_mff_V);
	normalize(_mPf);
	normalize(_mPfbar);
      }
      // normalize to unity P->V
      for(unsigned int ix=0;ix<_mff_P.size();++ix) {
	normalize(_mff_P);
	normalize(_mVf);
	normalize(_mVfbar);
      }

    }

    //@}



    /// @name Histograms for V -> P
    //@{
    /**
     *  PDG codes of the incoming particles
     */
    vector<long> _incomingV;
    
    /**
     *  PDG codes of the outgoing pseudoscalar mesons
     */
    vector<long> _outgoingP;
    
    /**
     *  PDG codes of the outgoing fermion
     */
    vector<long> _outgoingf_V;
    
    /**
     *  Histograms for the mass of the fermion-antifermion pair
     */
    vector<Histo1DPtr> _mff_V;
    
    /**
     *  Histograms for the masses of the pseudoscalar and the fermion
     */
    vector<Histo1DPtr> _mPf;
    
    /**
     *  Histograms for the masses of the pseudoscalar and the antifermion
     */
    vector<Histo1DPtr> _mPfbar;
    //@}
    
    /// @name Histograms P->V
    //@{
    /**
     *  PDG codes of the incoming_P particles
     */
    vector<long> _incoming_P;
    
    /**
     *  PDG codes of the outgoing vector mesons
     */
    vector<long> _outgoingV;
    
    /**
     *  PDG codes of the outgoing fermion
     */
    vector<long> _outgoingf_P;
    
    /**
     *  Histograms for the mass of the fermion-antifermion pair
     */
    vector<Histo1DPtr> _mff_P;
    
    /**
     *  Histograms for the masses of the vector and the fermion
     */
    vector<Histo1DPtr> _mVf;
    
    /**
     *  Histograms for the masses of the vector and the antifermion
     */
    vector<Histo1DPtr> _mVfbar;
    //@}


  };


  // The hook for the plugin system
  DECLARE_RIVET_PLUGIN(MC_Meson_Meson_Leptons_Decay);


}