X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFTrigger.h;h=4299ebc2e6c2c66c6a1b2d6ca5d7a4bf711c4fc1;hb=2a276c75d1983436e61da4ae8542772ef7c51d06;hp=07070226221fe6115a3a2403d98deda937ca0487;hpb=cd82ed2f7184f721af5eb7ddabef7f3ea5acf45a;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFTrigger.h b/TOF/AliTOFTrigger.h index 07070226221..4299ebc2e6c 100644 --- a/TOF/AliTOFTrigger.h +++ b/TOF/AliTOFTrigger.h @@ -1,26 +1,30 @@ +#ifndef ALITOFTRIGGER_H +#define ALITOFTRIGGER_H + /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ -#ifndef ALITOFTRIGGER_H -#define ALITOFTRIGGER_H - ///////////////////////////////////////////////// -// -// TOF Trigger Detector Class -// +// // +// TOF Trigger Detector Class // +// // ///////////////////////////////////////////////// #include "AliTriggerDetector.h" +#include "AliLog.h" + +class AliTOFrawData; +class AliTOFTriggerMask; +class AliTOFGeometry; class AliTOFTrigger : public AliTriggerDetector { public: AliTOFTrigger(); // constructor - AliTOFTrigger(Int_t HighMultTh, Int_t ppMBTh, Int_t MultiMuonTh, Int_t UPTh, Float_t deltaminpsi, Float_t deltamaxpsi, Float_t deltaminro, Float_t deltamaxro, Int_t stripWindow); //constructor with parameters - AliTOFTrigger(const AliTOFTrigger & tr); - virtual ~AliTOFTrigger(){} // destructor + AliTOFTrigger(Int_t HighMultTh, Int_t ppMBTh, Int_t MultiMuonTh, Int_t UPTh, Float_t deltaminpsi, Float_t deltamaxpsi, Float_t deltaminro, Float_t deltamaxro, Int_t stripWindow,Float_t startTimeWindow=0.0,Float_t widthTimeWindow=25.); //constructor with parameters + virtual ~AliTOFTrigger(); // destructor virtual void CreateInputs(); virtual void Trigger(); Int_t GetHighMultTh() const {return fHighMultTh;} @@ -33,6 +37,20 @@ class AliTOFTrigger : public AliTriggerDetector Float_t Getdeltamaxro() const {return fdeltamaxro;} Int_t GetstripWindow() const {return fstripWindow;} + void LoadActiveMask(); // Load active channel trigger mask + void GetMapMatrix(Bool_t map[][24]) const; + void GetMap(Bool_t **map) const; + //void PrintMap(); // to be checked because of warning problems + void GetTRDmapMatrix(Bool_t map[][8]) const; + void GetTRDmap(Bool_t **map) const; + Bool_t GetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); + Bool_t GetBit(Int_t *detind); + void SetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); + void SetBit(Int_t *detind); + void ResetBit(Int_t nDDL, Int_t nTRM, Int_t iChain,Int_t iTDC, Int_t iCH); + void ResetBit(Int_t *detind); + + void SetHighMultTh(Int_t HighMultTh){fHighMultTh = HighMultTh;} void SetppMBTh(Int_t ppMBTh){fppMBTh = ppMBTh;} void SetMultiMuonTh(Int_t MultiMuonTh){fMultiMuonTh = MultiMuonTh;} @@ -43,21 +61,47 @@ class AliTOFTrigger : public AliTriggerDetector void Setdeltamaxro(Float_t deltamaxro){fdeltamaxro = deltamaxro;} void SetstripWindow(Int_t stripWindow){fstripWindow = stripWindow;} - void CreateLTMMatrix(); + Bool_t Return(Int_t i){if(i==0) return fSel1; + else if(i==1) return fSel2; + else if(i==2) return fSel3; + else if(i==3) return fSel4; + else { AliWarning(Form(" Index out of range: %d not in [0,3]",i)); return kFALSE; } + }; + Float_t GetStartTimeWindow() const {return fStartTimeHit;}; // in ns + Float_t GetTimeWidthWindow() const {return fTimeWidthTrigger;}; // in ns + void SetStartTimeWindow(Float_t val) {fStartTimeHit = val;}; // in ns + void SetTimeWidthWindow(Float_t val) {fTimeWidthTrigger = val;}; // in ns + + Int_t GetNumberOfCrateOn(){return fNCrateOn;}; + Int_t GetNumberOfMaxipadOn(){return fNMaxipadOn;}; + Int_t GetNumberOfMaxipadOnAll(){return fNMaxipadOnAll;}; + Bool_t *GetLTMarray(){return fLTMarray;}; + void CreateCTTMMatrix(); + void CreateLTMMatrix(); + void CreateLTMMatrixFromDigits(); + void CreateLTMMatrixFromRaw(AliRawReader *fRawReader); private: enum{ kNLTM = 72, //Number of LTM kNLTMchannels = 48, //Number of channels in a LTM kNCTTM = 36, //Number of CTTM per TOF side - kNCTTMchannels = 24 //Number of channels in a CTTM + kNCTTMchannels = 24, //Number of channels in a CTTM + kNLTMtoTRDchannels = 8 //Number of channels in a CTTM }; - void GetLTMIndex(Int_t *detind, Int_t *LTMIndex); - Bool_t fLTMmatrix[kNLTM][kNLTMchannels]; //LTM matrix - Bool_t fCTTMmatrixFront[kNCTTM][kNCTTMchannels]; //CTTM matrix for LTM 0-35 - Bool_t fCTTMmatrixBack[kNCTTM][kNCTTMchannels]; //CTTM matrix for LTM 36-71 + static AliTOFGeometry *fgTofGeo; // TOF geometry needed to compute the minimal arrival time per channel + + AliTOFTrigger& operator=(const AliTOFTrigger &/*source*/); // ass. op. + AliTOFTrigger(const AliTOFTrigger & tr); + + void GetCTTMIndex(Int_t *detind, Int_t *indexCTTM); + void GetLTMIndex(const Int_t * const detind, Int_t *LTMIndex); + Bool_t fLTMmatrix[kNLTM][kNLTMchannels]; //LTM matrix + Bool_t fLTMarray[kNCTTM]; //LTM array for UPpurposes + Bool_t fCTTMmatrixFront[kNCTTM][kNCTTMchannels];//CTTM matrix for TOP FPGA + Bool_t fCTTMmatrixBack[kNCTTM][kNCTTMchannels]; //CTTM matrix for BOTTOM FPGA Int_t fHighMultTh; //threshold for High Multiplicity trigger Int_t fppMBTh; //threshold for pp Minimum Bias trigger Int_t fMultiMuonTh; //threshold for Multi Muon trigger @@ -68,6 +112,20 @@ class AliTOFTrigger : public AliTriggerDetector Float_t fdeltamaxro; //max delta phi for ro decay (UP trigger) Int_t fstripWindow; //strip window for triggering - ClassDef(AliTOFTrigger,1) // TOF Trigger Detector class + Bool_t fSel1,fSel2,fSel3,fSel4; // ppMB, PbPbMB2, PbPbMB3, PbPbUP + + UInt_t fPowerMask[kNCTTMchannels+1]; // mask for 24 TDC channels + + Int_t fNCrateOn; // number of crate fired + Int_t fNMaxipadOn; // number of Maxipad fired + Int_t fNMaxipadOnAll; // number of Maxipad fired w/o TDC dead mask + AliTOFTriggerMask *fTOFTrigMask; // class with the TOF trigger mask + + // aggiungere larghezza finestra temporale e tempo0 in ns + Float_t fStartTimeHit; // time window start after channel equalization (subtraction of the minimal time per channel default 0 ns) + Float_t fTimeWidthTrigger; // time window width (default 25 ns) + + ClassDef(AliTOFTrigger,2) // TOF Trigger Detector class }; #endif +