]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Central flags to digit and change of CIU position
authormbroz <Michal.Broz@cern.ch>
Wed, 26 Nov 2014 08:53:58 +0000 (09:53 +0100)
committermbroz <Michal.Broz@cern.ch>
Wed, 26 Nov 2014 08:53:58 +0000 (09:53 +0100)
AD/AliADRawStream.cxx
AD/AliADReconstructor.cxx
AD/AliADdigit.cxx
AD/AliADdigit.h

index f9e9b3d479f61376921d532a4007a213bfa99c83..96d97e9b49b8f4250eab62d58bf69772f87c28a7 100644 (file)
@@ -126,7 +126,7 @@ Bool_t AliADRawStream::Next()
   Int_t iCIU=0;
   for (Int_t  iV0CIU = 0; iV0CIU < 8; iV0CIU++) {
     
-    if(iV0CIU != 1 || iV0CIU != 5) {
+    if(iV0CIU != 1 || iV0CIU != 3) {
       for(Int_t iWord = 0; iWord<182; iWord++) GetNextWord();
       continue;
        }
index c102723dd0cb6ee4057bb24b1018ee7f8d7df379..c2ebd66c4686de02aec8d339c31d885b6b4b54ab 100644 (file)
@@ -93,11 +93,6 @@ void AliADReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTre
   AliADRawStream rawStream(rawReader);
   if (rawStream.Next()) { 
 
-    Int_t aBBflagsADA = 0;
-    Int_t aBBflagsADC = 0;
-    Int_t aBGflagsADA = 0;
-    Int_t aBGflagsADC = 0;
-
     for(Int_t iChannel=0; iChannel < 16; ++iChannel) {
       Int_t offlineCh = rawStream.GetOfflineChannel(iChannel);
       // ADC charge samples
@@ -107,29 +102,18 @@ void AliADReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTre
       }
       // Integrator flag
       Bool_t integrator = rawStream.GetIntegratorFlag(iChannel,kNClocks/2);
-      // Beam-beam and beam-gas flags
-      if(offlineCh<8) {
-       if (rawStream.GetBBFlag(iChannel,kNClocks/2)) aBBflagsADC |= (1 << offlineCh);
-       if (rawStream.GetBGFlag(iChannel,kNClocks/2)) aBGflagsADC |= (1 << offlineCh);
-      } else {
-       if (rawStream.GetBBFlag(iChannel,kNClocks/2)) aBBflagsADA |= (1 << (offlineCh-32));
-       if (rawStream.GetBGFlag(iChannel,kNClocks/2)) aBGflagsADA |= (1 << (offlineCh-32));
-      }
+      Bool_t BBflag = rawStream.GetBBFlag(iChannel,kNClocks/2); 
+      Bool_t BGflag = rawStream.GetBGFlag(iChannel,kNClocks/2);
+   
       // HPTDC data (leading time and width)
       Int_t board = AliADCalibData::GetBoardNumber(offlineCh);
       Float_t time = rawStream.GetTime(iChannel)*fCalibData->GetTimeResolution(board);
       Float_t width = rawStream.GetWidth(iChannel)*fCalibData->GetWidthResolution(board);
       // Add a digit
       if(!fCalibData->IsChannelDead(iChannel)){
-         new ((*fDigitsArray)[fDigitsArray->GetEntriesFast()]) AliADdigit(offlineCh, time, width,integrator, chargeADC);
+         new ((*fDigitsArray)[fDigitsArray->GetEntriesFast()]) AliADdigit(offlineCh, time, width,integrator, chargeADC, BBflag, BGflag);
       }
     }
-    // Store the BB and BG flags in the digits tree (user info)
-    digitsTree->GetUserInfo()->Add(new TParameter<int>("BBflagsADA",aBBflagsADA));
-    digitsTree->GetUserInfo()->Add(new TParameter<int>("BBflagsADC",aBBflagsADC));
-    digitsTree->GetUserInfo()->Add(new TParameter<int>("BGflagsADA",aBGflagsADA));
-    digitsTree->GetUserInfo()->Add(new TParameter<int>("BGflagsADC",aBGflagsADC));
-
 
     digitsTree->Fill();
   }
index cfad82fb723a9378e3573e8147ba77e09c2a6501..0f0e56f88c5c63797593060a073ed8e33eea3604 100644 (file)
@@ -24,7 +24,9 @@ AliADdigit::AliADdigit()
     fPMNumber(0),
     fTime(0.),
     fWidth(0.),
-    fIntegrator(0)
+    fIntegrator(0),
+    fBBflag(0),
+    fBGflag(0)
 
 {
   // Standard default
@@ -37,12 +39,16 @@ AliADdigit::AliADdigit(Int_t   PMnumber, Float_t time,
                              Float_t width,
                             Bool_t integrator,
                             Short_t *chargeADC,
+                            Bool_t  BBflag,
+                            Bool_t  BGflag,
                             Int_t *labels)
 :AliDigit(),
 fPMNumber(PMnumber),
 fTime(time),
 fWidth(width),
-fIntegrator(integrator)
+fIntegrator(integrator),
+fBBflag(BBflag),
+fBGflag(BGflag)
 {  
   // Constructor
   // Used in the digitizer
index 38a61a1de5ca4b55f52743f8335e92f7ce2ff015..e2debedbf04d509809b98e2d2aa58d1118c4bcd9 100644 (file)
@@ -17,6 +17,8 @@ public:
                   Float_t TimeWidth,
                  Bool_t  Integrator,
                  Short_t *chargeADC = 0,
+                 Bool_t  BBflag = kFALSE,
+                 Bool_t  BGflag = kFALSE,
                  Int_t *labels = 0);
     virtual ~AliADdigit() {};
     virtual void Print(const Option_t* option="") const;
@@ -28,13 +30,18 @@ public:
     Bool_t  Integrator() const {return fIntegrator;}
     Short_t ChargeADC(Int_t clock) const {return (clock >= 0 && clock < kNClocks) ? fChargeADC[clock] : 0;}
     Bool_t  GetIntegratorFlag(Int_t clock);
+    Bool_t  GetBBflag()  const {return fBBflag;}
+    Bool_t  GetBGflag()  const {return fBGflag;}
     
   protected:
     Int_t   fPMNumber;      // PhotoMultiplier number (0 to 16)
     Float_t fTime;          // Time of Flight
     Float_t fWidth;         // Width of the time distribution
-    Bool_t  fIntegrator;    // Integrator used
+    Bool_t  fIntegrator;    // Integrator used in central clock
     Short_t fChargeADC[kNClocks]; // ADC samples as present in raw data
+    Bool_t  fBBflag;       // BB flag in central clock
+    Bool_t  fBGflag;       // BB flag in central clock
+    
 
   ClassDef(AliADdigit,1)  // AD Digit class
 };