]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding conv viols fixed (Raphael)
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 Mar 2010 15:27:27 +0000 (15:27 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 Mar 2010 15:27:27 +0000 (15:27 +0000)
VZERO/AliVZEROTriggerMask.cxx
VZERO/AliVZEROTriggerMask.h

index 0e9452341b13eb7b791245e838cf5de490959385..c4c9d49a100d588d8f601dec144470409760c538 100644 (file)
  **************************************************************************/
 
 /* $Id$ */
+//-------------------------------------------
+// Class : AliVZEROTriggerMask
+//
+// Fill up the trigger mask word.
+//
+
 #include <Riostream.h>
 #include <TGeoManager.h>
 #include <TGeoMatrix.h>
 #include <TGeoPhysicalNode.h>
+#include <TTree.h>
+#include <TClonesArray.h>
+
 #include <AliGeomManager.h>
 #include "AliCDBManager.h"
 #include "AliCDBStorage.h"
@@ -76,16 +85,18 @@ Double_t AliVZEROTriggerMask::GetZPosition(const char* symname){
 
 
 void AliVZEROTriggerMask::FillMasks(TTree* vzeroDigitsTree,
-                               TClonesArray* vzeroDigits)
+                               TClonesArray* const vzeroDigits)
 {
-  const Double_t LightSpeed = 2.9979245800; // cm/100 ps
-  Float_t Z_V0A = TMath::Abs(GetZPosition("VZERO/V0A"));
-  Float_t Z_V0C = TMath::Abs(GetZPosition("VZERO/V0C"));
+// Fill up the trigger mask word using the TDC 
+
+  const Double_t lightSpeed = 2.9979245800; // cm/100 ps
+  Float_t zV0A = TMath::Abs(GetZPosition("VZERO/V0A"));
+  Float_t zV0C = TMath::Abs(GetZPosition("VZERO/V0C"));
 
   // distance in time units from nominal vertex to V0
-  Float_t v0a_dist = Z_V0A/LightSpeed; // 100 of picoseconds
-  Float_t v0c_dist = Z_V0C/LightSpeed; // 100 of picoseconds
-  Float_t bunch_separation = 1000.0; // 100 of picoseconds
+  Float_t v0aDist = zV0A/lightSpeed; // 100 of picoseconds
+  Float_t v0cDist = zV0C/lightSpeed; // 100 of picoseconds
+  Float_t bunchSeparation = 1000.0; // 100 of picoseconds
 
   // mask
   UInt_t one=1;
@@ -101,26 +112,26 @@ void AliVZEROTriggerMask::FillMasks(TTree* vzeroDigitsTree,
       //      vzeroDigitsTree->GetEvent(d);
       AliVZEROdigit* digit = (AliVZEROdigit*)vzeroDigits->At(d);
       
-      Int_t   PMNumber   = digit->PMNumber();
+      Int_t   pmNumber   = digit->PMNumber();
       Float_t adc        = digit->ADC();
       Float_t tdc        = digit->Time()*10.0; // in 100 of picoseconds
 
       if (adc>fAdcThresHold) {
-       if (PMNumber<32) { // in V0C
-         if (tdc>(v0c_dist-fTimeWindowWidthBBC/2.0) &&
-             tdc<(v0c_dist+fTimeWindowWidthBBC/2.0))
-           fBBtriggerV0C+=(one<<PMNumber);
-         if (tdc>(bunch_separation-v0c_dist-fTimeWindowWidthBGC/2.0) &&
-             tdc<(bunch_separation-v0c_dist+fTimeWindowWidthBGC/2.0))
-          fBGtriggerV0C+=(one<<PMNumber); 
+       if (pmNumber<32) { // in V0C
+         if (tdc>(v0cDist-fTimeWindowWidthBBC/2.0) &&
+             tdc<(v0cDist+fTimeWindowWidthBBC/2.0))
+           fBBtriggerV0C+=(one<<pmNumber);
+         if (tdc>(bunchSeparation-v0cDist-fTimeWindowWidthBGC/2.0) &&
+             tdc<(bunchSeparation-v0cDist+fTimeWindowWidthBGC/2.0))
+          fBGtriggerV0C+=(one<<pmNumber); 
        }
-       if (PMNumber>31) { // in V0A
-         Int_t shift = PMNumber-32;
-         if (tdc>(v0a_dist-fTimeWindowWidthBBA/2.0) &&
-             tdc<(v0a_dist+fTimeWindowWidthBBA/2.0)) 
+       if (pmNumber>31) { // in V0A
+         Int_t shift = pmNumber-32;
+         if (tdc>(v0aDist-fTimeWindowWidthBBA/2.0) &&
+             tdc<(v0aDist+fTimeWindowWidthBBA/2.0)) 
            fBBtriggerV0A+=(one<<shift);
-         if (tdc>(bunch_separation-v0a_dist-fTimeWindowWidthBGA/2.0) &&
-             tdc<(bunch_separation-v0a_dist+fTimeWindowWidthBGA/2.0))
+         if (tdc>(bunchSeparation-v0aDist-fTimeWindowWidthBGA/2.0) &&
+             tdc<(bunchSeparation-v0aDist+fTimeWindowWidthBGA/2.0))
            fBGtriggerV0A+=(one<<shift); 
        }
       }
index 05e79adcb97c726ba01c01c517dd882a76fda8bb..8e506d33b86b4ff071347a5631dfceeb850c3064 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIVZEROTriggerMask_H
-#define ALIVZEROTriggerMask_H
+#ifndef ALIVZEROTRIGGERMASK_H
+#define ALIVZEROTRIGGERMASK_H
 
 ///_________________________________________________________________________
 ///
@@ -7,8 +7,8 @@
 ///_________________________________________________________________________   
 
 #include <TObject.h>
-#include <TTree.h>
-#include <TClonesArray.h>
+class TTree;
+class TClonesArray;
 
 class AliVZEROTriggerMask : public TObject
 {
@@ -17,7 +17,7 @@ class AliVZEROTriggerMask : public TObject
    virtual        ~AliVZEROTriggerMask(){}  // destructor
 
    void FillMasks(TTree* vzeroDigitsTree,
-                 TClonesArray* vzeroDigits);
+                 TClonesArray* const vzeroDigits);
    Double_t GetZPosition(const char* symname);
 
    void            SetAdcThreshold(Float_t t=55.0) 
@@ -31,18 +31,18 @@ class AliVZEROTriggerMask : public TObject
    void            SetTimeWindowWidthBGC(Float_t w=20.0) 
      {fTimeWindowWidthBGC=w;}
 
-   UInt_t GetBBtriggerV0A() { return fBBtriggerV0A;}
-   UInt_t GetBGtriggerV0A() { return fBGtriggerV0A;}
-   UInt_t GetBBtriggerV0C() { return fBBtriggerV0C;}
-   UInt_t GetBGtriggerV0C() { return fBGtriggerV0C;}
+   UInt_t GetBBtriggerV0A() const { return fBBtriggerV0A;}
+   UInt_t GetBGtriggerV0A() const { return fBGtriggerV0A;}
+   UInt_t GetBBtriggerV0C() const { return fBBtriggerV0C;}
+   UInt_t GetBGtriggerV0C() const { return fBGtriggerV0C;}
 
 private:
 
-   Float_t fAdcThresHold;
-   Float_t fTimeWindowWidthBBA; // 
-   Float_t fTimeWindowWidthBGA; // 
-   Float_t fTimeWindowWidthBBC; // 
-   Float_t fTimeWindowWidthBGC; // 
+   Float_t fAdcThresHold; // Threshold on the ADC
+   Float_t fTimeWindowWidthBBA; // size of the BBA window
+   Float_t fTimeWindowWidthBGA; // size of the BGA window
+   Float_t fTimeWindowWidthBBC; // size of the BBC window
+   Float_t fTimeWindowWidthBGC; // size of the BGC window
    UInt_t fBBtriggerV0A; // bit mask for Beam-Beam trigger in V0A
    UInt_t fBGtriggerV0A; // bit mask for Beam-Gas trigger in V0A
    UInt_t fBBtriggerV0C; // bit mask for Beam-Beam trigger in V0C
@@ -52,4 +52,4 @@ private:
    ClassDef( AliVZEROTriggerMask, 1 )  // VZERO Trigger Detector class
 };
 
-#endif // AliVZEROTriggerMask_H
+#endif // ALIVZEROTRIGGERMASK_H