]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITShit.h
Initialize arrays in constructor (Ivana)
[u/mrichter/AliRoot.git] / ITS / AliITShit.h
index c6cda546ec1aed4cd778d2ff65bd5708f12a5f2a..ffb716abd169eb27c2beb2a8456cd074fe880871 100644 (file)
@@ -5,13 +5,6 @@
 
 /* $Id$ */
 
-#include "AliHit.h" 
-
-class ostream;
-class istream;
-class TParticle;
-
-class AliITShit : public AliHit {
 ////////////////////////////////////////////////////////////////////////
 // Version: 0
 // Written by Rene Brun, Federico Carminati, and Roberto Barbera
@@ -91,21 +84,30 @@ class AliITShit : public AliHit {
 //
 //
 ////////////////////////////////////////////////////////////////////////
-    // public;       // defined in AliHit
-    // Int_t fTrack  // defined in AliHit
-    // Float_t fX;   // defined in AliHit
-    // Float_t fY;   // defined in AliHit
-    // Float_t fZ;   // defined in AliHit
+
+#include "AliHit.h" 
+
+class TLorentzVector;
+class TParticle;
+
+class AliITShit : public AliHit {
 
  public:
-    AliITShit() {}// Default consrtructor
+    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
@@ -145,6 +147,17 @@ class AliITShit : public AliHit {
     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;};
+    // Returns particle 3 position at this hit in global coordinates.
+    virtual void GetPositionG0(Double_t &x,Double_t &y,Double_t &z,
+                              Double_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);
@@ -155,6 +168,9 @@ class AliITShit : public AliHit {
     // 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;}
+    // Returns particle 3 initial position and the time of flight at this hit
+    // in local coordinates.
+    virtual void GetPositionL0(Double_t &x,Double_t &y,Double_t &z,Double_t &t);
     virtual Float_t GetXL();
     // Returns particle X position at this hit in local coordinates.
     virtual Float_t GetYL();
@@ -188,23 +204,23 @@ class AliITShit : public AliHit {
     // 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"
+    virtual TParticle * GetParticle() const; // Returns ptr to this particle.
+    Bool_t StatusInside() const {// checks if the particle is "inside"
        if((fStatus&0x0001)==0) return kFALSE;else return kTRUE;}
-    Bool_t StatusEntering() {// checks if the particle is "entering"
+    Bool_t StatusEntering() const {// checks if the particle is "entering"
        if((fStatus&0x0002)==0) return kFALSE;else return kTRUE;}
-    Bool_t StatusExiting() {// checks if the particle is "exiting"
+    Bool_t StatusExiting() const {// checks if the particle is "exiting"
        if((fStatus&0x0004)==0) return kFALSE;else return kTRUE;}
-    Bool_t StatusOut() {// checks if the particle is "out"
+    Bool_t StatusOut() const {// checks if the particle is "out"
        if((fStatus&0x0008)==0) return kFALSE;else return kTRUE;}
-    Bool_t StatusDisappeared() {// checks if the particle is "disappeared"
+    Bool_t StatusDisappeared() const {// checks if the part. is "disappeared"
        if((fStatus&0x00010)==0) return kFALSE;else return kTRUE;}
-    Bool_t StatusStop() {// checks if the particle is "stopped"
+    Bool_t StatusStop() const {// checks if the particle is "stopped"
        if((fStatus&0x00020)==0) return kFALSE;else return kTRUE;}
-    Bool_t StatusAlive() {// checks if the particle is "alive"
+    Bool_t StatusAlive() const {// 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); 
+    void Print(ostream *os) const
     // Reads in the content of this class in the format of Print
     void Read(istream *is);
 
@@ -218,8 +234,13 @@ 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
 
-    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.