]>
Commit | Line | Data |
---|---|---|
d11dc2a6 | 1 | #ifndef ALIEMCALPARTICLE_H |
2 | #define ALIEMCALPARTICLE_H | |
3 | ||
4 | // $Id$ | |
5 | ||
6 | #include <TLorentzVector.h> | |
7 | #include <TObject.h> | |
8 | ||
9 | #include "AliVTrack.h" | |
10 | ||
11 | class AliVCluster; | |
12 | ||
13 | class AliEmcalParticle: public TObject { | |
14 | public: | |
15 | AliEmcalParticle(); | |
16 | AliEmcalParticle(TObject *particle, Int_t id = -1); | |
17 | ~AliEmcalParticle(); | |
18 | AliEmcalParticle(const AliEmcalParticle &p); | |
19 | AliEmcalParticle &operator=(const AliEmcalParticle &p); | |
20 | ||
21 | Short_t Charge() const { if (fTrack) return fTrack->Charge(); else return 0 ; } | |
22 | Double_t GetTrackPhiOnEMCal() const { if (fTrack) return fTrack->GetTrackPhiOnEMCal(); else return -999; } | |
23 | Double_t GetTrackEtaOnEMCal() const { if (fTrack) return fTrack->GetTrackEtaOnEMCal(); else return -999; } | |
24 | Bool_t IsEMCAL() const { if (fCluster) return kTRUE; | |
25 | if (fTrack) return fTrack->IsEMCAL(); | |
26 | return kFALSE; } | |
27 | AliVCluster* GetCluster() const { return fCluster ; } | |
28 | AliVTrack* GetTrack() const { return fTrack ; } | |
29 | Bool_t IsCluster() const { return (Bool_t) fCluster != 0 ; } | |
30 | Bool_t IsTrack() const { return (Bool_t) fTrack != 0 ; } | |
31 | Int_t IdInCollection() const { return fId ; } | |
32 | Double_t M() const { return 0.13957 ; } | |
33 | ||
34 | Int_t GetMatchedObjId(UShort_t i = 0) const { return fNMatched > i ? fMatchedIds[i] : -1 ; } | |
35 | Double_t GetMatchedObjDistance(UShort_t i = 0) const { return fNMatched > i ? fMatchedDist[i] : -1 ; } | |
36 | UShort_t GetNumberOfMatchedObj() const { return fNMatched ; } | |
37 | ||
38 | TLorentzVector &GetLorentzVector(const Double_t *vertex = 0) const; | |
39 | ||
40 | void AddMatchedObj(Int_t id, Double_t d); | |
41 | void ResetMatchedObjects(); | |
42 | void SetIdInCollection(Int_t id) { fId = id ; } | |
43 | void SetMatchedObj(Int_t id, Double_t d) { ResetMatchedObjects(); fMatchedIds[0] = id; fMatchedDist[0] = d; fNMatched = 1; } | |
44 | ||
45 | protected: | |
46 | static const UShort_t fSizeMatched = 10; //!size of matched clusters array | |
47 | ||
48 | AliVTrack *fTrack; //!track | |
49 | AliVCluster *fCluster; //!cluster | |
50 | UShort_t fMatchedIds[fSizeMatched]; //!ids of matched clusters, ordered from the closest to the farthest | |
51 | Double_t fMatchedDist[fSizeMatched]; //!distances of matched clusters | |
52 | UShort_t fNMatched; //!number of matched objects | |
53 | Int_t fId; //!id in collection | |
54 | ||
55 | ClassDef(AliEmcalParticle, 1) // Emcal particle class | |
56 | }; | |
57 | #endif |