Coverity
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Nov 2011 15:26:41 +0000 (15:26 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Nov 2011 15:26:41 +0000 (15:26 +0000)
PWG3/vertexingHF/AliAODRecoDecayHF.cxx
PWG3/vertexingHF/AliAnalysisTaskSESignificance.cxx
PWG3/vertexingHF/AliCFVertexingHF.cxx

index 873ade3..4b286dd 100644 (file)
@@ -149,8 +149,10 @@ AliAODRecoDecayHF &AliAODRecoDecayHF::operator=(const AliAODRecoDecayHF &source)
   if(source.GetOwnPrimaryVtx()) fOwnPrimaryVtx = new AliAODVertex(*(source.GetOwnPrimaryVtx()));
 
   if(source.GetNProngs()>0) {
-    fd0err = new Double_t[GetNProngs()];
-    memcpy(fd0err,source.fd0err,GetNProngs()*sizeof(Double_t));
+    if(source.fd0err) {
+      fd0err = new Double_t[GetNProngs()];
+      memcpy(fd0err,source.fd0err,GetNProngs()*sizeof(Double_t));
+    }
     if(source.fProngID) {
       fProngID = new UShort_t[GetNProngs()];
       memcpy(fProngID,source.fProngID,GetNProngs()*sizeof(UShort_t));
@@ -317,7 +319,7 @@ void AliAODRecoDecayHF::RecalculateImpPars(AliAODVertex *vtxAODNew,AliAODEvent*
   Double_t dz[2],covdz[3];
   for(Int_t i=0; i<GetNDaughters(); i++) {
     AliAODTrack *t = (AliAODTrack*)GetDaughter(i);
-    AliExternalTrackParam etp; etp.CopyFromVTrack(t);
+    AliExternalTrackParam etp(t);
     if(etp.PropagateToDCA(vtxAODNew,aod->GetMagneticField(),3.,dz,covdz)) {
       fd0[i]    = dz[0];
       fd0err[i] = TMath::Sqrt(covdz[0]);
index ef7ffb2..02cbfb7 100644 (file)
@@ -88,6 +88,17 @@ AliAnalysisTaskSESignificance::AliAnalysisTaskSESignificance():
   // Default constructor
   SetPDGCodes();
   SetDsChannel(kPhi);
+
+  for(Int_t i=0;i<4;i++) fPDGdaughters[i]=0;
+  for(Int_t i=0;i<2;i++) {fPDGD0ToKpi[i]=0;fPDGDStarToD0pi[i]=0;}
+  for(Int_t i=0;i<kMaxCutVar;i++) fVars[i]=0.;
+  for(Int_t i=0;i<kMaxNHist;i++) {
+    fMassHist[i]=0;
+    fSigHist[i]=0;
+    fBkgHist[i]=0;
+    fRflHist[i]=0;
+  }
+
 }
 
 //________________________________________________________________________
index c44543a..e4bdac1 100644 (file)
@@ -140,9 +140,9 @@ AliCFVertexingHF& AliCFVertexingHF::operator=(const AliCFVertexingHF& c)
 
        if (this!= &c){
                TObject::operator=(c);
-               fmcArray = c.fmcArray;
-               fRecoCandidate = c.fRecoCandidate;
-               fmcPartCandidate = c.fmcPartCandidate;
+               fmcArray = new TClonesArray(*(c.fmcArray));
+               fRecoCandidate = new AliAODRecoDecayHF(*(c.fRecoCandidate));
+               fmcPartCandidate = new AliAODMCParticle(*(c.fmcPartCandidate));
                fNDaughters = c.fNDaughters;
                fNVar = c.fNVar;
                fzPrimVertex = c.fzPrimVertex;
@@ -177,9 +177,6 @@ AliCFVertexingHF& AliCFVertexingHF::operator=(const AliCFVertexingHF& c)
 //____________________________________________________
 AliCFVertexingHF::AliCFVertexingHF(const AliCFVertexingHF &c) :
         TObject(c),
-       fmcArray(c.fmcArray),
-       fRecoCandidate(c.fRecoCandidate),
-       fmcPartCandidate(c.fmcPartCandidate),
        fNDaughters(c.fNDaughters),
        fNVar(c.fNVar),
        fzPrimVertex(c.fzPrimVertex),
@@ -203,6 +200,9 @@ AliCFVertexingHF::AliCFVertexingHF(const AliCFVertexingHF &c) :
        //
        //copy constructor
        //
+  fmcArray = new TClonesArray(*(c.fmcArray));
+  fRecoCandidate = new AliAODRecoDecayHF(*(c.fRecoCandidate));
+  fmcPartCandidate = new AliAODMCParticle(*(c.fmcPartCandidate));
        if (fProngs > 0){
                fLabelArray = new Int_t[fProngs];
                 fPtAccCut = new Float_t[fProngs];