X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITShit.h;h=c3b0ae0c511d8996ad60ede09e1476615b9451fb;hb=dac7ea84b8434845364d38b0dea7ad3df3a5787a;hp=5f887304bea2cdf514adec9f81b2489b7d964fcd;hpb=3da306186bdfe9b8dedf54c4b9cdcf2bff5b132c;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITShit.h b/ITS/AliITShit.h index 5f887304bea..c3b0ae0c511 100644 --- a/ITS/AliITShit.h +++ b/ITS/AliITShit.h @@ -1,15 +1,15 @@ -#ifndef ITSHIT_H -#define ITSHIT_H +#ifndef ALIITSHIT_H +#define ALIITSHIT_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ -#include "AliDetector.h" #include "AliHit.h" -#include "AliDigit.h" -#include "AliITSgeom.h" +#include +#include +class TParticle; class AliITShit : public AliHit { //////////////////////////////////////////////////////////////////////// @@ -90,73 +90,6 @@ class AliITShit : public AliHit { // are those determined by the Monte Carlo. // // -// Member functions: -// -// AliITShit() -// The default creator of the AliITShit class. -// -// AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) -// The creator of the AliITShit class. The variables shunt and -// track are passed to the creator of the AliHit class. See the AliHit -// class for a full description. the integer array *vol contains, in order, -// fLayer = vol[0], fDet = vol[1], fLadder = vol[2], fStatus = vol[3]. -// The array *hits contains, in order, fX = hits[0], fY = hits[1], -// fZ = hits[2], fPx = hits[3], fPy = hits[4], fPz = hits[5], -// fDestep = hits[6], and fTof = hits[7]. -// -// ~AliITShit() -// The default destructor of the AliITShit class. -// -// int GetTrack() -// See AliHit for a full description. Returns the track number fTrack -// for this hit. -// -// SetTrack(int track) -// See AliHit for a full description. Sets the track number fTrack -// for this hit. -// -// Int_t GetTrackStatus() -// Returns the value of the track status flag fStatus. This flag -// indicates the track status at the time of creating this hit. It is -// made up of the following 8 status bits from highest order to lowest -// order bits -// 0 : IsTrackAlive(): IsTrackStop():IsTrackDisappeared(): -// IsTrackOut():IsTrackExiting():IsTrackEntering():IsTrackInside() . -// See AliMC for a description of these functions. If the function is -// true then the bit is set to one, otherwise it is zero. -// -// Int_t GetLayer() -// Returns the layer number, fLayer, for this hit. -// -// Int_t GetLadder() -// Returns the ladder number, fLadder, for this hit. -// -// Int_t GetDetector() -// Returns the detector number, fDet, for this hit. -// -// GetDetectorID(Int_t &layer, Int_t &ladder, Int_t &detector) -// Returns the layer, ladder, and detector numbers, fLayer fLadder fDet, -// in one call. -// -// Float_t GetIonization() -// Returns the energy lost, fDestep, by the particle creating this hit, -// in the units defined by the Monte Carlo. -// -// GetPoositionG(Float_t &x, Float_t &y, Float_t &z) -// Returns the global position, fX fY fZ, of this hit, in the units -// define by the Monte Carlo. -// -// Float_t GetTOF() -// Returns the time of flight, fTof, of this hit, in the units defined -// by the Monte Carlo. -// -// GetPositionG(Float_t &x, Float_t &y, Float_t &z, Float_t &tof) -// Returns the global position and time of flight, fX fY fZ fTof, of -// this hit, in the units define by the Monte Carlo. -// -// GetPositioonP(Float_t &px, Float_t &py, Float_t &pz) -// Returns the global momentum, fPx fPy fPz, of the particle that made -// this hit, in the units define by the Monte Carlo. //////////////////////////////////////////////////////////////////////// // public; // defined in AliHit // Int_t fTrack // defined in AliHit @@ -165,7 +98,129 @@ class AliITShit : public AliHit { // Float_t fZ; // defined in AliHit public: -//private: + AliITShit();// Default consrtructor + // Old Standard Constructor + AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits); + // New Standard Constructor + AliITShit(Int_t shunt,Int_t track,Int_t *vol,Float_t edep,Float_t tof, + TLorentzVector &x,TLorentzVector &x0,TLorentzVector &p); + // Default destructor + virtual ~AliITShit() {} + // Get Hit information functions. + // virtual int GetTrack() const {return fTrack;} // define in AliHit + // virtual void SetTrack(int track) const {fTrack=track;) // AliHit + virtual Int_t GetTrackStatus() const {//returns the status code + return fStatus;} + virtual Int_t GetTrackStatus0() const {//returns the status code + return fStatus0;} + virtual Int_t GetLayer() const {// returns the layer number + return fLayer;} + virtual Int_t GetLadder() const {// returns the ladder number + return fLadder;} + virtual Int_t GetDetector() const {// returns the detector number + return fDet;} + virtual void GetDetectorID(Int_t &layer,Int_t &ladder,Int_t &det)const { + // returns the detector ID + layer=fLayer;ladder=fLadder;det=fDet;return;}; + virtual Int_t GetModule(); + virtual Float_t GetIonization() const {// returns the Destep + return fDestep;} + // + virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z)const { + // returns the position in the Global frame + x=fX;y=fY;z=fZ;return;}; + virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z)const { + // returns the position in the Global frame + x=fX;y=fY;z=fZ;return;}; + virtual Float_t GetTOF() const {// returns the time of flight + return fTof;} + // Returns particle 3 position at this hit in global coordinates. + virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z,Float_t &tof) + const {// returns the position in the Global frame and the time of + // flight + x=fX;y=fY;z=fZ,tof=fTof;return;}; + virtual void GetPositionG(Double_t &x,Double_t &y,Double_t &z,Double_t &t) + const {// Returns particle 3 position and the time of flight at this + // hit in global coordinates. + x=fX;y=fY;z=fZ,t=fTof;return;}; + virtual Float_t GetXG()const {// Returns particle X position at this hit + // in global coordinates. + return fX;} + virtual Float_t GetYG()const {// Returns particle X position at this hit + // in global coordinates. + return fY;} + virtual Float_t GetZG()const {// Returns particle Z position at this hit + // in global coordinates. + return fZ;} + // Returns particle 3 position at this hit in global coordinates. + virtual void GetPositionG0(Float_t &x,Float_t &y,Float_t &z,Float_t &tof) + const {// returns the initial position in the Global frame and the + // time of flight + x=fx0;y=fy0;z=fz0,tof=fTof;return;}; + virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z); + // Returns particle 3 position at this hit in local coordinates. + virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof); + virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z){ + // Returns particle 3 position at this hit in local coordinates. + Float_t xf,yf,zf;GetPositionL(xf,yf,zf);x=xf,y=yf;z=zf;} + virtual void GetPositionL(Double_t &x,Double_t &y,Double_t &z,Double_t &t){ + // Returns particle 3 position and the time of flight at this hit + // in local coordinates. + Float_t xf,yf,zf,tf;GetPositionL(xf,yf,zf,tf);x=xf,y=yf;z=zf;t=tf;} + virtual Float_t GetXL(); + // Returns particle X position at this hit in local coordinates. + virtual Float_t GetYL(); + // Returns particle Y position at this hit in local coordinates. + virtual Float_t GetZL(); + // Returns particle Z position at this hit in local coordinates. + // Get Monti Carlo information about hit. + virtual void GetMomentumG(Float_t &px,Float_t &py,Float_t &pz)const { + // returns the particle momentum in the Global frame + px=fPx;py=fPy;pz=fPz;return;}; + virtual void GetMomentumG(Double_t &px,Double_t &py,Double_t &pz)const { + // returns the particle momentum in the Global frame + px=fPx;py=fPy;pz=fPz;return;}; + virtual Float_t GetPXG()const {// Returns particle X momentum at this hit + // in global coordinates. + return fPx;} + virtual Float_t GetPYG()const {// Returns particle Y momentum at + // this hit in global coordinates. + return fPy;} + virtual Float_t GetPZG()const {// Returns particle Z momentum at + // this hit in global coordinates. + return fPz;} + virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz); + virtual void GetMomentumL(Double_t &px,Double_t &py,Double_t &pz){ + // Returns particle 3 momentum at this hit in local coordinates. + Float_t x,y,z;GetMomentumL(x,y,z);px=x,py=y,pz=z;} + + virtual Float_t GetPXL(); + // Returns particle X momentum at this hit in local coordinates. + virtual Float_t GetPYL(); + // Returns particle Y momentum at this hit in local coordinates. + virtual Float_t GetPZL(); + // Returns particle Z momentum at this hit in local coordinates. + virtual TParticle * GetParticle(); // Returns pointer to this particle. + Bool_t StatusInside() {// checks if the particle is "inside" + if((fStatus&0x0001)==0) return kFALSE;else return kTRUE;} + Bool_t StatusEntering() {// checks if the particle is "entering" + if((fStatus&0x0002)==0) return kFALSE;else return kTRUE;} + Bool_t StatusExiting() {// checks if the particle is "exiting" + if((fStatus&0x0004)==0) return kFALSE;else return kTRUE;} + Bool_t StatusOut() {// checks if the particle is "out" + if((fStatus&0x0008)==0) return kFALSE;else return kTRUE;} + Bool_t StatusDisappeared() {// checks if the particle is "disappeared" + if((fStatus&0x00010)==0) return kFALSE;else return kTRUE;} + Bool_t StatusStop() {// checks if the particle is "stopped" + if((fStatus&0x00020)==0) return kFALSE;else return kTRUE;} + Bool_t StatusAlive() {// checks if the particle is "alive" + if((fStatus&0x00030)==0) return kFALSE;else return kTRUE;} + // Prints out the content of this class in ASCII format. + void Print(ostream *os); + // Reads in the content of this class in the format of Print + void Read(istream *is); + + protected: Int_t fStatus; // Track Status Int_t fLayer; // Layer number Int_t fLadder; // Ladder number @@ -175,43 +230,17 @@ class AliITShit : public AliHit { Float_t fPz; // PZ of particle at the point of the hit Float_t fDestep; // Energy deposited in the current step Float_t fTof; // Time of flight at the point of the hit + Int_t fStatus0;// Track Status of Starting point + Float_t fx0; // Starting point of this step + Float_t fy0; // Starting point of this step + Float_t fz0; // Starting point of this step + Float_t ft0; // Starting point of this step - public: - AliITShit() {} - AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits); - virtual ~AliITShit() {} - // Get Hit information functions. - // inline virtual int GetTrack(){return fTrack;} // define in AliHit - // inline virtual void SetTrack(int track){fTrack=track;) // AliHit - inline virtual Int_t GetTrackStatus() {return fStatus;} - inline virtual Int_t GetLayer() {return fLayer;} - inline virtual Int_t GetLadder() {return fLadder;} - inline virtual Int_t GetDetector() {return fDet;} - inline virtual void GetDetectorID(Int_t &layer,Int_t &ladder, - Int_t &detector) - {layer=fLayer;ladder=fLadder;detector=fDet;return;}; - inline virtual Float_t GetIonization() {return fDestep;} - // - inline virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z) - {x=fX;y=fY;z=fZ;return;}; - inline virtual Float_t GetTOF() {return fTof;} - inline virtual void GetPositionG(Float_t &x,Float_t &y,Float_t &z, - Float_t &tof) - {x=fX;y=fY;z=fZ,tof=fTof;return;}; - inline virtual Float_t GetXG(){return fX;} - inline virtual Float_t GetYG(){return fY;} - inline virtual Float_t GetZG(){return fZ;} - virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z); - virtual void GetPositionL(Float_t &x,Float_t &y,Float_t &z, - Float_t &tof); - virtual Float_t GetXL(); - virtual Float_t GetYL(); - virtual Float_t GetZL(); - // Get Monti Carlo information about hit. - inline virtual void GetMomentumG(Float_t &px,Float_t &py,Float_t &pz) - {px=fPx;py=fPy;pz=fPz;return;}; - virtual void GetMomentumL(Float_t &px,Float_t &py,Float_t &pz); - ClassDef(AliITShit,1) //Hits object for set:ITS -}; + ClassDef(AliITShit,2) //Hits object for set:ITS + +}; +// Input and output function for standard C++ input/output. +ostream& operator<<(ostream &os,AliITShit &source); +istream& operator>>(istream &os,AliITShit &source); #endif