FairRoot/PandaRoot
Public Member Functions | Protected Attributes | List of all members
RhoVertexSelectorBase Class Referenceabstract

#include <RhoVertexSelectorBase.h>

Inheritance diagram for RhoVertexSelectorBase:
RhoSimpleVertexSelector

Public Member Functions

 RhoVertexSelectorBase (const char *name="RhoVertexSelectorBase")
 
virtual ~RhoVertexSelectorBase ()
 
virtual Bool_t Accept (RhoCandidate *, RhoCandidate *)=0
 
virtual Bool_t Accept (RhoCandidate *, RhoCandidate *, RhoCandidate *)
 
virtual Bool_t Accept (RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *)
 
virtual Bool_t Accept (RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *)
 
void SetDistanceOfClosestApproach (Double_t d)
 
void SetAngle (Double_t d)
 
void SetRadius (Double_t r1, Double_t r2=1.E8)
 
void SetPrimaryVertex (TVector3 x)
 
TVector3 GetVertex ()
 
Double_t GetDistanceOfClosestApproach ()
 
Double_t GetAngle ()
 
virtual void PrintOn (std::ostream &o=std::cout) const
 
const TVector3 & GetMomentumA () const
 
const TVector3 & GetMomentumB () const
 
TVector3 GetMomentum () const
 
Double_t GetRadius () const
 
void Combine (RhoCandList &in1, RhoCandList &in2, RhoCandList &out)
 

Protected Attributes

Double_t fDoca
 
Double_t fVtxip
 
Double_t fRmin
 
Double_t fRmax
 
Double_t fActualR
 
Double_t fActualVtxip
 
Double_t fActualDoca
 
TVector3 fVertex
 
TVector3 fPrimaryVertex
 
TVector3 fMomA
 
TVector3 fMomB
 

Detailed Description

Definition at line 23 of file RhoVertexSelectorBase.h.

Constructor & Destructor Documentation

RhoVertexSelectorBase::RhoVertexSelectorBase ( const char *  name = "RhoVertexSelectorBase")

Definition at line 22 of file RhoVertexSelectorBase.cxx.

22  :
23  TNamed ( name,name ),
24  fDoca ( 1.0 ), fVtxip ( 3.14159265358979323846 ), fRmin ( 0.0 ), fRmax ( 1.E8 ), fPrimaryVertex ( 0.,0.,0. )
25 {
26 }
TString name
RhoVertexSelectorBase::~RhoVertexSelectorBase ( )
virtual

Definition at line 28 of file RhoVertexSelectorBase.cxx.

29 {
30 }

Member Function Documentation

virtual Bool_t RhoVertexSelectorBase::Accept ( RhoCandidate ,
RhoCandidate  
)
pure virtual

Referenced by Combine().

virtual Bool_t RhoVertexSelectorBase::Accept ( RhoCandidate ,
RhoCandidate ,
RhoCandidate  
)
inlinevirtual

Definition at line 35 of file RhoVertexSelectorBase.h.

35  {
36  return kTRUE;
37  };
virtual Bool_t RhoVertexSelectorBase::Accept ( RhoCandidate ,
RhoCandidate ,
RhoCandidate ,
RhoCandidate  
)
inlinevirtual

Definition at line 38 of file RhoVertexSelectorBase.h.

38  {
39  return kTRUE;
40  };
virtual Bool_t RhoVertexSelectorBase::Accept ( RhoCandidate ,
RhoCandidate ,
RhoCandidate ,
RhoCandidate ,
RhoCandidate  
)
inlinevirtual

Definition at line 41 of file RhoVertexSelectorBase.h.

41  {
42  return kTRUE;
43  };
void RhoVertexSelectorBase::Combine ( RhoCandList in1,
RhoCandList in2,
RhoCandList out 
)

Definition at line 32 of file RhoVertexSelectorBase.cxx.

References Accept(), Bool_t, c, RhoCandList::Cleanup(), Double_t, RhoCandidate::E(), RhoCandList::GetLength(), GetMomentum(), GetVertex(), RhoCandList::Put(), RhoCandidate::SetE(), RhoCandidate::SetMarker(), RhoCandidate::SetPosition(), and RhoCandidate::SetVect().

33 {
34  TLorentzVector vl;
35  Double_t charge;
36  Bool_t nearby = kTRUE;
37  //fEntries = 0;
38  //end of unlock
39  Int_t endpos1 = l1.GetLength();
40  Int_t endpos2 = l2.GetLength();
41  out.Cleanup();
42 
43  if ( &l1==&l2 ) {
44  //combination of a list with itself
45  for ( Int_t comb_i=0; comb_i<endpos1; ++comb_i ) {
46  for ( Int_t comb_k=comb_i+1; comb_k<endpos2; ++comb_k ) {
47  if ( !l1[comb_i]->Overlaps ( l2[comb_k] ) ) {
48  vl=l1[comb_i]->P4() +l2[comb_k]->P4();
49  charge=l1[comb_i]->Charge() +l2[comb_k]->Charge();
50  nearby = Accept ( l1[comb_i],l2[comb_k] );
51  if ( nearby ) {
52  //fill list with new candidate
53  RhoCandidate c ( vl,charge );
54  c.SetMarker ( l1[comb_i]->GetMarker ( 0 ) |l2[comb_k]->GetMarker ( 0 ),0 );
55  c.SetMarker ( l1[comb_i]->GetMarker ( 1 ) |l2[comb_k]->GetMarker ( 1 ),1 );
56  c.SetMarker ( l1[comb_i]->GetMarker ( 2 ) |l2[comb_k]->GetMarker ( 2 ),2 );
57  c.SetMarker ( l1[comb_i]->GetMarker ( 3 ) |l2[comb_k]->GetMarker ( 3 ),3 );
58  c.SetPosition ( GetVertex() );
59  c.SetVect ( GetMomentum() );
60  c.SetE ( c.E() );
61  out.Put ( &c );
62  }
63  }
64  }
65  }
66  } else {
67  //combination of 2 different lists
68  for ( Int_t comb_i=0; comb_i<endpos1; ++comb_i ) {
69  for ( Int_t comb_k=0; comb_k<endpos2; ++comb_k ) {
70  if ( !l1[comb_i]->Overlaps ( l2[comb_k] ) ) {
71  vl=l1[comb_i]->P4() +l2[comb_k]->P4();
72  charge=l1[comb_i]->Charge() +l2[comb_k]->Charge();
73  nearby = Accept ( l1[comb_i],l2[comb_k] );
74  if ( nearby ) {
75  //fill list with new candidate
76  RhoCandidate c ( vl,charge );
77  c.SetMarker ( l1[comb_i]->GetMarker ( 0 ) |l2[comb_k]->GetMarker ( 0 ),0 );
78  c.SetMarker ( l1[comb_i]->GetMarker ( 1 ) |l2[comb_k]->GetMarker ( 1 ),1 );
79  c.SetMarker ( l1[comb_i]->GetMarker ( 2 ) |l2[comb_k]->GetMarker ( 2 ),2 );
80  c.SetMarker ( l1[comb_i]->GetMarker ( 3 ) |l2[comb_k]->GetMarker ( 3 ),3 );
81  c.SetPosition ( GetVertex() );
82  c.SetVect ( GetMomentum() );
83  c.SetE ( c.E() );
84  out.Put ( &c );
85  }
86  }
87  }
88  }
89  }
90 }
void Cleanup()
Definition: RhoCandList.cxx:62
TVector3 GetMomentum() const
Double_t
virtual Bool_t Accept(RhoCandidate *, RhoCandidate *)=0
void Put(const RhoCandidate *, Int_t i=-1)
Definition: RhoCandList.cxx:77
Double_t RhoVertexSelectorBase::GetAngle ( )
inline

Definition at line 63 of file RhoVertexSelectorBase.h.

References fActualVtxip.

63  {
64  return fActualVtxip;
65  }
Double_t RhoVertexSelectorBase::GetDistanceOfClosestApproach ( )
inline

Definition at line 60 of file RhoVertexSelectorBase.h.

References fActualDoca.

60  {
61  return fActualDoca;
62  }
TVector3 RhoVertexSelectorBase::GetMomentum ( ) const
inline

Definition at line 74 of file RhoVertexSelectorBase.h.

References fMomA, and fMomB.

Referenced by Combine().

74  {
75  return fMomA+fMomB;
76  }
const TVector3& RhoVertexSelectorBase::GetMomentumA ( ) const
inline

Definition at line 68 of file RhoVertexSelectorBase.h.

References fMomA.

68  {
69  return fMomA;
70  }
const TVector3& RhoVertexSelectorBase::GetMomentumB ( ) const
inline

Definition at line 71 of file RhoVertexSelectorBase.h.

References fMomB.

71  {
72  return fMomB;
73  }
Double_t RhoVertexSelectorBase::GetRadius ( ) const
inline

Definition at line 77 of file RhoVertexSelectorBase.h.

References fActualR.

77  {
78  return fActualR;
79  }
TVector3 RhoVertexSelectorBase::GetVertex ( )
inline

Definition at line 57 of file RhoVertexSelectorBase.h.

References fVertex.

Referenced by Combine().

57  {
58  return fVertex;
59  }
void RhoVertexSelectorBase::PrintOn ( std::ostream o = std::cout) const
virtual

Definition at line 92 of file RhoVertexSelectorBase.cxx.

References fDoca, fRmax, fRmin, and fVtxip.

Referenced by operator<<().

93 {
94  o << GetName() << " settings:" << endl;
95  o << "Distance of closest approach < " << fDoca << " cm" << endl;
96  o << "Angle vertex-IP->momentum < " << fVtxip << " rad" << endl;
97  o << "Radius of acceptance = " << fRmin << " ... " << fRmax << " cm" << endl;
98  o << endl;
99 }
void RhoVertexSelectorBase::SetAngle ( Double_t  d)
inline

Definition at line 47 of file RhoVertexSelectorBase.h.

References d, and fVtxip.

47  {
48  fVtxip = d;
49  }
TObjArray * d
void RhoVertexSelectorBase::SetDistanceOfClosestApproach ( Double_t  d)
inline

Definition at line 44 of file RhoVertexSelectorBase.h.

References d, and fDoca.

44  {
45  fDoca = d;
46  }
TObjArray * d
void RhoVertexSelectorBase::SetPrimaryVertex ( TVector3  x)
inline

Definition at line 54 of file RhoVertexSelectorBase.h.

References fPrimaryVertex, and x.

54  {
55  fPrimaryVertex = x;
56  }
Double_t x
void RhoVertexSelectorBase::SetRadius ( Double_t  r1,
Double_t  r2 = 1.E8 
)
inline

Definition at line 50 of file RhoVertexSelectorBase.h.

References fRmax, fRmin, r1, and r2.

50  {
51  fRmin = r1;
52  fRmax = r2;
53  }
double r1
double r2

Member Data Documentation

Double_t RhoVertexSelectorBase::fActualDoca
protected
Double_t RhoVertexSelectorBase::fActualR
protected

Definition at line 87 of file RhoVertexSelectorBase.h.

Referenced by RhoSimpleVertexSelector::Accept(), and GetRadius().

Double_t RhoVertexSelectorBase::fActualVtxip
protected

Definition at line 88 of file RhoVertexSelectorBase.h.

Referenced by RhoSimpleVertexSelector::Accept(), and GetAngle().

Double_t RhoVertexSelectorBase::fDoca
protected
TVector3 RhoVertexSelectorBase::fMomA
protected
TVector3 RhoVertexSelectorBase::fMomB
protected
TVector3 RhoVertexSelectorBase::fPrimaryVertex
protected

Definition at line 91 of file RhoVertexSelectorBase.h.

Referenced by RhoSimpleVertexSelector::Accept(), and SetPrimaryVertex().

Double_t RhoVertexSelectorBase::fRmax
protected
Double_t RhoVertexSelectorBase::fRmin
protected
TVector3 RhoVertexSelectorBase::fVertex
protected

Definition at line 90 of file RhoVertexSelectorBase.h.

Referenced by RhoSimpleVertexSelector::Accept(), and GetVertex().

Double_t RhoVertexSelectorBase::fVtxip
protected

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