StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFcsPoint.cxx
1 /*****************************************************************************
2  *
3  * $Id: StMuFcsPoint.cxx,v 1.0 2021/11/17 22:09:58 jdb Exp $
4  *
5  * Author: Daniel Brandenburg, 2021
6  *****************************************************************************
7  *
8  * Description: Implementation of StMuFcsPoint, the MuDST FCS "point" class
9  *
10  *****************************************************************************
11  *
12  *
13  *****************************************************************************/
14 #include "StMuFcsPoint.h"
15 #include "StMuFcsCluster.h"
16 
17 StMuFcsPoint::StMuFcsPoint() : mFourMomentum(0.,0.,0.,0.) { /* no op */ }
18 
19 StMuFcsPoint::~StMuFcsPoint() { /* no op */ }
20 
21 void StMuFcsPoint::print(int opt) {
22  cout << Form("StMuFcsPoint: Det=%2d ClusterId=%2d local=%7.2f %7.2lf xyz=%7.2lf %7.2lf %7.2lf E=%7.2lf ET=%6.2lf",
23  detectorId(), parentClusterId(),
24  x(), y(),
25  xyz().X(), xyz().Y(), xyz().Z(),
26  energy(), fourMomentum().Pt())
27  << endl;
28 }
29 
30 unsigned int StMuFcsPoint::parentClusterId() const {
31  StMuFcsCluster * clu = static_cast<StMuFcsCluster*>( mCluster.GetObject() );
32  if ( nullptr == clu )
33  return 9999999; // TODO: a better default for none?
34  return clu->id();
35 } //parent cluster Id
36 
37 
38 StMuFcsCluster* StMuFcsPoint::cluster() {
39  return static_cast<StMuFcsCluster*>( mCluster.GetObject() );
40 } // Parent cluster of the photon.
41 
42 void StMuFcsPoint::setCluster(StMuFcsCluster* cluster)
43 {
44  mCluster = cluster;
45 }