Ensure vacuum inside the beam pipe for upgrade (Mario)
[u/mrichter/AliRoot.git] / JETAN / AliJetCalTrk.h
CommitLineData
d89b8229 1#ifndef ALIJETCALTRK_H
2#define ALIJETCALTRK_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * * * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9//------------------------------------------------------
10// CalTrk is used to sore Tracks and CaloCells information
11//
12// Author: alexandre.shabetai@cern.ch & magali.estienne@subatech.in2p3.fr
13//------------------------------------------------------
14
15#include <Riostream.h>
16#include <TObject.h>
17#include <TRef.h>
18#include <TClonesArray.h>
19
20#include "AliVParticle.h"
21#include "AliVTrack.h"
22
23class AliVCaloCells;
24
25class AliJetCalTrkTrack : public TObject
26{
27 public:
28 AliJetCalTrkTrack();
29 AliJetCalTrkTrack(AliVParticle* track, Bool_t CutFlag, Bool_t SignalFlag, Float_t PtCorr = 1.);
30 AliJetCalTrkTrack(AliVTrack* track, Bool_t CutFlag, Bool_t SignalFlag, Float_t PtCorr = 1.);
31 virtual ~AliJetCalTrkTrack() {;}
32
33 // Setter
34 void SetCutFlag(Bool_t cutFlag) {fCalTrkCutFlag = cutFlag;}
35 void SetSignalFlag(Bool_t signalFlag) {fCalTrkSignalFlag = signalFlag;}
36 void SetPtCorr(Float_t ptcorr) {fCalTrkPtCorr = ptcorr;}
37
38 // Getter
39 AliVParticle* GetParticle() const {return ((AliVParticle*)fCalTrkTrackRef.GetObject());}
40 AliVTrack* GetTrack() const {return ((AliVTrack*)fCalTrkTrackRef.GetObject());}
41 TRef GetTrackRef() const {return fCalTrkTrackRef;}
42 TObject* GetTrackObject() const {return fCalTrkTrackRef.GetObject();}
43 Bool_t GetCutFlag() const {return fCalTrkCutFlag;}
44 Bool_t GetSignalFlag() const {return fCalTrkSignalFlag;}
45 Float_t GetPtCorr() const {return fCalTrkPtCorr;}
46 Float_t GetEta() const {return GetParticle()->Eta();}
47 Float_t GetPhi() const {return GetParticle()->Phi();}
3aa5f547 48 virtual Float_t GetE() const {return GetParticle()->E();}
49 virtual Float_t GetPt() const {return GetParticle()->Pt();}
50 virtual Float_t GetPx() const {return GetParticle()->Px();}
51 virtual Float_t GetPy() const {return GetParticle()->Py();}
52 virtual Float_t GetPz() const {return GetParticle()->Pz();}
53 virtual Float_t GetP() const {return GetParticle()->P();}
d89b8229 54 Int_t GetID() const {return GetTrack()->GetID();}
55 Float_t GetM() const {return GetParticle()->M();}
3aa5f547 56 void Print(const Option_t* /*option*/) const;
d89b8229 57
58 virtual void Clear(Option_t* /*option = ""*/);
59
60 private:
61 AliJetCalTrkTrack(const AliJetCalTrkTrack& rCalTrk);
62 AliJetCalTrkTrack& operator = (const AliJetCalTrkTrack& rhs);
63
64 TRef fCalTrkTrackRef; //! Reference to a track
65 Bool_t fCalTrkCutFlag; // Cut flag of the track in the tpc
66 Bool_t fCalTrkSignalFlag; // Signal flag of the track
67 Float_t fCalTrkPtCorr; // Correction factor
68
69 ClassDef(AliJetCalTrkTrack,1) // Implementation of AliJetCalTrkTrack
70
71};
72
73//-------------------------------------------------------------
74class AliJetCalTrkTrackKine : public AliJetCalTrkTrack
75{
76 public:
77 AliJetCalTrkTrackKine();
78 AliJetCalTrkTrackKine(AliVParticle* track, Bool_t CutFlag, Bool_t SignalFlag, Float_t ptReso);
79 virtual ~AliJetCalTrkTrackKine() {;}
80
81 Float_t GetPtReso() const {return fCalTrkPtReso;}
3aa5f547 82 Float_t GetE() const {return fCalTrkTrackE;}
83 Float_t GetPt() const {return fCalTrkTrackPt;}
84 Float_t GetPx() const {return fCalTrkTrackPx;}
85 Float_t GetPy() const {return fCalTrkTrackPy;}
86 Float_t GetPz() const {return fCalTrkTrackPz;}
87 Float_t GetP() const {return fCalTrkTrackP;}
88 Float_t CalcPx() {fCalTrkTrackPx = GetPtReso()*GetParticle()->Px(); return fCalTrkTrackPx;}
89 Float_t CalcPy() {fCalTrkTrackPy = GetPtReso()*GetParticle()->Py(); return fCalTrkTrackPy;}
90 Float_t CalcPz() {fCalTrkTrackPz = GetPtReso()*GetParticle()->Pz(); return fCalTrkTrackPz;}
91 Float_t CalcP();
92 Float_t CalcPt();
93 Float_t CalcE();
d89b8229 94 void Clear(Option_t* option = "");
95
96 private:
97 Float_t fCalTrkPtReso; // Pt resolution rescaling (AliJetFillCalTrkTrackKine::FillKine())
98 Float_t fCalTrkTrackE; // Particle energy
99 Float_t fCalTrkTrackPt; // Particle Pt
100 Float_t fCalTrkTrackP; // Particle P
3aa5f547 101 Float_t fCalTrkTrackPx; // Particle Px
102 Float_t fCalTrkTrackPy; // Particle Py
103 Float_t fCalTrkTrackPz; // Particle Pz
d89b8229 104
105 ClassDef(AliJetCalTrkTrackKine,1) // Implementation of AliJetCalTrkTrackKine
106};
107
108//-------------------------------------------------------------
109class AliJetCalTrkEvent : public TObject
110{
111 public:
112 AliJetCalTrkEvent(); //default constructor
113 AliJetCalTrkEvent(Short_t opt,Bool_t kine,Bool_t kIsHighMult=kFALSE); // constructor 2
114 virtual ~AliJetCalTrkEvent();
115 AliJetCalTrkEvent(const AliJetCalTrkEvent& rCalTrkEvent);
116 AliJetCalTrkTrack* AddCalTrkTrack(AliVTrack* track, Bool_t cutFlag, Bool_t signalFlag, Float_t ptCorr = 1.);
117 AliJetCalTrkTrack* AddCalTrkTrack(AliVParticle* track, Bool_t cutFlag, Bool_t signalFlag, Float_t ptCorr = 1.);
118 AliJetCalTrkTrackKine* AddCalTrkTrackKine(AliVParticle* track, Bool_t cutFlag, Bool_t signalFlag, Float_t ptReso = 1.);
119
120 AliJetCalTrkTrack* GetCalTrkTrack(Int_t i);
121 Int_t GetNCalTrkTracks() const {return fNJetCalTrkTrack;}
122
123 void Clear(Option_t* option = "");
441afcb9 124 void Print(const Option_t* = "") const;
d89b8229 125
126 private:
127 AliJetCalTrkEvent& operator = (const AliJetCalTrkEvent& rhs);
128 TClonesArray* fJetCalTrkTrack; //! Array of Tracks
129 TClonesArray* fJetCalTrkCell; //! Array of Cells
130 Int_t fNJetCalTrkTrack; // Number of tracks
131
132 ClassDef(AliJetCalTrkEvent,1) // Implementation of AliJetCalTrkEvent
133
134};
135
136#endif
137