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
| // -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/DressedLeptons.hh"
#include "Rivet/Projections/MissingMomentum.hh"
#include "Rivet/Projections/PromptFinalState.hh"
#include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {
/// @brief charm hadron production
class BELLE_2005_I686014 : public Analysis {
public:
/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2005_I686014);
/// @name Analysis methods
///@{
/// Book histograms and initialise projections before the run
void init() {
// projections
declare(UnstableParticles(),"UFS");
// histos
if(isCompatibleWithSqrtS(10.52))
_mode=1;
else if(isCompatibleWithSqrtS(10.58,1e-4))
_mode=2;
else
MSG_ERROR("Beam energy not supported!");
for(unsigned int ix=0;ix<7;++ix) {
if(_mode==1)
book(_r[ix],2,1,ix+1);
else
book(_r[ix],1,1,ix+1);
book(_h[ix],2+_mode,1,ix+1);
}
book(_c,"TMP/wgt");
}
/// Perform the per-event analysis
void analyze(const Event& event) {
// unstable particles
const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
if(_mode==2 && ufs.particles(Cuts::pid==300553).size()!=1)
vetoEvent;
_c->fill();
for(const Particle & p : ufs.particles(Cuts::abspid==411 ||
Cuts::abspid==421 ||
Cuts::abspid==431 ||
Cuts::abspid==413 ||
Cuts::abspid==423 ||
Cuts::abspid==4122 )) {
double pmax = sqrt(0.25*sqr(sqrtS())-sqr(p.mass()));
double xp = p.momentum().p3().mod()/pmax;
if(p.abspid()==421) {
_r[0]->fill(0.5);
_h[0]->fill(xp);
}
else if(p.abspid()==421) {
_r[0]->fill(0.5);
_h[0]->fill(xp);
}
else if(p.abspid()==411) {
_r[1]->fill(0.5);
_h[1]->fill(xp);
}
else if(p.abspid()==431) {
_r[2]->fill(0.5);
_h[2]->fill(xp);
}
else if(p.abspid()==4122) {
_r[3]->fill(0.5);
_h[3]->fill(xp);
}
else if(p.abspid()==413) {
_r[4]->fill(0.5);
_h[4]->fill(xp);
_r[5]->fill(0.5);
_h[5]->fill(xp);
}
else if(p.abspid()==423) {
_r[6]->fill(0.5);
_h[6]->fill(xp);
}
}
}
/// Normalise histograms etc., after the run
void finalize() {
if(_mode==1) {
for(unsigned int ix=0;ix<7;++ix) {
scale(_r[ix],crossSection()/picobarn/sumOfWeights());
scale(_h[ix],crossSection()/nanobarn/sumOfWeights());
}
}
else {
for(unsigned int ix=0;ix<7;++ix) {
scale(_r[ix], 0.5/ *_c);
scale(_h[ix],crossSection()/nanobarn/sumOfWeights());
}
}
}
///@}
/// @name Histograms
///@{
Histo1DPtr _h[7];
Histo1DPtr _r[7];
CounterPtr _c;
unsigned int _mode=0;
///@}
};
RIVET_DECLARE_PLUGIN(BELLE_2005_I686014);
}
|