]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZERORawStream.h
Correcting the comments changed in the previous commit
[u/mrichter/AliRoot.git] / VZERO / AliVZERORawStream.h
index 9b15e479ea8d56ac28976cc41e07ead0dc9e59d8..e8135e90efe8b99c0ae507bf3a43f302f58380c0 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <TObject.h>
+#include <TMath.h>
 
 class AliRawReader;
+class AliVZEROTriggerData;
 
 class AliVZERORawStream: public TObject {
   public :
@@ -50,9 +52,11 @@ class AliVZERORawStream: public TObject {
        
 // Getters of ADC signals, ADC pedestals, time information and corresponding flags :
 
-    UShort_t          GetADC(Int_t channel) const
-      { return fADC[channel][kNEvOfInt/2]; }
-    UShort_t          GetPedestal(Int_t channel, Int_t event) const
+    Short_t           GetADC(Int_t channel) const
+      { return TMath::MaxElement(kNEvOfInt, fADC[channel]); }    // maximum value instead of central clock
+//    { return fADC[channel][kNEvOfInt/2]; }
+            
+    Short_t           GetPedestal(Int_t channel, Int_t event) const
       { return fADC[channel][event]; }
     Bool_t            GetIntegratorFlag(Int_t channel, Int_t event) const
       { return fIsInt[channel][event]; }
@@ -60,11 +64,23 @@ class AliVZERORawStream: public TObject {
       { return fIsBB[channel][event]; } 
     Bool_t            GetBGFlag(Int_t channel, Int_t event) const
       { return fIsBG[channel][event]; }   
-    UInt_t            GetTime(Int_t channel) const
+    Short_t           GetTime(Int_t channel) const
       { return fTime[channel]; }
-    UInt_t            GetWidth(Int_t channel) const
+    Short_t           GetWidth(Int_t channel) const
       { return fWidth[channel]; }
 
+    UShort_t          GetTriggerInputs() const
+      { return fTrigger; }
+    UShort_t          GetTriggerInputsMask() const
+      { return fTriggerMask; }
+
+    void              CalculateChargeForCentrTriggers(AliVZEROTriggerData *triggerData,
+                                                     UShort_t &chargeA, UShort_t &chargeC) const;
+    void              CalculateBBandBGFlags(AliVZEROTriggerData *triggerData,
+                                           UChar_t &nBBA, UChar_t &nBBC,
+                                           UChar_t &nBGA, UChar_t &nBGC) const;
+    void              FillTriggerBits(AliVZEROTriggerData *triggerData);
+
 // Getter of Offline Channel number as used in aliroot (defined by aliroot 
 // numbering convention) from FEE channel (electronic channel number given 
 // by the V0 electronics readout) - See comment above - 
@@ -108,12 +124,12 @@ class AliVZERORawStream: public TObject {
     Bool_t        fIsBBMB[kNChannels][kNBunches];   // 'Beam-Beam' flag for all channels for the previous 10 MB events
     Bool_t        fIsBGMB[kNChannels][kNBunches];   // 'Beam-Gas' for all channels for the previous 10 MB events
 
-    UShort_t      fADC[kNChannels][kNEvOfInt];   // ADC counts for all channels and all events of interest
+    Short_t       fADC[kNChannels][kNEvOfInt];   // ADC counts for all channels and all events of interest
     Bool_t        fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels 
     Bool_t        fIsBB[kNChannels][kNEvOfInt];  // 'Beam-Beam' flag for all channels
     Bool_t        fIsBG[kNChannels][kNEvOfInt];  // 'Beam-Gas' flag for all channels
-    Int_t         fTime[kNChannels];             // leading time for all channels - from HPTDC
-    Int_t         fWidth[kNChannels];            // pulse width for all channels - from HPTDC
+    Short_t       fTime[kNChannels];             // leading time for all channels - from HPTDC - in HPTDC units
+    Short_t       fWidth[kNChannels];            // pulse width for all channels - from HPTDC - in HPTDC units
 
     UShort_t      fTrigger;        // VZERO trigger inputs
     UShort_t      fTriggerMask;    // VZERO trigger inputs mask