22 #ifndef STAR_StGammaCandidate
23 #define STAR_StGammaCandidate
27 #include "TRefArray.h"
31 #include "StGammaTower.h"
32 #include "StGammaStrip.h"
33 #include "StGammaTrack.h"
34 #include "StGammaFitterResult.h"
45 enum CalorimeterId { kEEmc = 0, kBEmc, kUnknown = 255};
46 enum thresholdCut { kMagnitude, kTransverse };
51 virtual const char* GetCVS()
const
52 {
static const char cvs[] =
"Tag $Name: $ $Id: StGammaCandidate.h,v 1.16 2014/08/06 11:43:17 jeromel Exp $ built " __DATE__
" " __TIME__;
return cvs; }
58 Float_t sumPt( Float_t radius, Float_t threshold = 0.0, thresholdCut cut = kTransverse );
59 Float_t sumTrackPt( Float_t radius, Float_t threshold = 0.0, thresholdCut cut = kTransverse );
60 Float_t sumTowerPt( Float_t radius, Float_t threshold = 0.0, thresholdCut cut = kTransverse );
61 Float_t sumPreshower1( Float_t radius, Float_t threshold = 0.0 );
62 Float_t sumPreshower2( Float_t radius, Float_t threshold = 0.0 );
63 Float_t sumPostshower( Float_t radius, Float_t threshold = 0.0 );
65 Int_t numberOfTracks( Float_t radius, Float_t threshold = 0.0, thresholdCut cut = kTransverse );
66 Int_t numberOfTowers( Float_t radius, Float_t threshold = 0.0, thresholdCut cut = kTransverse );
67 Int_t numberOfPreshower1( Float_t radius, Float_t threshold = 0.0 );
68 Int_t numberOfPreshower2( Float_t radius, Float_t threshold = 0.0 );
69 Int_t numberOfPostshower( Float_t radius, Float_t threshold = 0.0 );
72 Int_t id() {
return mGammaId; }
74 Float_t energy()
const {
return mEnergy; }
76 Float_t pre1Energy(Float_t threshold = 0.0);
77 Float_t pre2Energy(Float_t threshold = 0.0);
78 Float_t postEnergy(Float_t threshold = 0.0);
79 Float_t smduEnergy(Float_t threshold = 0.0);
80 Float_t smdvEnergy(Float_t threshold = 0.0);
81 Float_t smdEtaEnergy(Float_t threshold = 0.0) {
return smduEnergy(threshold); }
82 Float_t smdPhiEnergy(Float_t threshold = 0.0) {
return smdvEnergy(threshold); }
84 TVector3 position()
const {
return mPosition; }
85 TVector3 momentum()
const {
return mMomentum; }
87 TVector3 momentum1x1();
88 TVector3 momentum1x1c();
89 TVector3 momentum2x1();
91 Int_t numberOfTracks(){
return mTracks.GetLast()+1; }
92 Int_t numberOfTowers(){
return mTowers.GetLast()+1; }
93 Int_t numberOfPreshower1(){
return mPreshower1.GetLast()+1; }
94 Int_t numberOfPreshower2(){
return mPreshower2.GetLast()+1; }
95 Int_t numberOfPostshower(){
return mPostshower.GetLast()+1; }
96 Int_t numberOfSmdu(){
return mSmdu.GetLast()+1; }
97 Int_t numberOfSmdv(){
return mSmdv.GetLast()+1; }
98 Int_t numberOfSmdEta(){
return mSmdu.GetLast()+1; }
99 Int_t numberOfSmdPhi(){
return mSmdv.GetLast()+1; }
117 Int_t numberOfMyTracks(){
return mMyTracks.GetLast()+1; }
118 Int_t numberOfMyTowers(){
return mMyTowers.GetLast()+1; }
119 Int_t numberOfMyPreshower1(){
return mMyPreshower1.GetLast()+1; }
120 Int_t numberOfMyPreshower2(){
return mMyPreshower2.GetLast()+1; }
121 Int_t numberOfMyPostshower(){
return mMyPostshower.GetLast()+1; }
129 void recluster(TVector3
vertex, Float_t threshold, thresholdCut cut = kTransverse);
131 void SetId(Int_t
id) {
if(
id == kEEmc ||
id == kBEmc ) mGammaId = id;
else mGammaId = kUnknown; }
132 void SetTowerId( Int_t
id ) {
mTowerId = id; }
140 void SetDetectorId( Int_t
id ) {
mDetector = id; }
142 void SetMomentum( TVector3 p ){
mMomentum=p; }
143 void SetPosition( TVector3 p ){
mPosition=p; }
144 void SetEnergy( Float_t e ){
mEnergy=e; }
152 void SetSmdEtaEnergy( Float_t e ){
mSmduEnergy=e; }
153 void SetSmdPhiEnergy( Float_t e ){
mSmdvEnergy=e; }
157 void addTower (
StGammaTower *tower ){ mTowers.Add( tower ); }
158 void addPreshower1(
StGammaTower *pre1 ){ mPreshower1.Add( pre1 ); }
159 void addPreshower2(
StGammaTower *pre2 ){ mPreshower2.Add( pre2 ); }
160 void addPostshower(
StGammaTower *post ){ mPostshower.Add( post ); }
161 void addSmdu(
StGammaStrip *strip ){ mSmdu.Add(strip); }
162 void addSmdv(
StGammaStrip *strip ){ mSmdv.Add(strip); }
163 void addSmdEta(
StGammaStrip *strip ){ mSmdu.Add(strip); }
164 void addSmdPhi(
StGammaStrip *strip ){ mSmdv.Add(strip); }
167 void addMyTrack (
StGammaTrack *track ){ mMyTracks.Add( track ); }
168 void addMyTower (
StGammaTower *tower ){ mMyTowers.Add( tower ); }
169 void addMyPreshower1(
StGammaTower *pre1 ){ mMyPreshower1.Add( pre1 ); }
170 void addMyPreshower2(
StGammaTower *pre2 ){ mMyPreshower2.Add( pre2 ); }
171 void addMyPostshower(
StGammaTower *post ){ mMyPostshower.Add( post ); }
204 TRefArray mPreshower1;
205 TRefArray mPreshower2;
206 TRefArray mPostshower;
212 TRefArray mMyPreshower1;
213 TRefArray mMyPreshower2;
214 TRefArray mMyPostshower;
221 typedef std::vector<StGammaCandidate> StGammaCandidateVec_t;
Float_t mPostEnergy
Energy deposited in epre2 (possibly tof?)
Float_t mSeedEnergy
Energy of the gamma candidate.
StGammaFitterResult mSmdFit[2]
Energy deposited in emsdv (or bsmd phi)
Int_t mTowerClusterId
Seed tower ID (Eemc=index, Bemc=softid)
Float_t mPre1Energy
Energy of the seed tower.
Int_t mSmduClusterId
Unique ID of tower cluster.
TVector3 mPosition
Momentum of the gamma candidate.
Float_t mSmduEnergy
Energy deposited in epost.
Float_t mSmdvEnergy
Energy deposited in esmdu (or bsmd eta)
Float_t mEnergy
Position of the gamma at z (r) = SMD.
UChar_t mDetector
Unique ID of ESMD V (BSMD Phi) cluster.
Int_t mSmdvClusterId
Unique ID of ESMD U (BSMD Eta) cluster.
A base class for representing clusters of EEMC smd strips.
Int_t mTowerId
Unique ID assigned to gamma candidate in event.
TVector3 mMomentum
0=EEMC 1=BEMC
A base class for describing clusters of EEMC towers.
Float_t mPre2Energy
Energy deposited in epre1 (or bprs)