StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuPrimaryVertex.h
1 #ifndef __StMuPrimaryVertex_hh__
2 #define __StMuPrimaryVertex_hh__
3 /*
4  * Simple class to store primary vertices. Data members are a mainly a copy of
5  * StPrimaryVertex
6  *
7  * $Id: StMuPrimaryVertex.h,v 1.11 2017/05/17 16:03:04 smirnovd Exp $
8  */
9 
10 #include "TObject.h"
11 #include "StThreeVectorF.hh"
12 #include "StEnumerations.h"
13 
14 class StPrimaryVertex;
15 
16 class StMuPrimaryVertex : public TObject {
17 
18  public:
19 
20  StMuPrimaryVertex(): mFlag(0), mPosition(-999,-999,-999), mPosError(-999,-999,-999), mVertexFinderId(undefinedVertexFinder),
21  mRanking(999),mNTracksUsed(0), mNCTBMatch(0), mNBEMCMatch(0), mNEEMCMatch(0), mNCrossCentralMembrane(0),
22  mSumTrackPt(-999),mMeanDip(-999), mChiSquared(9999), mNTracks(0), mNTpcWestOnly(0), mNTpcEastOnly(0), mRefMultNeg(0), mRefMultPos(0), mRefMultFtpcWest(0),
23  mRefMultFtpcEast(0), mIdTruth(0), mQuality(0), mIdParent(0) {}
24 
26 
27  ~StMuPrimaryVertex() {;}
28  Int_t flag() const {return mFlag; }
29  StThreeVectorF position() const { return mPosition; }
30  StThreeVectorF posError() const { return mPosError; }
31  StVertexFinderId vertexFinderId() const { return mVertexFinderId; }
32  Float_t ranking() const { return mRanking; }
33  UShort_t nTracksUsed() const { return mNTracksUsed; }
34  UShort_t nBTOFMatch() const { return mNBTOFMatch; }
35  UShort_t nCTBMatch() const { return mNCTBMatch; }
36  UShort_t nBEMCMatch() const { return mNBEMCMatch; }
37  UShort_t nEEMCMatch() const { return mNEEMCMatch; }
38  UShort_t nPostXtracks() const { return mNPostXTracks;}
39  UShort_t nPromptTracks() const { return mNTracksWithPromptHit;}
40  UShort_t nBTOFNotMatch() const { return mNBTOFNotMatch; }
41  UShort_t nCTBNotMatch() const { return mNCTBNotMatch; }
42  UShort_t nBEMCNotMatch() const { return mNBEMCNotMatch; }
43  UShort_t nEEMCNotMatch() const { return mNEEMCNotMatch; }
44  UShort_t nCrossCentralMembrane() const { return mNCrossCentralMembrane; }
45  UShort_t nTpcWestOnly() const { return mNTpcWestOnly; }
46  UShort_t nTpcEastOnly() const { return mNTpcEastOnly; }
47 
48  Float_t sumTrackPt() const { return mSumTrackPt; }
49  Float_t meanDip() const { return mMeanDip; }
50  Float_t chiSquared() const { return mChiSquared; }
51  UShort_t noTracks() const {return mNTracks;}
52  UShort_t refMultPos() const { return mRefMultPos; }
53  UShort_t refMultNeg() const { return mRefMultNeg; }
54  UShort_t refMult() const { return refMultPos() + refMultNeg(); }
55  UShort_t refMultFtpcEast() const { return mRefMultFtpcEast; }
56  UShort_t refMultFtpcWest() const { return mRefMultFtpcWest; }
57  UShort_t refMultFtpc() const { return refMultFtpcEast() + refMultFtpcWest(); }
58  void setPosition(const StThreeVectorF &pos) { mPosition = pos; }
59  void setPosError(const StThreeVectorF &pos_err) { mPosError = pos_err; }
60  Int_t idTruth() const { return mIdTruth;}
61  Int_t qaTruth() const { return mQuality; }
62  Int_t idParent() const { return mIdParent;}
63  void setFlag(Int_t val) { mFlag = val; }
64  void setIdTruth(Int_t idtru,Int_t qatru=0) {mIdTruth = (UShort_t) idtru; mQuality = (UShort_t) qatru;}
65  void setIdParent(Int_t id) {mIdParent = id;}
66  Bool_t isBeamConstrained() const {return TESTBIT(mFlag,kBEAMConstrVtxId);}
67  virtual void Print(Option_t *option="") const;
68 
69  ClassDef(StMuPrimaryVertex,8)
70 
71  private:
72  Int_t mFlag;
73  StThreeVectorF mPosition;
74  StThreeVectorF mPosError;
75  StVertexFinderId mVertexFinderId;
76  Float_t mRanking;
77  UShort_t mNTracksUsed;
78  UShort_t mNBTOFMatch;
79  UShort_t mNCTBMatch;
80  UShort_t mNBEMCMatch;
81  UShort_t mNEEMCMatch;
82  UShort_t mNBTOFNotMatch;
83  UShort_t mNCTBNotMatch;
84  UShort_t mNBEMCNotMatch;
85  UShort_t mNEEMCNotMatch;
86  UShort_t mNCrossCentralMembrane;
87  UShort_t mNTracksWithPromptHit;
88  UShort_t mNPostXTracks;
89  Float_t mSumTrackPt;
90  Float_t mMeanDip;
91  Float_t mChiSquared;
92  UShort_t mNTracks;
93  UShort_t mNTpcWestOnly;
94  UShort_t mNTpcEastOnly;
95  // RefMult fields
96  UShort_t mRefMultNeg;
97  UShort_t mRefMultPos;
98  UShort_t mRefMultFtpcWest;
99  UShort_t mRefMultFtpcEast;
100  // IdTruth
101  UShort_t mIdTruth; // MC vertex id if any
102  UShort_t mQuality; // quality of this information (percentage of tracks coming the above MC Vertex)
103  Int_t mIdParent;
104 };
105 ostream& operator<<(ostream& os, const StMuPrimaryVertex& v);
106 #endif
107 /*
108  * $Log: StMuPrimaryVertex.h,v $
109  * Revision 1.11 2017/05/17 16:03:04 smirnovd
110  * StMuPrimaryVertex: Passing pointer by reference is pointless
111  *
112  * Revision 1.10 2017/04/17 19:19:43 smirnovd
113  * [Cosmetic] Whitespace adjustments
114  *
115  * Revision 1.9 2012/09/16 21:58:16 fisyak
116  * Make use of Tpc West and East Only no. of tracks
117  *
118  * Revision 1.8 2012/05/07 14:47:06 fisyak
119  * Add handles for track to fast detector matching
120  *
121  * Revision 1.7 2011/10/17 00:19:14 fisyak
122  * Active handing of IdTruth
123  *
124  * Revision 1.6 2011/04/08 01:25:51 fisyak
125  * Add branches for MC track and vertex information, add IdTruth to tracks and vertices, reserve a possiblity to remove Strange MuDst
126  *
127  * Revision 1.5 2009/12/24 21:19:31 tone421
128  * Added StMuPrimaryVertex::nBTOFMatch()
129  *
130  * Revision 1.4 2007/09/18 02:29:58 mvl
131  * Added basic printing functionality. For convenience and to assist data consistency checks
132  *
133  * Revision 1.3 2006/04/25 08:27:43 mvl
134  * Added members and getters for mean-dip and chisquared value
135  *
136  * Revision 1.2 2005/08/19 19:46:05 mvl
137  * Further updates for multiple vertices. The main changes are:
138  * 1) StMudst::primaryTracks() now returns a list (TObjArray*) of tracks
139  * belonging to the 'current' primary vertex. The index number of the
140  * 'current' vertex can be set using StMuDst::setCurrentVertex().
141  * This also affects StMuDst::primaryTracks(int i) and
142  * StMuDst::numberOfprimaryTracks().
143  * 2) refMult is now stored for all vertices, in StMuPrimaryVertex. The
144  * obvious way to access these numbers is from the StMuprimaryVertex structures,
145  * but for ebakcward compatibility a function is provided in StMuEvent as well
146  * (this is the only function that works for existing MuDst)
147  *
148  * As an aside, I've also changes the internals of StMuDst::createStEvent and
149  * StMuDst::fixTrackIndices() to be able to deal with a larger range of index numbers for tracks as generated by Ittf.
150  *
151  * BIG FAT WARNING: StMudst2StEventMaker and StMuDstFilterMaker
152  * do not fully support the multiple vertex functionality yet.
153  *
154  * Revision 1.1 2005/07/15 21:45:09 mvl
155  * Added support for multiple primary vertices (StMuPrimaryVertex). Track Dcas are now calculated with repect to the first vertex in the list (highest rank), but another vertex number can be specified. Tarcks also store the index of the vertex they belong to (StMuTrack::vertexIndex())
156  *
157  */
virtual void Print(Option_t *option="") const
Print essential vertex info.