// //
////////////////////////////////////////////////////////////////////////////
-#include <stdlib.h>
-
#include <TH1.h>
#include <TRandom.h>
#include <TMath.h>
-#include <TParticle.h>
#include <TVirtualMC.h>
#include <TVirtualMCStack.h>
#include "AliModule.h"
-#include "AliLog.h"
-#include "AliMC.h"
#include "AliTRDsimTR.h"
// AliTRDsimTR copy constructor
//
- if (((AliTRDsimTR &) s).fNFoils) {
- delete [] ((AliTRDsimTR &) s).fNFoils;
- }
- ((AliTRDsimTR &) s).fNFoils = new Int_t[fNFoilsDim];
+ fNFoils = new Int_t[fNFoilsDim];
for (Int_t iFoil = 0; iFoil < fNFoilsDim; iFoil++) {
- ((AliTRDsimTR &) s).fNFoils[iFoil] = fNFoils[iFoil];
+ fNFoils[iFoil] = ((AliTRDsimTR &) s).fNFoils[iFoil];
}
- if (((AliTRDsimTR &) s).fNFoilsUp) {
- delete [] ((AliTRDsimTR &) s).fNFoilsUp;
- }
- ((AliTRDsimTR &) s).fNFoilsUp = new Double_t[fNFoilsDim];
+ fNFoilsUp = new Double_t[fNFoilsDim];
for (Int_t iFoil = 0; iFoil < fNFoilsDim; iFoil++) {
- ((AliTRDsimTR &) s).fNFoilsUp[iFoil] = fNFoilsUp[iFoil];
+ fNFoilsUp[iFoil] = ((AliTRDsimTR &) s).fNFoilsUp[iFoil];
}
- if (((AliTRDsimTR &) s).fSigma) {
- delete [] ((AliTRDsimTR &) s).fSigma;
- }
- ((AliTRDsimTR &) s).fSigma = new Double_t[fSpNBins];
+ fSigma = new Double_t[fSpNBins];
for (Int_t iBin = 0; iBin < fSpNBins; iBin++) {
- ((AliTRDsimTR &) s).fSigma[iBin] = fSigma[iBin];
+ fSigma[iBin] = ((AliTRDsimTR &) s).fSigma[iBin];
}
- fSpectrum->Copy(*((AliTRDsimTR &) s).fSpectrum);
-
}
//_____________________________________________________________________________
//
if (this != &s) ((AliTRDsimTR &) s).Copy(*this);
+ this->Init();
return *this;
((AliTRDsimTR &) s).fSigma[iBin] = fSigma[iBin];
}
- fSpectrum->Copy(*((AliTRDsimTR &) s).fSpectrum);
-
}
//_____________________________________________________________________________
//_____________________________________________________________________________
Double_t AliTRDsimTR::Interpolate(Double_t energyMeV
- , Double_t *en, Double_t *mu, Int_t n)
+ , Double_t *en
+ , const Double_t * const mu
+ , Int_t n)
{
//
// Interpolates the photon absorbtion cross section
//_____________________________________________________________________________
Int_t AliTRDsimTR::Locate(Double_t *xv, Int_t n, Double_t xval
- , Int_t &kl, Double_t &dx)
+ , Int_t &kl, Double_t &dx)
{
//
// Locates a point (xval) in a 1-dim grid (xv(n))