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
}
// 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();
}
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;
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
};