rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_Onium_PiPi_Decay

Analysis of kinematics in $\mathcal{O}\to\mathcal{O}^\prime\pi\pi$ decays
Experiment: ()
Status: VALIDATED
Authors:
  • Peter Richardson
No references listed
Beams: * *
Beam energies: ANY
Run details:
  • Any type of process producing bottom or charmonium mesons

Analysis of the kinematics in the decay of bottom and charmonium resonances to lighter resonances and $\pi\pi$

Source code: MC_Onium_PiPi_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
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {


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

    /// Constructor
    DEFAULT_RIVET_ANALYSIS_CTOR(MC_Onium_PiPi_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& pip, Particles& pim,
			   Particles& pi0, Particles & onium) {
      for(const Particle & p : mother.children()) {
        int id = p.pid();
      	if ( id == PID::PIMINUS) {
	  pim.push_back(p);
	  ++nstable;
	}
       	else if (id == PID::PIPLUS) {
       	  pim.push_back(p);
       	  ++nstable;
       	}
       	else if (id == PID::PI0) {
       	  pi0.push_back(p);
       	  ++nstable;
       	}
	else if (abs(id)%1000==443 || abs(id)%1000==553) {
	  onium.push_back(p);
	  ++nstable;
	}
	else if ( !p.children().empty() ) {
	  findDecayProducts(p,nstable,pip,pim,pi0,onium);
	}
	else
	  ++nstable;
      }
    }

    /// Perform the per-event analysis
    void analyze(const Event& event) {
      // loop over unstable particles
      for(const Particle& vMeson : apply<UnstableParticles>(event, "UFS").particles()) {
	int id = vMeson.pid();
	if(id%1000!=443 && id%1000!=553) continue;
	unsigned int nstable(0);
	Particles pip, pim, pi0, onium;
	findDecayProducts(vMeson,nstable,pip,pim,pi0,onium);
	// check for onium
	if(onium.size() !=1 || nstable !=3) continue;
	// check for pipi
	if( ! ((pip.size()==1 && pim.size() ==1) || pi0.size()==2)) continue;
	// check if histos already made
	unsigned int iloc=0; bool found(false);
	while(!found&&iloc<_incoming.size()) {
	  if(_incoming[iloc]==vMeson.pid()&&_outgoing[iloc]==onium[0].pid()) found=true;
	  else ++iloc;
	}
	// if histos not made, make them
	if(!found) {
	  double twompi = 0.378;
	  double upp    = vMeson.mass()-onium[0].mass();
	  iloc=_incoming.size();
	  _incoming.push_back(vMeson.pid());
	  _outgoing.push_back(onium[0].pid());
	  std::ostringstream title;
	  title << "h_" << vMeson.pid() << "_" << onium[0].pid() << "_";
          _mpipi.push_back(make_pair(Histo1DPtr(), Histo1DPtr()));
          book(_mpipi.back().first, title.str()+"mpippim",200,twompi/GeV,upp/GeV);
          book(_mpipi.back().second, title.str()+"mpi0pi0",200,twompi/GeV,upp/GeV);
          _hel.push_back(make_pair(Histo1DPtr(), Histo1DPtr()));
          book(_hel.back().first, title.str()+"hpippim",200,-1.,1.);
          book(_hel.back().second, title.str()+"hpi0pi0",200, 0.,1.);
	}
	// boost to rest frame of the pion pair
	FourMomentum q = vMeson.momentum()-onium[0].momentum();
	LorentzTransform boost = LorentzTransform::mkFrameTransformFromBeta(q.betaVec());
	FourMomentum qp = onium[0].momentum();
	FourMomentum ppi= pip.size()==1 ? pip[0].momentum() : pi0[0].momentum();
	qp  = boost.transform(qp);
	ppi = boost.transform(ppi);
	double cX=-ppi.p3().unit().dot(qp.p3().unit());
	if(pi0.size()==2) {
	  _mpipi[iloc].second->fill(q.mass());
	  _hel  [iloc].second->fill(abs(cX));
	}
	else {
	  _mpipi[iloc].first->fill(q.mass());
	  _hel  [iloc].first->fill(cX);
	}
      }
    }
    
    
    /// Normalise histograms etc., after the run
    void finalize() {

      // normalize to unity
      for(unsigned int ix=0;ix<_mpipi.size();++ix) {
	normalize(_mpipi[ix].first );
	normalize(_mpipi[ix].second);
	normalize(_hel[ix].first );
	normalize(_hel[ix].second);
      }
    }

    //@}

    /**
     *  Incoming onium states
     */
    vector<long> _incoming;
    
    /**
     *  Outgoing onium states
     */
    vector<long> _outgoing;
    
    /**
     *  Histograms for the \f$\pi^+\pi^-\f$ masses
     */
    vector<pair<Histo1DPtr,Histo1DPtr> > _mpipi;
    
    /**
     *  Histmgrams for the helicity angles
     */
    vector<pair<Histo1DPtr,Histo1DPtr> > _hel;

  };


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


}