+ Int_t GetNTRUEta() const {return fNTRUEta ; }
+ Int_t GetNTRUPhi() const {return fNTRUPhi ; }
+ Int_t GetNCellsInTRUEta() const {return fNCellsInTRUEta ; }
+ Int_t GetNCellsInTRUPhi() const {return fNCellsInTRUPhi ; }
+ Int_t GetNCellsInSupMod() const {return fNCellsInSupMod;}
+ Int_t GetNCellsInModule() const {return fNCellsInModule; }
+ Int_t GetKey110DEG() const {return fKey110DEG;}
+ Int_t GetILOSS() const {return fILOSS;}
+ Int_t GetIHADR() const {return fIHADR;}
+ //
+ Int_t GetNTRU() const {return fNTRUEta*fNTRUPhi ; }
+ Int_t GetNCellsInTRU() const {return fNCellsInTRUEta*fNCellsInTRUPhi; }
+ Float_t GetDeltaEta() const {return (fArm1EtaMax-fArm1EtaMin)/ ((Float_t)fNZ);}
+ Float_t GetDeltaPhi() const {return (fArm1PhiMax-fArm1PhiMin)/ ((Float_t)fNPhi);}
+ Int_t GetNTowers() const {return fNPhi * fNZ ;}
+ //
+ Double_t GetPhiCenterOfSM(Int_t nsupmod) const;
+ Float_t *GetSuperModulesPars() {return fParSM;}
+ //
+ Bool_t GetPhiBoundariesOfSM (Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const;
+ Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
+ //
+ virtual Bool_t Impact(const TParticle *) const {return kTRUE;}
+ Bool_t IsInEMCAL(Double_t x, Double_t y, Double_t z) const;
+
+ ////////////////////////////////////////
+ // May 31, 2006; ALICE numbering scheme:
+ // see ALICE-INT-2003-038: ALICE Coordinate System and Software Numbering Convention
+ // All indexes are stared from zero now.
+ //
+ // abs id <-> indexes; Shish-kebab case, only TRD1 now.
+ // EMCAL -> Super Module -> module -> tower(or cell) - logic tree of EMCAL
+ //
+ //** Usual name of variable - Dec 18,2006 **
+ // nSupMod - index of super module (SM)
+ // nModule - index of module in SM
+ // nIphi - phi index of tower(cell) in module
+ // nIeta - eta index of tower(cell) in module
+ //
+ // Inside SM
+ // iphim - phi index of module in SM
+ // ietam - eta index of module in SM
+ //
+ // iphi - phi index of tower(cell) in SM
+ // ieta - eta index of tower(cell) in SM
+ //
+ // for a given tower index absId returns eta and phi of gravity center of tower.
+ void EtaPhiFromIndex(Int_t absId, Double_t &eta, Double_t &phi) const;
+ void EtaPhiFromIndex(Int_t absId, Float_t &eta, Float_t &phi) const;
+ //
+ // Tranforms Eta-Phi Cell index in TRU into Eta-Phi index in Super Module
+ void GetCellPhiEtaIndexInSModuleFromTRUIndex(Int_t itru, Int_t iphitru, Int_t ietatru,
+ Int_t &ietaSM, Int_t &iphiSM) const ;
+ Bool_t GetAbsCellIdFromEtaPhi(Double_t eta,Double_t phi, Int_t &absId) const;
+ Bool_t SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, Int_t &nSupMod) const;
+ Int_t GetAbsCellId(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta) const;
+ Bool_t CheckAbsCellId(Int_t absId) const;
+ Bool_t GetCellIndex(Int_t absId, Int_t &nSupMod, Int_t &nModule, Int_t &nIphi,
+ Int_t &nIeta) const;
+ // Local coordinate of Super Module
+ void GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t &iphim,
+ Int_t &ietam) const;
+ void GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta,
+ Int_t &iphi, Int_t &ieta) const ;
+ Int_t GetSuperModuleNumber(Int_t absId) const;
+ Int_t GetNumberOfModuleInPhiDirection(Int_t nSupMod) const
+ {
+ if(fKey110DEG == 1 && nSupMod>=10) return fNPhi/2;
+ else return fNPhi;
+ }
+ // From cell indexes to abs cell id
+ void GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta,
+ Int_t &iphim, Int_t &ietam, Int_t &nModule) const;
+ Int_t GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const;
+
+ // Methods for AliEMCALRecPoint - Feb 19, 2006
+ Bool_t RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const;
+ Bool_t RelPosCellInSModule(Int_t absId, Double_t loc[3]) const;
+ Bool_t RelPosCellInSModule(Int_t absId, TVector3 &vloc) const;
+ // Methods for AliEMCALRecPoint with taking into account energy of rec.point - Jul 30. 2007
+ Bool_t RelPosCellInSModule(Int_t absId,Double_t distEff,Double_t &xr,Double_t &yr,
+ Double_t & zr) const;
+ Bool_t RelPosCellInSModule(Int_t absId,Int_t maxAbsId,Double_t distEff,Double_t &xr,
+ Double_t &yr,Double_t &zr) const;
+
+ ///////////////////////////////
+ //Geometry data member setters
+ //
+ 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 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) ;}
+ void SetSampling(Float_t samp) { fSampling = samp;
+ printf("SetSampling: Sampling factor set to %f", fSampling) ; }
+
+ ///////////////////
+ // useful utilities
+ //
+ Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity