coverity fixes
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Mar 2011 07:33:02 +0000 (07:33 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 30 Mar 2011 07:33:02 +0000 (07:33 +0000)
PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.cxx
PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.cxx

index 4548693..4a327fe 100644 (file)
@@ -3673,7 +3673,7 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
                      
                      if (it < jettracklist2->GetSize())
                        { 
-                         Float_t trackPt2   = (dynamic_cast<AliVParticle*>(jettracklist2->At(it)))->Pt();
+                         Float_t trackPt2   = ((AliVParticle*)(jettracklist2->At(it)))->Pt();
                          Float_t jetPt2     = jet2->Pt();
                          
                          Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE;
@@ -3864,8 +3864,8 @@ void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *)
     
     for(Int_t ij=0; ij<nRecEffJets; ++ij){ 
     
-      AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsRecEff->At(ij));
-      
+      AliAODJet* jet = (AliAODJet*)(fJetsRecEff->At(ij));
+    
       if(ij==0){ // leading jet
        
        TList* jettracklistGen = new TList();
@@ -4947,7 +4947,9 @@ void AliAnalysisTaskFragmentationFunction::GetTracksOutOfNJetsStat(Int_t nCases,
 
   // Estimate jet and background areas
   Float_t* areaJet = new Float_t[nCases];
+  memset(areaJet, 0, sizeof(Float_t) * nCases);
   Float_t* areaJetLarge = new Float_t[nCases];
+  memset(areaJetLarge, 0, sizeof(Float_t) * nCases);
   Float_t areaFull = (fTrackEtaMax-fTrackEtaMin)*(fTrackPhiMax-fTrackPhiMin);
   Float_t areaOut = areaFull;
 
@@ -5216,7 +5218,7 @@ void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inp
       
       for(Int_t it=0; it<tracklistoutleading->GetSize(); ++it){
        
-       AliVParticle* trackVP   = dynamic_cast<AliVParticle*>(tracklistoutleading->At(it));
+       AliVParticle* trackVP   = (AliVParticle*)(tracklistoutleading->At(it));
        TLorentzVector* trackV  = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
        
        Float_t jetPt   = jet->Pt();
index eefd258..addc41f 100644 (file)
@@ -400,7 +400,7 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
   fh1ZVtx = new TH1F("fh1ZVtx","z vtx;z_{vtx} (cm)",400,-20,20);
   fHistList->Add(fh1ZVtx);
 
-  fh1RP = new TH1F("fh1RP","RP;#Psi",480,-180,360);
+  fh1RP = new TH1F("fh1RP","RP;#Psi",440, -1.*TMath::Pi(), 2.*TMath::Pi());
   fHistList->Add(fh1RP);
 
   fh1Centrality = new TH1F("fh1Centrality","cent;cent (%)",101,-0.5,100.5);