option to turn off some histograms
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Apr 2012 18:11:12 +0000 (18:11 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Apr 2012 18:11:12 +0000 (18:11 +0000)
PWG/FLOW/Base/AliFlowAnalysisWithScalarProduct.cxx
PWG/FLOW/Base/AliFlowAnalysisWithScalarProduct.h
PWG/FLOW/Tasks/AliAnalysisTaskScalarProduct.cxx
PWG/FLOW/Tasks/AliAnalysisTaskScalarProduct.h

index 97f6c34..ef48b9b 100644 (file)
@@ -46,6 +46,7 @@ ClassImp(AliFlowAnalysisWithScalarProduct)
 //-----------------------------------------------------------------------
 AliFlowAnalysisWithScalarProduct::AliFlowAnalysisWithScalarProduct():
 fDebug(0),
+fMinimalBook(kFALSE),
 fUsePhiWeights(0),
 fApplyCorrectionForNUA(0),
 fHarmonic(2),
@@ -122,7 +123,7 @@ void AliFlowAnalysisWithScalarProduct::Init() {
   tQARelated->SetName("QA");
   tQARelated->SetOwner();
 
-  fCommonHists = new AliFlowCommonHist("AliFlowCommonHist_SP");
+  fCommonHists = new AliFlowCommonHist("AliFlowCommonHist_SP","AliFlowCommonHist",fMinimalBook);
   (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); // store harmonic 
   fHistList->Add(fCommonHists);
 
@@ -235,55 +236,56 @@ void AliFlowAnalysisWithScalarProduct::Init() {
     nuaRelated->Add( fPhiWeightsSub[1] );
   }
 
-
-  fHistProQNorm = new TProfile("FlowPro_QNorm_SP","FlowPro_QNorm_SP",       1,0.5,1.5,"s");
-  fHistProQNorm->SetYTitle("<|Qa+Qb|>");
-  tQARelated->Add(fHistProQNorm);
-
-  fHistProQaQb  = new TProfile("FlowPro_QaQb_SP","FlowPro_QaQb_SP",         1,0.5,1.5,"s");
-  fHistProQaQb->SetYTitle("<QaQb>");
-  tQARelated->Add(fHistProQaQb);
-
-  fHistProQaQbM = new TProfile("FlowPro_QaQbvsM_SP","FlowPro_QaQbvsM_SP",1000,0.0,10000);
-  fHistProQaQbM->SetYTitle("<QaQb>");
-  fHistProQaQbM->SetXTitle("M");
-  fHistProQaQbM->Sumw2();
-  tQARelated->Add(fHistProQaQbM);
-
-  fHistMaMb = new TH2D("Flow_MavsMb_SP","Flow_MavsMb_SP",100,0.,100.,100,0.,100.);
-  fHistMaMb->SetYTitle("Ma");
-  fHistMaMb->SetXTitle("Mb");
-  tQARelated->Add(fHistMaMb);
-
-  fHistQNormQaQbNorm = new TH2D("Flow_QNormvsQaQbNorm_SP","Flow_QNormvsQaQbNorm_SP",88,-1.1,1.1,22,0.,1.1);
-  fHistQNormQaQbNorm->SetYTitle("|Q/Mq|");
-  fHistQNormQaQbNorm->SetXTitle("QaQb/MaMb");
-  tQARelated->Add(fHistQNormQaQbNorm);
-
-  fHistQaNormMa = new TH2D("Flow_QaNormvsMa_SP","Flow_QaNormvsMa_SP",100,0.,100.,22,0.,1.1);
-  fHistQaNormMa->SetYTitle("|Qa/Ma|");
-  fHistQaNormMa->SetXTitle("Ma");
-  tQARelated->Add(fHistQaNormMa);
-
-  fHistQbNormMb = new TH2D("Flow_QbNormvsMb_SP","Flow_QbNormvsMb_SP",100,0.,100.,22,0.,1.1);
-  fHistQbNormMb->SetYTitle("|Qb/Mb|");
-  fHistQbNormMb->SetXTitle("Mb");
-  tQARelated->Add(fHistQbNormMb);
-
-  fResolution = new TH1D("Flow_resolution_SP","Flow_resolution_SP",100,-1.0,1.0);
-  fResolution->SetYTitle("dN/d(Cos2(#phi_a - #phi_b))");
-  fResolution->SetXTitle("Cos2(#phi_a - #phi_b)");
-  tQARelated->Add(fResolution);
-
-  fHistQaQb = new TH1D("Flow_QaQb_SP","Flow_QaQb_SP",200,-100.,100.);
-  fHistQaQb->SetYTitle("dN/dQaQb");
-  fHistQaQb->SetXTitle("dQaQb");
-  tQARelated->Add(fHistQaQb);
-
-  fHistQaQbCos = new TH1D("Flow_QaQbCos_SP","Flow_QaQbCos_SP",63,0.,TMath::Pi());
-  fHistQaQbCos->SetYTitle("dN/d#phi");
-  fHistQaQbCos->SetXTitle("#phi");
-  tQARelated->Add(fHistQaQbCos);
+  if(!fMinimalBook) {
+    fHistProQNorm = new TProfile("FlowPro_QNorm_SP","FlowPro_QNorm_SP",       1,0.5,1.5,"s");
+    fHistProQNorm->SetYTitle("<|Qa+Qb|>");
+    tQARelated->Add(fHistProQNorm);
+
+    fHistProQaQb  = new TProfile("FlowPro_QaQb_SP","FlowPro_QaQb_SP",         1,0.5,1.5,"s");
+    fHistProQaQb->SetYTitle("<QaQb>");
+    tQARelated->Add(fHistProQaQb);
+
+    fHistProQaQbM = new TProfile("FlowPro_QaQbvsM_SP","FlowPro_QaQbvsM_SP",1000,0.0,10000);
+    fHistProQaQbM->SetYTitle("<QaQb>");
+    fHistProQaQbM->SetXTitle("M");
+    fHistProQaQbM->Sumw2();
+    tQARelated->Add(fHistProQaQbM);
+
+    fHistMaMb = new TH2D("Flow_MavsMb_SP","Flow_MavsMb_SP",100,0.,100.,100,0.,100.);
+    fHistMaMb->SetYTitle("Ma");
+    fHistMaMb->SetXTitle("Mb");
+    tQARelated->Add(fHistMaMb);
+
+    fHistQNormQaQbNorm = new TH2D("Flow_QNormvsQaQbNorm_SP","Flow_QNormvsQaQbNorm_SP",88,-1.1,1.1,22,0.,1.1);
+    fHistQNormQaQbNorm->SetYTitle("|Q/Mq|");
+    fHistQNormQaQbNorm->SetXTitle("QaQb/MaMb");
+    tQARelated->Add(fHistQNormQaQbNorm);
+
+    fHistQaNormMa = new TH2D("Flow_QaNormvsMa_SP","Flow_QaNormvsMa_SP",100,0.,100.,22,0.,1.1);
+    fHistQaNormMa->SetYTitle("|Qa/Ma|");
+    fHistQaNormMa->SetXTitle("Ma");
+    tQARelated->Add(fHistQaNormMa);
+
+    fHistQbNormMb = new TH2D("Flow_QbNormvsMb_SP","Flow_QbNormvsMb_SP",100,0.,100.,22,0.,1.1);
+    fHistQbNormMb->SetYTitle("|Qb/Mb|");
+    fHistQbNormMb->SetXTitle("Mb");
+    tQARelated->Add(fHistQbNormMb);
+
+    fResolution = new TH1D("Flow_resolution_SP","Flow_resolution_SP",100,-1.0,1.0);
+    fResolution->SetYTitle("dN/d(Cos2(#phi_a - #phi_b))");
+    fResolution->SetXTitle("Cos2(#phi_a - #phi_b)");
+    tQARelated->Add(fResolution);
+
+    fHistQaQb = new TH1D("Flow_QaQb_SP","Flow_QaQb_SP",200,-100.,100.);
+    fHistQaQb->SetYTitle("dN/dQaQb");
+    fHistQaQb->SetXTitle("dQaQb");
+    tQARelated->Add(fHistQaQb);
+
+    fHistQaQbCos = new TH1D("Flow_QaQbCos_SP","Flow_QaQbCos_SP",63,0.,TMath::Pi());
+    fHistQaQbCos->SetYTitle("dN/d#phi");
+    fHistQaQbCos->SetXTitle("#phi");
+    tQARelated->Add(fHistQaQbCos);
+  }
 
   fHistList->Add(uQRelated);
   fHistList->Add(nuaRelated);
@@ -421,16 +423,18 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) {
     dWq = fNormalizationType ? dMq : 1;
 
     //Filling QA (for compatibility with previous version)
-    fHistProQaQb->Fill(1,vQa*vQb,1);
-    fHistProQaQbM->Fill(anEvent->GetNumberOfRPs()+0.5,(vQa*vQb)/dMa/dMb,dMa*dMb);
-    fHistQaQbCos->Fill(TMath::ACos((vQa*vQb)/vQa.Mod()/vQb.Mod()));
-    fResolution->Fill( TMath::Cos( vQa.Phi()-vQb.Phi() ) );
-    fHistQaQb->Fill(vQa*vQb);
-    fHistMaMb->Fill(dMb,dMa);
-    fHistProQNorm->Fill(1,vQm.Mod()/dMq,dMq);
-    fHistQNormQaQbNorm->Fill((vQa*vQb)/dMa/dMb,vQm.Mod()/dMq);
-    fHistQaNormMa->Fill(dMa,vQa.Mod()/dMa);
-    fHistQbNormMb->Fill(dMb,vQb.Mod()/dMb);
+    if(!fMinimalBook) {
+      fHistProQaQb->Fill(1,vQa*vQb,1);
+      fHistProQaQbM->Fill(anEvent->GetNumberOfRPs()+0.5,(vQa*vQb)/dMa/dMb,dMa*dMb);
+      fHistQaQbCos->Fill(TMath::ACos((vQa*vQb)/vQa.Mod()/vQb.Mod()));
+      fResolution->Fill( TMath::Cos( vQa.Phi()-vQb.Phi() ) );
+      fHistQaQb->Fill(vQa*vQb);
+      fHistMaMb->Fill(dMb,dMa);
+      fHistProQNorm->Fill(1,vQm.Mod()/dMq,dMq);
+      fHistQNormQaQbNorm->Fill((vQa*vQb)/dMa/dMb,vQm.Mod()/dMq);
+      fHistQaNormMa->Fill(dMa,vQa.Mod()/dMa);
+      fHistQbNormMb->Fill(dMb,vQb.Mod()/dMb);
+    }
 
     Double_t dUQ = vU*vQm;
 
index 06bd4d8..35c4dcf 100644 (file)
@@ -44,6 +44,7 @@ class AliFlowAnalysisWithScalarProduct {
    void SetApplyCorrectionForNUA(Bool_t iVal) { fApplyCorrectionForNUA = iVal?1:0; }
    void SetNormalizationType(Int_t iVal)      { fNormalizationType = iVal; }
    void SetDebug(Bool_t bVal)                 { fDebug = bVal; }
+   void SetBookOnlyBasicCCH(Bool_t bVal)           { fMinimalBook = bVal; }
    void SetTotalQvector(Int_t iVal)           { fTotalQvector = iVal; }
 
    void SetUsePhiWeights(Bool_t bVal)        { fUsePhiWeights = bVal; }
@@ -70,6 +71,7 @@ class AliFlowAnalysisWithScalarProduct {
 
       
    Int_t fDebug ;                // flag for analysis: more print statements
+   Bool_t fMinimalBook;          // flag to turn off QA and minimize FlowCommonHist
    Int_t fUsePhiWeights;         // use phi weights
    Int_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance
    Int_t fHarmonic;              // harmonic 
index 07d26d5..da4d589 100644 (file)
@@ -46,6 +46,7 @@ AliAnalysisTaskScalarProduct::AliAnalysisTaskScalarProduct(const char *name, Boo
   fEvent(NULL),
   fSP(NULL),
   fListHistos(NULL),
+  fMinimalBook(kFALSE),
   fUsePhiWeights(usePhiWeights),
   fListWeights(NULL),
   fRelDiffMsub(1.0),
@@ -76,6 +77,7 @@ AliAnalysisTaskScalarProduct::AliAnalysisTaskScalarProduct() :
   fEvent(NULL),
   fSP(NULL),
   fListHistos(NULL),
+  fMinimalBook(kFALSE),
   fUsePhiWeights(kFALSE),
   fListWeights(NULL),
   fRelDiffMsub(1.0),
@@ -112,6 +114,7 @@ void AliAnalysisTaskScalarProduct::UserCreateOutputObjects()
   
   //Analyser
   fSP = new AliFlowAnalysisWithScalarProduct();
+  fSP->SetBookOnlyBasicCCH(fMinimalBook);
 
   //set the allowed relative difference in the subevent multiplicities
   //fSP->SetRelDiffMsub(fRelDiffMsub); 
index 57f11de..6df1557 100644 (file)
@@ -46,6 +46,8 @@ class AliAnalysisTaskScalarProduct : public AliAnalysisTaskSE {
   
   void SetTotalQvector(const char *tqv) {*this->fTotalQvector = tqv;}; 
 
+  void SetBookOnlyBasicCCH(Bool_t const aMB) {this->fMinimalBook = aMB;}
+
  private:
 
   AliAnalysisTaskScalarProduct(const AliAnalysisTaskScalarProduct& aAnalysisTask);
@@ -55,6 +57,7 @@ class AliAnalysisTaskScalarProduct : public AliAnalysisTaskSE {
   AliFlowAnalysisWithScalarProduct* fSP;            // analysis object
   TList*                            fListHistos;    // collection of output
 
+  Bool_t    fMinimalBook;   // flag to turn off QA and minimize FlowCommonHist                                                                                                                                                
   Bool_t    fUsePhiWeights; // use phi weights
   TList*    fListWeights;   // list with weights
 
@@ -67,7 +70,7 @@ class AliAnalysisTaskScalarProduct : public AliAnalysisTaskSE {
 
   TString   *fTotalQvector;      // total Q-vector is: "QaQb" (means Qa+Qb), "Qa"  or "Qb"  
   
-  ClassDef(AliAnalysisTaskScalarProduct, 1); // example of analysis
+  ClassDef(AliAnalysisTaskScalarProduct, 2); // example of analysis
 };
 
 //==================================================================