From: mvl Date: Mon, 23 Apr 2007 18:26:20 +0000 (+0000) Subject: Moved all TRU mapping to AliEMCALGeometry and removed from AliEMCALTrigger. Added... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=9946f2fe50cf8e38f225256ac66a9d44bb82203c Moved all TRU mapping to AliEMCALGeometry and removed from AliEMCALTrigger. Added fGeom pointer to AliEMCALTrigger to retrieve geometry information. --- diff --git a/EMCAL/AliEMCALGeometry.cxx b/EMCAL/AliEMCALGeometry.cxx index d603666ac8f..b2abc8443da 100644 --- a/EMCAL/AliEMCALGeometry.cxx +++ b/EMCAL/AliEMCALGeometry.cxx @@ -88,7 +88,8 @@ AliEMCALGeometry::AliEMCALGeometry() fShellThickness(0.),fZLength(0.),fGap2Active(0.),fNZ(0),fNPhi(0),fSampling(0.),fNumberOfSuperModules(0), fSteelFrontThick(0.),fFrontSteelStrip(0.),fLateralSteelStrip(0.),fPassiveScintThick(0.),fPhiModuleSize(0.), fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fLongModuleSize(0.),fNPhiSuperModule(0),fNPHIdiv(0),fNETAdiv(0), - fNCells(0),fNCellsInSupMod(0),fNCellsInModule(0),fNTRU(0),fNTRUEta(0),fNTRUPhi(0),fTrd1Angle(0.),f2Trd1Dx2(0.), + fNCells(0),fNCellsInSupMod(0),fNCellsInModule(0),fNTRUEta(0),fNTRUPhi(0), + fNCellsInTRUEta(0), fNCellsInTRUPhi(0), fTrd1Angle(0.),f2Trd1Dx2(0.), fPhiGapForSM(0.),fKey110DEG(0),fPhiBoundariesOfSM(0), fPhiCentersOfSM(0),fEtaMaxOfTRD1(0), fTrd2AngleY(0.),f2Trd2Dy2(0.),fEmptySpace(0.),fTubsR(0.),fTubsTurnAngle(0.),fCentersOfCellsEtaDir(0), fCentersOfCellsXDir(0),fCentersOfCellsPhiDir(0),fEtaCentersOfCells(0),fPhiCentersOfCells(0), @@ -108,7 +109,8 @@ AliEMCALGeometry::AliEMCALGeometry(const Text_t* name, const Text_t* title) fShellThickness(0.),fZLength(0.),fGap2Active(0.),fNZ(0),fNPhi(0),fSampling(0.),fNumberOfSuperModules(0), fSteelFrontThick(0.),fFrontSteelStrip(0.),fLateralSteelStrip(0.),fPassiveScintThick(0.),fPhiModuleSize(0.), fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fLongModuleSize(0.),fNPhiSuperModule(0),fNPHIdiv(0),fNETAdiv(0), - fNCells(0),fNCellsInSupMod(0),fNCellsInModule(0),fNTRU(0),fNTRUEta(0),fNTRUPhi(0),fTrd1Angle(0.),f2Trd1Dx2(0.), + fNCells(0),fNCellsInSupMod(0),fNCellsInModule(0),fNTRUEta(0),fNTRUPhi(0), + fNCellsInTRUEta(0), fNCellsInTRUPhi(0), fTrd1Angle(0.),f2Trd1Dx2(0.), fPhiGapForSM(0.),fKey110DEG(0),fPhiBoundariesOfSM(0), fPhiCentersOfSM(0), fEtaMaxOfTRD1(0), fTrd2AngleY(0.),f2Trd2Dy2(0.),fEmptySpace(0.),fTubsR(0.),fTubsTurnAngle(0.),fCentersOfCellsEtaDir(0), fCentersOfCellsXDir(0),fCentersOfCellsPhiDir(0),fEtaCentersOfCells(0),fPhiCentersOfCells(0), @@ -163,9 +165,10 @@ AliEMCALGeometry::AliEMCALGeometry(const AliEMCALGeometry& geom) fNCells(geom.fNCells), fNCellsInSupMod(geom.fNCellsInSupMod), fNCellsInModule(geom.fNCellsInModule), - fNTRU(geom.fNTRU), fNTRUEta(geom.fNTRUEta), fNTRUPhi(geom.fNTRUPhi), + fNCellsInTRUEta(geom.fNCellsInTRUEta), + fNCellsInTRUPhi(geom.fNCellsInTRUPhi), fTrd1Angle(geom.fTrd1Angle), f2Trd1Dx2(geom.f2Trd1Dx2), fPhiGapForSM(geom.fPhiGapForSM), @@ -401,9 +404,10 @@ void AliEMCALGeometry::Init(void){ fPhiCentersOfSM[5] = (fPhiBoundariesOfSM[10]+fPhiBoundariesOfSM[11])/2.; //TRU parameters. These parameters values are not the final ones. - fNTRU = 3 ; fNTRUEta = 3 ; fNTRUPhi = 1 ; + fNCellsInTRUEta = 16 ; + fNCellsInTRUPhi = 24 ; // Define TGeoMatrix of SM - Jan 19, 2007 (just fro TRD1) if(fGeoName.Contains("TRD1")) { // copy code from AliEMCALv0::CreateSmod() @@ -643,12 +647,8 @@ void AliEMCALGeometry::GetCellPhiEtaIndexInSModuleFromTRUIndex(const Int_t itru, Int_t col = itru/ fNTRUPhi ; Int_t row = itru - col*fNTRUPhi ; - //Calculate the (eta,phi) index in SM - Int_t nCellsPhi = fNPhi*2/fNTRUPhi; - Int_t nCellsEta = fNZ*2/fNTRUEta; - - iphiSM = nCellsPhi*row + iphitru ; - ietaSM = nCellsEta*col + ietatru ; + iphiSM = fNCellsInTRUPhi*row + iphitru ; + ietaSM = fNCellsInTRUEta*col + ietatru ; } //______________________________________________________________________ diff --git a/EMCAL/AliEMCALGeometry.h b/EMCAL/AliEMCALGeometry.h index f575ccdbfb8..83085db08e9 100644 --- a/EMCAL/AliEMCALGeometry.h +++ b/EMCAL/AliEMCALGeometry.h @@ -20,6 +20,7 @@ class TObjArray; class TVector3; class TGeoMatrix; class TParticle ; +class AliEMCALGeometry; class AliEMCALShishKebabTrd1Module; class AliEMCALRecPoint; class TClonesArray ; @@ -120,10 +121,14 @@ public: Int_t GetNETAdiv() const {return fNETAdiv ;} Int_t GetNCells() const {return fNCells;} - Int_t GetNTRU() const {return fNTRU ; } + Int_t GetNTRU() const {return fNTRUEta*fNTRUPhi ; } Int_t GetNTRUEta() const {return fNTRUEta ; } Int_t GetNTRUPhi() const {return fNTRUPhi ; } + Int_t GetNCellsInTRU() const {return fNCellsInTRUEta*fNCellsInTRUPhi; } + Int_t GetNCellsInTRUEta() const {return fNCellsInTRUEta ; } + Int_t GetNCellsInTRUPhi() const {return fNCellsInTRUPhi ; } + Float_t GetSteelFrontThickness() const { return fSteelFrontThick;} Float_t GetLongModuleSize() const {return fLongModuleSize;} @@ -196,7 +201,6 @@ public: void SetNZ(Int_t nz) { fNZ= nz ; printf("SetNZ: Number of modules in Z set to %d", fNZ) ; } void SetNPhi(Int_t nphi) { fNPhi= nphi ; printf("SetNPhi: Number of modules in Phi set to %d", fNPhi) ; } - void SetNTRU(Int_t ntru) {fNTRU = ntru; printf("SetNTRU: Number of TRUs per SuperModule set to %d", fNTRU) ; } void SetNTRUEta(Int_t ntru) {fNTRUEta = ntru; ; printf("SetNTRU: Number of TRUs per SuperModule in Etaset to %d", fNTRUEta) ;} void SetNTRUPhi(Int_t ntru) {fNTRUPhi = ntru; ; printf("SetNTRU: Number of TRUs per SuperModule in Phi set to %d", fNTRUPhi) ;} @@ -265,9 +269,11 @@ private: Int_t fNCellsInSupMod; // number cell in super module Int_t fNCellsInModule; // number cell in module) //TRU parameters - Int_t fNTRU ; //! Number of TRUs per module - Int_t fNTRUEta ; //! Number of cell rows per Z in one TRU - Int_t fNTRUPhi ; //! Number of cell rows per Phi in one TRU + Int_t fNTRUEta ; // Number of TRUs per module in eta + Int_t fNTRUPhi ; // Number of TRUs per module in phi + Int_t fNCellsInTRUEta; // Number of cells per TRU in eta + Int_t fNCellsInTRUPhi; // Number of cells per TRU in phi + // TRD1 options - 30-sep-04 Float_t fTrd1Angle; // angle in x-z plane (in degree) Float_t f2Trd1Dx2; // 2*dx2 for TRD1 @@ -303,7 +309,7 @@ private: Int_t fILOSS; Int_t fIHADR; - ClassDef(AliEMCALGeometry, 11) // EMCAL geometry class - }; + ClassDef(AliEMCALGeometry, 12) // EMCAL geometry class +}; #endif // AliEMCALGEOMETRY_H diff --git a/EMCAL/AliEMCALTrigger.cxx b/EMCAL/AliEMCALTrigger.cxx index e8fb129d7b0..4877e9e6959 100644 --- a/EMCAL/AliEMCALTrigger.cxx +++ b/EMCAL/AliEMCALTrigger.cxx @@ -59,7 +59,7 @@ ClassImp(AliEMCALTrigger) //______________________________________________________________________ AliEMCALTrigger::AliEMCALTrigger() - : AliTriggerDetector(), + : AliTriggerDetector(), fGeom(0), f2x2MaxAmp(-1), f2x2CellPhi(-1), f2x2CellEta(-1), f2x2SM(0), fnxnMaxAmp(-1), fnxnCellPhi(-1), fnxnCellEta(-1), @@ -69,8 +69,6 @@ AliEMCALTrigger::AliEMCALTrigger() fDigitsList(0), fL0Threshold(100),fL1JetLowPtThreshold(200), fL1JetMediumPtThreshold(500), fL1JetHighPtThreshold(1000), - fNTRU(3), fNTRUEta(3), fNTRUPhi(1), - fNCellsPhi(24), fNCellsEta(16), fPatchSize(1), fIsolPatchSize(1), f2x2AmpOutOfPatch(-1), fnxnAmpOutOfPatch(-1), f2x2AmpOutOfPatchThres(100000), fnxnAmpOutOfPatchThres(100000), @@ -94,6 +92,7 @@ AliEMCALTrigger::AliEMCALTrigger() //____________________________________________________________________________ AliEMCALTrigger::AliEMCALTrigger(const AliEMCALTrigger & trig) : AliTriggerDetector(trig), + fGeom(trig.fGeom), f2x2MaxAmp(trig.f2x2MaxAmp), f2x2CellPhi(trig.f2x2CellPhi), f2x2CellEta(trig.f2x2CellEta), @@ -111,8 +110,6 @@ AliEMCALTrigger::AliEMCALTrigger(const AliEMCALTrigger & trig) fL1JetLowPtThreshold(trig.fL1JetLowPtThreshold), fL1JetMediumPtThreshold(trig.fL1JetMediumPtThreshold), fL1JetHighPtThreshold(trig.fL1JetHighPtThreshold), - fNTRU(trig.fNTRU), fNTRUEta(trig.fNTRUEta), fNTRUPhi(trig.fNTRUPhi), - fNCellsPhi(trig.fNCellsPhi), fNCellsEta(trig.fNCellsEta), fPatchSize(trig.fPatchSize), fIsolPatchSize(trig.fIsolPatchSize), f2x2AmpOutOfPatch(trig.f2x2AmpOutOfPatch), @@ -167,21 +164,21 @@ Bool_t AliEMCALTrigger::IsPatchIsolated(Int_t iPatchType, const TClonesArray * a Float_t amp = 0; //Get matrix of TRU or Module with maximum amplitude patch. - Int_t itru = mtru+iSM*fNTRU ; //number of tru, min 0 max 8*5. + Int_t itru = mtru + iSM * fGeom->GetNTRU(); //number of tru, min 0 max 8*5. TMatrixD * ampmatrix = 0x0; Int_t colborder = 0; Int_t rowborder = 0; if(fIsolateInSuperModule){ ampmatrix = dynamic_cast(ampmatrixes->At(iSM)) ; - rowborder = fNCellsPhi*fNTRUPhi; - colborder = fNCellsEta*fNTRUEta; + rowborder = fGeom->GetNPhi()*2; + colborder = fGeom->GetNZ()*2; AliDebug(2,"Isolate trigger in Module"); } else{ ampmatrix = dynamic_cast(ampmatrixes->At(itru)) ; - rowborder = fNCellsPhi; - colborder = fNCellsEta; + rowborder = fGeom->GetNCellsInTRUPhi(); + colborder = fGeom->GetNCellsInTRUEta(); AliDebug(2,"Isolate trigger in TRU"); } @@ -193,14 +190,18 @@ Bool_t AliEMCALTrigger::IsPatchIsolated(Int_t iPatchType, const TClonesArray * a Int_t maxrow = maxphi + isolcells + ipatchcells; Int_t maxcol = maxeta + isolcells + ipatchcells; + if (minrow < 0) + minrow = 0; + if (mincol < 0) + mincol = 0; + if (maxrow > rowborder) + maxrow = rowborder; + if (maxcol > colborder) + maxcol = colborder; + AliDebug(2,Form("Number of added Isol Cells %d, Patch Size %d",isolcells, ipatchcells)); AliDebug(2,Form("Patch: minrow %d, maxrow %d, mincol %d, maxcol %d",minrow,maxrow,mincol,maxcol)); - if(minrow < 0 || mincol < 0 || maxrow > rowborder || maxcol > colborder){ - AliDebug(1,Form("Out of Module/TRU range, cannot isolate patch")); - return kFALSE; - } - //Add amplitudes in all isolation patch for(Int_t irow = minrow ; irow < maxrow; irow ++) for(Int_t icol = mincol ; icol < maxcol ; icol ++) @@ -241,18 +242,19 @@ void AliEMCALTrigger::MakeSlidingCell(const TClonesArray * amptrus, const TClone //for this reason we loop inside the TRU cells by 2. //Declare and initialize variables - Int_t nCellsPhi = fNCellsPhi;//geom->GetNPhi()*2/geom->GetNTRUPhi() ; + Int_t nCellsPhi = fGeom->GetNCellsInTRUPhi(); if(isupermod > 9) nCellsPhi = nCellsPhi / 2 ; //Half size SM. Not Final. // 12(tow)*2(cell)/1 TRU, cells in Phi in one TRU - Int_t nCellsEta = fNCellsEta ;//geom->GetNEta()*2/geom->GetNTRUEta() ; + Int_t nCellsEta = fGeom->GetNCellsInTRUEta(); + Int_t nTRU = fGeom->GetNTRU(); // 24(mod)*2(tower)/3 TRU, cells in Eta in one TRU //Int_t nTRU = geom->GeNTRU();//3 TRU per super module Float_t amp2 = 0 ; Float_t ampn = 0 ; for(Int_t i = 0; i < 4; i++){ - for(Int_t j = 0; j < fNTRU; j++){ + for(Int_t j = 0; j < nTRU; j++){ ampmax2(i,j) = -1; ampmaxn(i,j) = -1; } @@ -266,10 +268,10 @@ void AliEMCALTrigger::MakeSlidingCell(const TClonesArray * amptrus, const TClone tru2x2(i,j) = -1; //Loop over all TRUS in a supermodule - for(Int_t itru = 0 + isupermod * fNTRU ; itru < (isupermod+1)*fNTRU ; itru++) { + for(Int_t itru = 0 + isupermod * nTRU ; itru < (isupermod+1)*nTRU ; itru++) { TMatrixD * amptru = dynamic_cast(amptrus->At(itru)) ; TMatrixD * timeRtru = dynamic_cast(timeRtrus->At(itru)) ; - Int_t mtru = itru-isupermod*fNTRU ; //Number of TRU in Supermodule + Int_t mtru = itru-isupermod*nTRU ; //Number of TRU in Supermodule //Sliding 2x2, add 2x2 amplitudes (NOT OVERLAP) for(Int_t irow = 0 ; irow < nCellsPhi; irow += 2){ @@ -326,7 +328,7 @@ void AliEMCALTrigger::MakeSlidingCell(const TClonesArray * amptrus, const TClone Int_t coln = static_cast (ampmaxn(2,mtru)); for(Int_t i = 0; i<4*fPatchSize; i++){ for(Int_t j = 0; j<4*fPatchSize; j++){ - if( (rown+i) < nCellsPhi && (coln+j) < nCellsEta/2){//Avoid exit the TRU + if( (rown+i) < nCellsPhi && (coln+j) < nCellsEta){//Avoid exit the TRU if((*amptru)(rown+i,coln+j) > 0 && (*timeRtru)(rown+i,coln+j)> 0){ if((*timeRtru)(rown+i,coln+j) < ampmaxn(3,mtru) ) ampmaxn(3,mtru) = (*timeRtru)(rown+i,coln+j); @@ -401,7 +403,7 @@ void AliEMCALTrigger::Print(const Option_t * opt) const //____________________________________________________________________________ void AliEMCALTrigger::SetTriggers(const TClonesArray * ampmatrix,const Int_t iSM, const TMatrixD &max2, - const TMatrixD &maxn, const AliEMCALGeometry *geom) + const TMatrixD &maxn) { //Checks the 2x2 and nxn maximum amplitude per each TRU and @@ -411,9 +413,11 @@ void AliEMCALTrigger::SetTriggers(const TClonesArray * ampmatrix,const Int_t iSM Int_t mtru2 = -1 ; Int_t mtrun = -1 ; + Int_t nTRU = fGeom->GetNTRU(); + //Find maximum summed amplitude of all the TRU //in a Super Module - for(Int_t i = 0 ; i < fNTRU ; i++){ + for(Int_t i = 0 ; i < nTRU ; i++){ if(max2[0] < ampmax2(0,i) ){ max2[0] = ampmax2(0,i) ; // 2x2 summed max amplitude max2[1] = ampmax2(1,i) ; // corresponding phi position in TRU @@ -441,7 +445,7 @@ void AliEMCALTrigger::SetTriggers(const TClonesArray * ampmatrix,const Int_t iSM f2x2MaxAmp = max2[0] ; f2x2SM = iSM ; maxtimeR2 = max2[3] ; - geom->GetCellPhiEtaIndexInSModuleFromTRUIndex(mtru2, + fGeom->GetCellPhiEtaIndexInSModuleFromTRUIndex(mtru2, static_cast(max2[1]), static_cast(max2[2]), f2x2CellPhi,f2x2CellEta) ; @@ -474,7 +478,7 @@ void AliEMCALTrigger::SetTriggers(const TClonesArray * ampmatrix,const Int_t iSM fnxnMaxAmp = maxn[0] ; fnxnSM = iSM ; maxtimeRn = maxn[3] ; - geom->GetCellPhiEtaIndexInSModuleFromTRUIndex(mtrun, + fGeom->GetCellPhiEtaIndexInSModuleFromTRUIndex(mtrun, static_cast(maxn[1]), static_cast(maxn[2]), fnxnCellPhi,fnxnCellEta) ; @@ -520,7 +524,7 @@ void AliEMCALTrigger::SetTriggers(const TClonesArray * ampmatrix,const Int_t iSM } //____________________________________________________________________________ -void AliEMCALTrigger::FillTRU(const AliEMCALGeometry *geom, const TClonesArray * digits, TClonesArray * ampmatrix, TClonesArray * ampmatrixsmod, TClonesArray * timeRmatrix) { +void AliEMCALTrigger::FillTRU(const TClonesArray * digits, TClonesArray * ampmatrix, TClonesArray * ampmatrixsmod, TClonesArray * timeRmatrix) { // Orders digits ampitudes list in fNTRU TRUs (384 cells) per supermodule. // Each TRU is a TMatrixD, and they are kept in TClonesArrays. The number of @@ -529,18 +533,15 @@ void AliEMCALTrigger::FillTRU(const AliEMCALGeometry *geom, const TClonesArray * // is maintained for the last modules but decision not taken. If different, // then this must be changed. Also fill a matrix with all amplitudes in supermodule for isolation studies. - //Check data members - - if(fNTRUEta*fNTRUPhi != fNTRU) - Error("FillTRU"," Wrong number of TRUS per Eta or Phi"); - //Initilize and declare variables //List of TRU matrices initialized to 0. - Int_t nPhi = geom->GetNPhi(); - Int_t nZ = geom->GetNZ(); - Int_t nCellsPhi = nPhi*2/fNTRUPhi; - Int_t nCellsPhi2 = nPhi/fNTRUPhi; //HalfSize modules - Int_t nCellsEta = nZ*2/fNTRUEta; + Int_t nPhi = fGeom->GetNPhi(); + Int_t nZ = fGeom->GetNZ(); + Int_t nTRU = fGeom->GetNTRU(); + Int_t nTRUPhi = fGeom->GetNTRUPhi(); + Int_t nCellsPhi = fGeom->GetNCellsInTRUPhi(); + Int_t nCellsPhi2 = fGeom->GetNCellsInTRUPhi(); + Int_t nCellsEta = fGeom->GetNCellsInTRUEta(); Int_t id = -1; Float_t amp = -1; @@ -553,8 +554,8 @@ void AliEMCALTrigger::FillTRU(const AliEMCALGeometry *geom, const TClonesArray * Int_t ieta = -1; //List of TRU matrices initialized to 0. - Int_t nSup = geom->GetNumberOfSuperModules(); - for(Int_t k = 0; k < fNTRU*nSup; k++){ + Int_t nSup = fGeom->GetNumberOfSuperModules(); + for(Int_t k = 0; k < nTRU*nSup; k++){ TMatrixD amptrus(nCellsPhi,nCellsEta) ; TMatrixD timeRtrus(nCellsPhi,nCellsEta) ; // Do we need to initialise? I think TMatrixD does it by itself... @@ -590,11 +591,11 @@ void AliEMCALTrigger::FillTRU(const AliEMCALGeometry *geom, const TClonesArray * timeR = dig->GetTimeR() ; // Earliest time of the digit //Get eta and phi cell position in supermodule - Bool_t bCell = geom->GetCellIndex(id, iSupMod, nModule, nIphi, nIeta) ; + Bool_t bCell = fGeom->GetCellIndex(id, iSupMod, nModule, nIphi, nIeta) ; if(!bCell) Error("FillTRU","Wrong cell id number") ; - geom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta); + fGeom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta); //Check to which TRU in the supermodule belongs the cell. //Supermodules are divided in a TRU matrix of dimension @@ -608,7 +609,7 @@ void AliEMCALTrigger::FillTRU(const AliEMCALGeometry *geom, const TClonesArray * if(iSupMod > 9) row = iphi/nCellsPhi2; //Calculate label number of the TRU - Int_t itru = row + col*fNTRUPhi + iSupMod*fNTRU ; + Int_t itru = row + col*nTRUPhi + iSupMod*nTRU ; //Fill TRU matrix with cell values TMatrixD * amptrus = dynamic_cast(ampmatrix->At(itru)) ; @@ -638,22 +639,17 @@ void AliEMCALTrigger::Trigger() (runLoader->GetDetectorLoader("EMCAL")); //Load EMCAL Geometry - AliEMCALGeometry * geom = 0; if (runLoader->GetAliRun() && runLoader->GetAliRun()->GetDetector("EMCAL")) - geom = dynamic_cast(runLoader->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); - if (geom == 0) - geom = AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaulGeometryName()); + fGeom = dynamic_cast(runLoader->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); + if (fGeom == 0) + fGeom = AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaulGeometryName()); - if (geom==0) + if (fGeom==0) AliFatal("Did not get geometry from EMCALLoader"); //Define parameters - Int_t nSuperModules = geom->GetNumberOfSuperModules() ; //12 SM in EMCAL - fNTRU = geom->GetNTRU(); //3 TRU per super module - fNTRUEta = geom->GetNTRUEta(); //3 TRU in eta per super module - fNTRUPhi = geom->GetNTRUPhi(); //1 TRU in phi per super module - fNCellsPhi = geom->GetNPhi()*2/geom->GetNTRUPhi() ; - fNCellsEta = geom->GetNEta()*2/geom->GetNTRUEta() ; + Int_t nSuperModules = fGeom->GetNumberOfSuperModules() ; //12 SM in EMCAL + Int_t nTRU = fGeom->GetNTRU(); //3 TRU per super module //Intialize data members each time the trigger is called in event loop f2x2MaxAmp = -1; f2x2CellPhi = -1; f2x2CellEta = -1; @@ -674,13 +670,13 @@ void AliEMCALTrigger::Trigger() TClonesArray * ampsmods = new TClonesArray("TMatrixD",1000); TClonesArray * timeRtrus = new TClonesArray("TMatrixD",1000); - FillTRU(geom,fDigitsList, amptrus, ampsmods, timeRtrus) ; + FillTRU(fDigitsList, amptrus, ampsmods, timeRtrus) ; //Do Cell Sliding and select Trigger //Initialize varible that will contain maximum amplitudes and //its corresponding cell position in eta and phi, and time. - TMatrixD ampmax2(4,fNTRU) ; - TMatrixD ampmaxn(4,fNTRU) ; + TMatrixD ampmax2(4,nTRU) ; + TMatrixD ampmaxn(4,nTRU) ; for(Int_t iSM = 0 ; iSM < nSuperModules ; iSM++) { //Do 2x2 and nxn sums, select maximums. @@ -688,9 +684,9 @@ void AliEMCALTrigger::Trigger() //Set the trigger if(fIsolateInSuperModule) - SetTriggers(ampsmods,iSM,ampmax2,ampmaxn,geom) ; + SetTriggers(ampsmods,iSM,ampmax2,ampmaxn) ; if(!fIsolateInSuperModule) - SetTriggers(amptrus,iSM,ampmax2,ampmaxn,geom) ; + SetTriggers(amptrus,iSM,ampmax2,ampmaxn) ; } amptrus->Delete(); diff --git a/EMCAL/AliEMCALTrigger.h b/EMCAL/AliEMCALTrigger.h index 25133486320..05e2851a66e 100644 --- a/EMCAL/AliEMCALTrigger.h +++ b/EMCAL/AliEMCALTrigger.h @@ -115,16 +115,17 @@ class AliEMCALTrigger : public AliTriggerDetector { private: - void FillTRU(const AliEMCALGeometry *geom, const TClonesArray * digits, TClonesArray * ampmatrix, TClonesArray * ampmatrixsmod, TClonesArray * timeRmatrix); + void FillTRU(const TClonesArray * digits, TClonesArray * ampmatrix, TClonesArray * ampmatrixsmod, TClonesArray * timeRmatrix); Bool_t IsPatchIsolated(Int_t iPatchType, const TClonesArray * ampmods, const Int_t imod, const Int_t mtru, const Float_t maxamp, const Int_t maxphi, const Int_t maxeta) ; void MakeSlidingCell(const TClonesArray * amptrus, const TClonesArray * timeRtrus,const Int_t supermod, TMatrixD &max2, TMatrixD &maxn) ; - void SetTriggers(const TClonesArray * amptrus,const Int_t iSM, const TMatrixD &max2, const TMatrixD &maxn, const AliEMCALGeometry * geom) ; + void SetTriggers(const TClonesArray * amptrus,const Int_t iSM, const TMatrixD &max2, const TMatrixD &maxn) ; private: + AliEMCALGeometry *fGeom; Float_t f2x2MaxAmp ; //! Maximum 2x2 added amplitude (not overlapped) Int_t f2x2CellPhi ; //! upper right cell, row(phi) @@ -147,12 +148,6 @@ class AliEMCALTrigger : public AliTriggerDetector { Float_t fL1JetMediumPtThreshold ; //! L1 Medium pT trigger energy threshold Float_t fL1JetHighPtThreshold ; //! L1 High pT trigger energy threshold - Int_t fNTRU; //! Number of TRU per SuperModule (3) - Int_t fNTRUEta ; //! Number of crystal rows per Eta in one TRU (3) - Int_t fNTRUPhi ; //! Number of crystal rows per Phi in one TRU (1) - Int_t fNCellsPhi; //! Number of rows in a TRU (24) - Int_t fNCellsEta; //! Number of columns in a TRU (16) - Int_t fPatchSize; //! Trigger patch factor, to be multiplied to 2x2 cells // 0 means 2x2, 1 means 4x4, 2 means 6x6 ... Int_t fIsolPatchSize ; // Isolation patch size, number of rows or columns to add to @@ -170,7 +165,7 @@ class AliEMCALTrigger : public AliTriggerDetector { Bool_t fSimulation ; //! Flag to do the trigger during simulation or reconstruction Bool_t fIsolateInSuperModule; //! Flag to isolate trigger patch in SuperModule or in TRU acceptance - ClassDef(AliEMCALTrigger,1) + ClassDef(AliEMCALTrigger,0) } ;