StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsCluster.cxx
1 /*****************************************************************************
2  *
3  * $Id: StFmsCluster.cxx,v 2.5 2016/06/07 15:51:34 akio Exp $
4  *
5  * Author: Thomas Burton, Yuxi Pan, 2014
6  * ***************************************************************************
7  *
8  * Description: Implementation of StFmsCluster, a group of adjacent FMS towers
9  *
10  * ***************************************************************************
11  *
12  * $Log: StFmsCluster.cxx,v $
13  * Revision 2.5 2016/06/07 15:51:34 akio
14  * Making code better based on Coverity reports
15  *
16  * Revision 2.4 2015/10/21 14:52:09 ullrich
17  * Modified print out format and added info.
18  *
19  * Revision 2.3 2015/09/01 18:29:01 ullrich
20  * Changes due to adding StFpsSlat and interconnection between slats and points.
21  *
22  * Revision 2.2 2015/08/26 16:51:59 ullrich
23  * Added print out fct and operator.
24  *
25  * Revision 2.1 2015/02/14 18:56:00 ullrich
26  * Initial Revision.
27  *
28  *
29  *****************************************************************************/
30 #include "StFmsCluster.h"
31 
32 #include "StMessMgr.h"
33 
34 static const char rcsid[] = "$Id: StFmsCluster.cxx,v 2.5 2016/06/07 15:51:34 akio Exp $";
35 
36 StFmsCluster::StFmsCluster()
37 : StObject(), mDetectorId(0),mCategory(0), mNTowers(0), mEnergy(0.), mX(0.),
38 mY(0.), mSigmaMin(0.), mSigmaMax(0.), mChi2Ndf1Photon(-1.),
39 mChi2Ndf2Photon(-1.), mId(0), mFourMomentum(0.,0.,0.,0.) { /* no op */ }
40 
41 StFmsCluster::~StFmsCluster() { /* no op */ }
42 
43 void StFmsCluster::print(Option_t *option) const {cout<< *this <<endl;}
44 
45 ostream& operator<<(ostream &os, const StFmsCluster& cluster) {
46  os << Form("StFmsCluster id=%4d categ=%1d nTow=%2d nPhoton=%1d loc=%7.2f %7.2f PXYZE=%7.2f %7.2f %7.2f %7.2f E=%7.2f sigMin/max=%7.2f %7.2f",
47  cluster.id(), cluster.category(), cluster.nTowers(), cluster.nPhotons(),
48  cluster.x(), cluster.y(),
49  cluster.fourMomentum().px(),cluster.fourMomentum().py(),cluster.fourMomentum().pz(),cluster.fourMomentum().e(),
50  cluster.energy(), cluster.sigmaMin(), cluster.sigmaMax());
51  return os;
52 }