Limit printout from the helper task,Spectrum: Change range for jet shape, include...
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Aug 2010 13:46:30 +0000 (13:46 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Aug 2010 13:46:30 +0000 (13:46 +0000)
PWG4/JetTasks/AliAnalysisHelperJetTasks.cxx
PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.cxx
PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.cxx

index 57fcf2436be837aba4c93135309189722318a026..db6d50f1da94cf6a47fdcd5a384f6a7fa85ae02e 100644 (file)
@@ -816,7 +816,7 @@ Bool_t AliAnalysisHelperJetTasks::IsTriggerFired(const AliVEvent* aEv, Trigger t
   AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(aHeader);
 
   if (!pythiaGenHeader) {
-    printf(" AliAnalysisHelperJetTasks::GetProcessType : Unknown gen Header type). \n");
+    //    printf(" AliAnalysisHelperJetTasks::GetProcessType : Unknown gen Header type). \n");
     return kInvalidProcess;
   }
 
index 708c35648fa7c64df0094e3fac8e22711152efa9..35cb59087a690f7cd283aca48ff96537eb6baba8 100644 (file)
@@ -2001,31 +2001,42 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
   fQADiJetHistosRecCuts->DefineQADiJetHistos();
   fQADiJetHistosGen->DefineQADiJetHistos();
 
+  Bool_t genJets    = (fJetTypeGen != kJetsUndef) ? kTRUE : kFALSE;
+  Bool_t genTracks  = (fTrackTypeGen != kTrackUndef) ? kTRUE : kFALSE;
+  Bool_t recJetsEff = (fJetTypeRecEff != kJetsUndef) ? kTRUE : kFALSE;
+
+
   const Int_t saveLevel = 5;
   if(saveLevel>0){
     fCommonHistList->Add(fh1EvtSelection);
     fFFHistosRecCuts->AddToOutput(fCommonHistList);
     fFFHistosRecLeading->AddToOutput(fCommonHistList);
     fFFHistosRecLeadingTrack->AddToOutput(fCommonHistList);
-    fFFHistosGen->AddToOutput(fCommonHistList);
-    fFFHistosGenLeading->AddToOutput(fCommonHistList);
-    fFFHistosGenLeadingTrack->AddToOutput(fCommonHistList);
+
+    if(genJets && genTracks){
+       fFFHistosGen->AddToOutput(fCommonHistList);
+       fFFHistosGenLeading->AddToOutput(fCommonHistList);
+       fFFHistosGenLeadingTrack->AddToOutput(fCommonHistList);
+    }
   }
   if(saveLevel>1){
     fQATrackHistosRec->AddToOutput(fCommonHistList);
     fQATrackHistosRecCuts->AddToOutput(fCommonHistList);
-    fQATrackHistosGen->AddToOutput(fCommonHistList);
+    if(genTracks) fQATrackHistosGen->AddToOutput(fCommonHistList);
     
     fQAJetHistosRec->AddToOutput(fCommonHistList);
     fQAJetHistosRecCuts->AddToOutput(fCommonHistList);
     fQAJetHistosRecCutsLeading->AddToOutput(fCommonHistList);
-    fQAJetHistosGen->AddToOutput(fCommonHistList);
-    fQAJetHistosGenLeading->AddToOutput(fCommonHistList);
-    fQAJetHistosRecEffLeading->AddToOutput(fCommonHistList); 
+    if(recJetsEff) fQAJetHistosRecEffLeading->AddToOutput(fCommonHistList); 
+
+    if(genJets){
+       fQAJetHistosGen->AddToOutput(fCommonHistList);
+       fQAJetHistosGenLeading->AddToOutput(fCommonHistList);
+    }
 
     fCommonHistList->Add(fh1EvtMult);
     fCommonHistList->Add(fh1nRecJetsCuts);
-    fCommonHistList->Add(fh1nGenJets);
+    if(genJets) fCommonHistList->Add(fh1nGenJets);
   }
   if(saveLevel>2){
     fCommonHistList->Add(fh1VertexNContributors);
@@ -2035,22 +2046,31 @@ void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()
     fIJHistosRecCuts->AddToOutput(fCommonHistList);
     fIJHistosRecLeading->AddToOutput(fCommonHistList);
     fIJHistosRecLeadingTrack->AddToOutput(fCommonHistList);
-    fIJHistosGen->AddToOutput(fCommonHistList);
-    fIJHistosGenLeading->AddToOutput(fCommonHistList);
-    fIJHistosGenLeadingTrack->AddToOutput(fCommonHistList);
+
+    if(genJets && genTracks){
+       fIJHistosGen->AddToOutput(fCommonHistList);
+       fIJHistosGenLeading->AddToOutput(fCommonHistList);
+       fIJHistosGenLeadingTrack->AddToOutput(fCommonHistList);
+    }
   }
   if(saveLevel>4){
     fFFDiJetHistosRecCuts->AddToOutput(fCommonHistList);
     fFFDiJetHistosRecLeading->AddToOutput(fCommonHistList);
     fFFDiJetHistosRecLeadingTrack->AddToOutput(fCommonHistList);
-    fFFDiJetHistosGen->AddToOutput(fCommonHistList);
-    fFFDiJetHistosGenLeading->AddToOutput(fCommonHistList);
-    fFFDiJetHistosGenLeadingTrack->AddToOutput(fCommonHistList);
     fQADiJetHistosRecCuts->AddToOutput(fCommonHistList);
-    fQADiJetHistosGen->AddToOutput(fCommonHistList); 
-    fCommonHistList->Add(fhnSingleTrackRecEffHisto);
-    fCommonHistList->Add(fhnJetTrackRecEffHisto);
-    fCommonHistList->Add(fh1nRecEffJets);
+
+    if(genJets && genTracks){
+        fFFDiJetHistosGen->AddToOutput(fCommonHistList);
+        fFFDiJetHistosGenLeading->AddToOutput(fCommonHistList);
+        fFFDiJetHistosGenLeadingTrack->AddToOutput(fCommonHistList);
+        fQADiJetHistosGen->AddToOutput(fCommonHistList);
+    }
+
+    if(recJetsEff && genTracks){
+       fCommonHistList->Add(fhnSingleTrackRecEffHisto);
+       fCommonHistList->Add(fhnJetTrackRecEffHisto);
+       fCommonHistList->Add(fh1nRecEffJets);
+    }
   }
 
   // =========== Switch on Sumw2 for all histos ===========
index 29cd281b40b2a0cf14228d97ddc881acbfbfd21d..d42a0e3f6009508cd8b94a6c3aa3f4b8f16e1f05 100644 (file)
@@ -423,15 +423,15 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
                              nBinPhi,binLimitsPhi,nBinEta,binLimitsEta);
 
     fh2RhoPtRec[ij] =  new TH2F(Form("fh2RhoPtRec_j%d",ij),"jet shape rho for jets;r;p_{T,rec};",
-                               20,0.,1.,nBinPt,binLimitsPt);
+                               40,0.,1.,nBinPt,binLimitsPt);
     fh2PsiPtRec[ij] =  new TH2F(Form("fh2PsiPtRec_j%d",ij),"jet shape psi for jets;r;p_{T,rec};",
-                               20,0.,1.,nBinPt,binLimitsPt);
+                               40,0.,2.,nBinPt,binLimitsPt);
 
     fh2RhoPtGen[ij] =  new TH2F(Form("fh2RhoPtGen_j%d",ij),"jet shape rho for jets;r;p_{T,gen};",
-                               20,0.,1.,nBinPt,binLimitsPt);
+                              40,0.,2.,nBinPt,binLimitsPt);
     fh2PsiPtGen[ij] =  new TH2F(Form("fh2PsiPtGen_j%d",ij),"jet shape psi for jets;r;p_{T,gen};",
-                               20,0.,1.,nBinPt,binLimitsPt);
-    if(!fh1TmpRho)fh1TmpRho = new TH1F("fh1TmpRho","tmp histo for jet shape",20,0.,1);
+                               40,0.,2.,nBinPt,binLimitsPt);
+    if(!fh1TmpRho)fh1TmpRho = new TH1F("fh1TmpRho","tmp histo for jet shape",40,0.,2);
 
 
     fh2FragRec[ij] = new TH2F(Form("fh2FragRec_j%d",ij),"Jet Fragmentation;x=p_{T,i}/p_{T,jet};p_{T,jet};1/N_{jet}dN_{ch}/dx",
@@ -1030,7 +1030,7 @@ void AliAnalysisTaskJetSpectrum2::UserExec(Option_t */*option*/)
 
       }
       Float_t rhoSum = 0;
-      for(int ibx = 1;ibx<fh2RhoPtGen[ir]->GetNbinsX();ibx++){
+      for(int ibx = 1;ibx<=fh2RhoPtGen[ir]->GetNbinsX();ibx++){
        Float_t r = fh2RhoPtGen[ir]->GetXaxis()->GetBinCenter(ibx);
        Float_t rho = fh1TmpRho->GetBinContent(ibx);
        rhoSum += rho;
@@ -1173,7 +1173,7 @@ void AliAnalysisTaskJetSpectrum2::UserExec(Option_t */*option*/)
       }
       // fill the jet shapes
       Float_t rhoSum = 0;
-      for(int ibx = 1;ibx<fh2RhoPtRec[ir]->GetNbinsX();ibx++){
+      for(int ibx = 1;ibx<=fh2RhoPtRec[ir]->GetNbinsX();ibx++){
        Float_t r = fh2RhoPtRec[ir]->GetXaxis()->GetBinCenter(ibx);
        Float_t rho = fh1TmpRho->GetBinContent(ibx);
        rhoSum += rho;