]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/AliJet.h
Reconstruction QA by Sylwester
[u/mrichter/AliRoot.git] / RALICE / AliJet.h
CommitLineData
d88f97cc 1#ifndef ALIJET_H
2#define ALIJET_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
f531a546 6// $Id$
d88f97cc 7
d88f97cc 8#include <math.h>
9
387a745b 10#include "TNamed.h"
d88f97cc 11#include "TObjArray.h"
12
13#include "Ali4Vector.h"
14#include "AliTrack.h"
15
387a745b 16class AliJet : public TNamed,public Ali4Vector
d88f97cc 17{
18 public:
1c01b4f8 19 AliJet(); // Default constructor
20 AliJet(Int_t n); // Create a Jet to hold initially n Tracks
21 virtual ~AliJet(); // Default destructor
261c0caf 22 AliJet(const AliJet& j); // Copy constructor
23 virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
1c01b4f8 24 virtual void SetOwner(Bool_t own=kTRUE); // Set ownership of all added objects
25 virtual void Reset(); // Reset all values
26 void AddTrack(AliTrack& t); // Add a track to the jet
1fbffa23 27 void AddTrack(AliTrack* t) { AddTrack(*t); }
1f241680 28 virtual void Data(TString f="car",TString u="rad"); // Print jet information in frame f and ang units u
29 virtual void List(TString f="car",TString u="rad"); // Jet prim. track info for frame f and ang units u
30 virtual void ListAll(TString f="car",TString u="rad");// Jet prim. and decay track info for frame f and ang units u
25eefd00 31 Double_t GetEnergy(Float_t scale=-1); // Provide the total jet energy
32 Double_t GetMomentum(Float_t scale=-1); // Provide the value of the total jet 3-momentum
33 Ali3Vector Get3Momentum(Float_t scale=-1) const; // Provide the total jet 3-momentum
34 Double_t GetInvmass(Float_t scale=-1); // Provide the invariant mass
261c0caf 35 Float_t GetCharge() const; // Provide the total charge of the jet
325b076c 36 Int_t GetNtracks(Int_t idmode=0,Int_t chmode=2,Int_t pcode=0); // Provide the number of selected tracks in the jet
261c0caf 37 AliTrack* GetTrack(Int_t i) const; // Provide i-th track of the jet (1=first track)
38 AliTrack* GetIdTrack(Int_t id) const; // Provide the track with user identifier "id"
ea0b5b7f 39 TObjArray* GetTracks(Int_t idmode=0,Int_t chmode=2,Int_t pcode=0); // Provide references to selected tracks
50e93041 40 TObjArray* GetTracks(TString name); // Provide references to all tracks with a certain name
30672a96 41 void RemoveTracks(Int_t idmode=0,Int_t chmode=2,Int_t pcode=0); // Remove selected tracks
42 void RemoveTracks(TString name); // Remove all tracks with a certain name
325b076c 43 void ShowTracks(Int_t mode=1); // Provide on overview of the available tracks
25eefd00 44 Double_t GetPt(Float_t scale=-1); // Provide trans. momentum w.r.t. z-axis
45 Double_t GetPl(Float_t scale=-1); // Provide long. momentum w.r.t. z-axis
46 Double_t GetEt(Float_t scale=-1); // Provide trans. energy w.r.t. z-axis
47 Double_t GetEl(Float_t scale=-1); // Provide long. energy w.r.t. z-axis
48 Double_t GetMt(Float_t scale=-1); // Provide trans. mass w.r.t. z-axis
1c01b4f8 49 Double_t GetRapidity(); // Provide rapidity value w.r.t. z-axis
50 void SetTrackCopy(Int_t j); // (De)activate creation of private copies in fTracks
261c0caf 51 Int_t GetTrackCopy() const; // Provide TrackCopy flag value
1c01b4f8 52 void SetId(Int_t id); // Set the user defined identifier
261c0caf 53 Int_t GetId() const; // Provide the user defined identifier
413d0114 54 void SetReferencePoint(AliPosition& p); // Set the jet reference-point
55 AliPosition* GetReferencePoint(); // Provide the jet reference-point
e51b7d1a 56 TObjArray* SortTracks(Int_t mode=-1,TObjArray* tracks=0); // Sort tracks by a certain observable
25eefd00 57 Double_t GetDistance(AliPosition* p,Float_t scale=-1); // Provide distance to position p
58 Double_t GetDistance(AliPosition& p,Float_t scale=-1) { return GetDistance(&p,scale); }
59 Double_t GetDistance(AliTrack* t,Float_t scale=-1); // Provide distance to track t
60 Double_t GetDistance(AliTrack& t,Float_t scale=-1) { return GetDistance(&t,scale); }
61 Double_t GetDistance(AliJet* j,Float_t scale=-1); // Provide distance to jet j
62 Double_t GetDistance(AliJet& j,Float_t scale=-1) { return GetDistance(&j,scale); }
63 Int_t GetNsignals() const; // Provide the number of signals associated to the jet tracks
64 void SetEscale(Float_t scale); // Set the scale of the energy/momentum units of the jet
65 Float_t GetEscale() const; // Provide the scale of the energy/momentum units of the jet
d88f97cc 66
67 protected:
1fbffa23 68 void Init(); // Initialisation of pointers etc...
69 void SetNtinit(Int_t n=2); // Set the initial max. number of tracks for this Jet
70 void AddTrack(AliTrack& t,Int_t copy); // Internal memberfunction to add a track to the jet
71 void AddTrack(AliTrack* t,Int_t copy) { AddTrack(*t,copy); }
72 Int_t fNtinit; // The initial max. number of tracks for this jet
73 Int_t fNtmax; // The maximum number of tracks for this Jet
74 Float_t fQ; // The total charge of the jet
75 Int_t fNtrk; // The number of tracks in the jet
76 TObjArray* fTracks; // Array to hold the pointers to the tracks of the jet
77 Int_t fTrackCopy; // Flag to denote creation of private copies in fTracks
78 Int_t fUserId; // The user defined identifier
413d0114 79 AliPositionObj* fRef; // The reference-point of the jet
4962c850 80 TObjArray* fSelected; //! Temp. array to hold user selected or ordered objects
25eefd00 81 Float_t fEscale; // The scale of the energy/momentum units of the jet
d88f97cc 82
25eefd00 83 ClassDef(AliJet,19) // Creation and investigation of a jet of particle tracks.
d88f97cc 84};
85#endif