CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CDChargedVisible< H > Class Template Reference

#include <CDChargedVisible.h>

+ Inheritance diagram for CDChargedVisible< H >:

Public Types

typedef CDCandidate CandidateClass
 
typedef EvtRecTrack VisibleEvidence
 
- Public Types inherited from CDCandidate
typedef CDDecay DecayEvidence
 
typedef std::pair< vector< const EvtRecTrack * >, vector< const EvtRecTrack * > > TracksAndShowers
 

Public Member Functions

 CDChargedVisible (const EvtRecTrack *aVisible)
 
 CDChargedVisible (const CDChargedVisible< H > &aOtherCDChargedVisible)
 
virtual ~CDChargedVisible ()
 
virtual bool builtFromTrack () const
 
virtual const EvtRecTracktrack () const
 
virtual DBCandidate::Hypo hypo () const
 
- Public Member Functions inherited from CDCandidate
virtual ~CDCandidate ()
 
const CDCandidateoperator= (const CDCandidate &aOtherCDCandidate)
 
void setUserTag (int tag)
 
CDCandidatesetP4 (const HepLorentzVector &aMomentum)
 
int userTag () const
 
double mass () const
 
int charge () const
 
double energy () const
 
const Hep3Vector & momentum () const
 
const HepLorentzVector & p4 () const
 
const DecayChain::KinematicDatakinematicData () const
 
TracksAndShowers finalChildren () const
 
virtual DBCandidate::Hypo hypo () const
 
virtual bool builtFromTrack () const
 
virtual const EvtRecTracktrack () const
 
virtual bool builtFromCDPhoton () const
 
virtual const EvtRecTrackphoton () const
 
virtual bool builtFromCDPi0 () const
 
virtual const EvtRecPi0navPi0 () const
 
virtual bool builtFromCDEta () const
 
virtual const EvtRecEtaToGGnavEta () const
 
virtual bool builtFromCDKs () const
 
virtual const EvtRecVeeVertexnavKshort () const
 
virtual bool builtFromCDLambda () const
 
virtual const EvtRecVeeVertexnavLambda () const
 
virtual bool builtFromCDDecay () const
 
virtual const DecayEvidencedecay () const
 
bool overlap (const CDCandidate &aOtherCDCandidate) const
 
const CDFootPrintfootPrint () const
 
- Public Member Functions inherited from dchain::ReferenceCount
 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void addLink () const
 
void dropLink () const
 

Protected Member Functions

virtual DecayChain::KinematicDatadefaultKinematicData () const
 
- Protected Member Functions inherited from CDCandidate
 CDCandidate (const CDCandidate &aOtherCDCandidate)
 
 CDCandidate (const CDFootPrint &aCDFootPrint)
 
void setKinematicData (const DecayChain::KinematicData &aKinematicData)
 
void setCDFootPrint (const CDFootPrint &aCDFootPrint)
 
virtual DecayChain::KinematicDatadefaultKinematicData () const =0
 
void recurseNode (TracksAndShowers &final, const CDCandidate &cand) const
 

Detailed Description

template<DBCandidate::Hypo H>
class CDChargedVisible< H >

Definition at line 84 of file CDChargedVisible.h.

Member Typedef Documentation

◆ CandidateClass

template<DBCandidate::Hypo H>
typedef CDCandidate CDChargedVisible< H >::CandidateClass

Definition at line 90 of file CDChargedVisible.h.

◆ VisibleEvidence

template<DBCandidate::Hypo H>
typedef EvtRecTrack CDChargedVisible< H >::VisibleEvidence

Definition at line 91 of file CDChargedVisible.h.

Constructor & Destructor Documentation

◆ CDChargedVisible() [1/2]

template<DBCandidate::Hypo H>
CDChargedVisible< H >::CDChargedVisible ( const EvtRecTrack aVisible)

Definition at line 107 of file CDChargedVisible.cc.

107 :
109 m_visibleEvidence( aVisible )
110{
111}
Definition: CDMud.h:45

◆ CDChargedVisible() [2/2]

template<DBCandidate::Hypo H>
CDChargedVisible< H >::CDChargedVisible ( const CDChargedVisible< H > &  aOtherCDChargedVisible)

Definition at line 134 of file CDChargedVisible.cc.

134 :
135 CDCandidate( aOtherCDChargedHypo ) ,
136 m_visibleEvidence( aOtherCDChargedHypo.m_visibleEvidence )
137{
138}

◆ ~CDChargedVisible()

Definition at line 144 of file CDChargedVisible.cc.

145{
146}

Member Function Documentation

◆ builtFromTrack()

template<DBCandidate::Hypo H>
bool CDChargedVisible< H >::builtFromTrack
virtual

Reimplemented from CDCandidate.

Definition at line 161 of file CDChargedVisible.cc.

162{
163 return ( 0 != m_visibleEvidence ) ;
164}

◆ defaultKinematicData()

template<DBCandidate::Hypo H>
KinematicData * CDChargedVisible< H >::defaultKinematicData
protectedvirtual

Implements CDCandidate.

Definition at line 178 of file CDChargedVisible.cc.

179{
180 KinematicData* tmp = new KinematicData();
181
182 double mass = DBCandidate::mass( static_cast<DBCandidate::Hypo>(H) );
183
184 // original set, can be used again once kalTrack has charge and momentum available in memory
185 /*
186 if ( (const_cast<EvtRecTrack*>(m_visibleEvidence))->isMdcKalTrackValid() ) {
187 RecMdcKalTrack* mdcKalTrack = (const_cast<EvtRecTrack*>(m_visibleEvidence))->mdcKalTrack();
188
189 mdcKalTrack->setPidType( static_cast<RecMdcKalTrack::PidType>
190 (static_cast<DBCandidate::Hypo>(H) - 1) );
191
192 tmp->setCharge( mdcKalTrack->charge() );
193 //tmp->setMass( DBCandidate::mass( static_cast<DBCandidate::Hypo>(H) ) );
194 tmp->setMomentum( Hep3Vector(mdcKalTrack->px(), mdcKalTrack->py(), mdcKalTrack->pz()) );
195 }
196 */
197 //get momentume and chage from helix information directly
198
199 if ( (const_cast<EvtRecTrack*>(m_visibleEvidence))->isMdcKalTrackValid() ) {
200 RecMdcKalTrack* mdcKalTrack = (const_cast<EvtRecTrack*>(m_visibleEvidence))->mdcKalTrack();
201
202 mdcKalTrack->setPidType( static_cast<RecMdcKalTrack::PidType>
203 (static_cast<DBCandidate::Hypo>(H) - 1) );
204
205 int pid=static_cast<DBCandidate::Hypo>(H) - 1;
206
207 HepVector zhelix;
208 if(pid==0)
209 zhelix=mdcKalTrack->getZHelixE();
210 else if(pid==1)
211 zhelix=mdcKalTrack->getZHelixMu();
212 else if(pid==2)
213 zhelix=mdcKalTrack->getZHelix();
214 else if(pid==3)
215 zhelix=mdcKalTrack->getZHelixK();
216 else
217 zhelix=mdcKalTrack->getZHelixP();
218
219
220 double dr(0),phi0(0),kappa(0),dz(0),tanl(0);
221 dr=zhelix[0];
222 phi0=zhelix[1];
223 kappa=zhelix[2];
224 dz=zhelix[3];
225 tanl=zhelix[4];
226
227 int charge=0;
228
229 if (kappa > 0.0000000001)
230 charge = 1;
231 else if (kappa < -0.0000000001)
232 charge = -1;
233
234 double pxy=0;
235 if(kappa!=0) pxy = 1.0/fabs(kappa);
236
237 double px = pxy * (-sin(phi0));
238 double py = pxy * cos(phi0);
239 double pz = pxy * tanl;
240
241 double e = sqrt( pxy*pxy + pz*pz + mass*mass );
242
243 tmp->setCharge( charge );
244 //tmp->setMass( DBCandidate::mass( static_cast<DBCandidate::Hypo>(H) ) );
245 tmp->setP4( HepLorentzVector(px, py, pz, e));
246 }
247
248 else {
249 RecMdcTrack* mdcTrack = (const_cast<EvtRecTrack*>(m_visibleEvidence))->mdcTrack();
250 tmp->setCharge( mdcTrack->charge() );
251 double e = sqrt( mass*mass + mdcTrack->p3().mag2() );
252 tmp->setP4( HepLorentzVector(mdcTrack->p3(), e) );
253 }
254
255 return tmp;
256}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
int charge() const
double mass() const
static double mass(DBCandidate::Hypo aHypo)
Definition: DBCandidate.cxx:73
void setCharge(const int aCharge)
void setP4(const HepLorentzVector &aMomentum)
static void setPidType(PidType pidType)
const int charge() const
Definition: DstMdcTrack.h:53
const Hep3Vector p3() const
Definition: DstMdcTrack.h:43
const HepVector & getZHelix() const
HepVector & getZHelixP()
HepVector & getZHelixK()
HepVector & getZHelixE()
HepVector & getZHelixMu()
IMPLICIT REAL *A H
Definition: myXsection.h:1

◆ hypo()

template<DBCandidate::Hypo H>
DBCandidate::Hypo CDChargedVisible< H >::hypo
inlinevirtual

Reimplemented from CDCandidate.

Definition at line 138 of file CDChargedVisible.h.

139{
140 return H;
141}

◆ track()

template<DBCandidate::Hypo H>
const EvtRecTrack * CDChargedVisible< H >::track
virtual

Reimplemented from CDCandidate.

Definition at line 167 of file CDChargedVisible.cc.

168{
169 return m_visibleEvidence;
170}

Referenced by LocalKaonSelector::operator()(), and LocalPionSelector::operator()().


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