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