// Compares two digits with respect to its Id
// to sort according increasing Id
- Int_t rv ;
+ Int_t rv = 2 ;
AliEMCALDigit * digit = (AliEMCALDigit *)obj ;
// Prints the data of the digit
out << "ID " << digit.fId << " Energy = " << digit.fAmp << " Time = " << digit.fTime << endl ;
- Int_t i,j ;
- for(i=0;i<digit.fNprimary;i++)
+ for(Int_t i=0;i<digit.fNprimary;i++)
out << "Primary " << i+1 << " = " << digit.fPrimary[i]
<< " : DE " << digit.fDEPrimary[i] << endl ;
- for(j=0;j<digit.fNiparent;j++)
+ for(Int_t j=0;j<digit.fNiparent;j++)
out << "Iparent " << j+1 << " = " << digit.fIparent[j]
<< " : DE " << digit.fDEParent[j] << endl ;
out << "Position in list = " << digit.fIndexInList << endl ;
nEMC = geom->GetNCells();
AliDebug(1,Form("nEMC %i (number cells in EMCAL) | %s \n", nEMC, geom->GetName()));
- Int_t absID ;
+ Int_t absID = -1 ;
digits->Expand(nEMC) ;
//take all the inputs to add together and load the SDigits
TObjArray * sdigArray = new TObjArray(fInput) ;
sdigArray->AddAt(emcalLoader->SDigits(), 0) ;
+
Int_t i ;
-
for(i = 1 ; i < fInput ; i++){
TString tempo(fEventNames[i]) ;
tempo += i ;
//Find next signal module
nextSig = nEMC + 1 ;
for(i = 0 ; i < fInput ; i++){
- sdigits = dynamic_cast<TClonesArray *>(sdigArray->At(i)) ;
- Int_t curNext = nextSig ;
- if(sdigits->GetEntriesFast() > index[i] ){
- curNext = dynamic_cast<AliEMCALDigit *>(sdigits->At(index[i]))->GetId() ;
- }
- if(curNext < nextSig) nextSig = curNext ;
+ sdigits = dynamic_cast<TClonesArray *>(sdigArray->At(i)) ;
+ Int_t curNext = nextSig ;
+ if(sdigits->GetEntriesFast() > index[i] ){
+ curNext = dynamic_cast<AliEMCALDigit *>(sdigits->At(index[i]))->GetId() ;
+ }
+ if(curNext < nextSig) nextSig = curNext ;
}
}
// add the noise now
else if (fManager)
fLastEvent = fFirstEvent ; // what is this ??
- Int_t nEvents = fLastEvent - fFirstEvent + 1;
- Int_t ievent;
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
+ Int_t ievent = -1;
TClonesArray* digitsTRG = new TClonesArray("AliEMCALRawDigit", 32 * 96);
TClonesArray* digitsTMP = new TClonesArray("AliEMCALDigit", 32 * 96);
// to be compliant with %4 per TRU
if (itru == 31) iphim -= 2;
- Int_t trgid;
+ Int_t trgid = 0;
Bool_t isOK = geom->GetAbsFastORIndexFromPositionInTRU(itru, ietam, iphim % 4, trgid);
AliDebug(2,Form("trigger digit id: %d itru: %d isOK: %d\n",trgid,itru,isOK));
nStreams = GetNInputStreams() ;
else
nStreams = fInput ;
+
+ AliRunLoader *rl=0;
Int_t index = 0 ;
-
- AliRunLoader *rl=0;
-
for (index = 0 ; index < nStreams ; index++) {
TString tempo(fEventNames[index]) ;
tempo += index ;
fNETAdiv = fEMCGeometry->GetNETAdiv();
fNPHIdiv = fEMCGeometry->GetNPHIdiv();
fNCellsInModule = fNPHIdiv*fNETAdiv;
- static int i;
+ static int i=0;
Int_t nSMod = fEMCGeometry->GetNumberOfSuperModules();
fPhiBoundariesOfSM.Set(nSMod);
fPhiCentersOfSM.Set(nSMod/2);
Double_t phiMax = 0.;
for(Int_t sm=0; sm<nSMod; sm++) {
fEMCGeometry->GetPhiBoundariesOfSM(sm,phiMin,phiMax);
- i=sm/2;
+ i=sm/2;
fPhiCentersOfSM[i] = fEMCGeometry->GetPhiCenterOfSM(sm);
}
fNCells = fEMCGeometry->GetNCells();
void AliEMCALGeoUtils::GetGlobal(Int_t absId , double glob[3]) const
{
// Alice numbering scheme - Jun 03, 2006
- static Int_t nSupMod, nModule, nIphi, nIeta;
+ static Int_t nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1;
static double loc[3];
glob[0]=glob[1]=glob[2]=0.0; // bad case
void AliEMCALGeoUtils::PrintCellIndexes(Int_t absId, int pri, const char *tit) const
{
// Service methods
- Int_t nSupMod, nModule, nIphi, nIeta;
- Int_t iphi, ieta;
+ Int_t nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1;
+ Int_t iphi=-1, ieta=-1;
TVector3 vg;
GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
Int_t &iphim, Int_t &ietam, Int_t &nModule) const
{
// Transition from cell indexes (ieta,iphi) to module indexes (ietam,iphim, nModule)
- static Int_t nphi;
+ static Int_t nphi=0;
nphi = GetNumberOfModuleInPhiDirection(nSupMod);
ietam = ieta/fNETAdiv;
Int_t AliEMCALGeoUtils::GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const
{
// Transition from super module number(nSupMod) and cell indexes (ieta,iphi) to absId
- static Int_t ietam, iphim, nModule;
- static Int_t nIeta, nIphi; // cell indexes in module
+ static Int_t ietam=-1, iphim=-1, nModule=-1;
+ static Int_t nIeta=-1, nIphi=-1; // cell indexes in module
GetModuleIndexesFromCellIndexesInSModule(nSupMod, iphi, ieta, ietam, iphim, nModule);
{
// Return false if phi belongs a phi cracks between SM
- static Int_t i;
+ static Int_t i=0;
if(TMath::Abs(eta) > fEtaMaxOfTRD1) return kFALSE;
{
// Nov 17,2006
// stay here - phi problem as usual
- static Int_t nSupMod, i, ieta, iphi, etaShift, nphi;
- static Double_t absEta=0.0, d=0.0, dmin=0.0, phiLoc;
+ static Int_t nSupMod=0, i=0, ieta=-1, iphi=-1, etaShift=0, nphi=0;
+ static Double_t absEta=0.0, d=0.0, dmin=0.0, phiLoc=0.;
absId = nSupMod = - 1;
if(SuperModuleNumberFromEtaPhi(eta, phi, nSupMod)) {
// phi index first
// Return the number of the supermodule given the absolute
// ALICE numbering id
- static Int_t nSupMod, nModule, nIphi, nIeta;
+ static Int_t nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1;
GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
return nSupMod;
}
// ietam, iphi - indexes of module in two dimensional grid of SM
// ietam - have to change from 0 to fNZ-1
// iphim - have to change from 0 to nphi-1 (fNPhi-1 or fNPhi/2-1)
- static Int_t nphi;
+ static Int_t nphi = 0;
if(fKey110DEG == 1 && nSupMod>=10) nphi = fNPhi/2;
else nphi = fNPhi;
// ieta - have to change from 0 to (fNZ*fNETAdiv-1)
// iphi - have to change from 0 to (fNPhi*fNPHIdiv-1 or fNPhi*fNPHIdiv/2-1)
//
- static Int_t iphim, ietam;
+ static Int_t iphim=-1, ietam=-1;
GetModulePhiEtaIndexInSModule(nSupMod,nModule, iphim, ietam);
// ieta = ietam*fNETAdiv + (1-nIeta); // x(module) = -z(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 nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1, iphi=-1, ieta=-1;
if(!CheckAbsCellId(absId)) return kFALSE;
GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
GetAbsCellIdFromEtaPhi(direction.Eta(),direction.Phi(),absId);
//tower absID hitted -> tower/module plane (evaluated at the center of the tower)
- Int_t nSupMod, nModule, nIphi, nIeta;
+ Int_t nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1;
Double_t loc[3],loc2[3],loc3[3];
Double_t glob[3]={},glob2[3]={},glob3[3]={};
GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
//look at 2 neighbours-s cell using nIphi={0,1} and nIeta={0,1}
- Int_t nIphi2,nIeta2,absId2,absId3;
+ Int_t nIphi2=-1,nIeta2=-1,absId2=-1,absId3=-1;
if(nIeta==0) nIeta2=1;
else nIeta2=0;
absId2=GetAbsCellId(nSupMod,nModule,nIphi,nIeta2);
Double_t r=sqrt(x*x+y*y);
if ( r > fEnvelop[0] ) {
- Double_t theta;
- theta = TMath::ATan2(r,z);
- Double_t eta;
- if(theta == 0)
+ Double_t theta = TMath::ATan2(r,z);
+ Double_t eta = 9999;
+ if(theta < 1e-5) // before theta == 0, not allowed by coding convention
eta = 9999;
else
eta = -TMath::Log(TMath::Tan(theta/2.));
{
//Trigger mapping method, get position in TRU from FasOr Index
- Int_t iADC;
+ Int_t iADC = 0;
Bool_t isOK = GetTRUFromAbsFastORIndex(id, iTRU, iADC);
{
//Trigger mapping method, get position in Super Module from FasOr Index
- Int_t iTRU;
+ Int_t iTRU = 0;
Bool_t isOK = GetPositionInTRUFromAbsFastORIndex(id, iTRU, iEta, iPhi);
if (!isOK) return kFALSE;
// 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 Int_t nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1, iphi=-1, ieta=-1;
+ static Int_t iphim=-1, ietam=-1;
static AliEMCALShishKebabTrd1Module *mod = 0;
static TVector2 v;
if(!CheckAbsCellId(absId)) return kFALSE;
//
// kElectron : fPIDFinal[0]
// kMuon : fPIDFinal[1]
-// kPion : fPIDFinal[2]
-// kKaon : fPIDFinal[3]
+// kPion : fPIDFinal[2]
+// kKaon : fPIDFinal[3]
// kProton : fPIDFinal[4]
// kPhoton : fPIDFinal[5]
-// kPi0 : fPIDFinal[6]
+// kPi0 : fPIDFinal[6]
// kNeutron : fPIDFinal[7]
// kKaon0 : fPIDFinal[8]
// kEleCon : fPIDFinal[9]
// Compute the values of the weigh for a given energy the parametrised distribution using the data initialised before.
//
Double_t constante = 0.;
- Double_t energyParam;
switch (type) {
constante = 1.;
break;
case 2:
- constante = 1.;
+ constante = 1.;
break;
case 3:
constante = PowerExp(energy, fHadronEnergyProb);
break;
}
- energyParam = constante;
+ // cout << "Weight " << constante << " for energy "<< energy<< " GeV "<< endl;
- // // cout << "Weight " << constante << " for energy "<< energy<< " GeV "<< endl;
-
- return energyParam;
+ return constante;
}
// with the array of parameters passed as the second arg
//
- Double_t y;
- y = params[0];
+ Double_t y = params[0];
y += params[1] * x;
y += params[2] * x * x;
y += params[3] * x * x * x;
// with the array of parameters passed as the second arg
//
- Double_t y;
- y = params[0];
+ Double_t y = params[0];
return y;
}
// with the array of parameters passed as the second arg
//
- Double_t y;
+ Double_t y=0.;
+
if(x>0){
- y = params[0];
- y += params[1] / x;
- y += params[2] / (x * x);
- y += params[3] / (x * x * x);
- y += params[4] / (x * x * x * x);
- y += params[5] / (x * x * x * x * x);
+ y = params[0];
+ y += params[1] / x;
+ y += params[2] / (x * x);
+ y += params[3] / (x * x * x);
+ y += params[4] / (x * x * x * x);
+ y += params[5] / (x * x * x * x * x);
}
- else
- y=0.;
+
return y;
}
// with the array of parameters passed as the second arg
//
- Double_t y;
+ Double_t y=0.;
if(x>0){
y = params[0] / x;
y += params[1] ;
// y += params[4] * 0.;
// y += params[5] * 0.;
}
- else
- y=0.;
+
return y;
// with the array of parameters passed as the second arg
//
- Double_t y;
+ Double_t y=0.;
if(x>0){
y = params[0] / ( x * x);
y += params[1] / x;
y += params[4] * x * x ;
// y += params[5] * 0.;
}
- else
- y=0.;
return y;
// par[0]*TMath::Power(x[0],par[1])
// par[0]*TMath::Exp((x[0]-par[1])*par[2]);
- Double_t y;
-
- y = params[0] *TMath::Power( x,params[1]);
- y += params[2] *TMath::Exp((x-params[3])*params[4]);
+ Double_t y = params[0] *TMath::Power( x,params[1]);
+ y += params[2] *TMath::Exp((x-params[3])*params[4]);
return y;
{
// as a first step, all array elements are initialized to 0.0
- Int_t i, j;
+ Int_t i=0, j=0;
for (i = 0; i < 6; i++) {
for (j = 0; j < 6; j++) {
{
// as a first step, all array elements are initialized to 0.0
- Int_t i, j;
+ Int_t i=0, j=0;
for (i = 0; i < 6; i++) {
for (j = 0; j < 6; j++) {
fGamma[i][j] = fHadron[i][j] = fPiZero[i][j] = 0.;
printf("===\nDigit id: %4d / %d Time Samples: \n",fId,fNSamples);
for (Int_t i=0; i < fNSamples; i++)
{
- Int_t timeBin, amp;
+ Int_t timeBin=-1, amp=0;
GetTimeSample(i, timeBin, amp);
printf("(%d,%d) ",timeBin,amp);
}
// Compares two digits with respect to its Id
// to sort according increasing Id
- Int_t rv;
+ Int_t rv=2;
AliEMCALRawDigit* digit = (AliEMCALRawDigit *)obj;
AliDebug(1,Form("Found TRG digit in TRU: %2d ADC: %2d",itru,in.GetColumn()));
- Int_t idtrg;
+ Int_t idtrg=0;
Bool_t isOK = fGeom->GetAbsFastORIndexFromTRU(itru, in.GetColumn(), idtrg);
// N: par[3]
// ped: par[4]
//
- Double_t signal ;
- Double_t tau =par[2];
- Double_t n =par[3];
+ Double_t signal = 0. ;
+ Double_t tau = par[2];
+ Double_t n = par[3];
Double_t ped = par[4];
- Double_t xx = ( x[0] - par[1] + tau ) / tau ;
+ Double_t xx = ( x[0] - par[1] + tau ) / tau ;
if (xx <= 0)
signal = ped ;
// N: par[3]
// ped: par[4]
//
- Double_t signal ;
- Double_t tau =par[2];
- Double_t n =par[3];
+ Double_t signal = 0. ;
+ Double_t tau = par[2];
+ Double_t n = par[3];
//Double_t ped = par[4]; // not used
Double_t xx = ( x[0] - par[1] + tau ) / tau ;
Float_t delta = 1 ; //Width of "Sorting row".
- Int_t rv ;
+ Int_t rv = 2 ;
AliEMCALRecPoint * clu = (AliEMCALRecPoint *)obj ;
Double_t d = 0., wtot = 0., w = 0.;
Int_t iDigit=0, nstat=0;
- AliEMCALDigit * digit ;
+ AliEMCALDigit * digit=0;
// Calculates the dispersion in cell units
Double_t etai, phii, etaMean=0.0, phiMean=0.0;
// Calculates the center of gravity in the local EMCAL-module coordinates
// Info("Print", " logWeight %f : cluster energy %f ", logWeight, fAmp); // for testing
- AliEMCALDigit * digit;
+ AliEMCALDigit * digit=0;
Int_t i=0, nstat=0;
static Double_t dist = TmaxInCm(Double_t(fAmp));
// Calculates the center of gravity in the global ALICE coordinates
// Info("Print", " logWeight %f : cluster energy %f ", logWeight, fAmp); // for testing
- AliEMCALDigit * digit;
+ AliEMCALDigit * digit=0;
Int_t i=0, nstat=0;
static Double_t dist = TmaxInCm(Double_t(fAmp));
{
// Aug 14-16, 2007 - for fit
// Aug 31 - should be static ??
- static Double_t ycorr;
- static AliEMCALDigit *digit;
+ static Double_t ycorr=0;
+ static AliEMCALDigit *digit=0;
Int_t i=0, nstat=0;
Double_t clXYZ[3]={0.,0.,0.}, clRmsXYZ[3]={0.,0.,0.}, xyzi[3], wtot=0., w=0.;
Bool_t AliEMCALRecPoint::EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos)
{
// Used when digits should be recalibrated
- static Double_t deff, w0, esum;
- static Int_t iDigit;
+ static Double_t deff=0, w0=0, esum=0;
+ static Int_t iDigit=0;
// static AliEMCALDigit *digit;
if(ed.GetSize() && (digits->GetEntries()!=ed.GetSize())) return kFALSE;
Bool_t AliEMCALRecPoint::EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0, TClonesArray *digits, TArrayD &ed, TVector3 &locPos)
{
//Evaluate position of digits in supermodule.
- static AliEMCALDigit *digit;
+ static AliEMCALDigit *digit=0;
Int_t i=0, nstat=0;
Double_t clXYZ[3]={0.,0.,0.}, xyzi[3], wtot=0., w=0.;
// Unfinished - Nov 15,2006
// Distance is calculate in (phi,eta) units
- AliEMCALDigit * digit ;
+ AliEMCALDigit * digit = 0 ;
- Int_t iDigit;
+ Int_t iDigit=0;
if (!fLocPos.Mag()) {
EvalLocalPosition(logWeight, digits);
AliEMCALDigit * digit = 0;
- Double_t etai , phii, w;
+ Double_t etai =0, phii=0, w=0;
int nSupMod=0, nModule=0, nIphi=0, nIeta=0;
int iphi=0, ieta=0;
for(Int_t iDigit=0; iDigit<fMulDigit; iDigit++) {
// have contributed to this RecPoint and calculate deposited energy
// for each track
- AliEMCALDigit * digit ;
+ AliEMCALDigit * digit =0;
Int_t * primArray = new Int_t[fMaxTrack] ;
Float_t * dEPrimArray = new Float_t[fMaxTrack] ;
{
// Constructs the list of parent particles (tracks) which have contributed to this RecPoint
- AliEMCALDigit * digit ;
+ AliEMCALDigit * digit=0 ;
Int_t * parentArray = new Int_t[fMaxTrack] ;
Float_t * dEParentArray = new Float_t[fMaxTrack] ;
Float_t menergy = 0. ;
Int_t iDigit;
-
for(iDigit=0; iDigit<fMulDigit; iDigit++) {
if(fEnergyList[iDigit] > menergy)
// Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
// energy difference between two local maxima
- AliEMCALDigit * digit ;
- AliEMCALDigit * digitN ;
+ AliEMCALDigit * digit = 0;
+ AliEMCALDigit * digitN = 0;
- Int_t iDigitN ;
- Int_t iDigit ;
+ Int_t iDigitN = 0 ;
+ Int_t iDigit = 0 ;
for(iDigit = 0; iDigit < fMulDigit; iDigit++)
maxAt[iDigit] = (AliEMCALDigit*) digits->At(fDigitsList[iDigit]) ;
digit = maxAt[iDigit] ;
for(iDigitN = 0; iDigitN < fMulDigit; iDigitN++) {
- digitN = (AliEMCALDigit *) digits->At(fDigitsList[iDigitN]) ;
+ digitN = (AliEMCALDigit *) digits->At(fDigitsList[iDigitN]) ;
if ( AreNeighbours(digit, digitN) ) {
if (fEnergyList[iDigit] > fEnergyList[iDigitN] ) {
void AliEMCALRecPoint::EvalTime(TClonesArray * digits){
// time is set to the time of the digit with the maximum energy
- Float_t maxE = 0;
- Int_t maxAt = 0;
+ Float_t maxE = 0;
+ Int_t maxAt = 0;
for(Int_t idig=0; idig < fMulDigit; idig++){
if(fEnergyList[idig] > maxE){
- maxE = fEnergyList[idig] ;
+ maxE = fEnergyList[idig] ;
maxAt = idig;
}
}
Coord_t x = pos.X() ;
Coord_t y = pos.Z() ;
Color_t markercolor = 1 ;
- Size_t markersize = 1. ;
+ Size_t markersize = 1.;
Style_t markerstyle = 5 ;
if (!gPad->IsBatch()) {
// e energy in GeV)
// 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 tmax = 0.; // position of electromagnetic shower max in cm
+ 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 tmax = 0.; // position of electromagnetic shower max in cm
- tmax = 0.0;
if(e>0.1) {
tmax = TMath::Log(e) + ca;
if (key==0) tmax += 0.5;
Double_t AliEMCALRecPoint::GetPointEnergy() const
{
//Returns energy ....
- static double e;
- e=0.0;
+ static double e=0.0;
for(int ic=0; ic<GetMultiplicity(); ic++) e += double(fEnergyList[ic]);
return e;
}
}
Int_t nEvents = fLastEvent - fFirstEvent + 1;
- Int_t ievent;
Float_t energy=0.; // de * fSampling - 23-nov-04
rl->LoadKinematics();
rl->LoadHits("EMCAL");
-
+
+ Int_t ievent;
for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
rl->GetEvent(ievent);
TTree * treeS = emcalLoader->TreeS();
//Center of supermodules
Float_t *pars = geom->GetSuperModulesPars();
Double_t rpos = (geom->GetEnvelop(0) + geom->GetEnvelop(1))/2.;
- Double_t phi, phiRad, xpos, ypos, zpos;
+ Double_t phi=0, phiRad=0, xpos=0, ypos=0, zpos=0;
AliEMCALSuperModuleCoords *idealSM = new AliEMCALSuperModuleCoords[fNSuperModule];
for (Int_t smodnum = 0; smodnum < geom->GetNumberOfSuperModules(); ++smodnum) {
//Center of supermodules
Float_t *pars = geom->GetSuperModulesPars();
Double_t rpos = (geom->GetEnvelop(0) + geom->GetEnvelop(1))/2.;
- Double_t phi, phiRad, xpos, ypos, zpos;
+ Double_t phi=0, phiRad=0, xpos=0, ypos=0, zpos=0;
zpos = pars[2];
//
// parameters are chosen according to static variable fUseOuterParams
- Double_t alpha, x, params[5], cov[15];
+ Double_t alpha=0., x=0., params[5], cov[15];
if (fgUseOuterParams) {
if(t.GetOuterParam()){
t.GetOuterExternalParameters(alpha, x, params);
AliEMCALTrack *that = (AliEMCALTrack*)obj;
- Double_t thisP[3], thisVal, thatP[3], thatVal;
+ Double_t thisP[3], thisVal=0., thatP[3], thatVal=0.;
if (fgSortByPt) {
this->GetPxPyPz(thisP);
// the local track reference frame is adjusted accordingly.
//
- Double_t y;
+ Double_t y=0.;
Double_t field = GetBz();
Double_t width = TMath::Pi() / 9.0; // width of TPC/TRD/EMCAL sector (= 20 deg)
Double_t ymax = TMath::Abs(xk * TMath::Tan(0.5 * width)); // max allowed Y in local coords at distance xk
if (TMath::Abs(y) <= ymax) return SimplePropagation(xk, d, x0);
// otherwise, try change a sector to find one where the propagation is ok
- Int_t i, incr, istart, nloops;
+ Int_t i=0, incr=0, istart=0, nloops=0;
Double_t alpha = GetAlpha();
incr = (y > ymax) ? 1 : -1;
if (alpha < 0.0) alpha += TMath::TwoPi();
outTree->Branch("indexT", &indexT, "indexT/I");
outTree->Branch("label", &label , "label/I");
- Double_t dist;
+ Double_t dist=0.;
Int_t ic, nClusters = (Int_t)fClusters->GetEntries();
Int_t it, nTracks = fTracks->GetEntries();
Int_t nTracks = esd->GetNumberOfTracks();
fTracks = new TObjArray(0);
- Int_t i, j;
- Bool_t isKink;
- Double_t alpha;
+ Int_t i=0, j=0;
+ Bool_t isKink=kFALSE;
+ Double_t alpha=0.;
for (i = 0; i < nTracks; i++) {
AliESDtrack *esdTrack = esd->GetTrack(i);
// set by default the value corresponding to "no match"
x0 = 0.0;
}
if (fNPropSteps) {
- Int_t i;
- Double_t r;
+ Int_t i=0;
+ Double_t r=0.;
cout.setf(ios::fixed);
cout.precision(5);
if (isTrue) cout << "Init : " << rt << ' ' << x << ' ' << y << ' ' << z << endl;
TVector3 vt(x, y, z);
Double_t angle = TMath::Abs(vc.Angle(vt)) * TMath::RadToDeg();
// check: where is the track?
- Double_t r, phiT, phiC;
- r = TMath::Sqrt(pos[0]*pos[0] + pos[1]*pos[1]);
- phiT = TMath::ATan2(pos[1], pos[0]) * TMath::RadToDeg();
- phiC = vc.Phi() * TMath::RadToDeg();
+// Double_t r = TMath::Sqrt(pos[0]*pos[0] + pos[1]*pos[1]);
+// Double_t phiT = TMath::ATan2(pos[1], pos[0]) * TMath::RadToDeg();
+// Double_t phiC = vc.Phi() * TMath::RadToDeg();
//cout << "Propagated R, phiT, phiC = " << r << ' ' << phiT << ' ' << phiC << endl;
if (angle > fCutAngle) {
Double_t distance = 2.0 * fMaxDist;
- Double_t x0, rho;
+ Double_t x0=0., rho=0.;
if (fTrackCorrMode == kTrackCorrMMB) {
Double_t pos1[3], pos2[3], param[6];
tr->GetXYZ(pos1);
TVector3 vc(cl->X(), cl->Y(), cl->Z());
// rotate the vector in order to put all clusters on a plane intersecting
// vertically the X axis; the angle depends on the sector
- Double_t clusterRot, clusterPhi = vc.Phi() * TMath::RadToDeg();
+ Double_t clusterRot=0., clusterPhi = vc.Phi() * TMath::RadToDeg();
if (clusterPhi < 0.0) clusterPhi += 360.0;
if (clusterPhi < 100.0) {
clusterRot = -90.0;
// compute the 'phi' coordinate of the intersection point to
// the EMCAL surface
Double_t x = vc.X();
- Double_t y;
+ Double_t y = 0.;
track->GetYAt(vc.X(), track->GetBz(), y);
Double_t tmp = x*TMath::Cos(track->GetAlpha()) - y*TMath::Sin(track->GetAlpha());
y = x*TMath::Sin(track->GetAlpha()) + y*TMath::Cos(track->GetAlpha());
AliEMCALTrack tr(*track);
- Int_t sector;
+ Int_t sector=-1;
Double_t distance = 2.0 * fMaxDist;
- Double_t dx, dy, dz;
- Double_t phi, alpha, slope, tgtXnum, tgtXden, sectorWidth = 20.0 * TMath::DegToRad();
- Double_t xcurr, xprop, param[6] = {0., 0., 0., 0., 0., 0.}, x0, rho, bz;
- Double_t x[3], x1[3], x2[3];
+ Double_t dx=0., dy=0., dz=0.;
+ Double_t phi=0., alpha=0., slope=0., tgtXnum=0., tgtXden=0., sectorWidth = 20.0 * TMath::DegToRad();
+ Double_t xcurr=0., xprop=0., param[6] = {0., 0., 0., 0., 0., 0.}, x0=0., rho=0., bz=0.;
+ Double_t x[3]= {0., 0., 0.}, x1[3]= {0., 0., 0.}, x2[3]= {0., 0., 0.};
// get initial track position
xcurr = tr.GetX();
if (!tr.GetXYZAt(xprop, bz, x2)) return distance;
//AliKalmanTrack::MeanMaterialBudget(x1, x2, param);
rho = param[0]*param[4];
- x0 = param[1];
+ x0 = param[1];
if (!tr.PropagateTo(xprop, x0, rho)) return distance;
//if (!tr.PropagateTo(xprop, 0.0, 0.0)) return distance;
// Propagates the track to the proximity of the EMCAL surface
//
- Double_t xcurr, xtemp, xprop = 438.0, step = 10.0, param[6], x0, rho, bz;
- Double_t x1[3], x2[3];
+ Double_t xcurr=0., xtemp=0., xprop = 438.0, step = 10.0, param[6]= {0., 0., 0., 0., 0., 0.}, x0=0., rho=0., bz=0.;
+ Double_t x1[3]= {0., 0., 0.}, x2[3]= {0., 0., 0.};
// get initial track position
xcurr = tr->GetX();
// initialize counters and indexes
Int_t count = 0;
- Int_t ic, nClusters = (Int_t)fClusters->GetEntries();
- Int_t it, nTracks = fTracks->GetEntries();
+ Int_t ic=0, nClusters = (Int_t)fClusters->GetEntries();
+ Int_t it=0, nTracks = fTracks->GetEntries();
// external loop on clusters, internal loop on tracks
- Double_t dist;
+ Double_t dist=0.;
for (ic = 0; ic < nClusters; ic++) {
AliEMCALMatchCluster *cluster = (AliEMCALMatchCluster*)fClusters->At(ic);
for (it = 0; it < nTracks; it++) {
Int_t count = 0;
// initialize flags to check repetitions
- Int_t ic, nClusters = (Int_t)fClusters->GetEntries();
- Int_t it, nTracks = fTracks->GetEntries();
+ Int_t ic=0, nClusters = (Int_t)fClusters->GetEntries();
+ Int_t it=0, nTracks = fTracks->GetEntries();
Bool_t *usedC = new Bool_t[nClusters];
Bool_t *usedT = new Bool_t[nTracks];
for (ic = 0; ic < nClusters; ic++) usedC[ic] = kFALSE;
if (!tr->PropagateToGlobal(x,y,z, 0.0, 0.0)) {
return error;
}
- Double_t pos[3];
+ Double_t pos[3]= {0., 0., 0.};
tr->GetXYZ(pos);
TVector3 ExTrPos(pos[0],pos[1],pos[2]);
return ExTrPos;
// Translates an AliESDCaloCluster object into the internal format.
// Index of passed cluster in its native array must be specified.
//
- Float_t clpos[3];
+ Float_t clpos[3]= {0., 0., 0.};
caloCluster->GetPosition(clpos);
fX = (Double_t)clpos[0];
// Add a hit to the hit list.
// An EMCAL hit is the sum of all hits in a tower section
// originating from the same entering particle
- Int_t hitCounter;
+ Int_t hitCounter=0;
- AliEMCALHit *newHit;
- AliEMCALHit *curHit;
+ AliEMCALHit *newHit=0;
+ AliEMCALHit *curHit=0;
Bool_t deja = kFALSE;
newHit = new AliEMCALHit(shunt, primary, tracknumber, iparent, ienergy, id, hits, p);
void AliEMCALv1::StepManager(void){
// Accumulates hits as long as the track stays in a tower
- Int_t id[2]; // (phi, Eta) indices
+ Int_t id[2]={0,0}; // (phi, Eta) indices
// position wrt MRS and energy deposited
Float_t xyzte[5]={0.,0.,0.,0.,0.};// position wrt MRS, time and energy deposited
Float_t pmom[4]={0.,0.,0.,0.};
AliEMCALGeometry * geom = GetGeometry() ;
- TParticle *part;
- Int_t parent;
+ TParticle *part=0;
+ Int_t parent=-1;
static Int_t idXPHI = gMC->VolId("XPHI");
if(gMC->CurrentVolID(copy) == idXPHI ) { // We are in a Scintillator Layer
else
birkC1Mod=fBirkC1;
}
- Float_t dedxcm;
+ Float_t dedxcm=0.;
if (gMC->TrackStep()>0)
dedxcm=1000.*gMC->Edep()/gMC->TrackStep();
else
// Add a hit to the hit list.
// An EMCAL hit is the sum of all hits in a tower section
// originating from the same entering particle
- static Int_t hitCounter;
- static AliEMCALHit *newHit, *curHit;
- static Bool_t deja;
-
- deja = kFALSE;
+ static Int_t hitCounter=0.;
+ static AliEMCALHit *newHit=0, *curHit=0;
+ static Bool_t deja=kFALSE;
newHit = new AliEMCALHit(shunt, primary, tracknumber, iparent, ienergy, id, hits, p);
for ( hitCounter = fNhits-1; hitCounter >= 0 && !deja; hitCounter-- ) {
static TLorentzVector pos; // Lorentz vector of the track current position.
static TLorentzVector mom; // Lorentz vector of the track current momentum.
static Float_t ienergy = 0; // part->Energy();
- static TString curVolName;
- static int supModuleNumber, moduleNumber, yNumber, xNumber, absid;
+ static TString curVolName="";
+ static int supModuleNumber=-1, moduleNumber=-1, yNumber=-1, xNumber=-1, absid=-1;
static int keyGeom=1; //real TRD1 geometry
static const char *vn = "SCMX"; // Apr 13, 2006 - only TRD1 case now
static int nSMOP[7]={1,3,5,7,9,11}; // 30-mar-05
if(gMC->VolId("WSUC")==1) printf(" WSUC - cosmic ray stand geometry \n");
}
Int_t tracknumber = gAlice->GetMCApp()->GetCurrentTrackNumber();
- Int_t parent;
- TParticle* part;
+ Int_t parent=0;
+ TParticle* part=0;
curVolName = gMC->CurrentVolName();
if(curVolName.Contains(vn) || curVolName.Contains("SCX")) { // We are in a scintillator layer; SCX for 3X3
else birkC1Mod = fBirkC1;
}
- Float_t dedxcm;
+ Float_t dedxcm=0.;
if (gMC->TrackStep()>0) dedxcm=1000.*gMC->Edep()/gMC->TrackStep();
else dedxcm=0;
lightYield=lightYield/(1.+birkC1Mod*dedxcm+fBirkC2*dedxcm*dedxcm);
TClonesArray *hits = Hits();
Int_t nhits = hits->GetEntries(), absId, nSupMod, nModule, nIphi, nIeta, iphi, ieta;
AliEMCALHit *hit = 0;
- Double_t de, des=0.;
+ Double_t de=0., des=0.;
for(Int_t i=0; i<nhits; i++) {
hit = (AliEMCALHit*)hits->UncheckedAt(i);
absId = hit->GetId();
// Add a hit to the hit list.
// An EMCAL hit is the sum of all hits in a tower section
// originating from the same entering particle
- static Int_t hitCounter;
- static AliEMCALHitv1 *newHit, *curHit;
- static Bool_t deja;
-
- deja = kFALSE;
+ static Int_t hitCounter=0;
+ static AliEMCALHitv1 *newHit=0, *curHit=0;
+ static Bool_t deja = kFALSE;
newHit = new AliEMCALHitv1(shunt, primary, tracknumber, iparent, ienergy, id, hits, p);
for ( hitCounter = fNhits-1; hitCounter >= 0 && !deja; hitCounter-- ) {
- curHit = (AliEMCALHitv1*) (*fHits)[hitCounter];
+ curHit = (AliEMCALHitv1*) (*fHits)[hitCounter];
// We add hits with the same tracknumber, while GEANT treats
// primaries succesively
if(curHit->GetPrimary() != primary)
static TLorentzVector pos; // Lorentz vector of the track current position.
static TLorentzVector mom; // Lorentz vector of the track current momentum.
static Float_t ienergy = 0;
- static TString curVolName;
- static int supModuleNumber, moduleNumber, yNumber, xNumber, absid;
+ static TString curVolName="";
+ static int supModuleNumber=-1, moduleNumber=-1, yNumber=-1, xNumber=-1, absid=-1;
static int keyGeom=0;
static char *vn = "SX"; // 15-mar-05
static int nSMOP[7]={1,3,5,7,9,11}; // 30-mar-05
else BirkC1_mod=fBirkC1;
}
- Float_t dedxcm;
+ Float_t dedxcm=0;
if (gMC->TrackStep()>0) dedxcm=1000.*gMC->Edep()/gMC->TrackStep();
else dedxcm=0;
lightYield=lightYield/(1.+BirkC1_mod*dedxcm+fBirkC2*dedxcm*dedxcm);