FairRoot/PandaRoot
Public Types | Public Member Functions | Private Attributes | List of all members
RhoBooster Class Reference

#include <RhoBooster.h>

Public Types

enum  BoostSign { To, From }
 

Public Member Functions

 RhoBooster (const TLorentzVector &cmFrame, Bool_t saveCovMatrix=kFALSE)
 
 RhoBooster (const RhoCandidate &cand, Bool_t saveCovMatrix=kFALSE)
 
 RhoBooster (const TVector3 &boostVector, Bool_t saveCovMatrix=kFALSE)
 
 RhoBooster (const RhoCandidate *cand=0, Bool_t saveCovMatrix=kFALSE)
 
virtual ~RhoBooster ()
 
void SetBoostVector (const TVector3 &cmFrame)
 
void SetBoostVector (const TLorentzVector &lv)
 
void SetBoostVector (const RhoCandidate *cand)
 
void SetBoostVector (const RhoCandidate &cand)
 
RhoCandidateBoostTo (const RhoCandidate &cand) const
 
RhoCandidateBoostFrom (const RhoCandidate &cand) const
 
void BoostTo (RhoCandList &initialList, RhoCandList &boostedList, Bool_t cleanList=kTRUE) const
 
void BoostFrom (RhoCandList &initialList, RhoCandList &boostedList, Bool_t cleanList=kTRUE) const
 
RhoCandidateBoost (const RhoCandidate &cand, BoostSign sign) const
 

Private Attributes

TVector3 fBoostVector
 
Bool_t fSaveCovMatrix
 

Detailed Description

Definition at line 48 of file RhoBooster.h.

Member Enumeration Documentation

Enumerator
To 
From 

Definition at line 55 of file RhoBooster.h.

Constructor & Destructor Documentation

RhoBooster::RhoBooster ( const TLorentzVector &  cmFrame,
Bool_t  saveCovMatrix = kFALSE 
)

Definition at line 60 of file RhoBooster.cxx.

References SetBoostVector().

61  : fBoostVector ( 0.,0.,0. ),
62 // fRotateAndBoostTo(0),
63 // fRotateAndBoostFrom(0),
64  fSaveCovMatrix ( saveCovMatrix )
65 {
66  SetBoostVector(lorentzVector);
67 }
TVector3 fBoostVector
Definition: RhoBooster.h:122
Bool_t fSaveCovMatrix
Definition: RhoBooster.h:125
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80
RhoBooster::RhoBooster ( const RhoCandidate cand,
Bool_t  saveCovMatrix = kFALSE 
)

Definition at line 51 of file RhoBooster.cxx.

References SetBoostVector().

52  : fBoostVector ( 0.,0.,0. ),
53 // fRotateAndBoostTo(0),
54 // fRotateAndBoostFrom(0),
55  fSaveCovMatrix ( saveCovMatrix )
56 {
57  SetBoostVector(referenceCand);
58 }
TVector3 fBoostVector
Definition: RhoBooster.h:122
Bool_t fSaveCovMatrix
Definition: RhoBooster.h:125
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80
RhoBooster::RhoBooster ( const TVector3 &  boostVector,
Bool_t  saveCovMatrix = kFALSE 
)

Definition at line 69 of file RhoBooster.cxx.

References SetBoostVector().

70  : fBoostVector ( 0.,0.,0. ),
71 // fRotateAndBoostTo(0),
72 // fRotateAndBoostFrom(0),
73  fSaveCovMatrix ( saveCovMatrix )
74 {
75  SetBoostVector(boostVector);
76 }
TVector3 fBoostVector
Definition: RhoBooster.h:122
Bool_t fSaveCovMatrix
Definition: RhoBooster.h:125
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80
RhoBooster::RhoBooster ( const RhoCandidate cand = 0,
Bool_t  saveCovMatrix = kFALSE 
)

Definition at line 42 of file RhoBooster.cxx.

References SetBoostVector().

43  : fBoostVector ( 0.,0.,0. ),
44 // fRotateAndBoostTo(0),
45 // fRotateAndBoostFrom(0),
46  fSaveCovMatrix ( saveCovMatrix )
47 {
48  if ( referenceCand ) SetBoostVector(referenceCand);
49 }
TVector3 fBoostVector
Definition: RhoBooster.h:122
Bool_t fSaveCovMatrix
Definition: RhoBooster.h:125
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80
RhoBooster::~RhoBooster ( )
virtual

Definition at line 83 of file RhoBooster.cxx.

84 {
85  //clean();
86 }

Member Function Documentation

RhoCandidate & RhoBooster::Boost ( const RhoCandidate cand,
BoostSign  sign 
) const

Definition at line 145 of file RhoBooster.cxx.

References RhoCandidate::Boost(), fBoostVector, RhoFactory::Instance(), RhoFactory::NewCandidate(), and To.

Referenced by BoostFrom(), and BoostTo().

147 {
149  if ( sign == To ) {
150  bc->Boost ( -fBoostVector );
151  } else {
152  bc->Boost ( fBoostVector );
153  }
154  return *bc;
155 
156  // // recursive implementation
157  // // the function returns a poInt_ter to the current mother
158  // // in order to establish mother-daughter links
159  // //
160  // // 1) get the boost vector beta=p/E of the moving frame.
161  // TVector3 beta( theLorentzVector().fBoostVector() );
162  // // boostTo : -beta
163  // // boostFrom : beta
164  // if( sign==To ) beta *= -1;
165  // // 2) now apply the boost to the four-vector
166  // TLorentzVector the4Vector( cand.p4() ); // four-vector of the candidate
167  // the4Vector.boost( beta ); // boost it along the boost vector
168 
169  // Create a instance of a RhoCandidate with the boosted 4-vector
170  // the problem is that we loose all connection with the original...
171  // the solution would be to copy the RhoCandidate and then
172  // to boost it !!! We are missing a boost method in RhoCandidate,
173  // or in TCandBase.
174 
175 // if ( fSaveCovMatrix == kTRUE ) {
176 // const TLorentzVector& boosted4Mtm = BoostedP4 ( cand, sign );
177 // // Boost 4-momentum error (covariance) matrix
178 // const RhoLorentzVectorErr& boostedCovError = BoostedError ( cand, sign );
179 //
180 // // Don't boost decay vertex - this will have a different meaning in the boosted
181 // // frame - a new re-fit of the boosted candidates would need to be done to get the
182 // // correct vertex in the boosted frame. Also, can't change the values
183 // // of the vertex in the abstract class, TAbsVertex, unless we know what vertexer was
184 // // used. This would complicate the TBooster Interface.
185 //
186 // // Set the trajectory for the boosted RhoCandidate
187 // // (really, set it's new covariance matrix).
188 // Double_t charge = cand.Charge(); // charge is Double_t!
189 // RhoCandidate* boostedCand = RhoFactory::Instance()->NewCandidate ( RhoCandidate ( boosted4Mtm, charge ) );
190 // boostedCand->SetTrajectory ( boosted4Mtm, boostedCovError.CovMatrix(), ( int ) charge, cand.PdtEntry(), 0 );
191 // // now loop on daughters
192 // RhoCandListIterator iterDau = cand.DaughterIterator();
193 // RhoCandidate* daug=0;
194 // while ( daug=iterDau.Next() ) {
195 // const TLorentzVector& boostedDaug4Mtm = BoostedP4 ( *daug, sign );
196 // // Boost 4-momentum error (covariance) matrix
197 // const RhoLorentzVectorErr& boostedDaugCovError = BoostedError ( *daug, sign );
198 // // Set the trajectory for the boosted RhoCandidate
199 // // (really, set it's new covariance matrix).
200 // Double_t daugCharge = daug->Charge(); // charge is Double_t!
201 // RhoCandidate* boostedDaugCand = RhoFactory::Instance()->NewCandidate ( RhoCandidate ( boostedDaug4Mtm, daugCharge ) );
202 // boostedDaugCand->SetTrajectory ( boostedDaug4Mtm, boostedDaugCovError.CovMatrix(), ( int ) daugCharge,
203 // daug->PdtEntry(), 0 );
204 // boostedCand->AddDaughterLink ( boostedDaugCand );
205 // }
206 // // Set mass here when the daughters are defined.
207 // boostedCand->SetMass ( cand.Mass() );
208 // // have to cast off the const because of the RhoCandidate Int_terface !!!!!
209 // if ( cand.PdtEntry() ) { boostedCand->SetType ( cand.PdtEntry() ); }
210 // return *boostedCand;
211 // }
212 //
213 // RhoCandidate* boostedCand = RhoFactory::Instance()->NewCandidate ( RhoCandidate ( BoostedP4 ( cand, sign ), cand.Charge() ) );
214 // //
215 // // now loop on daughters
216 // RhoCandListIterator iterDau = cand.DaughterIterator();
217 // RhoCandidate* dau=0;
218 // while ( dau=iterDau.Next() ) {
219 // RhoCandidate boostedDau = Boost ( *dau, sign );
220 // boostedCand->AddDaughterLink ( &boostedDau );
221 // }
222 //
223 // // Set mass here when the daughters are defined.
224 // boostedCand->SetMass ( cand.Mass() );
225 // if ( cand.PdtEntry() ) { boostedCand->SetType ( cand.PdtEntry() ); }
226 //
227 // // set marker (for overlap checks)
228 // boostedCand->SetMarker ( cand.GetMarker ( 0 ),0 );
229 // boostedCand->SetMarker ( cand.GetMarker ( 1 ),1 );
230 // boostedCand->SetMarker ( cand.GetMarker ( 2 ),2 );
231 // boostedCand->SetMarker ( cand.GetMarker ( 3 ),3 );
232 //
233 // // set link to AOD Information
234 // if ( &cand.GetRecoCandidate() ) {
235 // boostedCand->SetRecoCandidate ( cand.GetRecoCandidate() );
236 // }
237 // return *boostedCand;
238 
239 }
void Boost(Double_t bx, Double_t by, Double_t bz)
TVector3 fBoostVector
Definition: RhoBooster.h:122
static RhoFactory * Instance()
Definition: RhoFactory.cxx:34
static RhoCandidate * NewCandidate()
Definition: RhoFactory.cxx:52
int sign(T val)
Definition: PndCADef.h:48
RhoCandidate & RhoBooster::BoostFrom ( const RhoCandidate cand) const

Definition at line 104 of file RhoBooster.cxx.

References Boost(), and From.

105 {
106  return Boost ( cand, From );
107 }
RhoCandidate & Boost(const RhoCandidate &cand, BoostSign sign) const
Definition: RhoBooster.cxx:145
void RhoBooster::BoostFrom ( RhoCandList initialList,
RhoCandList boostedList,
Bool_t  cleanList = kTRUE 
) const

Definition at line 125 of file RhoBooster.cxx.

References RhoCandList::Add(), Boost(), RhoCandList::Cleanup(), From, and RhoCandListIterator::Next().

128 {
129  if ( cleanList ) {
130  boostedList.Cleanup();
131  }
132  RhoCandListIterator iter ( initialList );
133  RhoCandidate* cand=0;
134  while ( (cand=iter.Next()) ) {
135  boostedList.Add ( &(Boost ( *cand, From )) );
136  }
137 }
void Add(const RhoCandidate *c)
Definition: RhoCandList.h:49
void Cleanup()
Definition: RhoCandList.cxx:62
RhoCandidate & Boost(const RhoCandidate &cand, BoostSign sign) const
Definition: RhoBooster.cxx:145
RhoCandidate & RhoBooster::BoostTo ( const RhoCandidate cand) const

Definition at line 98 of file RhoBooster.cxx.

References Boost(), and To.

99 {
100  return Boost ( cand, To );
101 }
RhoCandidate & Boost(const RhoCandidate &cand, BoostSign sign) const
Definition: RhoBooster.cxx:145
void RhoBooster::BoostTo ( RhoCandList initialList,
RhoCandList boostedList,
Bool_t  cleanList = kTRUE 
) const

Definition at line 110 of file RhoBooster.cxx.

References RhoCandList::Add(), Boost(), RhoCandList::Cleanup(), RhoCandListIterator::Next(), and To.

113 {
114  if ( cleanList ) {
115  boostedList.Cleanup();
116  }
117  RhoCandListIterator iter ( initialList );
118  RhoCandidate* cand=0;
119  while ( (cand=iter.Next()) ) {
120  boostedList.Add ( &(Boost ( *cand, To )) );
121  }
122 }
void Add(const RhoCandidate *c)
Definition: RhoCandList.h:49
void Cleanup()
Definition: RhoCandList.cxx:62
RhoCandidate & Boost(const RhoCandidate &cand, BoostSign sign) const
Definition: RhoBooster.cxx:145
void RhoBooster::SetBoostVector ( const TVector3 &  cmFrame)
inline

Definition at line 80 of file RhoBooster.h.

References fBoostVector.

Referenced by RhoBooster().

80 {fBoostVector=cmFrame;};
TVector3 fBoostVector
Definition: RhoBooster.h:122
void RhoBooster::SetBoostVector ( const TLorentzVector &  lv)
inline

Definition at line 81 of file RhoBooster.h.

References SetBoostVector().

Referenced by SetBoostVector().

81 {SetBoostVector(lv.BoostVector());};
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80
void RhoBooster::SetBoostVector ( const RhoCandidate cand)
inline

Definition at line 82 of file RhoBooster.h.

References RhoCandidate::P4(), and SetBoostVector().

Referenced by SetBoostVector().

82 {SetBoostVector(cand->P4());;};
TLorentzVector P4() const
Definition: RhoCandidate.h:195
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80
void RhoBooster::SetBoostVector ( const RhoCandidate cand)
inline

Definition at line 83 of file RhoBooster.h.

References SetBoostVector().

Referenced by SetBoostVector().

83 {SetBoostVector(&cand);};
void SetBoostVector(const TVector3 &cmFrame)
Definition: RhoBooster.h:80

Member Data Documentation

TVector3 RhoBooster::fBoostVector
private

Definition at line 122 of file RhoBooster.h.

Referenced by Boost(), and SetBoostVector().

Bool_t RhoBooster::fSaveCovMatrix
private

Definition at line 125 of file RhoBooster.h.


The documentation for this class was generated from the following files: