StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlCluster.h
1 
6 /***************************************************************************
7  *
8  * $Id: StPxlCluster.h,v 1.7 2014/08/06 11:43:34 jeromel Exp $
9  *
10  * Author: Qiu Hao, Jan 2013, according codes from Xiangming Sun
11  ***************************************************************************
12  *
13  * Description:
14  * a group of neighboring pixel raw hits
15  * More information at
16  * https://www.star.bnl.gov/protected/heavy/qiuh/HFT/software/PXL_software.pdf
17  *
18  ***************************************************************************
19  *
20  * $Log: StPxlCluster.h,v $
21  * Revision 1.7 2014/08/06 11:43:34 jeromel
22  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
23  *
24  * Revision 1.6 2014/02/27 00:44:25 smirnovd
25  * Minor corrections
26  *
27  * Revision 1.5 2014/02/27 00:44:15 smirnovd
28  * Make sorting function static class method
29  *
30  * Revision 1.4 2014/02/21 21:11:06 smirnovd
31  * Minor style and empty space adjustments
32  *
33  * Revision 1.3 2014/01/28 19:29:35 qiuh
34  * *** empty log message ***
35  *
36  *
37  **************************************************************************/
38 
39 #ifndef StPxlCluster_hh
40 #define StPxlCluster_hh
41 
42 #include <utility>
43 
44 #include "Rtypes.h"
45 
46 class StPxlRawHit;
47 
48 
50 {
51 public:
52  StPxlCluster();
53  Int_t nRawHits() const;
54  void addRawHit(const StPxlRawHit *rawHit);
55  void summarize(int embeddingShortCut = 0);
56  Float_t columnCenter() const {return mColumnCenter;}
57  Float_t rowCenter() const {return mRowCenter;}
58  Int_t idTruth() const {return mIdTruth;}
59  virtual const char *GetCVS() const {
60  static const char cvs[] = "Tag $Name: $ $Id: StPxlCluster.h,v 1.7 2014/08/06 11:43:34 jeromel Exp $ built " __DATE__ " " __TIME__ ;
61  return cvs;
62  }
63 
64  static bool compareSecond(const std::pair<int, int> &pair1, const std::pair<int, int> &pair2);
65 
66 protected:
67  std::vector<const StPxlRawHit *> mRawHitVec;
68  Float_t mColumnCenter;
69  Float_t mRowCenter;
70  Int_t mIdTruth;
71 
72  ClassDef(StPxlCluster, 1)
73 };
74 
75 #endif
Float_t mColumnCenter
average raw hit column
Definition: StPxlCluster.h:68
void summarize(int embeddingShortCut=0)
calculate column center, row center, and most frequent idTruth among raw hits
void addRawHit(const StPxlRawHit *rawHit)
add a raw hit to the cluster
Float_t rowCenter() const
average raw hit row
Definition: StPxlCluster.h:57
std::vector< const StPxlRawHit * > mRawHitVec
vector of raw hits
Definition: StPxlCluster.h:67
Int_t idTruth() const
for embedding, 0 as background, most frequent raw hit idTruth as idTruth of the cluster ...
Definition: StPxlCluster.h:58
Int_t nRawHits() const
number of raw hits
Int_t mIdTruth
for embedding, 0 as background, most frequent raw hit idTruth as idTruth of the cluster ...
Definition: StPxlCluster.h:70
Float_t mRowCenter
average raw hit row
Definition: StPxlCluster.h:69
Float_t columnCenter() const
average raw hit column
Definition: StPxlCluster.h:56