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 "RhoCandidate.h"
43 #include "RhoCandList.h"
44 #include "RhoCandListIterator.h"
45 #include "RhoLorentzVectorErr.h"
46 #include "RhoFactory.h"
47 
48 class RhoBooster {
49  public:
50  //--------------------
51  // Public interface --
52  //--------------------
53 
54  enum BoostSign { To, From };
55  //
56  // constructors - either from a RhoCandidate or from a 4-Vector
57  //
58 
59  // takes a 4-vector
60  RhoBooster(const TLorentzVector &cmFrame, Bool_t saveCovMatrix = kFALSE);
61 
62  // takes the particle which defined the moving system as an argument
63  RhoBooster(const RhoCandidate &cand, Bool_t saveCovMatrix = kFALSE);
64 
65  // takes the boost vector as an argument
66  RhoBooster(const TVector3 &boostVector, Bool_t saveCovMatrix = kFALSE);
67 
68  // default constructor
69  RhoBooster(const RhoCandidate *cand = nullptr, Bool_t saveCovMatrix = kFALSE);
70 
71  //
72  // virtual destructor
73  //
74  virtual ~RhoBooster();
75 
76  //
77  // assignment
78  //
79  void SetBoostVector(const TVector3 &cmFrame) { fBoostVector = cmFrame; };
80  void SetBoostVector(const TLorentzVector &lv) { SetBoostVector(lv.BoostVector()); };
81  void SetBoostVector(const RhoCandidate *cand)
82  {
83  SetBoostVector(cand->P4());
84  ;
85  };
86  void SetBoostVector(const RhoCandidate &cand) { SetBoostVector(&cand); };
87 
88  //
89  // accessors
90  //
91  // const RhoCandidate& RestParticle() const {};
92 
93  //
94  // public member functions
95  //
96 
97  // Note : the boost preserves genealogy.
98  RhoCandidate &BoostTo(const RhoCandidate &cand) const;
99  RhoCandidate &BoostFrom(const RhoCandidate &cand) const;
100 
101  void BoostTo(RhoCandList &initialList, RhoCandList &boostedList, Bool_t cleanList = kTRUE) const;
102  void BoostFrom(RhoCandList &initialList, RhoCandList &boostedList, Bool_t cleanList = kTRUE) const;
103 
104  // // Boost and sort according to momentum (returns a owned map)
105  // TCandMap* BoostAndSort ( RhoCandList&,
106  // RhoCandList&,
107  // BoostSign sign=To );
108 
109  // TLorentzVector BoostedP4 ( const RhoCandidate& cand, BoostSign sign=To ) const {};
110  // RhoLorentzVectorErr BoostedError ( const RhoCandidate& cand, BoostSign sign=To ) const {};
111  // const TLorentzRotation& RotateAndBoost ( BoostSign sign=To ) const {};
112 
113  RhoCandidate &Boost(const RhoCandidate &cand, BoostSign sign) const;
114 
115  private:
116  //
117  // private helper functions
118  //
119 
120  TVector3 fBoostVector;
121  // TLorentzRotation* fRotateAndBoostTo; //!
122  // TLorentzRotation* fRotateAndBoostFrom; //!
123  Bool_t fSaveCovMatrix;
124  // void clean();
125 
126  public:
127  ClassDef(RhoBooster, 1) // Boost RhoCandidate from and to CMS
128 };
129 
130 #endif
TLorentzVector P4() const
Definition: RhoCandidate.h:185
void SetBoostVector(const RhoCandidate &cand)
Definition: RhoBooster.h:86
void SetBoostVector(const TLorentzVector &lv)
Definition: RhoBooster.h:80
RhoCandidate & Boost(const RhoCandidate &cand, BoostSign sign) const
void SetBoostVector(const RhoCandidate *cand)
Definition: RhoBooster.h:81
int sign(T val)
Definition: PndCADef.h:49
RhoCandidate & BoostFrom(const RhoCandidate &cand) const
RhoBooster(const TLorentzVector &cmFrame, Bool_t saveCovMatrix=kFALSE)
virtual ~RhoBooster()
RhoCandidate & BoostTo(const RhoCandidate &cand) const
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:79