]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDhit.h
Add a protection againts runs with missing DCS information in the OCDB
[u/mrichter/AliRoot.git] / TRD / AliTRDhit.h
index 46749f066a3751c8c77d93c907fa23cd9900aa32..148bb6fa1906f3e00b80b2698b517cf9aca1bd9f 100644 (file)
@@ -3,49 +3,57 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id: AliTRDhit.h,v */
+/* $Id$ */
 
-////////////////////////////////////////////////
-//  Hit class for the TRD                     //
-////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+//                                                                        //
+//  Hit class for the TRD                                                 //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
 
 #include "AliHit.h"
 
-//_____________________________________________________________________________
 class AliTRDhit : public AliHit {
 
  public:
 
   AliTRDhit();
-  AliTRDhit(Int_t shunt, Int_t track, Int_t det, Float_t *hits, Int_t q);
+  AliTRDhit(Int_t shunt, Int_t track, Int_t det, const Float_t * const hits, Int_t q, Float_t time);
   virtual ~AliTRDhit();
 
-          Int_t  GetDetector() const         { return fDetector; };
-          Int_t  GetCharge() const           { return fQ;        };
-
-          Bool_t FromDrift() const           { return TestBit(kDrift);         };
-          Bool_t FromAmplification() const   { return TestBit(kAmplification); };
-          Bool_t FromTRphoton() const        { return TestBit(kTRphoton);      };
-          Bool_t FromTest() const            { return TestBit(kTest);          };
-
-          void   SetDrift()                  { SetBit(kDrift);         };
-          void   SetAmplification()          { SetBit(kAmplification); };
-          void   SetTRphoton()               { SetBit(kTRphoton);      };
-          void   SetTest()                   { SetBit(kTest);          }; 
+          Int_t    GetDetector() const         { return fDetector; }
+          Int_t    GetCharge() const           { return fQ;        }
+          Float_t  GetTime() const             { return fTime;     }
+
+          void     SetX(Float_t x)             { fX        =   x;  }
+          void     SetY(Float_t y)             { fY        =   y;  }
+          void     SetZ(Float_t z)             { fZ        =   z;  }
+          void     SetDetector(Int_t det)      { fDetector = det;  }
+          void     SetQ(Int_t q)               { fQ        =   q;  }
+          void     SetTime(Float_t time)       { fTime     = time; }
+
+          Bool_t   FromDrift() const           { return TestBit(kDrift);         }
+          Bool_t   FromAmplification() const   { return TestBit(kAmplification); }
+          Bool_t   FromTRphoton() const        { return (fQ < 0);                }
+         
+          void     SetDrift()                  { SetBit(kDrift);                 }
+          void     SetAmplification()          { SetBit(kAmplification);         }
+          void     SetTRphoton()               { SetBit(kTRphoton);              }
 
  protected:
 
-  enum {
-    kDrift         = 0x00000001,    // Hit is from the drift region
-    kAmplification = 0x00000002,    // Hit is from the amplification region
-    kTRphoton      = 0x00000004,    // Hit is from a TR photon
-    kTest          = 0x00000008     // Hit is a special test hit
-  };
+          enum {
+              kDrift         = 0x00000001   //  Hit is from the drift region
+            , kAmplification = 0x00000002   //  Hit is from the amplification region
+            , kTRphoton      = 0x00000004   //  Hit is from a TR photon
+            , kTest          = 0x00000008   //  Hit is a special test hit
+          };
 
-  UShort_t     fDetector;           // TRD detector number
-  Short_t      fQ;                  // Charge created by a hit. TR signals are negative.
+          UShort_t fDetector;               //  TRD detector number
+          Short_t  fQ;                      //  Charge created by a hit. TR signals are negative.
+          Float_t  fTime;                   //  Absolute time of hit [mus]. Needed for pile-up events
 
-  ClassDef(AliTRDhit,3)             // Hit for the Transition Radiation Detector
+  ClassDef(AliTRDhit,4)                     //  Hit for the Transition Radiation Detector
 
 };