Line data Source code
1 : //--------------------------------------------------------------------------
2 : //
3 : // Environment:
4 : // This software is part of the EvtGen package developed jointly
5 : // for the BaBar and CLEO collaborations. If you use all or part
6 : // of it, please give an appropriate acknowledgement.
7 : //
8 : // Copyright Information: See EvtGen/COPYRIGHT
9 : // Copyright (C) 1998 Caltech, UCSB
10 : //
11 : // Module: EvtStringParticle.cc
12 : //
13 : // Description: Class to describe the partons that are produced in JetSet.
14 : //
15 : // Modification history:
16 : //
17 : // RYD Febuary 27,1998 Module created
18 : //
19 : //------------------------------------------------------------------------
20 : //
21 : #include "EvtGenBase/EvtPatches.hh"
22 : #include <iostream>
23 : #include <math.h>
24 : #include <stdlib.h>
25 : #include "EvtGenBase/EvtStringParticle.hh"
26 : #include "EvtGenBase/EvtVector4R.hh"
27 : #include "EvtGenBase/EvtReport.hh"
28 :
29 :
30 0 : EvtStringParticle::~EvtStringParticle(){
31 :
32 0 : if (_npartons!=0){
33 :
34 0 : delete [] _p4partons;
35 0 : delete [] _idpartons;
36 :
37 : }
38 :
39 0 : }
40 :
41 :
42 0 : EvtStringParticle::EvtStringParticle(){
43 :
44 0 : _p4partons=0;
45 0 : _idpartons=0;
46 0 : _npartons=0;
47 :
48 0 : return;
49 :
50 0 : }
51 :
52 : void EvtStringParticle::init(EvtId id, const EvtVector4R& p4){
53 :
54 0 : _validP4=true;
55 0 : setp(p4);
56 0 : setpart_num(id);
57 :
58 0 : }
59 :
60 :
61 : void EvtStringParticle::initPartons(int npartons,
62 : EvtVector4R* p4partons,EvtId* idpartons){
63 :
64 0 : _p4partons = new EvtVector4R[npartons];
65 0 : _idpartons = new EvtId[npartons];
66 :
67 : int i;
68 :
69 0 : _npartons=npartons;
70 :
71 0 : for(i=0;i<npartons;i++){
72 :
73 0 : _p4partons[i]=p4partons[i];
74 0 : _idpartons[i]=idpartons[i];
75 :
76 : }
77 :
78 0 : }
79 :
80 : int EvtStringParticle::getNPartons(){
81 :
82 0 : return _npartons;
83 :
84 : }
85 :
86 : EvtId EvtStringParticle::getIdParton(int i){
87 :
88 0 : return _idpartons[i];
89 :
90 : }
91 :
92 : EvtVector4R EvtStringParticle::getP4Parton(int i){
93 :
94 0 : return _p4partons[i];
95 :
96 : }
97 :
98 : EvtSpinDensity EvtStringParticle::rotateToHelicityBasis() const{
99 :
100 0 : report(Severity::Error,"EvtGen") << "rotateToHelicityBasis not implemented for strin particle.";
101 0 : report(Severity::Error,"EvtGen") << "Will terminate execution.";
102 :
103 0 : ::abort();
104 :
105 : EvtSpinDensity rho;
106 : return rho;
107 :
108 : }
109 :
110 : EvtSpinDensity EvtStringParticle::rotateToHelicityBasis(double,
111 : double,
112 : double) const{
113 :
114 0 : report(Severity::Error,"EvtGen") << "rotateToHelicityBasis(alpha,beta,gamma) not implemented for string particle.";
115 0 : report(Severity::Error,"EvtGen") << "Will terminate execution.";
116 :
117 0 : ::abort();
118 :
119 : EvtSpinDensity rho;
120 : return rho;
121 :
122 : }
123 :
124 :
|