In some cases affecting AliESDEvent and AliTPCtrackerMI memory leaks introduced by placement-new were fixed. The placement-new sometimes overwrote pointers to memory allocated by the class itself.The placement-new was replaced with assigments where it was considered appropiate (for this some operator= were modified) or an explicit call to the destructor before was used.
Christian
}
}
//delete array...
- for(Int_t i=0;i<iNpars;i++) delete derivPart[i]; delete derivPart;
+ for(Int_t i=0;i<iNpars;i++) delete [] derivPart[i]; delete [] derivPart;
}//FitFunction()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// delete temporary arrays
//
+ delete[] forbidden;
delete[] minPointAngle;
delete[] maxr;
delete[] minr;
// cpy ctor
}
+AliPHOSTrigger::~AliPHOSTrigger()
+{
+ // dtor
+
+ if(fADCValuesHighnxn)delete [] fADCValuesHighnxn;
+ if(fADCValuesLownxn)delete [] fADCValuesLownxn;
+ if(fADCValuesHigh2x2)delete [] fADCValuesHigh2x2;
+ if(fADCValuesLow2x2)delete [] fADCValuesLow2x2;
+ // fDigitsList is now ours...
+}
+
//_________________________________________________________________________
AliPHOSTrigger & AliPHOSTrigger::operator = (const AliPHOSTrigger &)
{
//Transform digit amplitude in Raw Samples
if (fADCValuesLow2x2 == 0) {
fADCValuesLow2x2 = new Int_t[nTimeBins];
- fADCValuesHigh2x2 = new Int_t[nTimeBins];
}
+ if(!fADCValuesHigh2x2) fADCValuesHigh2x2 = new Int_t[nTimeBins];
+
pulse.SetAmplitude(f2x2MaxAmp);
pulse.SetTZero(maxtimeR2);
AliPHOSTrigger() ; // ctor
AliPHOSTrigger(const AliPHOSTrigger & trig) ; // cpy ctor
- virtual ~AliPHOSTrigger(){}; //virtual dtor
-
+ virtual ~AliPHOSTrigger();
virtual void CreateInputs(); //Define trigger inputs for Central Trigger Processor
void Print(const Option_t * opt ="") const ;
delete [] adcpre;
delete [] ncellpre;
delete [] radpre;
+ delete [] sortcoord;
delete [] clupidpre;
delete [] xpadcpv;
delete [] ypadcpv;
delete fPMDcontout;
fPMDcontout=0;
}
+ delete fPMDutil;
}
//--------------------------------------------------------------------//
void AliPMDtracker::LoadClusters(TTree *treein)
if(this!=&ctrig) {
TNamed::operator=(ctrig);
// CKB dont't want to create leak if fTriggerAmp points to
- // somthing already, use new with placement
- if(fTriggerAmplitudes){
- fTriggerAmplitudes = new(fTriggerAmplitudes) TArrayF(*ctrig.fTriggerAmplitudes);
- }
- else{
- fTriggerAmplitudes = new TArrayF(*ctrig.fTriggerAmplitudes);
- }
- if(fTriggerPosition){
- fTriggerPosition = new(fTriggerPosition) TArrayF(*ctrig.fTriggerPosition);
- }
- else{
- fTriggerPosition = new TArrayF(*ctrig.fTriggerPosition);
- }
+ // something already
+ delete fTriggerAmplitudes;
+ fTriggerAmplitudes = new TArrayF(*ctrig.fTriggerAmplitudes);
+ delete fTriggerPosition;
+ fTriggerPosition = new TArrayF(*ctrig.fTriggerPosition);
}
return *this;
}
if(fESDTZERO) fESDTZERO->Reset();
// CKB no clear/reset implemented
if(fSPDVertex){
+ fSPDVertex->~AliESDVertex();
new (fSPDVertex) AliESDVertex();
fSPDVertex->SetName(fESDListName[kSPDVertex]);
}
if(fPrimaryVertex){
+ fPrimaryVertex->~AliESDVertex();
new (fPrimaryVertex) AliESDVertex();
fPrimaryVertex->SetName(fESDListName[kPrimaryVertex]);
}
- if(fSPDMult)new (fSPDMult) AliMultiplicity();
+ if(fSPDMult){
+ fSPDMult->~AliMultiplicity();
+ new (fSPDMult) AliMultiplicity();
+ }
if(fPHOSTrigger)fPHOSTrigger->Reset();
if(fEMCALTrigger)fEMCALTrigger->Reset();
if(fTracks)fTracks->Delete();
void AliESDEvent::SetVertex(const AliESDVertex *vertex) {
// use already allocated space
if(fSPDVertex){
- new(fSPDVertex) AliESDVertex(*vertex);
+ *fSPDVertex = *vertex;
fSPDVertex->SetName(fESDListName[kSPDVertex]);
}
}
void AliESDEvent::SetPrimaryVertex(const AliESDVertex *vertex) {
- // use already allocated space
if(fPrimaryVertex){
- new(fPrimaryVertex) AliESDVertex(*vertex);
+ *fPrimaryVertex = *vertex;
fPrimaryVertex->SetName(fESDListName[kPrimaryVertex]);
}
}
void AliESDEvent::SetMultiplicity(const AliMultiplicity *mul) {
if(fSPDMult){
- new (fSPDMult) AliMultiplicity(*mul);
+ *fSPDMult = *mul;
}
}
void AliESDEvent::SetFMDData(AliESDFMD * obj) {
// use already allocated space
if(fESDFMD){
- new(fESDFMD) AliESDFMD(*obj);
+ *fESDFMD = *obj;
}
}
AliESDFMD::operator=(const AliESDFMD& other)
{
// Default CTOR
- fMultiplicity = other.fMultiplicity;
- fEta = other.fEta;
+ if(this!=&other){
+ TObject::operator=(other);
+ fMultiplicity = other.fMultiplicity;
+ fEta = other.fEta;
+ }
return *this;
}
//
// assignment operator
//
- if(&source == this) return *this;
- this->SetName(source.GetName());
- this->SetTitle(source.GetTitle());
- for(Int_t i=0;i<3;i++) {
- fPosition[i] = source.fPosition[i];
- fSNR[i] = source.fSNR[i];
- }
- fCovXX = source.fCovXX;
- fCovXY = source.fCovXY;
- fCovYY = source.fCovYY;
- fCovXZ = source.fCovXZ;
- fCovYZ = source.fCovYZ;
- fCovZZ = source.fCovZZ;
- fChi2 = source.fChi2;
- fSigma = source.GetDispersion();
- fNContributors = source.GetNContributors();
- fNIndices = source.GetNIndices();
- if(source.fNIndices>0) {
- fIndices = new UShort_t[fNIndices];
- memcpy(fIndices,source.fIndices,fNIndices*sizeof(UShort_t));
+ if(&source != this){
+ AliVertex::operator=(source);
+ for(Int_t i=0;i<3;++i)fSNR[i] = source.fSNR[i];
+ fCovXX = source.fCovXX;
+ fCovXY = source.fCovXY;
+ fCovYY = source.fCovYY;
+ fCovXZ = source.fCovXZ;
+ fCovYZ = source.fCovYZ;
+ fCovZZ = source.fCovZZ;
+ fChi2 = source.fChi2;
}
return *this;
}
for(Int_t i=0; i<AliPID::kSPECIES; i++) fIntegratedTime[i] = 0;
}
-//_______________________________________________________________________
AliKalmanTrack::AliKalmanTrack(const AliKalmanTrack &t):
AliExternalTrackParam(t),
fLab(t.fLab),
fIntegratedTime[i] = t.fIntegratedTime[i];
}
+AliKalmanTrack& AliKalmanTrack::operator=(const AliKalmanTrack&o){
+ if(this!=&o){
+ AliExternalTrackParam::operator=(o);
+ fLab = o.fLab;
+ fFakeRatio = o.fFakeRatio;
+ fChi2 = o.fChi2;
+ fMass = o.fMass;
+ fN = o.fN;
+ fStartTimeIntegral = o.fStartTimeIntegral;
+ for(Int_t i = 0;i<AliPID::kSPECIES;++i)fIntegratedTime[i] = o.fIntegratedTime[i];
+ fIntegratedLength = o.fIntegratedLength;
+ }
+ return *this;
+}
+
//_______________________________________________________________________
void AliKalmanTrack::StartTimeIntegral()
{
AliKalmanTrack();
AliKalmanTrack(const AliKalmanTrack &t);
virtual ~AliKalmanTrack(){};
-
+ AliKalmanTrack& operator=(const AliKalmanTrack &o);
void SetLabel(Int_t lab) {fLab=lab;}
virtual Double_t GetPredictedChi2(const AliCluster *c) const = 0;
//
- char* fname;
+ char* fname = 0;
TFile* file = 0;
if (fMap == k2kG) {
fSolenoid = 2.;
fFieldMap[0] = dynamic_cast<AliFieldMap*>(file->Get("L3B02"));
file->Close();
delete file;
+ delete fname; // see documentation to expand filenam
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/DipB02.root");
file = new TFile(fname);
fFieldMap[1] = dynamic_cast<AliFieldMap*>(file->Get("DipB02"));
file->Close();
delete file;;
-
+ delete fname;
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/ExtB02.root");
file = new TFile(fname);
fFieldMap[2] = dynamic_cast<AliFieldMap*>(file->Get("ExtB02"));
file->Close();
delete file;
+ delete fname;
} else if (fMap == k4kG) {
fSolenoid = 4.;
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/L3B04.root");
fFieldMap[0] = dynamic_cast<AliFieldMap*>(file->Get("L3B04"));
file->Close();
delete file;
+ delete fname;
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/DipB04.root");
file = new TFile(fname);
fFieldMap[1] = dynamic_cast<AliFieldMap*>(file->Get("DipB04"));
file->Close();
+ delete fname;
delete file;
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/ExtB04.root");
file = new TFile(fname);
fFieldMap[2] = dynamic_cast<AliFieldMap*>(file->Get("ExtB04"));
file->Close();
+ delete fname;
delete file;
} else if (fMap == k5kG) {
fSolenoid = 5.;
file = new TFile(fname);
fFieldMap[0] = dynamic_cast<AliFieldMap*>(file->Get("L3B05"));
file->Close();
- delete file;
+ delete file;
+ delete fname;
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/DipB05.root");
file = new TFile(fname);
fFieldMap[1] = dynamic_cast<AliFieldMap*>(file->Get("DipB05"));
file->Close();
delete file;
-
+ delete fname;
fname = gSystem->ExpandPathName("$(ALICE_ROOT)/data/maps/ExtB05.root");
file = new TFile(fname);
fFieldMap[2] = dynamic_cast<AliFieldMap*>(file->Get("ExtB05"));
file->Close();
delete file;
+ delete fname;
}
if (!fL3Option) fSolenoidUser = fSolenoid;
{
// Default Constructor
-
fFiredChips[0] = -1;
fFiredChips[1] = -1;
}
fPhisingle[i]=ps[i];
}
}
-
fFiredChips[0] = -1;
fFiredChips[1] = -1;
}
fPhisingle(0)
{
// copy constructor
-
Duplicate(m);
-
}
//______________________________________________________________________
if(this == &m)return *this;
((TObject *)this)->operator=(m);
- if (fTh)delete [] fTh;
- if(fPhi)delete [] fPhi;
- if(fDeltPhi)delete [] fDeltPhi;
- if(fLabels)delete [] fLabels;
- if(fThsingle)delete [] fThsingle;
- if(fPhisingle)delete [] fPhisingle;
+ if(fTh)delete [] fTh;fTh = 0;
+ if(fPhi)delete [] fPhi;fPhi = 0;
+ if(fDeltPhi)delete [] fDeltPhi;fDeltPhi = 0;
+ if(fLabels)delete [] fLabels;fLabels = 0;
+ if(fThsingle)delete [] fThsingle;fThsingle = 0;
+ if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
Duplicate(m);
return *this;
// used by copy constructor and assignment operator
fNtracks = m.fNtracks;
if(fNtracks>0){
- fTh = new Float_t [fNtracks];
- fPhi = new Float_t [fNtracks];
- fDeltPhi = new Float_t [fNtracks];
+ fTh = new Float_t[fNtracks];
+ fPhi = new Float_t[fNtracks];
+ fDeltPhi = new Float_t[fNtracks];
fLabels = new Int_t[fNtracks];
}
else {
}
fNsingle = m.fNsingle;
if(fNsingle>0){
- fThsingle = new Float_t [fNsingle];
- fPhisingle = new Float_t [fNsingle];
+ fThsingle = new Float_t[fNsingle];
+ fPhisingle = new Float_t[fNsingle];
}
else {
fThsingle = 0;
//______________________________________________________________________
AliMultiplicity::~AliMultiplicity(){
// Destructor
- if (fTh)delete [] fTh;
- if(fPhi)delete [] fPhi;
- if(fDeltPhi)delete [] fDeltPhi;
- if(fLabels)delete [] fLabels;
- if(fThsingle)delete [] fThsingle;
- if(fPhisingle)delete [] fPhisingle;
+ if(fTh)delete [] fTh;fTh = 0;
+ if(fPhi)delete [] fPhi;fPhi = 0;
+ if(fDeltPhi)delete [] fDeltPhi;fDeltPhi = 0;
+ if(fLabels)delete [] fLabels;fLabels = 0;
+ if(fThsingle)delete [] fThsingle;fThsingle = 0;
+ if(fPhisingle)delete [] fPhisingle;fPhisingle = 0;
+
}
//
// assignment operator
//
- if(&source == this) return *this;
- this->SetName(source.GetName());
- this->SetTitle(source.GetTitle());
- for(Int_t i=0;i<3;i++)fPosition[i] = source.fPosition[i];
- fSigma = source.GetDispersion();
- fNContributors = source.GetNContributors();
- fNIndices = source.GetNIndices();
- fIndices = 0x0;
- if(source.fNIndices>0) {
- fIndices = new UShort_t[fNIndices];
- memcpy(fIndices,source.fIndices,fNIndices*sizeof(UShort_t));
+ if(&source != this){
+ TNamed::operator=(source);
+ for(Int_t i=0;i<3;i++)fPosition[i] = source.fPosition[i];
+ fSigma = source.GetDispersion();
+ fNContributors = source.GetNContributors();
+ fNIndices = source.GetNIndices();
+ if(fIndices)delete [] fIndices;
+ fIndices = 0;
+ if(fNIndices>0) {
+ fIndices = new UShort_t[fNIndices];
+ memcpy(fIndices,source.fIndices,fNIndices*sizeof(UShort_t));
+ }
}
return *this;
}
// Default Destructor
//
delete [] fIndices;
+ fIndices = 0;
}
//--------------------------------------------------------------------------
void AliVertex::GetXYZ(Double_t position[3]) const {
/*
$Log$
+Revision 1.9 2006/11/06 16:07:15 kowal2
+Eff C++
+
Revision 1.8 2004/03/30 14:09:22 kowal2
Changes due to the coding conventions
ClassImp(AliTPCExactPoint)
ClassImp(AliTPCClusterPoint)
ClassImp(AliTPCTrackerPoint)
+
+AliTPCTrackerPoint& AliTPCTrackerPoint::operator=(const AliTPCTrackerPoint& o){
+ if(this!=&o){
+ fTX = o.fTX;
+ fTY = o.fTY;
+ fTZ = o.fTZ;
+ fTAngleZ = o.fTAngleZ;
+ fTAngleY = o.fTAngleY;
+ fSigmaZ = o.fSigmaZ;
+ fSigmaY = o.fSigmaY;
+ fErrZ = o.fErrZ;
+ fErrY = o.fErrY;
+ fIsShared = o.fIsShared;
+ }
+ return *this;
+}
+
ClassImp(AliTPCTrackPoint)
ClassImp(AliTPCTrackPoint2)
ClassImp(AliTPCTrackPointRef)
fErrY(0),
fIsShared(0){}
virtual ~AliTPCTrackerPoint(){}
+ AliTPCTrackerPoint &operator=(const AliTPCTrackerPoint& o);
Float_t GetX() const {return (fTX*0.01);}
Float_t GetZ() const {return (fTZ*0.01);}
Float_t GetY() const {return (fTY*0.01);}
UShort_t fErrY; // y error estimate - in mm - 50 mum precision
Char_t fIsShared; // indicate sharing of the point between several tracks
- ClassDef(AliTPCTrackerPoint,1)
+ ClassDef(AliTPCTrackerPoint,2)
};
class AliTPCClusterPoint {
for (Int_t i=0;i<160;i++) fSharedMap[i]=kFALSE;
}
//_________________________________________________
-AliTPCseed & AliTPCseed::operator =(const AliTPCseed & param)
+AliTPCseed & AliTPCseed::operator=(const AliTPCseed ¶m)
{
//
- // assignment operator - dummy
+ // assignment operator
//
- fRow=param.fRow;
+ if(this!=¶m){
+ AliTPCtrack::operator=(param);
+ fEsd =param.fEsd;
+ for(Int_t i = 0;i<160;++i)fClusterPointer[i] = param.fClusterPointer[i]; // this is not allocated by AliTPCSeed
+ fClusterOwner = param.fClusterOwner;
+ // leave out fPoint, they are also not copied in the copy ctor...
+ // but deleted in the dtor... strange...
+ // fPoints =
+ // fEPoints =
+ fRow = param.fRow;
+ fSector = param.fSector;
+ fRelativeSector = param.fRelativeSector;
+ fCurrentSigmaY2 = param.fCurrentSigmaY2;
+ fCurrentSigmaZ2 = param.fCurrentSigmaZ2;
+ fErrorY2 = param.fErrorY2;
+ fErrorZ2 = param.fErrorZ2;
+ fCurrentCluster = param.fCurrentCluster; // this is not allocated by AliTPCSeed
+ fCurrentClusterIndex1 = param.fCurrentClusterIndex1;
+ fInDead = param.fInDead;
+ fIsSeeding = param.fIsSeeding;
+ fNoCluster = param.fNoCluster;
+ fSort = param.fSort;
+ fBSigned = param.fBSigned;
+ for(Int_t i = 0;i<4;++i){
+ fDEDX[i] = param.fDEDX[i];
+ fSDEDX[i] = param.fSDEDX[i];
+ fNCDEDX[i] = param.fNCDEDX[i];
+ }
+ for(Int_t i = 0;i<AliPID::kSPECIES;++i)fTPCr[i] = param.fTPCr[i];
+
+ fSeedType = param.fSeedType;
+ fSeed1 = param.fSeed1;
+ fSeed2 = param.fSeed2;
+ for(Int_t i = 0;i<12;++i)fOverlapLabels[i] = param.fOverlapLabels[i];
+ fMAngular = param.fMAngular;
+ fCircular = param.fCircular;
+ for(int i = 0;i<160;++i)fTrackPoints[i] = param.fTrackPoints[i];
+ fClusterMap = param.fClusterMap;
+ fSharedMap = param.fSharedMap;
+ }
return (*this);
}
//____________________________________________________
for (Int_t i=0; i<3;i++) fV0Indexes[i]=t.fV0Indexes[i];
}
+AliTPCtrack& AliTPCtrack::operator=(const AliTPCtrack& o){
+ if(this!=&o){
+ AliKalmanTrack::operator=(o);
+ fdEdx = o.fdEdx;
+ for(Int_t i = 0;i<kMaxRow;++i)fIndex[i] = o.fIndex[i];
+ for(Int_t i = 0;i<4;++i)fPoints[i] = o.fPoints[i];
+ fSdEdx = o.fSdEdx;
+ fNFoundable = o.fNFoundable;
+ fBConstrain = o.fBConstrain;
+ fLastPoint = o.fLastPoint;
+ fFirstPoint = o.fFirstPoint;
+ fTrackType = o.fTrackType;
+ fLab2 = o.fLab2;
+ fNShared = o.fNShared;
+ fReference = o.fReference;
+ for(Int_t i = 0;i<12;++i) fKinkPoint[i] = o.fKinkPoint[i];
+
+ for(Int_t i = 0;i<3;++i){
+ fKinkIndexes[i] = o.fKinkIndexes[i];
+ fV0Indexes[i] = o.fV0Indexes[i];
+ }
+ }
+ return *this;
+
+}
+
+
//_____________________________________________________________________________
Int_t AliTPCtrack::Compare(const TObject *o) const {
//-----------------------------------------------------------------
const Double_t cov[15], Int_t index);
AliTPCtrack(const AliESDtrack& t);
AliTPCtrack(const AliTPCtrack& t);
+ AliTPCtrack& operator=(const AliTPCtrack& o);
virtual ~AliTPCtrack() {}
Int_t Compare(const TObject *o) const;
Int_t fKinkIndexes[3]; // kink indexes - minus = mother + daughter
Int_t fV0Indexes[3]; // kink indexes - minus = mother + daughter
- ClassDef(AliTPCtrack,3) // Time Projection Chamber reconstructed tracks
+ ClassDef(AliTPCtrack,4) // Time Projection Chamber reconstructed tracks
};
#endif
Double_t x[5], c[15];
// Int_t di = i1-i2;
//
- AliTPCseed * seed = new AliTPCseed;
+ AliTPCseed * seed = new AliTPCseed();
Double_t alpha=fSectors->GetAlpha(), shift=fSectors->GetAlphaShift();
Double_t cs=cos(alpha), sn=sin(alpha);
//
// if (!BuildSeed(kr1[is],kcl,0,x1,x2,x3,x,c)) continue;
UInt_t index=kr1.GetIndex(is);
+ seed->~AliTPCseed(); // this does not set the pointer to 0...
AliTPCseed *track=new(seed) AliTPCseed(x1, ns*alpha+shift, x, c, index);
track->SetIsSeeding(kTRUE);
}
}
}
-
+
track->SetSeedType(0);
arr->AddLast(track);
seed = new AliTPCseed;
// if (!BuildSeed(kr1[is],kcl,0,x1,x2,x3,x,c)) continue;
UInt_t index=kr1.GetIndex(is);
+ seed->~AliTPCseed();
AliTPCseed *track=new(seed) AliTPCseed(x1, sec*alpha+shift, x, c, index);
track->SetIsSeeding(kTRUE);
UInt_t index=0;
//kr0.GetIndex(is);
- AliTPCseed *track=new (seed) AliTPCseed(x1,sec*alpha+shift,x,c,index);
+ seed->~AliTPCseed();
+ AliTPCseed *track=new(seed) AliTPCseed(x1,sec*alpha+shift,x,c,index);
track->SetIsSeeding(kTRUE);
Int_t rc=FollowProlongation(*track, i2);
if (constrain) track->SetBConstrain(1);
if (TMath::Abs(ktrack0->GetC())>5) continue; // cut on the curvature for mother particle
AliExternalTrackParam paramm(*ktrack0);
AliExternalTrackParam paramd(*ktrack1);
- if (row0>60&&ktrack1->GetReference().GetX()>90.) new (¶md) AliExternalTrackParam(ktrack1->GetReference());
+ if (row0>60&&ktrack1->GetReference().GetX()>90.)new (¶md) AliExternalTrackParam(ktrack1->GetReference());
//
//
kink->SetMother(paramm);
if (RefitKink(*seed0,*seed1,*kink)) kink->SetStatus(1,9);
row0 = GetRowNumber(kink->GetR());
sumn = seed0->GetNumberOfClusters()+seed1->GetNumberOfClusters();
- new (&mothers[i]) AliTPCseed(*seed0);
- new (&daughters[i]) AliTPCseed(*seed1);
+ mothers[i] = *seed0;
+ daughters[i] = *seed1;
}
else{
delete kinks->RemoveAt(i);
//
if ( ktrack0->GetKinkIndex(0)==0 && ktrack1->GetKinkIndex(0)==0) { //best kink
if (mothers[indexes[i]].GetNumberOfClusters()>20 && daughters[indexes[i]].GetNumberOfClusters()>20 && (mothers[indexes[i]].GetNumberOfClusters()+daughters[indexes[i]].GetNumberOfClusters())>100){
- new (ktrack0) AliTPCseed(mothers[indexes[i]]);
- new (ktrack1) AliTPCseed(daughters[indexes[i]]);
+ *ktrack0 = mothers[indexes[i]];
+ *ktrack1 = daughters[indexes[i]];
}
}
//
for (Int_t irow=0;irow<kNdiv;irow++){
FollowBackProlongation(mother, rows[irow]);
FollowProlongation(daughter,rows[kNdiv-1-irow]);
- new(¶m0[irow]) AliTPCseed(mother);
- new(¶m1[kNdiv-1-irow]) AliTPCseed(daughter);
+ param0[irow] = mother;
+ param1[kNdiv-1-irow] = daughter;
}
//
// define kinks
param0[index].Reset(kTRUE);
FollowProlongation(param0[index],0);
//
- new (&mother) AliTPCseed(param0[index]);
- new (&daughter) AliTPCseed(param1[index]); // daughter in vertex
+ mother = param0[index];
+ daughter = param1[index]; // daughter in vertex
//
kink.SetMother(mother);
kink.SetDaughter(daughter);
for (Int_t irow=0;irow<20;irow++){
FollowBackProlongation(*seed0, rows[irow]);
FollowProlongation(*seed1,rows[19-irow]);
- new(¶m0[irow]) AliTPCseed(*seed0);
- new(¶m1[19-irow]) AliTPCseed(*seed1);
+ param0[irow] = *seed0;
+ param1[19-irow] = *seed1;
}
//
// define kinks
seed1->ResetCovariance(10.);
FollowProlongation(*seed0,0);
FollowBackProlongation(*seed1,158);
- new (&mother) AliTPCseed(*seed0); // backup mother at position 0
+ mother = *seed0; // backup mother at position 0
seed0->Reset(kFALSE);
seed1->Reset(kFALSE);
seed0->ResetCovariance(10.);
for (Int_t irow=0;irow<20;irow++){
FollowBackProlongation(*seed0, rows[irow]);
FollowProlongation(*seed1,rows[19-irow]);
- new(¶m0[irow]) AliTPCseed(*seed0);
- new(¶m1[19-irow]) AliTPCseed(*seed1);
+ param0[irow] = *seed0;
+ param1[19-irow] = *seed1;
}
//
// define kinks
//
//
// new (&mother) AliTPCseed(param0[index]);
- new (&daughter) AliTPCseed(param1[index]);
+ daughter = param1[index];
daughter.SetLabel(kink.GetLabel(1));
param0[index].Reset(kTRUE);
FollowProlongation(param0[index],0);
- new (&mother) AliTPCseed(param0[index]);
+ mother = param0[index];
mother.SetLabel(kink.GetLabel(0));
delete seed0;
delete seed1;
//--------------------------------------------------------------------
//This function "cooks" a track label. If label<0, this track is fake.
//--------------------------------------------------------------------
- AliTPCseed * t = (AliTPCseed*)tk;
+ AliTPCseed * t = dynamic_cast<AliTPCseed*>(tk);
+ if(!t){
+ printf("%s:%d wrong type \n",(char*)__FILE__,__LINE__);
+ return;
+ }
+
Int_t noc=t->GetNumberOfClusters();
if (noc<10){
//printf("\nnot founded prolongation\n\n\n");
fPadPitchWidth=par->GetInnerPadPitchWidth();
fPadPitchLength=par->GetInnerPadPitchLength();
fN=par->GetNRowLow();
+ if(fRow)delete [] fRow;fRow = 0;
fRow=new AliTPCRow[fN];
for (Int_t i=0; i<fN; i++) {
fRow[i].SetX(par->GetPadRowRadiiLow(i));
fPadPitchLength = par->GetOuter1PadPitchLength();
f1PadPitchLength = par->GetOuter1PadPitchLength();
f2PadPitchLength = par->GetOuter2PadPitchLength();
-
fN=par->GetNRowUp();
+ if(fRow)delete [] fRow;fRow = 0;
fRow=new AliTPCRow[fN];
for (Int_t i=0; i<fN; i++) {
fRow[i].SetX(par->GetPadRowRadiiUp(i));