evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtStringParticle.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
22 
23 #include "EvtGenBase/EvtPatches.hh"
24 #include "EvtGenBase/EvtReport.hh"
26 
27 #include <iostream>
28 #include <math.h>
29 #include <stdlib.h>
30 
32 {
33  _validP4 = true;
34  setp( p4 );
35  setpart_num( id );
36 }
37 
38 void EvtStringParticle::initPartons( int npartons, EvtVector4R* p4partons,
39  EvtId* idpartons )
40 {
41  _p4partons.resize( npartons );
42  _idpartons.resize( npartons );
43  for ( int i = 0; i < npartons; i++ ) {
44  _p4partons[i] = p4partons[i];
45  _idpartons[i] = idpartons[i];
46  }
47 }
48 
50 {
51  return _p4partons.size();
52 }
53 
55 {
56  return _idpartons[i];
57 }
58 
60 {
61  return _p4partons[i];
62 }
63 
65 {
66  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
67  << "rotateToHelicityBasis not implemented for strin particle.";
68  EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution.";
69 
70  ::abort();
71 
72  EvtSpinDensity rho;
73  return rho;
74 }
75 
77  double ) const
78 {
79  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
80  << "rotateToHelicityBasis(alpha,beta,gamma) not implemented for string particle.";
81  EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution.";
82 
83  ::abort();
84 
85  EvtSpinDensity rho;
86  return rho;
87 }
void initPartons(int npartons, EvtVector4R *p4partons, EvtId *idpartons)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtVector4R getP4Parton(int i)
EvtSpinDensity rotateToHelicityBasis() const override
void init(EvtId id, const EvtVector4R &p4) override
EvtId getIdParton(int i)
Definition: EvtId.hh:27
std::vector< EvtId > _idpartons
void setp(double e, double px, double py, double pz)
Definition: EvtParticle.hh:437
std::vector< EvtVector4R > _p4partons
void setpart_num(EvtId particle_number)
Definition: EvtParticle.hh:449