3
#include "Rivet/Analysis.hh"
4
#include "Rivet/RivetAIDA.hh"
5
#include "Rivet/Tools/ParticleIdUtils.hh"
6
#include "Rivet/Projections/Beam.hh"
7
#include "Rivet/Projections/UnstableFinalState.hh"
12
/// @brief BABAR Xi_c baryons from fragmentation
13
/// @author Peter Richardson
14
class BABAR_2005_S6181155 : public Analysis {
18
: Analysis("BABAR_2005_S6181155")
22
void analyze(const Event& e) {
23
const double weight = e.weight();
25
// Loop through unstable FS particles and look for charmed mesons/baryons
26
const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");
28
const Beam beamproj = applyProjection<Beam>(e, "Beams");
29
const ParticlePair& beams = beamproj.beams();
30
FourMomentum mom_tot = beams.first.momentum() + beams.second.momentum();
31
LorentzTransform cms_boost(-mom_tot.boostVector());
32
const double s = sqr(beamproj.sqrtS());
34
const bool onresonance = fuzzyEquals(beamproj.sqrtS(), 10.58, 2E-3);
36
foreach (const Particle& p, ufs.particles()) {
37
// 3-momentum in CMS frame
38
const double mom = cms_boost.transform(p.momentum()).vector3().mod();
39
// only looking at Xi_c^0
40
if(abs(p.pdgId()) != 4132 ) continue;
42
_histOnResonanceA_norm->fill(mom,weight);
43
_histOnResonanceB_norm->fill(mom,weight);
46
_histOffResonance_norm->fill(mom,s/sqr(10.58)*weight);
48
MSG_DEBUG("mom = " << mom);
49
// off-resonance cross section
50
if(checkDecay(p.genParticle())) {
52
_histOnResonanceA->fill(mom,weight);
53
_histOnResonanceB->fill(mom,weight);
56
_histOffResonance->fill(mom,s/sqr(10.58)*weight);
57
_sigma->fill(10.6,weight);
64
scale(_histOnResonanceA, crossSection()/femtobarn/sumOfWeights());
65
scale(_histOnResonanceB, crossSection()/femtobarn/sumOfWeights());
66
scale(_histOffResonance, crossSection()/femtobarn/sumOfWeights());
67
scale(_sigma , crossSection()/femtobarn/sumOfWeights());
68
normalize(_histOnResonanceA_norm);
69
normalize(_histOnResonanceB_norm);
70
normalize(_histOffResonance_norm);
75
addProjection(Beam(), "Beams");
76
addProjection(UnstableFinalState(), "UFS");
78
_histOnResonanceA = bookHistogram1D(1,1,1);
79
_histOnResonanceB = bookHistogram1D(2,1,1);
80
_histOffResonance = bookHistogram1D(2,1,2);
81
_sigma = bookHistogram1D(3,1,1);
82
_histOnResonanceA_norm = bookHistogram1D(4,1,1);
83
_histOnResonanceB_norm = bookHistogram1D(5,1,1);
84
_histOffResonance_norm = bookHistogram1D(5,1,2);
92
AIDA::IHistogram1D *_histOnResonanceA;
93
AIDA::IHistogram1D *_histOnResonanceB;
94
AIDA::IHistogram1D *_histOffResonance;
95
AIDA::IHistogram1D *_sigma ;
96
AIDA::IHistogram1D *_histOnResonanceA_norm;
97
AIDA::IHistogram1D *_histOnResonanceB_norm;
98
AIDA::IHistogram1D *_histOffResonance_norm;
101
bool checkDecay(const GenParticle & p) {
102
unsigned int nstable=0,npip=0,npim=0;
103
unsigned int nXim=0,nXip=0;
104
findDecayProducts(p,nstable,npip,npim,
109
if(nstable==2&&nXim==1&&npip==1) return true;
112
if(nstable==2&&nXip==1&&npim==1) return true;
117
void findDecayProducts(const GenParticle & p,
118
unsigned int & nstable,
119
unsigned int & npip, unsigned int & npim,
120
unsigned int & nXip, unsigned int & nXim) {
121
const GenVertex* dv = p.end_vertex();
122
for (GenVertex::particles_out_const_iterator
123
pp = dv->particles_out_const_begin();
124
pp != dv->particles_out_const_end(); ++pp) {
125
int id = (*pp)->pdg_id();
134
else if(id==111||id==221)
136
else if((*pp)->end_vertex())
137
findDecayProducts(**pp,nstable,npip,npim,nXip,nXim);
139
if(id!=22) ++nstable;
140
if (id == 211) ++npip;
141
else if(id == -211) ++npim;
147
// The hook for the plugin system
148
DECLARE_RIVET_PLUGIN(BABAR_2005_S6181155);