return kTRUE;
}
+//Not in use, comment for the moment
//________________________________________________________________________________________________
-Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Int_t maxAbsId, Double_t distEff, Double_t &xr, Double_t &yr, Double_t &zr) const
-{
- // Jul 31, 2007 - taking into account position of shower max and apply coor2.
- // Look to see what the relative
- // position inside a given cell is
- // for a recpoint.
- // In:
- // absId - cell is as in Geant, 0<= absId < fNCells;
- // maxAbsId - abs id of cell with highest energy
- // e - cluster energy
- // OUT:
- // xr,yr,zr - x,y,z coordinates of cell with absId inside SM
-
- // Shift index taking into account the difference between standard SM
- // and SM of half size in phi direction
- const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
- static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
- static Int_t iphim, ietam;
- static AliEMCALShishKebabTrd1Module *mod = 0;
- static TVector2 v;
-
- static Int_t nSupModM, nModuleM, nIphiM, nIetaM, iphiM, ietaM;
- static Int_t iphimM, ietamM, maxAbsIdCopy=-1;
- static AliEMCALShishKebabTrd1Module *modM = 0;
- static Double_t distCorr;
-
- if(!CheckAbsCellId(absId)) return kFALSE;
-
- GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
- GetModulePhiEtaIndexInSModule(nSupMod, nModule, iphim, ietam);
- GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta);
-
- //Get eta position. Careful with ALICE conventions (increase index decrease eta)
- if(nSupMod%2 == 0) {
- ietam = (fCentersOfCellsEtaDir.GetSize()/2-1)-ietam;// 23-ietam, revert the ordering on A side in order to keep convention.
- if(nIeta == 0) nIeta = 1;
- else nIeta = 0;
- }
-
- mod = GetShishKebabModule(ietam);
-
- if(absId != maxAbsId) {
- distCorr = 0.;
- if(maxAbsIdCopy != maxAbsId) {
- GetCellIndex(maxAbsId, nSupModM, nModuleM, nIphiM, nIetaM);
- GetModulePhiEtaIndexInSModule(nSupModM, nModuleM, iphimM, ietamM);
- GetCellPhiEtaIndexInSModule(nSupModM,nModuleM,nIphiM,nIetaM, iphiM, ietaM);
- //Careful with ALICE conventions (increase index decrease eta)
- if(nSupModM%2 == 0) {
- ietamM = (fCentersOfCellsEtaDir.GetSize()/2-1)-ietamM;// 47-ietam, revert the ordering on A side in order to keep convention.
- }
-
- modM = GetShishKebabModule(ietamM); // do I need this ?
- maxAbsIdCopy = maxAbsId;
- }
-
- if(ietamM !=0) {
- distCorr = fEMCGeometry->GetEtaModuleSize()*(ietam-ietamM)/TMath::Tan(modM->GetTheta()); // Stay here
- //printf(" distCorr %f | dist %f | ietam %i -> etamM %i\n", distCorr, dist, ietam, ietamM);
- }
- // distEff += distCorr;
- }
- // Bad resolution in this case, strong bias vs phi
- // distEff = 0.0;
- mod->GetPositionAtCenterCellLine(nIeta, distEff, v); // Stay here
- xr = v.Y() - fParSM[0];
- zr = v.X() - fParSM[2];
-
- //Get phi position. Careful with ALICE conventions (increase index increase phi)
- Int_t iphi2 = iphi;
- if(nSupMod<10) {
- if(nSupMod%2 != 0)
- iphi2 = (fCentersOfCellsPhiDir.GetSize()-1)-iphi;// 23-iphi, revert the ordering on C side in order to keep convention.
- yr = fCentersOfCellsPhiDir.At(iphi2);
-
- } else {
- if(nSupMod%2 != 0)
- iphi2 = (fCentersOfCellsPhiDir.GetSize()/2-1)-iphi;// 11-iphi, revert the ordering on C side in order to keep convention.
- yr = fCentersOfCellsPhiDir.At(iphi2 + kphiIndexShift);
- }
- AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
-
- return kTRUE;
-}
-
+//Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Int_t maxAbsId, Double_t distEff, Double_t &xr, Double_t &yr, Double_t &zr) const
+//{
+// // Jul 31, 2007 - taking into account position of shower max and apply coor2.
+// // Look to see what the relative
+// // position inside a given cell is
+// // for a recpoint.
+// // In:
+// // absId - cell is as in Geant, 0<= absId < fNCells;
+// // maxAbsId - abs id of cell with highest energy
+// // e - cluster energy
+// // OUT:
+// // xr,yr,zr - x,y,z coordinates of cell with absId inside SM
+//
+// // Shift index taking into account the difference between standard SM
+// // and SM of half size in phi direction
+// const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+// static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
+// static Int_t iphim, ietam;
+// static AliEMCALShishKebabTrd1Module *mod = 0;
+// static TVector2 v;
+//
+// static Int_t nSupModM, nModuleM, nIphiM, nIetaM, iphiM, ietaM;
+// static Int_t iphimM, ietamM, maxAbsIdCopy=-1;
+// static AliEMCALShishKebabTrd1Module *modM = 0;
+// static Double_t distCorr;
+//
+// if(!CheckAbsCellId(absId)) return kFALSE;
+//
+// GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
+// GetModulePhiEtaIndexInSModule(nSupMod, nModule, iphim, ietam);
+// GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta);
+//
+// //Get eta position. Careful with ALICE conventions (increase index decrease eta)
+// if(nSupMod%2 == 0) {
+// ietam = (fCentersOfCellsEtaDir.GetSize()/2-1)-ietam;// 23-ietam, revert the ordering on A side in order to keep convention.
+// if(nIeta == 0) nIeta = 1;
+// else nIeta = 0;
+// }
+//
+// mod = GetShishKebabModule(ietam);
+//
+// if(absId != maxAbsId) {
+// distCorr = 0.;
+// if(maxAbsIdCopy != maxAbsId) {
+// GetCellIndex(maxAbsId, nSupModM, nModuleM, nIphiM, nIetaM);
+// GetModulePhiEtaIndexInSModule(nSupModM, nModuleM, iphimM, ietamM);
+// GetCellPhiEtaIndexInSModule(nSupModM,nModuleM,nIphiM,nIetaM, iphiM, ietaM);
+// //Careful with ALICE conventions (increase index decrease eta)
+// if(nSupModM%2 == 0) {
+// ietamM = (fCentersOfCellsEtaDir.GetSize()/2-1)-ietamM;// 47-ietam, revert the ordering on A side in order to keep convention.
+// }
+//
+// modM = GetShishKebabModule(ietamM); // do I need this ?
+// maxAbsIdCopy = maxAbsId;
+// }
+//
+// if(ietamM !=0) {
+// distCorr = fEMCGeometry->GetEtaModuleSize()*(ietam-ietamM)/TMath::Tan(modM->GetTheta()); // Stay here
+// //printf(" distCorr %f | dist %f | ietam %i -> etamM %i\n", distCorr, dist, ietam, ietamM);
+// }
+// // distEff += distCorr;
+// }
+// // Bad resolution in this case, strong bias vs phi
+// // distEff = 0.0;
+// mod->GetPositionAtCenterCellLine(nIeta, distEff, v); // Stay here
+// xr = v.Y() - fParSM[0];
+// zr = v.X() - fParSM[2];
+//
+// //Get phi position. Careful with ALICE conventions (increase index increase phi)
+// Int_t iphi2 = iphi;
+// if(nSupMod<10) {
+// if(nSupMod%2 != 0)
+// iphi2 = (fCentersOfCellsPhiDir.GetSize()-1)-iphi;// 23-iphi, revert the ordering on C side in order to keep convention.
+// yr = fCentersOfCellsPhiDir.At(iphi2);
+//
+// } else {
+// if(nSupMod%2 != 0)
+// iphi2 = (fCentersOfCellsPhiDir.GetSize()/2-1)-iphi;// 11-iphi, revert the ordering on C side in order to keep convention.
+// yr = fCentersOfCellsPhiDir.At(iphi2 + kphiIndexShift);
+// }
+// AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
+//
+// return kTRUE;
+//}
+//
//
// == Shish-kebab cases ==
//
-
-//____________________________________________________________________________
-void AliEMCALGeometry::GetGlobal(const AliRecPoint* /*rp*/, TVector3& /* vglob */) const
-{
- AliFatal(Form("Please use GetGlobalEMCAL(recPoint,gpos) instead of GetGlobal!"));
-}
-
-//_________________________________________________________________________________
-void AliEMCALGeometry::GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const
-{
- // Figure out the global numbering
- // of a given supermodule from the
- // local numbering for RecPoints
-
- static TVector3 vloc;
- static Int_t nSupMod, nModule, nIphi, nIeta;
-
- const AliEMCALRecPoint *rpTmp = rp;
- const AliEMCALRecPoint *rpEmc = rpTmp;
-
- GetCellIndex(rpEmc->GetAbsId(0), nSupMod, nModule, nIphi, nIeta);
- rpTmp->GetLocalPosition(vloc);
- GetGlobal(vloc, vglob, nSupMod);
-}
+//
+////_________________________________________________________________________________
+//void AliEMCALGeometry::GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const
+//{
+// // Figure out the global numbering
+// // of a given supermodule from the
+// // local numbering for RecPoints
+//
+// static TVector3 vloc;
+// static Int_t nSupMod, nModule, nIphi, nIeta;
+//
+// const AliEMCALRecPoint *rpTmp = rp;
+// const AliEMCALRecPoint *rpEmc = rpTmp;
+//
+// GetCellIndex(rpEmc->GetAbsId(0), nSupMod, nModule, nIphi, nIeta);
+// rpTmp->GetLocalPosition(vloc);
+// GetGlobal(vloc, vglob, nSupMod);
+//}
// --- AliRoot header files ---
#include "AliEMCALGeoUtils.h"
#include "AliEMCALEMCGeometry.h"
-class AliRecPoint;
-class AliEMCALRecPoint;
+//class AliRecPoint;
+//class AliEMCALRecPoint;
class AliEMCALGeometry : public AliEMCALGeoUtils {
//
using AliEMCALGeoUtils::GetGlobal;
- virtual void GetGlobal(const AliRecPoint *rp, TVector3 &vglob) const;
- virtual void GetGlobal(const AliRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */)
- const {GetGlobal(rp,gpos); }
- virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const;
- virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */)
- const {GetGlobalEMCAL(rp,gpos); }
+// virtual void GetGlobal(const AliRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */)
+// const {GetGlobal(rp,gpos); }
+// virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const;
+// virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */)
+// const {GetGlobalEMCAL(rp,gpos); }
// Return EMC geometry parameters
AliEMCALEMCGeometry * GetEMCGeometry() const {return fEMCGeometry ;}
// Methods for AliEMCALRecPoint with taking into account energy of rec.point - Jul 30. 2007
using AliEMCALGeoUtils::RelPosCellInSModule;
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;
+ Double_t & zr) const;
+
+ //Not in use, comment for the moment
+ //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
ClassImp(AliEMCALShishKebabTrd1Module)
- AliEMCALEMCGeometry *AliEMCALShishKebabTrd1Module::fgGeometry=0;
+ //AliEMCALEMCGeometry *AliEMCALShishKebabTrd1Module::fgGeometry=0;
Double_t AliEMCALShishKebabTrd1Module::fga=0.;
Double_t AliEMCALShishKebabTrd1Module::fga2=0.;
Double_t AliEMCALShishKebabTrd1Module::fgb=0.;
//_____________________________________________________________________________
AliEMCALShishKebabTrd1Module::AliEMCALShishKebabTrd1Module(Double_t theta, AliEMCALEMCGeometry *g)
: TNamed(),
+ fGeometry(g),
fOK(),
fA(0.),
fB(0.),
fORT()
{
// theta in radians ; first object shold be with theta=pi/2.
- if(fgGeometry==0) {
- fTheta = TMath::PiOver2();
- fgGeometry = g;
- if(GetParameters()) {
- DefineFirstModule();
- }
- } else Warning("AliEMCALShishKebabTrd1Module(theta)","You should call this constractor just once !!");
+ fTheta = TMath::PiOver2();
+ if(GetParameters()) {
+ DefineFirstModule();
+ }
DefineName(fTheta);
AliDebug(1,Form("AliEMCALShishKebabTrd1Module - first module: theta %1.4f geometry %s",fTheta,g->GetName()));
}
//_____________________________________________________________________________
AliEMCALShishKebabTrd1Module::AliEMCALShishKebabTrd1Module(AliEMCALShishKebabTrd1Module &leftNeighbor)
: TNamed(),
+ fGeometry(leftNeighbor.fGeometry),
fOK(),
fA(0.),
fB(0.),
//________________________________________________________________
AliEMCALShishKebabTrd1Module::AliEMCALShishKebabTrd1Module(const AliEMCALShishKebabTrd1Module& mod)
: TNamed(mod.GetName(),mod.GetTitle()),
+ fGeometry(mod.fGeometry),
fOK(mod.fOK),
fA(mod.fA),
fB(mod.fB),
{
// Get needing module parameters from EMCAL geometry
- TString sn(fgGeometry->GetName()); // 2-Feb-05
+ TString sn(fGeometry->GetName()); // 2-Feb-05
sn.ToUpper();
- if(!fgGeometry) {
+ if(!fGeometry) {
Warning("GetParameters()"," No geometry ");
return kFALSE;
}
- fga = (Double_t)fgGeometry->GetEtaModuleSize();
- fgb = (Double_t)fgGeometry->GetLongModuleSize();
- fgangle = Double_t(fgGeometry->GetTrd1Angle())*TMath::DegToRad();
+ fga = (Double_t)fGeometry->GetEtaModuleSize();
+ fgb = (Double_t)fGeometry->GetLongModuleSize();
+ fgangle = Double_t(fGeometry->GetTrd1Angle())*TMath::DegToRad();
fgtanBetta = TMath::Tan(fgangle/2.);
- fgr = (Double_t)fgGeometry->GetIPDistance();
+ fgr = (Double_t)fGeometry->GetIPDistance();
- fgr += fgGeometry->GetSteelFrontThickness();
+ fgr += fGeometry->GetSteelFrontThickness();
- fga2 = Double_t(fgGeometry->Get2Trd1Dx2());
+ fga2 = Double_t(fGeometry->Get2Trd1Dx2());
//PH PrintShish(0);
return kTRUE;
}