StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFcsCollection.h
1 /***************************************************************************
2  *
3  * $Id: StMuFcsCollection.h,v 1.0 2021/11/17 16:22:36 jdb Exp $
4  *
5  * Author: jdb, 2021
6  ***************************************************************************
7  *
8  * Description: Fcs data interface to StMuFcsHit, StMuFcsCluster and StMuFcsPoint
9  *
10  ***************************************************************************
11  *
12  *
13  **************************************************************************/
14 #ifndef StMuFcsCollection_hh
15 #define StMuFcsCollection_hh
16 
17 #include <TObject.h>
18 #include "TClonesArray.h"
19 
20 class StMuFcsHit;
21 class StMuFcsCluster;
22 class StMuFcsPoint;
23 class StMuFcsInfo;
24 
25 class StMuFcsCollection : public TObject {
26 public:
29 
30  void init();
31  StMuFcsHit* addHit();
32  StMuFcsCluster* addCluster();
33  StMuFcsPoint* addPoint();
34  StMuFcsInfo* addInfo();
35 
36  unsigned int numberOfHits() const;
37  unsigned int numberOfClusters() const;
38  unsigned int numberOfPoints() const;
39 
40  void setFcsHitArray(TClonesArray *array) {mHits=array;};
41  void setFcsClusterArray(TClonesArray* array) {mClusters=array;}
42  void setFcsPointArray(TClonesArray* array) {mPoints=array;}
43  void setFcsInfoArray(TClonesArray* array) {mInfo=array;}
44 
45  // helpers to set info directly
46  Int_t fcsReconstructionFlag();
47  void setFcsReconstructionFlag( Int_t v );
48 
49  StMuFcsHit* getHit(int index);
50  StMuFcsCluster* getCluster(int index);
51  StMuFcsPoint* getPoint(int index);
52  StMuFcsInfo* getInfo();
53 
54  unsigned int indexOfFirstHit( unsigned int idet );
55  unsigned int indexOfFirstCluster( unsigned int idet );
56  unsigned int indexOfFirstPoint( unsigned int idet );
57 
58  unsigned int numberOfHits( unsigned int idet );
59  unsigned int numberOfClusters( unsigned int idet );
60  unsigned int numberOfPoints( unsigned int idet );
61 
62  TClonesArray* getHitArray() { return mHits; };
63  TClonesArray* getClusterArray() { return mClusters; }
64  TClonesArray* getPointArray() { return mPoints; }
65  TClonesArray* getInfoArray() { return mInfo; }
66 
67 private:
68  TClonesArray* mHits=0;
69  TClonesArray* mClusters=0;
70  TClonesArray* mPoints=0;
71  TClonesArray* mInfo=0;
72 
73  ClassDef(StMuFcsCollection,1)
74 };
75 #endif