StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TauolaParticlePair.h
1 #ifndef _TauolaParticlePair_h_included_
2 #define _TauolaParticlePair_h_included_
3 
27 #include <iostream>
28 #include <vector>
29 #include <math.h>
30 #include "TauolaParticle.h"
31 
32 // Forward declarations for friend function
33 namespace TauSpinner {
34  class SimpleParticle;
35  extern double getLongitudinalPolarization(double,SimpleParticle&,SimpleParticle&);
36 }
37 
38 namespace Tauolapp
39 {
40 
42 
43  public:
44 
45  // needed to access m_R matrix and recalculateRij() function.
46  friend class Plots;
47  friend double TauSpinner::getLongitudinalPolarization(double,TauSpinner::SimpleParticle&,TauSpinner::SimpleParticle&);
48 
54  TauolaParticlePair(std::vector<TauolaParticle*> &particle_list);
55 
60  void decayTauPair();
61 
64  bool contains(TauolaParticle * particle);
65 
67  TauolaParticle * getTauPlus(std::vector<TauolaParticle*> particles);
68 
70  TauolaParticle * getTauMinus(std::vector<TauolaParticle*> particles);
71 
74  TauolaParticle * getGrandmotherPlus(std::vector<TauolaParticle*> particles);
75 
78  TauolaParticle * getGrandmotherMinus(std::vector<TauolaParticle*> particles);
79 
81  void print();
82 
86 
87  private:
88 
91 
94  static void setBornKinematics(int incoming_pdg_id, int outgoing_pdg_id, double invariant_mass_squared, double cosTheta);
95 
98  std::vector<TauolaParticle*> m_final_particles;
99 
102  std::vector<TauolaParticle*> m_production_particles;
103 
105  TauolaParticle* m_mother;
106 
108  bool m_mother_exists;
109 
111  std::vector<TauolaParticle*> m_grandmothers;
112 
114  void recalculateRij(int incoming_pdg_id, int outgoing_pdg_id, double invariant_mass_squared, double cosTheta);
115 
117  void rotateSystem(vector<TauolaParticle *> grandmothers,
118  vector<TauolaParticle *> taus,
119  double theta,
120  int axis,
121  int axis2=TauolaParticle::Z_AXIS);
122 
123 
131  void boostFromLabToTauPairFrame(double * rotation_angle1,
132  double * rotation_angle2,
133  double * rotation_angle3,
134  TauolaParticle * mother,
135  vector<TauolaParticle *> grandmothers,
136  vector<TauolaParticle *> taus);
137 
139  void boostFromTauPairToLabFrame(double rotation_angle1,
140  double rotation_angle2,
141  double rotation_angle3,
142  TauolaParticle * mother,
143  vector<TauolaParticle *> grandmothers,
144  vector<TauolaParticle *> taus);
145 
148  void initializeDensityMatrix();
149 
155  TauolaParticle * makeTemporaryMother(vector<TauolaParticle *> taus);
156 
158  //void ANGULU(int *IDE, int *IDF, double *SVAR, double *COSTHE);
160  double getZPolarization(int *incoming_pdg_id,
161  int *outgoing_pdg_id,
162  double *invMass,
163  double *cosTheta);
164 
166  double getVirtuality(TauolaParticle * p1, TauolaParticle*p2, bool flip);
167 
169  void addToBeam(TauolaParticle * pcle,
170  std::vector<TauolaParticle*> * candidates_same,
171  std::vector<TauolaParticle*> * candidates_opp);
172 
173 
178  double m_R[4][4]; //density matrix
179 };
180 
181 //Temporary
182 //Pz is still calculated using the FORTRAN routine in tauola_extra.f
183 //This should be migrated to C++ at some stage.
184 extern "C" {
185  extern double plzap0_(int *incoming_pdg_id,
186  int *outgoing_pdg_id,
187  double *invMass,
188  double *cosTheta);
189 }
190 
191 } // namespace Tauolapp
192 #endif
193 
bool contains(TauolaParticle *particle)
TauolaParticle * getTauMinus(std::vector< TauolaParticle * > particles)
TauolaParticle * getGrandmotherMinus(std::vector< TauolaParticle * > particles)
static const int Z_AXIS
TauolaParticle * getGrandmotherPlus(std::vector< TauolaParticle * > particles)
TauolaParticle * getTauPlus(std::vector< TauolaParticle * > particles)