FairRoot/PandaRoot
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DecayTreeFitter::RecoPhoton Class Reference

#include <RecoPhoton.h>

Inheritance diagram for DecayTreeFitter::RecoPhoton:
DecayTreeFitter::RecoParticle DecayTreeFitter::ParticleBase

Public Types

enum  ParticleType {
  kInteractionPoint, kRecoComposite, kRecoResonance, kInternalParticle,
  kRecoTrack, kResonance, kRecoPhoton, kMissingParticle
}
 
typedef std::vector
< ParticleBase * > 
ParticleContainer
 
typedef std::vector
< ParticleBase * > 
daucontainer
 
typedef
daucontainer::const_iterator 
const_iterator
 
typedef std::vector< std::pair
< const ParticleBase *, int > > 
indexmap
 
typedef std::vector
< DecayTreeFitter::Constraint
constraintlist
 

Public Member Functions

 RecoPhoton (RhoCandidate *bc, const ParticleBase *mother)
 
virtual ~RecoPhoton ()
 
virtual int dimM () const
 
virtual ErrCode initPar1 (FitParams *)
 
virtual ErrCode initPar2 (FitParams *)
 
virtual ErrCode initCov (FitParams *) const
 
virtual int type () const
 
virtual ErrCode projectRecoConstraint (const FitParams *, Projection &) const
 
ErrCode updCache ()
 
virtual void addToConstraintList (constraintlist &alist, int depth) const
 
virtual std::string parname (int index) const
 
virtual int dim () const
 
virtual int momIndex () const
 
virtual bool hasEnergy () const
 
virtual ErrCode projectConstraint (Constraint::Type, const FitParams *, Projection &) const
 
virtual double chiSquare (const FitParams *fitparams) const
 
virtual void updateIndex (int &offset)
 
virtual void print (const FitParams *) const
 
const ParticleBaselocate (RhoCandidate *bc) const
 
RhoCandidateparticle () const
 
virtual int index () const
 
const ParticleBasemother () const
 
const std::string & name () const
 
virtual ErrCode projectGeoConstraint (const FitParams *, Projection &) const
 
virtual ErrCode projectMassConstraint (const FitParams *, Projection &) const
 
virtual int posIndex () const
 
virtual int lenIndex () const
 
virtual bool hasPosition () const
 
int eneIndex () const
 
virtual double chiSquareD (const FitParams *) const
 
double pdtMass () const
 
double pdtWidth () const
 
double pdtCLifeTime () const
 
double pdtTau () const
 
int charge () const
 
const daucontainerdaughters () const
 
const_iterator begin () const
 
const_iterator end () const
 
ParticleBaseaddDaughter (RhoCandidate *, const Configuration &config)
 
void removeDaughter (const ParticleBase *pb)
 
virtual void retrieveIndexMap (indexmap &anindexmap) const
 
void setMother (const ParticleBase *m)
 
virtual int nFinalChargedCandidates () const
 
void setParticle (RhoCandidate *bc)
 
void collectVertexDaughters (daucontainer &particles, int posindex)
 
bool setMassConstraint (bool add)
 
void setMassConstraint (double mass)
 

Static Public Member Functions

static ParticleBasecreateParticle (RhoCandidate *bc, const ParticleBase *mother, const Configuration &config)
 

Protected Member Functions

daucontainerdaughters ()
 
ErrCode initTau (FitParams *par) const
 
void makeName (RhoCandidate *bc)
 
bool hasMassConstraint () const
 
void setIndex (int i)
 
void setName (const std::string &n)
 

Static Protected Member Functions

static double pdtCLifeTime (RhoCandidate *bc)
 
static bool isAResonance (const TParticlePDG *bc)
 
static double bFieldOverC ()
 

Private Member Functions

virtual ErrCode initParPhoton (FitParams *, const TVector3 &motherpos) const
 

Private Attributes

double m_z
 
TVector3 m_m
 
TMatrixDSym m_V
 

Detailed Description

Definition at line 18 of file RecoPhoton.h.

Member Typedef Documentation

typedef daucontainer::const_iterator DecayTreeFitter::ParticleBase::const_iterator
inherited

Definition at line 97 of file ParticleBase.h.

Definition at line 110 of file ParticleBase.h.

Definition at line 96 of file ParticleBase.h.

typedef std::vector< std::pair<const ParticleBase*,int> > DecayTreeFitter::ParticleBase::indexmap
inherited

Definition at line 105 of file ParticleBase.h.

Definition at line 33 of file ParticleBase.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

DecayTreeFitter::RecoPhoton::RecoPhoton ( RhoCandidate bc,
const ParticleBase mother 
)

Definition at line 23 of file RecoPhoton.cxx.

References updCache().

24 : RecoParticle(bc,aMother), m_V(3)
25 {
26  updCache() ; // read from candidate
27 }
RecoParticle(RhoCandidate *bc, const ParticleBase *mother)
DecayTreeFitter::RecoPhoton::~RecoPhoton ( )
virtual

Definition at line 29 of file RecoPhoton.cxx.

29 {}

Member Function Documentation

ParticleBase * DecayTreeFitter::ParticleBase::addDaughter ( RhoCandidate cand,
const Configuration config 
)
inherited

Definition at line 94 of file ParticleBase.cxx.

References DecayTreeFitter::ParticleBase::createParticle().

Referenced by DecayTreeFitter::InternalParticle::InternalParticle().

95 {
96  m_daughters.push_back( DecayTreeFitter::ParticleBase::createParticle(cand,this,config) ) ;
97  return m_daughters.back() ;
98 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
static ParticleBase * createParticle(RhoCandidate *bc, const ParticleBase *mother, const Configuration &config)
virtual void DecayTreeFitter::RecoPhoton::addToConstraintList ( constraintlist alist,
int  depth 
) const
inlinevirtual

Implements DecayTreeFitter::ParticleBase.

Definition at line 34 of file RecoPhoton.h.

References dimM(), and DecayTreeFitter::Constraint::photon.

34  {
35  alist.push_back( Constraint(this,Constraint::photon,depth,dimM()) ) ; }
virtual int dimM() const
Definition: RecoPhoton.h:25
const_iterator DecayTreeFitter::ParticleBase::begin ( ) const
inlineinherited

Definition at line 100 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_daughters.

100 { return m_daughters.begin() ; }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
double DecayTreeFitter::ParticleBase::bFieldOverC ( )
staticprotectedinherited

Definition at line 582 of file ParticleBase.cxx.

References C(), RhoCalculationTools::GetBz(), and pos.

583 {
584  TVector3 pos(0.,0.,0.); //TODO get a sensible position, but let's assume zero first...
585  return RhoCalculationTools::GetBz ( pos ) / TMath::C() ;
586 }
TVector3 pos
int Pic_FED Eff_lEE C()
static Double_t GetBz(const TVector3 &position)
Return the magnetic field along the z-axis in kGs
int DecayTreeFitter::ParticleBase::charge ( ) const
inlineinherited

Definition at line 90 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_charge.

90 { return m_charge ; }
double DecayTreeFitter::RecoParticle::chiSquare ( const FitParams fitparams) const
virtualinherited

Definition at line 50 of file RecoParticle.cxx.

References DecayTreeFitter::FitParams::dim(), and p.

51 {
52  std::cout<<" Marke 3" <<std::endl;
53  // project
54  Projection p(fitparams->dim(),dimM()) ;
55  projectRecoConstraint(fitparams,p) ;
56  return p.chiSquare() ;
57 }
Double_t p
Definition: anasim.C:58
virtual ErrCode projectRecoConstraint(const FitParams *fitparams, Projection &p) const =0
virtual int dimM() const =0
double DecayTreeFitter::ParticleBase::chiSquareD ( const FitParams fitparams) const
virtualinherited

Definition at line 551 of file ParticleBase.cxx.

552 {
553  double rc = 0;
554  for(daucontainer::const_iterator it = m_daughters.begin() ;
555  it != m_daughters.end(); ++it)
556  rc += (*it)->chiSquareD(fitparams) ;
557  return rc ;
558 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
void DecayTreeFitter::ParticleBase::collectVertexDaughters ( daucontainer particles,
int  posindex 
)
inherited

Definition at line 227 of file ParticleBase.cxx.

References name, and vtxverbose.

228 {
229  // collect all particles emitted from vertex with position posindex
230  if(vtxverbose>=3) {
231  std::cout << "DecayTreeFitter::ParticleBase::collectVertexDaughters " << posindex << std::endl ;
232  }
233  //skip: head of tree, particles from different vertex, resonances
234  if( mother() && mother()->posIndex() == posindex && type()!=kRecoResonance && type()!=kResonance )
235  {
236  particles.push_back( this ) ;
237  if(vtxverbose>=3) {
238  std::cout << "DecayTreeFitter::ParticleBase::collectVertexDaughters - added a particle "<<name()<<" to vertex " << posindex << std::endl ;
239  }
240  }
241  for( daucontainer::const_iterator idau = daughters().begin() ;
242  idau != daughters().end() ; ++idau )
243  (*idau)->collectVertexDaughters(particles,posindex ) ; //FIXME: RK Caution here!!
244  //collectVertexDaughters(particles,posindex ) ;
245 }
int vtxverbose
const_iterator begin() const
Definition: ParticleBase.h:100
const std::string & name() const
Definition: ParticleBase.h:61
virtual int posIndex() const
Definition: ParticleBase.h:69
virtual int type() const =0
const daucontainer & daughters() const
Definition: ParticleBase.h:99
const ParticleBase * mother() const
Definition: ParticleBase.h:60
ParticleBase * DecayTreeFitter::ParticleBase::createParticle ( RhoCandidate bc,
const ParticleBase mother,
const Configuration config 
)
staticinherited

Definition at line 113 of file ParticleBase.cxx.

References RhoCandidate::Charge(), fabs(), RhoCandidate::GetRecoCandidate(), DecayTreeFitter::ParticleBase::index(), RhoCandidate::IsLocked(), DecayTreeFitter::ParticleBase::name(), RhoCandidate::NDaughters(), RhoCandidate::PdgCode(), RhoCandidate::PdtEntry(), DecayTreeFitter::ParticleBase::type(), RhoCandidate::Uid(), and vtxverbose.

Referenced by DecayTreeFitter::ParticleBase::addDaughter().

116 {
117  // This routine interpretes a beta candidate as one of the
118  // 'Particles' used by the fitter.
119 
120  const TParticlePDG* prop = particle->PdtEntry();
121 
122  if(vtxverbose>=5)
123  std::cout << "DecayTreeFitter::ParticleBase::createParticle from " <<particle->PdgCode() << " | " << particle->Uid() << std::endl ;
124  ParticleBase* rc=0 ;
125  //bool bsconstraint = false ;
126 
127  // We refit invalid fits, kinematic fits and composites with beamspot
128  // constraint if not at head of tree.
129  bool validfit = particle->IsLocked();//TODO needed? && particle.endVertex() != 0 ;
130  bool iscomposite = (particle->NDaughters()>0) ;
131  bool isresonance = iscomposite && prop && isAResonance(prop) ;
132 
133  if(!mother) { // 'head of tree' particles
134  //if ( bsconstraint )
135  //rc = new InteractionPoint(particle) ;
136  //else
137 
138  if( iscomposite )
139  { if(vtxverbose>=2) std::cout<<" H "; if(vtxverbose>=5) std::cout<<std::endl;
140  rc = new InternalParticle(particle,0,config) ; // still need proper head-of-tree class
141  }
142  else {
143  std::cout << "DecayTreeFitter::ParticleBase::createParticle: You are fitting a decay tree that exists of "
144  << "a single, non-composite particle and which does not have a beamconstraint."
145  << "I do not understand what you want me to do with this." << std::endl ;
146  std::cout<<" X ";
147  rc = new InternalParticle(particle,0,config) ; // still need proper head-of-tree class
148  }
149  } else if( !iscomposite ) { // external particles (i.e. tracks/neutrals)
150  bool hasrecocand = ( NULL !=particle->GetRecoCandidate() );
151  bool ischarged = ( fabs(particle->Charge())>0 );
152  //bool hastrack = proto && (proto->GetTrackIndex() >= 0) ;
153  //bool hascalo = proto && (proto->GetEmcNumberOfCrystals() > 0) ;
154  //std::cout<<" particle="<<particle<<" proto="<<proto<<" ntrk="<<proto->GetTrackIndex()<<" ncry"<<proto->GetEmcNumberOfCrystals()<<std::endl;
155  if( hasrecocand )
156  {
157  if( ischarged )
158  { if(vtxverbose>=2) std::cout<<" T "; if(vtxverbose>=5) std::cout<<std::endl;
159  rc = new RecoTrack(particle,mother,config) ; // reconstructed track
160  } else
161  { if(vtxverbose>=2) std::cout<<" P "; if(vtxverbose>=5) std::cout<<std::endl;
162  rc = new RecoPhoton(particle,mother) ; // reconstructed photon
163  }
164  } else if( validfit ) { // fitted composites w/o daughters?
165  if( isresonance )
166  { if(vtxverbose>=2) std::cout<<" RF "; if(vtxverbose>=5) std::cout<<std::endl;
167  rc = new RecoResonance(particle,mother) ;
168  } else
169  { if(vtxverbose>=2) std::cout<<" CF "; if(vtxverbose>=5) std::cout<<std::endl;
170  rc = new RecoComposite(particle,mother) ;
171  }
172  } else { // missing particle!
173  if(vtxverbose>=2) std::cout<<" M "; if(vtxverbose>=5) std::cout<<std::endl;
174  rc = new MissingParticle(particle,mother) ;
175  }
176  } else { // 'internal' particles
177  if( validfit /*|| isconversion*/ ) { // fitted composites
178  if( isresonance ) {
179  if(vtxverbose>=2) std::cout<<" Rf "; if(vtxverbose>=5) std::cout<<std::endl;
180  rc = new RecoResonance(particle,mother) ;
181  } else {
182  if(vtxverbose>=2) std::cout<<" Cf "; if(vtxverbose>=5) std::cout<<std::endl;
183  rc = new RecoComposite(particle,mother) ;
184  }
185  } else { // unfited composites
186  if( isresonance ) {
187  if(vtxverbose>=2) std::cout<<" R "; if(vtxverbose>=5) std::cout<<std::endl;
188  rc = new Resonance(particle,mother,config) ;
189  } else {
190  if(vtxverbose>=2) std::cout<<" I "; if(vtxverbose>=5) std::cout<<std::endl;
191  rc = new InternalParticle(particle,mother,config) ;
192  }
193  }
194  }
195  if(vtxverbose>=5)
196  std::cout << "DecayTreeFitter::ParticleBase::createParticle finished " <<particle->PdgCode() << " | " << particle->Uid() << std::endl ;
197 
198  if(vtxverbose>=2)
199  std::cout << "DecayTreeFitter::ParticleBase::createParticle returns type=" << rc->type()
200  << " index=" << rc->index() << " with name \""<< rc->name() << "\""<<std::endl ;
201  return rc ;
202 }
RhoCandidate * particle() const
Definition: ParticleBase.h:57
PndPidCandidate * GetRecoCandidate() const
Definition: RhoCandidate.h:376
static bool isAResonance(const TParticlePDG *bc)
Int_t Uid() const
Definition: RhoCandidate.h:419
int vtxverbose
const std::string & name() const
Definition: ParticleBase.h:61
virtual int index() const
Definition: ParticleBase.h:59
Bool_t IsLocked()
Definition: RhoCandidate.h:330
const TParticlePDG * PdtEntry() const
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
virtual int type() const =0
Int_t NDaughters() const
Double_t Charge() const
Definition: RhoCandidate.h:184
const daucontainer& DecayTreeFitter::ParticleBase::daughters ( ) const
inlineinherited
daucontainer& DecayTreeFitter::ParticleBase::daughters ( )
inlineprotectedinherited

Definition at line 138 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_daughters.

138 { return m_daughters ; }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
virtual int DecayTreeFitter::RecoParticle::dim ( ) const
inlinevirtualinherited

Implements DecayTreeFitter::ParticleBase.

Definition at line 27 of file RecoParticle.h.

27 { return 3; } //(px,py,pz)
virtual int DecayTreeFitter::RecoPhoton::dimM ( ) const
inlinevirtual

Implements DecayTreeFitter::RecoParticle.

Definition at line 25 of file RecoPhoton.h.

Referenced by addToConstraintList().

25 { return 3 ; }
const_iterator DecayTreeFitter::ParticleBase::end ( ) const
inlineinherited

Definition at line 101 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_daughters.

Referenced by DecayTreeFitter::ParticleBase::locate().

101 { return m_daughters.end() ; }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
int DecayTreeFitter::ParticleBase::eneIndex ( ) const
inlineinherited

Definition at line 80 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::hasEnergy(), and DecayTreeFitter::ParticleBase::momIndex().

80 { return hasEnergy() ? momIndex()+3 : -1 ; }
virtual int momIndex() const
Definition: ParticleBase.h:71
virtual bool hasEnergy() const
Definition: ParticleBase.h:74
virtual bool DecayTreeFitter::RecoParticle::hasEnergy ( ) const
inlinevirtualinherited

Reimplemented from DecayTreeFitter::ParticleBase.

Definition at line 30 of file RecoParticle.h.

30 { return false ; }
bool DecayTreeFitter::ParticleBase::hasMassConstraint ( ) const
inlineprotectedinherited
virtual bool DecayTreeFitter::ParticleBase::hasPosition ( ) const
inlinevirtualinherited

Reimplemented in DecayTreeFitter::RecoComposite, DecayTreeFitter::InternalParticle, and DecayTreeFitter::Resonance.

Definition at line 78 of file ParticleBase.h.

78 { return false ; }
virtual int DecayTreeFitter::ParticleBase::index ( ) const
inlinevirtualinherited
ErrCode DecayTreeFitter::RecoPhoton::initCov ( FitParams fitparams) const
virtual

Reimplemented from DecayTreeFitter::ParticleBase.

Definition at line 71 of file RecoPhoton.cxx.

References DecayTreeFitter::FitParams::cov(), and row.

72 {
73  int momindex = momIndex() ;
74  double varEnergy = m_V(2,2) ;
75  const double factor = 1000;
76  for(int row=0; row<3; row++)
77  fitparams->cov()(momindex+row,momindex+row) = factor * varEnergy ;
78  return ErrCode() ;
79 }
int row
Definition: anaLmdDigi.C:67
virtual int momIndex() const
Definition: RecoParticle.h:29
TMatrixDSym & cov()
Definition: FitParams.h:34
ErrCode DecayTreeFitter::RecoPhoton::initPar1 ( FitParams fitparams)
virtual

Reimplemented from DecayTreeFitter::RecoParticle.

Definition at line 52 of file RecoPhoton.cxx.

References vtxverbose.

53 {
54  if(vtxverbose>5){std::cout<<"RecoPhoton::initPar1: - "<<std::endl;}
55  return initParPhoton( fitparams, TVector3(0,0,0) ) ;
56 }
virtual ErrCode initParPhoton(FitParams *, const TVector3 &motherpos) const
Definition: RecoPhoton.cxx:31
int vtxverbose
ErrCode DecayTreeFitter::RecoPhoton::initPar2 ( FitParams fitparams)
virtual

Implements DecayTreeFitter::ParticleBase.

Definition at line 59 of file RecoPhoton.cxx.

References DecayTreeFitter::FitParams::par(), and vtxverbose.

60 {
61  if(vtxverbose>5){std::cout<<"RecoPhoton::initPar2: - "<<std::endl;}
62  // calculate the direction
63  int posindexmother = mother()->posIndex() ;
64  TVector3 motherpos(fitparams->par(posindexmother+0),
65  fitparams->par(posindexmother+1),
66  fitparams->par(posindexmother+2)) ;
67  return initParPhoton(fitparams, motherpos ) ;
68 }
virtual ErrCode initParPhoton(FitParams *, const TVector3 &motherpos) const
Definition: RecoPhoton.cxx:31
int vtxverbose
virtual int posIndex() const
Definition: ParticleBase.h:69
const ParticleBase * mother() const
Definition: ParticleBase.h:60
ErrCode DecayTreeFitter::RecoPhoton::initParPhoton ( FitParams fitparams,
const TVector3 &  motherpos 
) const
privatevirtual

Definition at line 31 of file RecoPhoton.cxx.

References dx, energy, and DecayTreeFitter::FitParams::par().

33 {
34  TVector3 dx( m_m(0) - motherpos.x(),
35  m_m(1) - motherpos.y(),
36  m_z - motherpos.z()) ;
37  double l = dx.Mag() ;
38 
39  // get the energy
40  double energy = m_m(2) ;
41 
42  // assign the momentum
43  int momindex = momIndex() ;
44  fitparams->par(momindex+0) = energy*dx.x()/l ;
45  fitparams->par(momindex+1) = energy*dx.y()/l ;
46  fitparams->par(momindex+2) = energy*dx.z()/l ;
47 
48  return ErrCode() ;
49 }
virtual int momIndex() const
Definition: RecoParticle.h:29
double dx
Double_t energy
Definition: plot_dirc.C:15
ErrCode DecayTreeFitter::ParticleBase::initTau ( FitParams par) const
protectedinherited

Definition at line 522 of file ParticleBase.cxx.

References mom, DecayTreeFitter::FitParams::par(), DecayTreeFitter::ParticleBase::posIndex(), and DecayTreeFitter::ErrCode::success.

523 {
524  int lenindex = lenIndex() ;
525  if(lenindex>=0 && hasPosition() ) {
526  const ParticleBase* amother = mother() ;
527  int momposindex = amother ? amother->posIndex() : -1 ;
528  int posindex = posIndex() ;
529  int momindex = momIndex() ;
530  assert(momposindex>=0) ; // check code logic: no mother -> no tau
531  //assert(fitparams->par(momposindex+0)!=0 ||fitparams->par(momposindex+1)!=0
532  // ||fitparams->par(momposindex+2)!=0) ; // mother must be initialized
533 
534  TVector3 dX,mom ;
535  double mom2(0) ;
536  for(int irow=0; irow<3; irow++) {
537  dX(irow) = fitparams->par(posindex+irow) - fitparams->par(momposindex+irow) ;
538  double px = fitparams->par(momindex+irow) ;
539  mom(irow) = px ;
540  mom2 += px*px ;
541  }
542  double tau = dX.Dot(mom)/mom2 ;
543  // we don't like 0 and we don't like very negative values
544  if( tau==0 ) tau=pdtTau() ;
545  //tau = tau==0 ? pdtTau() : std::max(tau,-pdtTau()) ;
546  fitparams->par(lenindex) = tau ;
547  }
548  return ErrCode::success ;
549 }
virtual int momIndex() const
Definition: ParticleBase.h:71
virtual int lenIndex() const
Definition: ParticleBase.h:70
Double_t mom
Definition: plot_dirc.C:14
virtual int posIndex() const
Definition: ParticleBase.h:69
virtual bool hasPosition() const
Definition: ParticleBase.h:78
const ParticleBase * mother() const
Definition: ParticleBase.h:60
bool DecayTreeFitter::ParticleBase::isAResonance ( const TParticlePDG *  bc)
staticprotectedinherited

Definition at line 205 of file ParticleBase.cxx.

References C(), and vtxverbose.

205  {
206  bool rc = false ;
207  switch(prop->PdgCode()) {
208  case 11: // bremstrahlung is treated as a resonance
209  case -11:
210  rc = true ;
211  break ;
212  //case 22: // conversions are not treated as a resonance
213  //case 310: // K shorts count as "stable" in PDT Table
214  //rc = false;
215  //break ;
216  default: // this should take care of the pi0
217  rc = (prop->Lifetime()>0) && (100.*TMath::C()*prop->Lifetime() < 0.0001); //[cm]
218  if(rc) break;
219  if(vtxverbose>4)std::cout<<"ParticleBase::isAResonance l."<<__LINE__<<": ctau="<<100.*TMath::C()*prop->Lifetime()<<" cm"<<std::endl;
220  if(prop->Stable()) return false;
221  //rc = prop.ctau() < 0.001*Gaudi::Units::mm ;
222  break;
223  }
224  return rc ;
225 }
int Pic_FED Eff_lEE C()
int vtxverbose
virtual int DecayTreeFitter::ParticleBase::lenIndex ( ) const
inlinevirtualinherited
const ParticleBase * DecayTreeFitter::ParticleBase::locate ( RhoCandidate bc) const
inherited

Definition at line 353 of file ParticleBase.cxx.

References DecayTreeFitter::ParticleBase::end(), and DecayTreeFitter::ParticleBase::locate().

Referenced by DecayTreeFitter::Fitter::decayLengthSum(), DecayTreeFitter::DecayChain::locate(), DecayTreeFitter::ParticleBase::locate(), DecayTreeFitter::Fitter::name(), and DecayTreeFitter::Fitter::updateCand().

354 {
355  // does there exist an 'iscloneof' in lhcb?
356  const ParticleBase* rc = m_particle == abc ? this : 0 ;
357  for(daucontainer::const_iterator it = m_daughters.begin() ;
358  !rc && it != m_daughters.end(); ++it)
359  rc = (*it)->locate(abc) ;
360  return rc ;
361 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
const ParticleBase * locate(RhoCandidate *bc) const
void DecayTreeFitter::ParticleBase::makeName ( RhoCandidate bc)
protectedinherited
virtual int DecayTreeFitter::RecoParticle::momIndex ( ) const
inlinevirtualinherited

Reimplemented from DecayTreeFitter::ParticleBase.

Definition at line 29 of file RecoParticle.h.

References DecayTreeFitter::ParticleBase::index().

29 { return index() ; }
virtual int index() const
Definition: ParticleBase.h:59
const ParticleBase* DecayTreeFitter::ParticleBase::mother ( ) const
inlineinherited
const std::string& DecayTreeFitter::ParticleBase::name ( ) const
inlineinherited
int DecayTreeFitter::ParticleBase::nFinalChargedCandidates ( ) const
virtualinherited

Reimplemented in DecayTreeFitter::RecoTrack.

Definition at line 560 of file ParticleBase.cxx.

Referenced by DecayTreeFitter::sortByType().

560  {
561  int rc=0;
562  for(daucontainer::const_iterator it = m_daughters.begin() ;
563  it != m_daughters.end() ; ++it)
564  rc +=(*it)->nFinalChargedCandidates() ;
565  return rc ;
566 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
std::string DecayTreeFitter::RecoParticle::parname ( int  index) const
virtualinherited

Reimplemented from DecayTreeFitter::ParticleBase.

Definition at line 28 of file RecoParticle.cxx.

References DecayTreeFitter::ParticleBase::parname().

29 {
30  return ParticleBase::parname(ind+4) ;
31 }
virtual std::string parname(int index) const
RhoCandidate* DecayTreeFitter::ParticleBase::particle ( ) const
inlineinherited
double DecayTreeFitter::ParticleBase::pdtCLifeTime ( ) const
inlineinherited

Definition at line 88 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_pdtCLifeTime.

88 { return m_pdtCLifeTime ; }
static double DecayTreeFitter::ParticleBase::pdtCLifeTime ( RhoCandidate bc)
staticprotectedinherited
double DecayTreeFitter::ParticleBase::pdtMass ( ) const
inlineinherited
double DecayTreeFitter::ParticleBase::pdtTau ( ) const
inlineinherited
double DecayTreeFitter::ParticleBase::pdtWidth ( ) const
inlineinherited

Definition at line 87 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_pdtWidth.

87 { return m_pdtWidth ; }
virtual int DecayTreeFitter::ParticleBase::posIndex ( ) const
inlinevirtualinherited
void DecayTreeFitter::ParticleBase::print ( const FitParams fitpar) const
virtualinherited

Definition at line 309 of file ParticleBase.cxx.

References DecayTreeFitter::FitParams::cov(), i, name, DecayTreeFitter::FitParams::par(), pz, and sqrt().

310 {
311  std::cout << std::setw(5) << "[" << type() << "]" << std::setw(15) << std::flush << name().c_str()
312  << std::setw(15)<< " val" << std::setw(15)<< "err" << std::setw(15) << "sigma^2"<< std::endl ;
313  std::cout << std::setprecision(5) ;
314  for(int i=0; i<dim(); i++) {
315  int theindex = index()+i ;
316  std::cout << std::setw(2) << theindex << " "
317  << std::setw(20) << parname(i).c_str()
318  << std::setw(15) << fitpar->par()(theindex)
319  << std::setw(15) << sqrt(fitpar->cov()(theindex,theindex))
320  << std::setw(15) << fitpar->cov()(theindex,theindex) <<std::endl ;
321  }
322  if( hasEnergy() ) {
323  int momindex = momIndex() ;
324  double E = fitpar->par()(momindex+3) ;
325  double px = fitpar->par()(momindex+0) ;
326  double py = fitpar->par()(momindex+1) ;
327  double pz = fitpar->par()(momindex+2) ;
328  double mass2 = E*E-px*px-py*py-pz*pz ;
329  double mass = mass2>0 ? sqrt(mass2) : -sqrt(-mass2) ;
330 
331  // TODO this does not work? fitpar->cov()).GetSub(momindex+0,momindex+3)
332  TMatrixDSym cov = fitpar->cov().GetSub(momindex+0,momindex+3,momindex+0,momindex+3);
333  //HepSymMatrix cov = fitpar->cov().sub(momindex+0,momindex+3) ;
334  TVectorD G(4) ; //was at G(4,0) .. ??why
335  G(0) = -px/mass ;
336  G(1) = -py/mass ;
337  G(2) = -pz/mass ;
338  G(3) = E/mass ;
339  double massvar = cov.Similarity(G) ;
340  std::cout << std::setw(2)<< "-"<<" " << std::setw(20) << "mass: "
341  << std::setw(15) << mass
342  << std::setw(15) << sqrt(massvar)
343  << std::setw(15) << massvar << std::endl ;
344  }
345 
346  for(daucontainer::const_iterator it = m_daughters.begin() ;
347  it != m_daughters.end() ; ++it)
348  (*it)->print(fitpar) ;
349 
350 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
Int_t i
Definition: run_full.C:25
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
virtual int dim() const =0
virtual int momIndex() const
Definition: ParticleBase.h:71
virtual bool hasEnergy() const
Definition: ParticleBase.h:74
const std::string & name() const
Definition: ParticleBase.h:61
virtual int index() const
Definition: ParticleBase.h:59
virtual std::string parname(int index) const
virtual int type() const =0
double pz[39]
Definition: pipisigmas.h:14
TMatrixDSym & cov()
Definition: FitParams.h:34
ErrCode DecayTreeFitter::RecoParticle::projectConstraint ( Constraint::Type  aType,
const FitParams fitparams,
Projection p 
) const
virtualinherited

Reimplemented from DecayTreeFitter::ParticleBase.

Definition at line 34 of file RecoParticle.cxx.

References DecayTreeFitter::Constraint::photon, DecayTreeFitter::ParticleBase::projectConstraint(), and DecayTreeFitter::Constraint::track.

37 {
38  ErrCode aStatus ;
39  switch(aType) {
40  case Constraint::track:
41  case Constraint::photon:
42  aStatus |= projectRecoConstraint(fitparams,p) ;
43  break ;
44  default:
45  aStatus |= ParticleBase::projectConstraint(aType,fitparams,p) ;
46  }
47  return aStatus ;
48 }
virtual ErrCode projectRecoConstraint(const FitParams *fitparams, Projection &p) const =0
virtual ErrCode projectConstraint(Constraint::Type, const FitParams *, Projection &) const
ErrCode DecayTreeFitter::ParticleBase::projectGeoConstraint ( const FitParams fitparams,
Projection p 
) const
virtualinherited

Definition at line 387 of file ParticleBase.cxx.

References DecayTreeFitter::Projection::H(), mom, p2, DecayTreeFitter::FitParams::par(), RhoCalculationTools::PrintMatrix(), pz, DecayTreeFitter::Projection::r(), row, sqrt(), DecayTreeFitter::ErrCode::success, DecayTreeFitter::Projection::V(), and vtxverbose.

389 {
390  // implements the constraint
391 
392  // vec{x}_decay = vec{x}_production + decaylength * vec{p} / p
393  int posindexmother = mother()->posIndex() ;
394  int posindex = posIndex();
395  int lenindex = lenIndex() ;
396  int momindex = momIndex() ;
397  assert(posindexmother>=0 && posindex>=0 && lenindex>=0 && momindex>=0) ;
398 
399 
400  // size of momentum
401  double px = fitparams->par()(momindex+0) ;
402  double py = fitparams->par()(momindex+1) ;
403  double pz = fitparams->par()(momindex+2) ;
404  double p2 = px*px+py*py+pz*pz ;
405  double mom = std::sqrt(p2) ;
406 
407  double dvx = fitparams->par()(posindexmother+0) - fitparams->par()(posindex+0);
408  double dvy = fitparams->par()(posindexmother+1) - fitparams->par()(posindex+1);
409  double dvz = fitparams->par()(posindexmother+2) - fitparams->par()(posindex+2);
410  double len=dvx*dvx+dvy*dvy+dvz*dvz;
411  len=std::sqrt(len);
412 
413  // lineair approximation is fine for now
414  for(int row=0; row<3; row++) {
415  double posxmother = fitparams->par()(posindexmother+row) ;
416  double posx = fitparams->par()(posindex+row) ;
417  double momx = fitparams->par()(momindex+row) ;
418  p.r(row) = posxmother - posx + len*momx/mom ;
419  p.H(row,posindexmother+row) = 1 ;
420  p.H(row,posindex+row) = -1 ;
421  p.H(row,lenindex) = momx/mom ;
422  }
423  // still need these as well
424  p.H(0,momindex+0) = len/mom*( 1 - px*px/p2 ) ;
425  p.H(0,momindex+1) = len/mom*( 0 - px*py/p2 ) ;
426  p.H(0,momindex+2) = len/mom*( 0 - px*pz/p2 ) ;
427  p.H(1,momindex+0) = len/mom*( 0 - py*px/p2 ) ;
428  p.H(1,momindex+1) = len/mom*( 1 - py*py/p2 ) ;
429  p.H(1,momindex+2) = len/mom*( 0 - py*pz/p2 ) ;
430  p.H(2,momindex+0) = len/mom*( 0 - pz*px/p2 ) ;
431  p.H(2,momindex+1) = len/mom*( 0 - pz*py/p2 ) ;
432  p.H(2,momindex+2) = len/mom*( 1 - pz*pz/p2 ) ;
434  //if( charge()!=0 )
435  //{
436  //double lambda = bFieldOverC() * charge() ;
437  //double tau = fitparams->par(lenIndex());
438  //double pt = sqrt(px*px+py*py) ;
439  //const double posprecision = 1e-4 ; // 1mu
440  //if( fabs(pt*lambda*tau*tau) > posprecision )
441  //{
443  //double sinlt = sin(lambda*tau) ;
444  //double coslt = cos(lambda*tau) ;
445  //double px1 = px*coslt - py*sinlt ;
446  //double py1 = py*coslt + px*sinlt ;
447 
448  //p.r(0) += -tau*px + (py1-py)/lambda ;
449  //p.r(1) += -tau*py - (px1-px)/lambda ;
450 
451  //p.H(0,lenindex+0) += -px + px1 ;
452  //p.H(0,momindex+0) += -tau + sinlt/lambda ;
453  //p.H(0,momindex+1) += (coslt-1)/lambda ;
454  //p.H(1,lenindex+0) += -py + py1 ;
455  //p.H(1,momindex+0) += - (coslt-1)/lambda ;
456  //p.H(1,momindex+1) += -tau + sinlt/lambda ;
457 
459  //std::cout << "Using helix for position of particle: " << name().c_str() << " "
460  //<< lambda << " " << lambda*tau
461  //<< " delta-x,y: " << -tau*px + (py1-py)/lambda << " "
462  //<< -tau*py - (px1-px)/lambda << std::endl ;
463  //}
464  //}
466 
467  //p.setParticle( *mother() ) ; // adds geoconstraint chi2 to the balance of the mother particle. Why?
468  if(vtxverbose>6){
469  std::cout<<"ParticleBase::projectConstraint(): projection is:"<<std::endl;
470  std::cout<<"r "; p.r().Print();
471  std::cout<<"V "; p.V().Print();
472  std::cout<<"H "; RhoCalculationTools::PrintMatrix(p.H());
473  }
474  return ErrCode::success ;
475 }
int row
Definition: anaLmdDigi.C:67
const TVectorD & r() const
Definition: Projection.h:37
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
virtual int momIndex() const
Definition: ParticleBase.h:71
virtual int lenIndex() const
Definition: ParticleBase.h:70
Double_t mom
Definition: plot_dirc.C:14
const TMatrixD & H() const
Definition: Projection.h:28
const TMatrixDSym & V() const
Definition: Projection.h:47
int vtxverbose
virtual int posIndex() const
Definition: ParticleBase.h:69
static void PrintMatrix(TMatrixT< double > m)
TPad * p2
Definition: hist-t7.C:117
const ParticleBase * mother() const
Definition: ParticleBase.h:60
double pz[39]
Definition: pipisigmas.h:14
ErrCode DecayTreeFitter::ParticleBase::projectMassConstraint ( const FitParams fitparams,
Projection p 
) const
virtualinherited

Definition at line 477 of file ParticleBase.cxx.

References DecayTreeFitter::Projection::H(), DecayTreeFitter::FitParams::par(), pz, DecayTreeFitter::Projection::r(), DecayTreeFitter::ErrCode::success, DecayTreeFitter::Projection::Vfast(), and vtxverbose.

479 {
480  if(vtxverbose>6){std::cout<<"ParticleBase::projectMassConstraint():"<<std::endl;}
481  double mass = pdtMass() ;
482  double mass2 = mass*mass ;
483  int momindex = momIndex() ;
484 
485  // initialize the value
486  double px = fitparams->par()(momindex+0) ;
487  double py = fitparams->par()(momindex+1) ;
488  double pz = fitparams->par()(momindex+2) ;
489  double E = fitparams->par()(momindex+3) ;
490  if(vtxverbose>6){std::cout<<"px="<<px<<", py="<<py<<", pz="<<pz<<", E="<<E<<", pdtmass="<<mass<<std::endl;}
491  p.r(0) = E*E-px*px-py*py-pz*pz-mass2 ;
492 
493  // calculate the projection matrix
494  p.H(0,momindex+0) = -2.0*px ;
495  p.H(0,momindex+1) = -2.0*py ;
496  p.H(0,momindex+2) = -2.0*pz ;
497  p.H(0,momindex+3) = 2.0*E ;
498 
499  // set the variance in the residual
500  double width = pdtWidth() ;
501  p.Vfast(0,0) = 4*mass*mass*width*width ;
502 
503  return ErrCode::success ;
504 }
const TVectorD & r() const
Definition: Projection.h:37
virtual int momIndex() const
Definition: ParticleBase.h:71
const TMatrixD & H() const
Definition: Projection.h:28
int vtxverbose
double pz[39]
Definition: pipisigmas.h:14
double & Vfast(int row, int col)
Definition: Projection.h:50
ErrCode DecayTreeFitter::RecoPhoton::projectRecoConstraint ( const FitParams fitparams,
Projection p 
) const
virtual

Implements DecayTreeFitter::RecoParticle.

Definition at line 123 of file RecoPhoton.cxx.

References dE, dx, dy, dz, energy, DecayTreeFitter::Projection::H(), m, DecayTreeFitter::FitParams::par(), RhoCalculationTools::PrintMatrix(), pz, DecayTreeFitter::Projection::r(), sqrt(), status, DecayTreeFitter::Projection::V(), DecayTreeFitter::Projection::Vfast(), and vtxverbose.

124 {
125  // residual of photon:
126  // r(0-2) = motherpos + mu * photon momentum - cluster position
127  // r(3) = |momentum| - cluster energy
128  // mu is calculated from the 'chi2-closest approach' (see below)
129 
130  ErrCode status ;
131 
132  // calculate the total momentum and energy:
133  int momindex = momIndex() ;
134  double px = fitparams->par()(momindex+0) ;
135  double py = fitparams->par()(momindex+1) ;
136  double pz = fitparams->par()(momindex+2) ;
137  double m = pdtMass() ; // could be non-zero for mergedpi0
138 
139  double energy = std::sqrt(px*px+py*py+pz*pz+m*m) ;
140  double dedpx = px/energy ;
141  double dedpy = py/energy ;
142  double dedpz = pz/energy ;
143 
144  double tx = px/pz ;
145  double ty = py/pz ;
146  double dtxdpx = 1/pz ;
147  double dtxdpz = -tx/pz ;
148  double dtydpy = 1/pz ;
149  double dtydpz = -ty/pz ;
150 
151  // calculate dX = Xc - Xmother
152  int posindex = mother()->posIndex() ;
153 
154  double dz = m_z - fitparams->par(posindex+2) ;
155  double dx = m_m(0) - fitparams->par(posindex+0) - dz * tx ;
156  double dy = m_m(1) - fitparams->par(posindex+1) - dz * ty ;
157  double dE = m_m(2) - energy ;
158 
159  p.r(0) = dx ;
160  p.r(1) = dy ;
161  p.r(2) = dE ;
162 
163  // calculate the projection matrix
164  // first the 'position' part
165 
166  // derivative of position to position of mother
167  p.H(0,posindex+0) = -1 ;
168  p.H(1,posindex+1) = -1 ;
169 
170  // derivative to position to 3-momentum
171  p.H(0,momindex+0) = -dz * dtxdpx ;
172  p.H(0,momindex+2) = -dz * dtxdpz ;
173  p.H(1,momindex+1) = -dz * dtydpy ;
174  p.H(1,momindex+2) = -dz * dtydpz ;
175 
176  // derivative of momentum to 3-momentum
177  p.H(2,momindex+0) = -dedpx ;
178  p.H(2,momindex+1) = -dedpy ;
179  p.H(2,momindex+2) = -dedpz ;
180 
181  // error
182  for(int irow=0; irow<3; irow++)
183  for(int icol=0; icol<3/*=irow*/; icol++)
184  p.Vfast(irow,icol) = m_V(irow,icol) ;
185  if(vtxverbose>6){
186  std::cout<<"RecoPhoton::projectRecoConstraint(): projection is:"<<posindex<<std::endl;
187  std::cout<<"r "; p.r().Print();
188  std::cout<<"V "; p.V().Print();
189  std::cout<<"H "; RhoCalculationTools::PrintMatrix(p.H());
190  }
191 
192  return status ;
193 }
double dy
const TVectorD & r() const
Definition: Projection.h:37
__m128 m
Definition: P4_F32vec4.h:28
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
virtual int momIndex() const
Definition: RecoParticle.h:29
const TMatrixD & H() const
Definition: Projection.h:28
Double_t dE
Definition: anasim.C:58
const TMatrixDSym & V() const
Definition: Projection.h:47
int vtxverbose
virtual int posIndex() const
Definition: ParticleBase.h:69
static void PrintMatrix(TMatrixT< double > m)
double dx
const ParticleBase * mother() const
Definition: ParticleBase.h:60
double pz[39]
Definition: pipisigmas.h:14
int status[10]
Definition: f_Init.h:28
Double_t energy
Definition: plot_dirc.C:15
double & Vfast(int row, int col)
Definition: Projection.h:50
void DecayTreeFitter::ParticleBase::removeDaughter ( const ParticleBase pb)
inherited

Definition at line 100 of file ParticleBase.cxx.

Referenced by DecayTreeFitter::Fitter::remove().

101 {
102  daucontainer::iterator it = std::find(m_daughters.begin(),m_daughters.end(),pb) ;
103  if(it != m_daughters.end() ) {
104  ParticleBase* _dp = *it ;
105  m_daughters.erase(it) ;
106  if(_dp) delete _dp ;
107  } else {
108  std::cout << "ERROR: cannot remove particle, because not found ..." << std::endl ;
109  }
110 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
void DecayTreeFitter::ParticleBase::retrieveIndexMap ( indexmap anindexmap) const
virtualinherited

Definition at line 377 of file ParticleBase.cxx.

378 {
379 
380  anindexmap.push_back(std::pair<const ParticleBase*,int>(this,index())) ;
381  for(daucontainer::const_iterator it = m_daughters.begin() ;
382  it != m_daughters.end() ; ++it)
383  (*it)->retrieveIndexMap(anindexmap) ;
384 }
ParticleContainer m_daughters
Definition: ParticleBase.h:146
virtual int index() const
Definition: ParticleBase.h:59
void DecayTreeFitter::ParticleBase::setIndex ( int  i)
inlineprotectedinherited

Definition at line 141 of file ParticleBase.h.

References i, and DecayTreeFitter::ParticleBase::m_index.

141 { m_index = i ; }
Int_t i
Definition: run_full.C:25
bool DecayTreeFitter::ParticleBase::setMassConstraint ( bool  add)
inlineinherited

Definition at line 118 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_hasMassConstraint.

Referenced by DecayTreeFitter::DecayChain::setMassConstraint().

118  {
119  std::swap(add,m_hasMassConstraint) ;
120  return add != m_hasMassConstraint ;
121  }
void DecayTreeFitter::ParticleBase::setMassConstraint ( double  mass)
inlineinherited
void DecayTreeFitter::ParticleBase::setMother ( const ParticleBase m)
inlineinherited

Definition at line 108 of file ParticleBase.h.

References m, and DecayTreeFitter::ParticleBase::m_mother.

108 { m_mother = m ; }
__m128 m
Definition: P4_F32vec4.h:28
const ParticleBase * m_mother
Definition: ParticleBase.h:145
void DecayTreeFitter::ParticleBase::setName ( const std::string &  n)
inlineprotectedinherited

Definition at line 142 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_name, and n.

142 { m_name = n ; }
int n
void DecayTreeFitter::ParticleBase::setParticle ( RhoCandidate bc)
inlineinherited

Definition at line 113 of file ParticleBase.h.

References DecayTreeFitter::ParticleBase::m_particle.

113 { m_particle = bc ; }
virtual int DecayTreeFitter::RecoPhoton::type ( ) const
inlinevirtual
void DecayTreeFitter::ParticleBase::updateIndex ( int &  offset)
virtualinherited

Definition at line 83 of file ParticleBase.cxx.

References offset(), and vtxverbose.

Referenced by DecayTreeFitter::Fitter::add(), and DecayTreeFitter::DecayChain::DecayChain().

84 {
85  if(vtxverbose>=5){std::cout<<"ParticleBase::updateIndex() start"<<std::endl;}
86  // first the daughters
87  for(const_iterator it = begin(); it!= end(); ++it) (*it)->updateIndex(offset) ;
88  // now the real work
89  m_index = offset ;
90  offset += dim() ;
91  if(vtxverbose>=5){std::cout<<"ParticleBase::updateIndex() end"<<std::endl;}
92 }
virtual int dim() const =0
TVector3 offset(2, 0, 0)
int vtxverbose
const_iterator begin() const
Definition: ParticleBase.h:100
daucontainer::const_iterator const_iterator
Definition: ParticleBase.h:97
const_iterator end() const
Definition: ParticleBase.h:101
ErrCode DecayTreeFitter::RecoPhoton::updCache ( )

Definition at line 82 of file RecoPhoton.cxx.

References PndPidCandidate::Cov7(), PndPidCandidate::GetEnergy(), PndPidCandidate::GetLastHit(), particle, rec, and vtxverbose.

Referenced by RecoPhoton().

83 {
84  // const LHCb::CaloHypo* hypo = particle().proto()->calo()[0] ;
85  // // this works for photons
86  // const LHCb::CaloPosition* pos = hypo->position() ;
87  // and this seems to work for merged pi0 ...
88  // if(!pos && hypo->clusters().size()>0)
89  // pos = &(hypo->clusters()[0]->position()) ;
90  ErrCode rc ;
91 
92  // if(pos) {
93  // FIXME: Welche Parameter hat das?
94  // Parameters: X, Y, of Cluster (in crystal plane?), E
95  // FIXME: LHCb is a fixed-target experiment, all detectors line up along Z!
97  m_m(0) = rec->GetLastHit().X(); // x
98  m_m(1) = rec->GetLastHit().Y(); // y
99  m_z = rec->GetLastHit().Z(); // z
100  m_m(2) = rec->GetEnergy(); // E
101  if(vtxverbose>4) std::cout<<"RecoPhoton::updCache() l."<<__LINE__ <<" m_m(0) = "<<m_m(0) <<" cm; m_m(1) = "<<m_m(1) <<" cm; m_z = "<<m_z <<"cm; m_M(2) = "<<m_m(2)<<" GeV" <<std::endl;
102  TMatrixD cov7 = rec->Cov7(); //error matrix for
103  m_V[0][0]=cov7[0][0]; // x-x
104  m_V[0][1]=cov7[0][1]; // x-y
105  m_V[0][2]=cov7[0][6]; // x-E
106  m_V[1][0]=cov7[1][0]; // y-x
107  m_V[1][1]=cov7[1][1]; // y-y
108  m_V[1][2]=cov7[1][6]; // y-E
109  m_V[2][0]=cov7[6][0]; // E-x
110  m_V[2][1]=cov7[6][1]; // E-y
111  m_V[2][2]=cov7[6][6]; // E-E
112  // m_m = pos->parameters() ;
113  // m_V = pos->covariance() ;
114  // m_z = pos->z() ;
115  // } else {
116  // std::cout << "DecayTreeFitter::RecoPhoton: cannot find position info for cluster" << std::endl ;
117  // rc = ErrCode::badsetup ;
118  // }
119  return ErrCode() ;
120 }
RhoCandidate * particle() const
Definition: ParticleBase.h:57
PndPidCandidate * GetRecoCandidate() const
Definition: RhoCandidate.h:376
Double_t GetEnergy() const
int vtxverbose
TVector3 GetLastHit() const
TMatrixD & Cov7() const
Int_t rec
Definition: autocutx.C:47
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52

Member Data Documentation

TVector3 DecayTreeFitter::RecoPhoton::m_m
private

Definition at line 40 of file RecoPhoton.h.

TMatrixDSym DecayTreeFitter::RecoPhoton::m_V
private

Definition at line 41 of file RecoPhoton.h.

double DecayTreeFitter::RecoPhoton::m_z
private

Definition at line 39 of file RecoPhoton.h.


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