]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In case the input is MC Kinematics, need some patches in the vertex and extraction...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Oct 2010 14:49:31 +0000 (14:49 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Oct 2010 14:49:31 +0000 (14:49 +0000)
PWG4/PartCorrBase/AliCaloTrackMCReader.cxx
PWG4/PartCorrBase/AliCaloTrackReader.cxx
PWG4/PartCorrDep/AliAnaPi0EbE.cxx

index 184669cb7760f1333b7764fe57404710ef70b867..913929c16cf70fa9fafee7da56c25707faa41759 100755 (executable)
@@ -251,6 +251,9 @@ Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, const char * cur
        if(!ComparePtHardAndJetPt()) return kFALSE ;
   }
        
+  //Fill Vertex array
+  FillVertexArray();
+  
   Int_t iParticle = 0 ;
   Double_t charge = 0.;
        
index e5f74d7f9ddc27d240bc5be943911302fe3057f9..d0a76a509bb6b5dbd8e39f2bd7966c6a039481dc 100755 (executable)
@@ -613,7 +613,12 @@ void AliCaloTrackReader::FillVertexArray() {
   }          
   
   if (!fMixedEvent) { //Single event analysis
-    fInputEvent->GetPrimaryVertex()->GetXYZ(fVertex[0]); 
+    
+    if(fDataType!=kMC)fInputEvent->GetPrimaryVertex()->GetXYZ(fVertex[0]); 
+    else { 
+      fVertex[0][0]=0.;   fVertex[0][1]=0.;   fVertex[0][2]=0.;
+    }
+      
     if(fDebug > 1)
       printf("AliCaloTrackReader::FillVertexArray() - Single Event Vertex : %f,%f,%f\n",fVertex[0][0],fVertex[0][1],fVertex[0][2]);
 
index 45505b594f79d5d0b863edcbe658f1890c04f5f5..e7ff72f449532f964df135fa2a6fa32846fa00f4 100755 (executable)
@@ -336,15 +336,16 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeter()
         }//Work with stack also   
         
         //Fill some histograms about shower shape
-        //Photon1
-        AliVCluster *cluster1 = (GetReader()->GetInputEvent())->GetCaloCluster(photon1->GetCaloLabel(0));        
-        fhPtDispPi0  ->Fill(photon1->Pt(), cluster1->GetDispersion());    
-        fhPtLambdaPi0->Fill(photon1->Pt(), cluster1->GetM20(), cluster1->GetM02());    
-        //Photon2
-        AliVCluster *cluster2 = (GetReader()->GetInputEvent())->GetCaloCluster(photon2->GetCaloLabel(0));        
-        fhPtDispPi0  ->Fill(photon2->Pt(), cluster2->GetDispersion());    
-        fhPtLambdaPi0->Fill(photon2->Pt(), cluster2->GetM20(), cluster2->GetM02());  
-        
+        if(GetReader()->GetDataType()!=AliCaloTrackReader::kMC){
+          //Photon1 
+          AliVCluster *cluster1 = (GetReader()->GetInputEvent())->GetCaloCluster(photon1->GetCaloLabel(0)); 
+          fhPtDispPi0  ->Fill(photon1->Pt(), cluster1->GetDispersion());    
+          fhPtLambdaPi0->Fill(photon1->Pt(), cluster1->GetM20(), cluster1->GetM02());    
+          //Photon2
+          AliVCluster *cluster2 = (GetReader()->GetInputEvent())->GetCaloCluster(photon2->GetCaloLabel(0));        
+          fhPtDispPi0  ->Fill(photon2->Pt(), cluster2->GetDispersion());    
+          fhPtLambdaPi0->Fill(photon2->Pt(), cluster2->GetM20(), cluster2->GetM02());  
+        }
         //Create AOD for analysis
         mom = mom1+mom2;
         AliAODPWG4Particle pi0 = AliAODPWG4Particle(mom);
@@ -363,14 +364,16 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeter()
         fhPtEtaPhiBkg ->Fill((mom1+mom2).Pt(),(mom1+mom2).Eta(),(mom1+mom2).Phi());
         
         //Fill some histograms about shower shape
-        //Photon1
-        AliVCluster *cluster1 = (GetReader()->GetInputEvent())->GetCaloCluster(photon1->GetCaloLabel(0));        
-        fhPtDispBkg  ->Fill(photon1->Pt(), cluster1->GetDispersion());    
-        fhPtLambdaBkg->Fill(photon1->Pt(), cluster1->GetM20(), cluster1->GetM02());    
-        //Photon2
-        AliVCluster *cluster2 = (GetReader()->GetInputEvent())->GetCaloCluster(photon2->GetCaloLabel(0));        
-        fhPtDispBkg  ->Fill(photon2->Pt(), cluster2->GetDispersion());    
-        fhPtLambdaBkg->Fill(photon2->Pt(), cluster2->GetM20(), cluster2->GetM02());  
+        if(GetReader()->GetDataType()!=AliCaloTrackReader::kMC){
+          //Photon1
+          AliVCluster *cluster1 = (GetReader()->GetInputEvent())->GetCaloCluster(photon1->GetCaloLabel(0));        
+          fhPtDispBkg  ->Fill(photon1->Pt(), cluster1->GetDispersion());    
+          fhPtLambdaBkg->Fill(photon1->Pt(), cluster1->GetM20(), cluster1->GetM02());    
+          //Photon2
+          AliVCluster *cluster2 = (GetReader()->GetInputEvent())->GetCaloCluster(photon2->GetCaloLabel(0));        
+          fhPtDispBkg  ->Fill(photon2->Pt(), cluster2->GetDispersion());    
+          fhPtLambdaBkg->Fill(photon2->Pt(), cluster2->GetM20(), cluster2->GetM02()); 
+        }
         
       }//bkg pair