#include <assert.h>
-// --- AliRoot header files ---
+// --- Root header files ---
#include <Riostream.h>
#include <TBrowser.h>
#include <TClonesArray.h>
if(fGeoName.Contains("WSUC")) fNumberOfSuperModules = 1; // Jul 12, 2007
fgInit = kTRUE;
- AliInfo(" is ended");
}
void AliEMCALGeometry::PrintGeometry()
}
}
}
- cout<<endl;
}
void AliEMCALGeometry::PrintCellIndexes(Int_t absId, int pri, char *tit)
// Shift index taking into account the difference between standard SM
// and SM of half size in phi direction
- const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+ const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
if(!CheckAbsCellId(absId)) return kFALSE;
if(nSupMod<10) {
yr = fCentersOfCellsPhiDir.At(iphi);
} else {
- yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+ yr = fCentersOfCellsPhiDir.At(iphi + 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));
// Shift index taking into account the difference between standard SM
// and SM of half size in phi direction
- const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+ 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;
if(nSupMod<10) {
yr = fCentersOfCellsPhiDir.At(iphi);
} else {
- yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+ yr = fCentersOfCellsPhiDir.At(iphi + 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));
// Shift index taking into account the difference between standard SM
// and SM of half size in phi direction
- const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+ 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;
if(nSupMod<10) {
yr = fCentersOfCellsPhiDir.At(iphi);
} else {
- yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+ yr = fCentersOfCellsPhiDir.At(iphi + 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));
fCentersOfCellsPhiDir.Set(fNPhi*fNPHIdiv);
fPhiCentersOfCells.Set(fNPhi*fNPHIdiv);
- Double_t R0 = GetIPDistance() + GetLongModuleSize()/2.;
+ Double_t r0 = GetIPDistance() + GetLongModuleSize()/2.;
for(Int_t it=0; it<fNPhi; it++) { // cycle on modules
ytCenterModule = -fParSM[1] + fPhiModuleSize*(2*it+1)/2; // center of module
for(Int_t ic=0; ic<fNPHIdiv; ic++) { // cycle on cells in module
// Define grid on phi direction
// Grid is not the same for different eta bin;
// Effect is small but is still here
- phi = TMath::ATan2(ytCenterCell, R0);
+ phi = TMath::ATan2(ytCenterCell, r0);
fPhiCentersOfCells.AddAt(phi, ind);
AliDebug(2,Form(" ind %2.2i : y %8.3f ", ind, fCentersOfCellsPhiDir.At(ind)));
return trd1;
}
-void AliEMCALGeometry::Browse(TBrowser* b)
+void AliEMCALGeometry::Browse(TBrowser* b) const
{
+ //Browse the modules
if(fShishKebabTrd1Modules) b->Add(fShishKebabTrd1Modules);
}
Bool_t AliEMCALGeometry::IsFolder() const
{
+ //Check if fShishKebabTrd1Modules is in folder
if(fShishKebabTrd1Modules) return kTRUE;
else return kFALSE;
}
Double_t AliEMCALGeometry::GetPhiCenterOfSM(Int_t nsupmod) const
{
+ //returns center of supermodule in phi
static int i = nsupmod/2;
return fPhiCentersOfSM[i];
class TVector3;
class TGeoMatrix;
class TParticle ;
-class AliEMCALGeometry;
-class AliEMCALShishKebabTrd1Module;
-class AliEMCALRecPoint;
class TClonesArray ;
+#include <TMath.h>
+#include <TArrayD.h>
+class assert;
+class Riostream;
+class TClonesArray;
+class TGeoNode;
+class TGeoManager;
// --- AliRoot header files ---
-#include <TArrayD.h>
-#include <TMath.h>
+class AliEMCALGeometry;
+class AliEMCALShishKebabTrd1Module;
+class AliEMCALRecPoint;
+class AliEMCALDigit;
#include "AliGeometry.h"
static Char_t* GetDefaulGeometryName() {return fgDefaultGeometryName;}
void PrintGeometry(); //*MENU*
void PrintCellIndexes(Int_t absId=0, int pri=0, char *tit=""); //*MENU*
- virtual void Browse(TBrowser* b);
+ virtual void Browse(TBrowser* b) const ;
virtual Bool_t IsFolder() const;
void GetCellPhiEtaIndexInSModuleFromTRUIndex(Int_t itru, Int_t iphitru, Int_t ietatru, Int_t &ietaSM, Int_t &iphiSM) const ; // Tranforms Eta-Phi Cell index in TRU into Eta-Phi index in Super Module
char *fAdditionalOpts[6]; //! some additional options for the geometry type and name
int fNAdditionalOpts; //! size of additional options parameter
- // Options for Geant (MIP business) - will call in AliEMCAL
- Int_t fILOSS;
- Int_t fIHADR;
+ Int_t fILOSS; // Options for Geant (MIP business) - will call in AliEMCAL
+ Int_t fIHADR; // Options for Geant (MIP business) - will call in AliEMCAL
ClassDef(AliEMCALGeometry, 13) // EMCAL geometry class
};
//____________________________________________________________________________
AliEMCALRecPoint& AliEMCALRecPoint::operator= (const AliEMCALRecPoint &rp)
{
+ // assignment operator
+
if(&rp == this) return *this;
fGeomPtr = rp.fGeomPtr;
// Look to: http://rhic.physics.wayne.edu/~pavlinov/ALICE/SHISHKEBAB/RES/CALIB/GEOMCORR/deffandW0VaEgamma_2.gif
//
static Double_t e=0.0;
- const Double_t dp0=9.25147, dp1=1.16700; // Hard coded now
- const Double_t wp0=4.83713, wp1=-2.77970e-01, wp2 = 4.41116;
+ const Double_t kdp0=9.25147, kdp1=1.16700; // Hard coded now
+ const Double_t kwp0=4.83713, kwp1=-2.77970e-01, kwp2 = 4.41116;
// No extrapolation here
e = esum<0.5?0.5:esum;
e = e>100.?100.:e;
- deff = dp0 + dp1*TMath::Log(e);
- w0 = wp0 / (1. + TMath::Exp(wp1*(e+wp2)));
+ deff = kdp0 + kdp1*TMath::Log(e);
+ w0 = kwp0 / (1. + TMath::Exp(kwp1*(e+kwp2)));
//printf("<I> AliEMCALRecPoint::GetDeffW0 esum %5.2f : deff %5.2f : w0 %5.2f \n", esum, deff, w0);
}
// key = 0(gamma, default)
// != 0(electron)
static Double_t ca = 4.82; // shower max parameter - first guess; ca=TMath::Log(1000./8.07)
- static Double_t X0 = 1.23; // radiation lenght (cm)
+ static Double_t x0 = 1.23; // radiation lenght (cm)
static Double_t tmax = 0.; // position of electromagnetic shower max in cm
tmax = 0.0;
tmax = TMath::Log(e) + ca;
if (key==0) tmax += 0.5;
else tmax -= 0.5;
- tmax *= X0; // convert to cm
+ tmax *= x0; // convert to cm
}
return tmax;
}
//___________________________________________________________
Double_t AliEMCALRecPoint::GetPointEnergy() const
{
+ //Returns energy ....
static double e;
e=0.0;
for(int ic=0; ic<GetMultiplicity(); ic++) e += double(fEnergyList[ic]);
// --- ROOT system ---
#include <TVector3.h>
+class TGeoManager;
+class TGeoPhysicalNode;
+class TPad;
+class TPaveText;
+class TGraph;
+class Riostream;
// --- Standard library ---
class AliEMCALDigit;
class AliDigitNew;
class AliEMCALGeometry;
+class AliEMCALHit;
class AliEMCALRecPoint : public AliCluster {
virtual ~AliEMCALRecPoint();
- virtual void AddDigit(AliDigitNew &){
+ virtual void AddDigit(AliDigitNew &) const {
Fatal("AddDigit", "use AddDigit(AliEMCALDigit & digit, Float_t Energy )") ;
}
virtual void AddDigit(AliEMCALDigit & digit, Float_t Energy);
Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
Int_t * GetAbsId() const {return fAbsIdList;}
Int_t GetAbsId(int i) const {if(i>=0 && i<fMulDigit)return fAbsIdList[i]; else return -1;}
- Int_t GetAbsIdMaxDigit() {return GetAbsId(fDigitIndMax);}
- Int_t GetIndMaxDigit() {return fDigitIndMax;}
+ Int_t GetAbsIdMaxDigit() const {return GetAbsId(fDigitIndMax);}
+ Int_t GetIndMaxDigit() const {return fDigitIndMax;}
void SetIndMaxDigit(const Int_t ind) {fDigitIndMax = ind;}
void SetIndexInList(Int_t val) { fIndexInList = val ; }
**************************************************************************/
/*
-$Log$
+$Log$
+Revision 1.2 2007/09/11 19:38:15 pavlinov
+added pi0 calibration, linearity, shower profile
+
*/
//_________________________________________________________________________
// super Modules (SM), modules, towers, set of hists and so on.
// TObjectSet -> TFolder; Sep 6, 2007
//
+//
+//
//*-- Author: Aleksei Pavlinov (WSU, Detroit, USA)
#include "AliEMCALSuperModule.h"
AliEMCALSuperModule::AliEMCALSuperModule() : TFolder()
, fParent(0),fLh(0),fSMNumber(0)
{
+ //default ctor
}
AliEMCALSuperModule::AliEMCALSuperModule(const Int_t m, const char* title) :
TFolder(Form("SM%2.2i",m), title)
, fParent(0),fLh(0),fSMNumber(m)
{
+ //ctor
+}
+
+AliEMCALSuperModule::AliEMCALSuperModule(const AliEMCALSuperModule &sm) :
+TFolder(), fParent(sm.fParent),fLh(sm.fLh),fSMNumber(sm.fSMNumber)
+{
+ //copy ctor
+}
+
+AliEMCALSuperModule & AliEMCALSuperModule::operator =(const AliEMCALSuperModule &sm)
+{
+ // assignment operator
+// if(this == &sm)return *this;
+// ((TObject *)this)->operator=(sm);
+
+ fParent = sm.fParent;
+ fLh = sm.fLh;
+ fSMNumber = sm.fSMNumber;
+
}
AliEMCALSuperModule::~AliEMCALSuperModule()
void AliEMCALSuperModule::Init()
{
+ //Initialization method
+
if(GetHists()==0) {
fLh = BookHists();
Add(fLh);
void AliEMCALSuperModule::AddCellToEtaRow(AliEMCALCell *cell, const Int_t etaRow)
{
+ //Adds cells to corresponding Super module Eta Row
static TFolder *set;
set = dynamic_cast<TFolder*>(FindObject(Form("ETA%2.2i",etaRow)));
if(set==0) {
void AliEMCALSuperModule::FitForAllCells()
{
+ //Fit histograms of each cell
+
Int_t ncells=0;
for(int eta=0; eta<48; eta++) { // eta row
TFolder *setEta = dynamic_cast<TFolder*>(FindObject(Form("ETA%2.2i",eta)));
void AliEMCALSuperModule::FitEffMassHist()
{
+ //Fit effective mass histogram
TH1* h = (TH1*)GetHists()->At(0);
AliEMCALCell::FitHist(h, GetName());
}
void AliEMCALSuperModule::PrintInfo()
{
+ //Print
printf(" Super Module : %s : %i \n", GetName(), fSMNumber);
printf(" # of active cells %i \n", GetNumberOfCells());
TH1* h = (TH1*)GetHists()->At(0);
void AliEMCALSuperModule::DrawCC(int iopt)
{
+ //Draw different cell histograms
TCanvas *c=0;
if(iopt==1) c = new TCanvas("ccInOut","ccInOut");
Int_t AliEMCALSuperModule::GetNumberOfCells()
{
+ //Returns number of cells in SM
Int_t ncells=0;
TList* l = (TList*)GetListOfFolders();
for(int eta=0; eta<l->GetSize(); eta++) { // cycle on eta row
TList* AliEMCALSuperModule::BookHists()
{
+ //Initializes histograms
+
gROOT->cd();
TH1::AddDirectory(1);
- AliEMCALFolder* EMCAL = (AliEMCALFolder*)GetParent();
- Int_t it = EMCAL->GetIterationNumber();
+ AliEMCALFolder* emcal = (AliEMCALFolder*)GetParent();
+ Int_t it = emcal->GetIterationNumber();
new TH1F("00_EffMass", "effective mass of #gamma,#gamma(m_{#pi^{0}}=134.98 MeV) ", 250,0.0,0.5);
new TH1F("01_CCInput", "input CC dist.(MEV) ", 200, 5., 25.);
// Super Module folder
// Initial version was created with TDataSet staf
// TObjectSet -> TFolder; Sep 6, 2007
-
+//
+//
#include <TFolder.h>
class TList;
+class TStyle ;
+class TROOT;
+
class AliEMCALCell;
class AliEMCALSuperModule : public TFolder {
public:
- AliEMCALSuperModule();
- AliEMCALSuperModule(const Int_t m, const char* title="Emcal Super Module");
-
- virtual ~AliEMCALSuperModule();
+ AliEMCALSuperModule(); // default ctor
+ AliEMCALSuperModule(const Int_t m, const char* title="Emcal Super Module");//ctor
+ AliEMCALSuperModule( const AliEMCALSuperModule & sm);// cpy ctor
+ AliEMCALSuperModule &operator = (const AliEMCALSuperModule & sm);// cpy assignment
+ virtual ~AliEMCALSuperModule();//virtual dtor
void Init();
void AddCellToEtaRow(AliEMCALCell *cell, const Int_t etaRow);
//
TObject* fParent; // parent
TList* fLh; // List of hists
- Int_t fSMNumber;
+ Int_t fSMNumber; //Super Module Number
ClassDef(AliEMCALSuperModule,2) // EMCAL SuperModule