StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFcsCollection.h
1 /***************************************************************************
2  *
3  * $Id: StFcsCollection.h,v 2.1 2021/01/11 20:25:37 ullrich Exp $
4  *
5  * Author: Akio Ogawa, 2018 Aug
6  ***************************************************************************
7  *
8  * Description:
9  * Collection of all hits (towers), clusters and points (photons) in the FCS
10  * This collection owns all these objects, and is itself owned by StEvent.
11  * It is therefore vital to *not* delete any of the objects stored in this
12  * container yourself - the collection will handle freeing memory.
13  * Similarly, any object added to the collection via an add() method must be
14  * allocated with new, and not be owned anywhere else.
15  *
16  ***************************************************************************
17  *
18  * $Log: StFcsCollection.h,v $
19  * Revision 2.1 2021/01/11 20:25:37 ullrich
20  * Initial Revision
21  *
22  **************************************************************************/
23 #ifndef StFcsCollection_hh
24 #define StFcsCollection_hh
25 
26 #include "Stiostream.h"
27 #include "StObject.h"
28 #include "StEnumerations.h"
29 #include "StContainers.h"
30 
31 class StFcsHit;
32 class StFcsCluster;
33 class StFcsPoint;
34 //class StFcsPointPair;
35 
36 class StFcsCollection : public StObject {
37 public:
39  ~StFcsCollection();
40 
41  void addHit(unsigned int det, StFcsHit*); // Add a hit
42  StSPtrVecFcsHit& hits(unsigned int det); // Return the hit list
43  const StSPtrVecFcsHit& hits(unsigned int det) const; // Return the hit list
44  unsigned int numberOfHits(unsigned int det) const; // Return the number of hits
45 
46  void addCluster(unsigned int det, StFcsCluster*); // Add a cluster
47  StSPtrVecFcsCluster& clusters(unsigned int det); // Return the cluster list
48  const StSPtrVecFcsCluster& clusters(unsigned int det) const; // Return the cluster list
49  unsigned int numberOfClusters(unsigned int det) const; // Return the number of clusters
50 
51  void addPoint(unsigned int det, StFcsPoint*); // Add a point
52  StSPtrVecFcsPoint& points(unsigned int det); // Return the point list
53  const StSPtrVecFcsPoint& points(unsigned int det) const; // Return the point list
54  unsigned int numberOfPoints(unsigned int det) const; // Return the number of points
55 
56  void setDataExist(int v) {mDataExist=v;}
57  int isDataExist() {return mDataExist;}
58 
59  int fcsReconstructionFlag() const;
60  void setFcsReconstructionFlag(int v);
61 
62  void print(int option=1);
63 
64 private:
65  StSPtrVecFcsHit mHits[kFcsNDet+1]; //+1 for empty channel
66  StSPtrVecFcsCluster mClusters[kFcsNDet];
67  StSPtrVecFcsPoint mPoints[kFcsNDet];
68 
69  Int_t mFcsReconstructionFlag=0; // undefined for now
70  Int_t mDataExist=0; // if FCS data existed in daq file
71 
72  ClassDef(StFcsCollection,2)
73 };
74 
75 inline int StFcsCollection::fcsReconstructionFlag() const {return mFcsReconstructionFlag;}
76 inline void StFcsCollection::setFcsReconstructionFlag(int v) {mFcsReconstructionFlag=v;}
77 
78 #endif