FairRoot/PandaRoot
RhoBooster.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 // $Id: RhoBooster.h,v 1.3 2001-12-17 18:46:04 Marcel Exp $
4 //
5 // Description:
6 // RhoBooster -
7 //
8 // Utility class to
9 // boost any candidate from and to the Center of Mass system
10 // of a given beta candidate.
11 // The class keeps internally a copy to the beta candidate
12 // which defines the moving system,
13 // and an association map for book keeping (NO! not implemented !).
14 // Genealogy is preserved during the boost : Boosting a mother
15 // candidate will recursively boost all its daughters.
16 //
17 // Environment:
18 // Software developed for the BaBar Detector at the SLAC B-Factory.
19 //
20 // Author List:
21 // Gautier Hamel de Monchenault - CEN Saclay & Lawrence Berkeley Lab
22 //
23 // History (add to end):
24 // Gautier Sept, 1997 - creation
25 //
26 // Copyright Information:
27 // Copyright (C) 1997 Lawrence Berkeley Laboratory
28 // Copyright (C) 1997 CEA - Centre d'Etude de Saclay
29 //
30 // ROOT Version by Marcel Kunze, RUB
31 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring)
32 //------------------------------------------------------------------------
33 
34 #ifndef RHOBOOSTER_H
35 #define RHOBOOSTER_H
36 
37 #include "TROOT.h"
38 #include "TVector3.h"
39 #include "TLorentzVector.h"
40 #include "TVector3.h"
41 #include "TRotation.h"
42 #include "RhoBase/RhoCandidate.h"
43 #include "RhoBase/RhoCandList.h"
45 #include "RhoLorentzVectorErr.h"
46 #include "RhoBase/RhoFactory.h"
47 
49 {
50  public:
51  //--------------------
52  // Public interface --
53  //--------------------
54 
55  enum BoostSign { To, From };
56  //
57  // constructors - either from a RhoCandidate or from a 4-Vector
58  //
59 
60  // takes a 4-vector
61  RhoBooster ( const TLorentzVector& cmFrame, Bool_t saveCovMatrix = kFALSE );
62 
63  // takes the particle which defined the moving system as an argument
64  RhoBooster ( const RhoCandidate& cand, Bool_t saveCovMatrix = kFALSE );
65 
66  // takes the boost vector as an argument
67  RhoBooster ( const TVector3& boostVector, Bool_t saveCovMatrix = kFALSE );
68 
69  // default constructor
70  RhoBooster ( const RhoCandidate* cand=0, Bool_t saveCovMatrix = kFALSE );
71 
72  //
73  // virtual destructor
74  //
75  virtual ~RhoBooster();
76 
77  //
78  // assignment
79  //
80  void SetBoostVector ( const TVector3& cmFrame ){fBoostVector=cmFrame;};
81  void SetBoostVector ( const TLorentzVector& lv ){SetBoostVector(lv.BoostVector());};
82  void SetBoostVector ( const RhoCandidate* cand ){SetBoostVector(cand->P4());;};
83  void SetBoostVector ( const RhoCandidate& cand ){SetBoostVector(&cand);};
84 
85  //
86  // accessors
87  //
88 // const RhoCandidate& RestParticle() const {};
89 
90  //
91  // public member functions
92  //
93 
94  // Note : the boost preserves genealogy.
95  RhoCandidate& BoostTo ( const RhoCandidate& cand ) const;
96  RhoCandidate& BoostFrom ( const RhoCandidate& cand ) const;
97 
98  void BoostTo ( RhoCandList& initialList,
99  RhoCandList& boostedList,
100  Bool_t cleanList=kTRUE ) const;
101  void BoostFrom ( RhoCandList& initialList,
102  RhoCandList& boostedList,
103  Bool_t cleanList=kTRUE ) const;
104 
105 // // Boost and sort according to momentum (returns a owned map)
106 // TCandMap* BoostAndSort ( RhoCandList&,
107 // RhoCandList&,
108 // BoostSign sign=To );
109 
110 // TLorentzVector BoostedP4 ( const RhoCandidate& cand, BoostSign sign=To ) const {};
111 // RhoLorentzVectorErr BoostedError ( const RhoCandidate& cand, BoostSign sign=To ) const {};
112 // const TLorentzRotation& RotateAndBoost ( BoostSign sign=To ) const {};
113 
114  RhoCandidate& Boost ( const RhoCandidate& cand, BoostSign sign ) const;
115 
116  private:
117 
118  //
119  // private helper functions
120  //
121 
122  TVector3 fBoostVector;
123 // TLorentzRotation* fRotateAndBoostTo; //!
124 // TLorentzRotation* fRotateAndBoostFrom; //!
126 // void clean();
127 
128  public:
129  ClassDef ( RhoBooster,1 ) // Boost RhoCandidate from and to CMS
130 };
131 
132 #endif
RhoCandidate & Boost(const RhoCandidate &cand, BoostSign sign) const
Definition: RhoBooster.cxx:145
RhoCandidate & BoostFrom(const RhoCandidate &cand) const
Definition: RhoBooster.cxx:104
TVector3 fBoostVector
Definition: RhoBooster.h:122
void SetBoostVector(const RhoCandidate &cand)
Definition: RhoBooster.h:83
void SetBoostVector(const TLorentzVector &lv)
Definition: RhoBooster.h:81
virtual ~RhoBooster()
Definition: RhoBooster.cxx:83
void SetBoostVector(const RhoCandidate *cand)
Definition: RhoBooster.h:82
TLorentzVector P4() const
Definition: RhoCandidate.h:195
Bool_t fSaveCovMatrix
Definition: RhoBooster.h:125
int sign(T val)
Definition: PndCADef.h:48
RhoBooster(const TLorentzVector &cmFrame, Bool_t saveCovMatrix=kFALSE)
Definition: RhoBooster.cxx:60
RhoCandidate & BoostTo(const RhoCandidate &cand) const
Definition: RhoBooster.cxx:98
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80