]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Various fixes, and possibility to set trigger efficiency
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Oct 2012 10:31:17 +0000 (10:31 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Oct 2012 10:31:17 +0000 (10:31 +0000)
20 files changed:
PWGLF/FORWARD/analysis2/AddTaskCentraldNdeta.C
PWGLF/FORWARD/analysis2/AddTaskFMDELoss.C
PWGLF/FORWARD/analysis2/AddTaskForwarddNdeta.C
PWGLF/FORWARD/analysis2/AddTaskMCTruthdNdeta.C
PWGLF/FORWARD/analysis2/AliAODForwardMult.h
PWGLF/FORWARD/analysis2/AliBasedNdetaTask.cxx
PWGLF/FORWARD/analysis2/AliBasedNdetaTask.h
PWGLF/FORWARD/analysis2/AliFMDEventInspector.cxx
PWGLF/FORWARD/analysis2/AliFMDEventInspector.h
PWGLF/FORWARD/analysis2/AliFMDEventPlaneFinder.h
PWGLF/FORWARD/analysis2/AliFMDMCEventInspector.h
PWGLF/FORWARD/analysis2/AliFMDSharingFilter.h
PWGLF/FORWARD/analysis2/AliForwarddNdetaTask.cxx
PWGLF/FORWARD/analysis2/AliForwarddNdetaTask.h
PWGLF/FORWARD/analysis2/AliMCTruthdNdetaTask.cxx
PWGLF/FORWARD/analysis2/AliMCTruthdNdetaTask.h
PWGLF/FORWARD/analysis2/CentralAODConfig.C
PWGLF/FORWARD/analysis2/DrawdNdeta.C
PWGLF/FORWARD/analysis2/ForwardAODConfig.C
PWGLF/FORWARD/analysis2/doc/Trains.C

index 269285a92704a422c92dfb3eae57c5f0f3b869c8..ea976043b641f13dbdf33deec651598a5283c40e 100644 (file)
@@ -31,6 +31,8 @@ AddTaskCentraldNdeta(const char* trig     = "INEL",
                     Bool_t      useCent  = false,
                     const char* scheme   = 0,
                     Bool_t      cutEdges = false,
+                    Double_t    trigEff  = 1, 
+                    Double_t    trigEff0 = 1,
                     const char* mcanalysisfilename = "none")
 {
   // --- Load libraries ----------------------------------------------
@@ -54,8 +56,9 @@ AddTaskCentraldNdeta(const char* trig     = "INEL",
   // Set the vertex range to use 
   task->SetVertexRange(vzMin, vzMax);
   // Set the trigger mask to use (INEL,INEL>0,NSD)
-  task->SetTriggerEff(0.997535);
   task->SetTriggerMask(trig);
+  task->SetTriggerEff(trigEff); // 0.997535);
+  task->SetTriggerEff0(trigEff0); 
   // Whether to cut edges when re-binning 
   task->SetCutEdges(cutEdges);
   // Whether to correct for empty bins when projecting 
index aef19adf757ba4da8376fe3abc5e48ba0a646bed..dfa4eea7c00942b4161d8aef61b0f17c7ec16dd9 100644 (file)
@@ -21,6 +21,7 @@
  * 
  * @param mc      Assume MC input 
  * @param useCent Use centrality information 
+ * @param debug   Debug level
  *
  * @return Newly created task 
  *
index 98f82616e48b48f92ce8b9de4c1ad44404363621..2988b91700ea802751337434a2c47e2556a77231 100644 (file)
@@ -31,6 +31,8 @@ AddTaskForwarddNdeta(const char* trig     = "INEL",
                     Bool_t      useCent  = false,
                     const char* scheme   = 0,
                     Bool_t      cutEdges = false,
+                    Double_t    trigEff  = 1, 
+                    Double_t    trigEff0 = 1,
                     const char* mcanalysisfilename = "none")
 {
   // --- Load libraries ----------------------------------------------
@@ -58,7 +60,8 @@ AddTaskForwarddNdeta(const char* trig     = "INEL",
   // Set the trigger mask to use (INEL,INEL>0,NSD)
   task->SetTriggerMask(trig);
   // Set the trigger efficiency 
-  // task->SetTriggerEff(0.997535);
+  task->SetTriggerEff(trigEff); // 0.997535);
+  task->SetTriggerEff0(trigEff0); 
   // Whether to cut edges when re-binning 
   task->SetCutEdges(cutEdges);
   // Whether to correct for empty bins when projecting 
index 4efd6f752224dff84e12224531c8199ede59662e..e36d8b4bbf25d9acc867aa28f45af38214200b33 100644 (file)
@@ -29,7 +29,9 @@ AddTaskMCTruthdNdeta(const char* trig     = "INEL",
                     Double_t    vzMax    = +10, 
                     Bool_t      useCent  = false,
                     const char* scheme   = 0,
-                    Bool_t      cutEdges = false)
+                    Bool_t      cutEdges = false,
+                    Double_t    trigEff  = 1, 
+                    Double_t    trigEff0 = 1)
 {
   // --- Load libraries ----------------------------------------------
   gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
@@ -44,7 +46,8 @@ AddTaskMCTruthdNdeta(const char* trig     = "INEL",
   // Set the trigger mask to use (INEL,INEL>0,NSD)
   task->SetTriggerMask(trig);
   // Set the trigger efficiency 
-  // task->SetTriggerEff(0.997535);
+  task->SetTriggerEff(trigEff); // 0.997535);
+  task->SetTriggerEff0(trigEff0);
   // Whether to cut edges when re-binning 
   task->SetCutEdges(cutEdges);
   // Whether to correct for empty bins when projecting 
index 97336dff47f375a22e9c32ef769e0fff2494ddd1..554ecd21a54cd5652ffd4fc9993455a67bd55a8f 100644 (file)
@@ -131,7 +131,7 @@ public:
     /** At least one SPD cluster */ 
     kNClusterGt0 = 0x1000,
     /** V0-AND trigger */
-    kV0AND
+    kV0AND       = 0x2000
   };
   /** 
    * Bin numbers in trigger histograms 
index df834aa4b3a331bdb2ca09f89f7ada65a369c899..ec2ae0556e34c55f04980d758a225c73db40415e 100644 (file)
@@ -28,6 +28,7 @@ AliBasedNdetaTask::AliBasedNdetaTask()
     fCorrEmpty(true), 
     fUseROOTProj(false),
     fTriggerEff(1),
+  fTriggerEff0(1),
     fShapeCorr(0),
     fListOfCentralities(0),
     fSNNString(0),
@@ -59,6 +60,7 @@ AliBasedNdetaTask::AliBasedNdetaTask(const char* name)
     fCorrEmpty(true), 
     fUseROOTProj(false),
     fTriggerEff(1),
+    fTriggerEff0(1),
     fShapeCorr(0),
     fListOfCentralities(0),
     fSNNString(0),
@@ -101,6 +103,7 @@ AliBasedNdetaTask::AliBasedNdetaTask(const AliBasedNdetaTask& o)
     fCorrEmpty(o.fCorrEmpty), 
     fUseROOTProj(o.fUseROOTProj),
     fTriggerEff(o.fTriggerEff),
+    fTriggerEff0(o.fTriggerEff0),
     fShapeCorr(o.fShapeCorr),
     fListOfCentralities(o.fListOfCentralities),
     fSNNString(o.fSNNString),
@@ -273,15 +276,8 @@ AliBasedNdetaTask::SetNormalizationScheme(UShort_t scheme)
 {
   DGUARD(fDebug,3,"Set the normalization scheme: 0x%x", scheme);
   fNormalizationScheme = scheme; 
-#if 0
-  const Char_t* tit = NormalizationSchemeString(scheme);
-  if (!fSchemeString) fSchemeString = new TNamed("scheme", "");
-  fSchemeString->SetTitle(tit);
-  fSchemeString->SetUniqueID(fNormalizationScheme);
-#else 
   if (fSchemeString) delete fSchemeString;
   fSchemeString = AliForwardUtil::MakeParameter("scheme", scheme);
-#endif
 }
 //________________________________________________________________________
 void 
@@ -302,16 +298,8 @@ AliBasedNdetaTask::SetTriggerMask(UShort_t mask)
 { 
   DGUARD(fDebug,3,"Set the trigger mask: 0x%0x", mask);
   fTriggerMask = mask; 
-#if 0
-  TString tit(AliAODForwardMult::GetTriggerString(mask));
-  tit = tit.Strip(TString::kBoth);
-  if (!fTriggerString) fTriggerString = new TNamed("trigger", "");
-  fTriggerString->SetTitle(tit);
-  fTriggerString->SetUniqueID(fTriggerMask);
-#else 
   if (fTriggerString) delete fTriggerString;
   fTriggerString = AliForwardUtil::MakeParameter("trigger", fTriggerMask);
-#endif
 }
 
 //________________________________________________________________________
@@ -436,26 +424,6 @@ AliBasedNdetaTask::UserExec(Option_t *)
   }
 
   // Here, we get the update 
-#if 0
-  if (!fSNNString) { 
-    UShort_t sNN = forward->GetSNN();
-    fSNNString = new TNamed("sNN", "");
-    fSNNString->SetTitle(AliForwardUtil::CenterOfMassEnergyString(sNN));
-    fSNNString->SetUniqueID(sNN);
-    fSums->Add(fSNNString);
-  
-    UShort_t sys = forward->GetSystem();
-    fSysString = new TNamed("sys", "");
-    fSysString->SetTitle(AliForwardUtil::CollisionSystemString(sys));
-    fSysString->SetUniqueID(sys);
-    fSums->Add(fSysString);
-
-    fSums->Add(fSchemeString);
-    fSums->Add(fTriggerString);
-
-    // Print();
-  }
-#else
   if (!fSNNString) { 
     fSNNString = AliForwardUtil::MakeParameter("sNN", forward->GetSNN());
     fSysString = AliForwardUtil::MakeParameter("sys", forward->GetSystem());
@@ -467,8 +435,6 @@ AliBasedNdetaTask::UserExec(Option_t *)
 
     // Print();
   }
-
-#endif
   PostData(1, fSums);
 }
 
@@ -689,7 +655,8 @@ AliBasedNdetaTask::Terminate(Option_t *)
   AliInfo(Form("Marker style=%d, color=%d", style, color));
   while ((bin = static_cast<CentralityBin*>(next()))) {
     
-    bin->End(fSums, fOutput, fNormalizationScheme, fShapeCorr, fTriggerEff,
+    bin->End(fSums, fOutput, fNormalizationScheme, fShapeCorr, 
+            fTriggerEff, fTriggerEff0, 
             fSymmetrice, fRebin, fUseROOTProj, fCorrEmpty, fCutEdges, 
             fTriggerMask, style, color, mclist, truthlist);
     if (fCentAxis && bin->IsAllBin()) continue;
@@ -789,6 +756,7 @@ AliBasedNdetaTask::Terminate(Option_t *)
 
   // Output trigger efficiency and shape correction 
   fOutput->Add(AliForwardUtil::MakeParameter("triggerEff", fTriggerEff));
+  fOutput->Add(AliForwardUtil::MakeParameter("triggerEff0", fTriggerEff0));
   if (fShapeCorr) fOutput->Add(fShapeCorr);
 
   TNamed* options = new TNamed("options","");
@@ -864,6 +832,21 @@ AliBasedNdetaTask::LoadNormalizationData(UShort_t sys, UShort_t energy)
   if (fTriggerEff != 1) SetTriggerEff(trigEff);
   if (fTriggerEff < 0)  fTriggerEff = 1;
 
+  // Trigger efficiency
+  TString eff0Name(Form("%sTriggerEff0", 
+                      fTriggerMask == AliAODForwardMult::kInel ? "inel" :
+                      fTriggerMask == AliAODForwardMult::kNSD ? "nsd" :
+                      fTriggerMask == AliAODForwardMult::kInelGt0 ?
+                      "inelgt0" : "all"));
+
+  Double_t trigEff0 = 1; 
+  if (fNormalizationScheme & kTriggerEfficiency) { 
+    TObject* eff = fin->Get(eff0Name);
+    if (eff) AliForwardUtil::GetParameter(eff, trigEff0);
+  }
+  if (fTriggerEff0 != 1) SetTriggerEff0(trigEff0);
+  if (fTriggerEff0 < 0)  fTriggerEff0 = 1;
+
   // TEMPORARY FIX
   // Rescale the shape correction by the trigger efficiency 
   if (fShapeCorr) {
@@ -886,29 +869,31 @@ AliBasedNdetaTask::Print(Option_t*) const
   // 
   std::cout << this->ClassName() << ": " << this->GetName() << "\n"
            << std::boolalpha 
-           << " Trigger:              " << (fTriggerString ? 
-                                            fTriggerString->GetTitle() :
-                                            "none") << "\n"
-           << " Vertex range:         [" << fVtxMin << ":" << fVtxMax << "]\n"
-           << " Rebin factor:         " << fRebin << "\n" 
-           << " Cut edges:            " << fCutEdges << "\n"
-           << " Symmertrice:          " << fSymmetrice << "\n"
-           << " Use TH2::ProjectionX: " << fUseROOTProj << "\n"
-           << " Correct for empty:    " << fCorrEmpty << "\n"
-           << " Normalization scheme: " << (fSchemeString ? 
-                                            fSchemeString->GetTitle() : 
+           << " Trigger:                    " << (fTriggerString ? 
+                                                  fTriggerString->GetTitle() :
+                                                  "none") << "\n"
+           << " Vertex range:               [" << fVtxMin << ":" 
+           << fVtxMax << "]\n"
+           << " Rebin factor:               " << fRebin << "\n" 
+           << " Cut edges:                  " << fCutEdges << "\n"
+           << " Symmertrice:                " << fSymmetrice << "\n"
+           << " Use TH2::ProjectionX:       " << fUseROOTProj << "\n"
+           << " Correct for empty:          " << fCorrEmpty << "\n"
+           << " Normalization scheme:       " << (fSchemeString ? 
+                                                  fSchemeString->GetTitle() : 
                                             "none") <<"\n"
-           << " Trigger efficiency:   " << fTriggerEff << "\n" 
-           << " Shape correction:     " << (fShapeCorr ? 
-                                          fShapeCorr->GetName() : 
-                                          "none") << "\n"
-           << " sqrt(s_NN):           " << (fSNNString ? 
-                                            fSNNString->GetTitle() : 
-                                          "unknown") << "\n"
-           << " Collision system:     " << (fSysString ? 
-                                            fSysString->GetTitle() : 
-                                          "unknown") << "\n"
-           << " Centrality bins:      " << (fCentAxis ? "" : "none");
+           << " Trigger efficiency:         " << fTriggerEff << "\n" 
+           << " Bin-0 Trigger efficiency:   " << fTriggerEff0 << "\n" 
+           << " Shape correction:           " << (fShapeCorr ? 
+                                                  fShapeCorr->GetName() : 
+                                                  "none") << "\n"
+           << " sqrt(s_NN):                 " << (fSNNString ? 
+                                                  fSNNString->GetTitle() : 
+                                                  "unknown") << "\n"
+           << " Collision system:           " << (fSysString ? 
+                                                  fSysString->GetTitle() : 
+                                                  "unknown") << "\n"
+           << " Centrality bins:            " << (fCentAxis ? "" : "none");
   if (fCentAxis) { 
     Int_t           nBins = fCentAxis->GetNbins();
     const Double_t* bins  = fCentAxis->GetXbins()->GetArray();
@@ -1546,7 +1531,7 @@ AliBasedNdetaTask::CentralityBin::Normalization(const TH1I& t,
   Double_t nOffline    = t.GetBinContent(AliAODForwardMult::kBinOffline);
   Double_t nTriggered  = t.GetBinContent(AliAODForwardMult::kWithTrigger);
   Double_t nWithVertex = t.GetBinContent(AliAODForwardMult::kWithVertex);
-  Double_t nAccepted   = ntotal; // t.GetBinContent(AliAODForwardMult::kAccepted);
+  Double_t nAccepted   = ntotal; 
   ntotal               = 0;
   
   if (nTriggered <= 0.1) { 
@@ -1744,24 +1729,23 @@ AliBasedNdetaTask::CentralityBin::MakeResult(const TH2D* sum,
   if(mclist) 
     centlist = static_cast<TList*> (mclist->FindObject(GetListName()));
   if(centlist)
-    dndetaMCCorrection = static_cast<TH1D*>(centlist->FindObject(Form("dndeta%s%s",GetName(), postfix)));
+    dndetaMCCorrection = 
+      static_cast<TH1D*>(centlist->FindObject(Form("dndeta%s%s",
+                                                  GetName(), postfix)));
   if(truthlist) 
-    truthcentlist = static_cast<TList*> (truthlist->FindObject(GetListName()));
+    truthcentlist =static_cast<TList*>(truthlist->FindObject(GetListName()));
   if(truthcentlist)
-    dndetaMCtruth =  static_cast<TH1D*> (truthcentlist->FindObject("dndetaTruth"));
-  //std::cout<<dndetaMCCorrection<<"  "<<dndetaMCtruth<<std::endl;
+    dndetaMCtruth =static_cast<TH1D*>(truthcentlist->FindObject("dndetaTruth"));
+
   if(dndetaMCCorrection && dndetaMCtruth) {
     AliInfo("Correcting with final MC correction");
     dndetaMCCorrection->Divide(dndetaMCtruth);
     dndetaMCCorrection->SetTitle("Final MC correction");
     dndetaMCCorrection->SetName("finalMCCorr");
-    dndeta->Divide(dndetaMCCorrection);
-    
-    //std::cout<<"histo "<<Form("dndeta%s%s",GetName(), postfix)<<"  "<<GetListName()<<"  "<<dndetaMCCorrection<<std::endl;
-    //std::cout<<"truth "<<GetListName()<<"  "<<dndetaMCtruth<<std::endl;
-  
+    dndeta->Divide(dndetaMCCorrection);    
   }
-  else AliInfo("No final MC correction applied");
+  else 
+    AliInfo("No final MC correction applied");
   
   // --- Set some histogram attributes -------------------------------
   TString post;
@@ -1790,6 +1774,7 @@ AliBasedNdetaTask::CentralityBin::End(TList*      sums,
                                      UShort_t    scheme,
                                      const TH2F* shapeCorr, 
                                      Double_t    trigEff,
+                                     Double_t    trigEff0,
                                      Bool_t      symmetrice,
                                      Int_t       rebin, 
                                      Bool_t      rootProj,
@@ -1845,7 +1830,10 @@ AliBasedNdetaTask::CentralityBin::End(TList*      sums,
 
   // --- Get normalization scaler ------------------------------------
   Double_t epsilonT  = trigEff;
-  Double_t epsilonT0 = trigEff;
+  Double_t epsilonT0 = trigEff0;
+  AliInfoF("Using epsilonT=%f, epsilonT0=%f for %d", 
+          epsilonT, epsilonT0, triggerMask);
+#if 0
   // TEMPORARY FIX
   if (triggerMask == AliAODForwardMult::kNSD) {
     // This is a local change 
@@ -1868,15 +1856,16 @@ AliBasedNdetaTask::CentralityBin::End(TList*      sums,
     AliWarning(Form("Using hard-coded NCluster>0 trigger efficiency of %f",
                    epsilonT0));
   }
+#endif
 
   // Get our histograms 
   Double_t nSum   = 0;
-  TH2D*    sum    = fSum->CalcSum(fOutput, nSum, epsilonT0, 1
+  TH2D*    sum    = fSum->CalcSum(fOutput, nSum, epsilonT0, epsilonT
                                 marker, rootProj, corrEmpty);
   Double_t nSumMC = 0;
   TH2D*    sumMC  = 0;
   if (fSumMC) sumMC = fSumMC->CalcSum(fOutput, nSumMC, 
-                                     epsilonT0, 1, marker,
+                                     epsilonT0, epsilonT, marker,
                                      rootProj, corrEmpty);
   if (!sum) { 
     AliError("Failed to get sum from summer - bailing out");
index 50d59e4a7405ed13b9174e7db37aa83e186b59d7..fed6d596283ce9270144ec9a5579e2a52d0f35ac 100644 (file)
@@ -171,6 +171,12 @@ public:
    * @param e Trigger efficiency 
    */
   void SetTriggerEff(Double_t e) { fTriggerEff = e; } 
+  /** 
+   * Trigger efficiency for 0-bin for selected trigger(s)
+   * 
+   * @param e Trigger efficiency for 0-bin
+   */
+  void SetTriggerEff0(Double_t e) { fTriggerEff0 = e; } 
   /** 
    * Set the shape correction (a.k.a., track correction) for selected
    * trigger(s)
@@ -701,6 +707,7 @@ protected:
      * @param scheme      Normalisation scheme options
      * @param shapeCorr   Shape correction or nil
      * @param trigEff     Trigger efficiency 
+     * @param trigEff0    0-bin trigger efficiency 
      * @param symmetrice  Whether to symmetrice the results
      * @param rebin       Whether to rebin the results
      * @param rootProj    If true, use TH2::ProjectionX
@@ -717,6 +724,7 @@ protected:
                     UShort_t    scheme,
                     const TH2F* shapeCorr, 
                     Double_t    trigEff,
+                    Double_t    trigEff0,
                     Bool_t      symmetrice,
                     Int_t       rebin, 
                     Bool_t      rootProj,
@@ -858,28 +866,19 @@ protected:
   Bool_t          fCorrEmpty;    // Correct for empty bins 
   Bool_t          fUseROOTProj;  // Whether to use ROOT's ProjectionX
   Double_t        fTriggerEff;   // Trigger efficiency for selected trigger(s)
+  Double_t        fTriggerEff0;  // Bin-0 Trigger efficiency for sel trigger(s)
   TH2F*           fShapeCorr;    // Shape correction 
   TObjArray*      fListOfCentralities; // Centrality bins 
-#if 0
-  TNamed*         fSNNString;    // sqrt(s_NN) string 
-  TNamed*         fSysString;    // Collision system string 
-#else
-  TObject* fSNNString;    // sqrt(s_NN) string 
-  TObject* fSysString;    // Collision system string 
-#endif
+  TObject*        fSNNString;    // sqrt(s_NN) string 
+  TObject*        fSysString;    // Collision system string 
   TH1D*           fCent;         // Centrality distribution 
   TAxis*          fCentAxis;     // Centrality axis
   UShort_t        fNormalizationScheme; // Normalization scheme
-#if 0
-  TNamed*         fSchemeString;     // Normalization scheme string
-  TNamed*         fTriggerString;    // Trigger string 
-#else 
   TObject*        fSchemeString;    // Normalization scheme string
   TObject*        fTriggerString;    // Trigger string 
-#endif
   TString         fFinalMCCorrFile; //Filename for final MC corr
   
-  ClassDef(AliBasedNdetaTask,8); // Determine multiplicity in base area
+  ClassDef(AliBasedNdetaTask,9); // Determine charged particle density
 };
 
 #endif
index b602cb409229fed5d381ebdfab67bf323cd2fe14..f98ffc6c2a3888cf1d76246385b24428fb59c80b 100644 (file)
@@ -48,23 +48,24 @@ AliFMDEventInspector::AliFMDEventInspector()
     fHEventsAccepted(0),
     fHEventsAcceptedXY(0),
     fHTriggers(0),
+    fHTriggerCorr(0),
     fHType(0),
   fHWords(0),
-    fHCent(0),
+  fHCent(0),
   fHCentVsQual(0),
   fHStatus(0),
-    fLowFluxCut(1000),
-    fMaxVzErr(0.2),
-    fList(0),
-    fEnergy(0),
+  fLowFluxCut(1000),
+  fMaxVzErr(0.2),
+  fList(0),
+  fEnergy(0),
     fField(999), 
-    fCollisionSystem(kUnknown),
+  fCollisionSystem(kUnknown),
     fDebug(0),
     fCentAxis(0),
     fVtxAxis(10,-10,10),
-    fUseFirstPhysicsVertex(true),
-    fUseV0AND(false),
-    fMinPileupContrib(3), 
+  fUseFirstPhysicsVertex(true),
+  fUseV0AND(false),
+  fMinPileupContrib(3), 
     fMinPileupDistance(0.8),
     fUseDisplacedVertices(false),
   fDisplacedVertex(),
@@ -85,6 +86,7 @@ AliFMDEventInspector::AliFMDEventInspector(const char* name)
     fHEventsAccepted(0),
     fHEventsAcceptedXY(0),
     fHTriggers(0),
+    fHTriggerCorr(0),
     fHType(0),
     fHWords(0),
     fHCent(0),
@@ -125,6 +127,7 @@ AliFMDEventInspector::AliFMDEventInspector(const AliFMDEventInspector& o)
     fHEventsAccepted(o.fHEventsAccepted),
     fHEventsAcceptedXY(o.fHEventsAcceptedXY),
     fHTriggers(o.fHTriggers),
+    fHTriggerCorr(o.fHTriggerCorr),
     fHType(o.fHType),
     fHWords(o.fHWords),
     fHCent(o.fHCent),
@@ -187,6 +190,7 @@ AliFMDEventInspector::operator=(const AliFMDEventInspector& o)
   fHEventsAccepted   = o.fHEventsAccepted;
   fHEventsAcceptedXY = o.fHEventsAcceptedXY;
   fHTriggers         = o.fHTriggers;
+  fHTriggerCorr      = o.fHTriggerCorr;
   fHType             = o.fHType;
   fHWords            = o.fHWords;
   fHCent             = o.fHCent;
@@ -213,6 +217,7 @@ AliFMDEventInspector::operator=(const AliFMDEventInspector& o)
     if (fHEventsTr)    fList->Add(fHEventsTr);
     if (fHEventsTrVtx) fList->Add(fHEventsTrVtx);
     if (fHTriggers)    fList->Add(fHTriggers);
+    if (fHTriggerCorr) fList->Add(fHTriggerCorr);
     if (fHType)        fList->Add(fHType);
     if (fHWords)       fList->Add(fHWords);
     if (fHCent)        fList->Add(fHCent);
@@ -409,19 +414,45 @@ AliFMDEventInspector::Init(const TAxis& vtxAxis)
   fHTriggers->SetFillStyle(3001);
   fHTriggers->SetStats(0);
   fHTriggers->SetDirectory(0);
-  fHTriggers->GetXaxis()->SetBinLabel(kInel   +1,"INEL");
-  fHTriggers->GetXaxis()->SetBinLabel(kInelGt0+1,"INEL>0");
-  fHTriggers->GetXaxis()->SetBinLabel(kNSD    +1,"NSD");
-  fHTriggers->GetXaxis()->SetBinLabel(kV0AND  +1,"VOAND");
-  fHTriggers->GetXaxis()->SetBinLabel(kEmpty  +1,"Empty");
-  fHTriggers->GetXaxis()->SetBinLabel(kA      +1,"A");
-  fHTriggers->GetXaxis()->SetBinLabel(kB      +1,"B");
-  fHTriggers->GetXaxis()->SetBinLabel(kC      +1,"C");
-  fHTriggers->GetXaxis()->SetBinLabel(kE      +1,"E");
-  fHTriggers->GetXaxis()->SetBinLabel(kPileUp +1,"Pileup");
-  fHTriggers->GetXaxis()->SetBinLabel(kMCNSD  +1,"NSD_{MC}");
-  fHTriggers->GetXaxis()->SetBinLabel(kOffline+1,"Offline");
+
+  fHTriggerCorr = new TH2I("triggerCorr", "Trigger correlation", 
+                          kOffline+1, 0, kOffline+1, 
+                          kOffline+1, 0, kOffline+1);
+  fHTriggerCorr->SetStats(0);
+  fHTriggerCorr->SetDirectory(0);
+  
+  Int_t binNum[] = { kInel   +1,
+                    kInelGt0+1,
+                    kNSD    +1,
+                    kV0AND  +1,
+                    kEmpty  +1,
+                    kA      +1,
+                    kB      +1,
+                    kC      +1,
+                    kE      +1,
+                    kPileUp +1,
+                    kMCNSD  +1,
+                    kOffline+1 };
+  const char* binLbl[] = { "INEL",      
+                          "INEL>0",
+                          "NSD",        
+                          "VOAND",
+                          "Empty",      
+                          "A",  
+                          "B",  
+                          "C",  
+                          "E",  
+                          "Pileup",
+                          "NSD_{MC}", 
+                          "Offline" };
+  for (Int_t i = 0; i < kOffline; i++) {
+    fHTriggers->GetXaxis()->SetBinLabel(binNum[i], binLbl[i]);
+    fHTriggerCorr->GetXaxis()->SetBinLabel(binNum[i], binLbl[i]);
+    fHTriggerCorr->GetYaxis()->SetBinLabel(binNum[i], binLbl[i]);
+  }
   fList->Add(fHTriggers);
+  fList->Add(fHTriggerCorr);
+  
 
   fHType = new TH1I("type", Form("Event type (cut: SPD mult>%d)", 
                                 fLowFluxCut), 2, -.5, 1.5);
@@ -768,7 +799,7 @@ AliFMDEventInspector::ReadTriggers(const AliESDEvent& esd, UInt_t& triggers,
   if (triggers & AliAODForwardMult::kB) {
     fHTriggers->Fill(kB+.5);
     if (triggers & AliAODForwardMult::kInel) 
-      fHTriggers->Fill(kInel);
+      fHTriggers->Fill(kInel+.5);
     
     if (triggers & AliAODForwardMult::kInelGt0)
       fHTriggers->Fill(kInelGt0+.5);
@@ -782,7 +813,36 @@ AliFMDEventInspector::ReadTriggers(const AliESDEvent& esd, UInt_t& triggers,
   if (triggers & AliAODForwardMult::kA) fHTriggers->Fill(kA+.5);
   if (triggers & AliAODForwardMult::kC) fHTriggers->Fill(kC+.5);
   if (triggers & AliAODForwardMult::kE) fHTriggers->Fill(kE+.5);
+
+#define TEST_TRIG_BIN(RET,BIN,TRIGGERS) \
+  do { switch (BIN) { \
+    case kInel:    RET = triggers & AliAODForwardMult::kInel;    break; \
+    case kInelGt0: RET = triggers & AliAODForwardMult::kInelGt0; break; \
+    case kNSD:     RET = triggers & AliAODForwardMult::kNSD;     break; \
+    case kV0AND:   RET = triggers & AliAODForwardMult::kV0AND;   break; \
+    case kEmpty:   RET = triggers & AliAODForwardMult::kEmpty;   break; \
+    case kA:       RET = triggers & AliAODForwardMult::kA;       break; \
+    case kB:       RET = triggers & AliAODForwardMult::kB;       break; \
+    case kC:       RET = triggers & AliAODForwardMult::kC;       break; \
+    case kE:       RET = triggers & AliAODForwardMult::kE;       break; \
+    case kPileUp:  RET = triggers & AliAODForwardMult::kPileUp;  break; \
+    case kMCNSD:   RET = triggers & AliAODForwardMult::kMCNSD;   break; \
+    case kOffline: RET = triggers & AliAODForwardMult::kOffline; break; \
+    default:       RET = false; } } while(false)
+      
   
+  for (Int_t i = 0; i < kOffline+1; i++) { 
+    Bool_t hasX = false;
+    TEST_TRIG_BIN(hasX, i, triggers);
+    if (!hasX) continue;
+    for (Int_t j = i; j < kOffline+1; j++) { 
+      Bool_t hasY = false;
+      TEST_TRIG_BIN(hasY, j, triggers);
+      if (!hasY) continue;
+      
+      fHTriggerCorr->Fill(i+.5, j+.5);
+    }
+  }
   return kTRUE;
 }
 
index ede32279d6ec1886a83ae0d648dcf59a7e3a5a27..f26f3a6accfa30169c8b020cd11bccb7917a8e56 100644 (file)
@@ -24,6 +24,7 @@ class TH1D;
 class TH1I;
 class TH1F;
 class TH2F;
+class TH2I;
 class TAxis;
 // class TList;
 
@@ -444,6 +445,7 @@ protected:
   TH1I*    fHEventsAccepted; //! Events w/trigger and vertex in range 
   TH2D*    fHEventsAcceptedXY; //! XY vtx with trigger and Z vertex in range 
   TH1I*    fHTriggers;    //! Triggers
+  TH2I*    fHTriggerCorr; //! Correlation of triggers
   TH1I*    fHType;        //! Type (low/high flux) of event
   TH1I*    fHWords;       //! Trigger words 
   TH1F*    fHCent;        //! Centrality 
index 3a7af3b9fc791b70b844da344781a1519d917507..7a42fd00b1af118702ea28fce99ca441877842ee 100644 (file)
@@ -159,7 +159,7 @@ protected:
    */
   Double_t GetPhiWeight(Int_t etaBin, Int_t phiBin) const;
   /** 
-   * Calculat the difference @f$a_1 - a_2@$f between two angles
+   * Calculat the difference @f$a_1 - a_2@f$ between two angles
    * @f$a_1, a_2@f$ and normalize to @f$[-\pi/2,\pi/2]@f$
    * 
    * @param a1 First angle @f$a_1@f$
index 63754ac2e1a3cb3b02b39d8ed94ae73713617123..622c1607eed8c9b09b7533d1d4615f843bf8622c 100644 (file)
@@ -86,7 +86,7 @@ public:
    *                  means outside of the defined vertex range
    * @param vz        On return, the z position of the interaction
    * @param b         On return, impact parameter [fm] (if available)
-   * @param b         On return, centrality estimate [%] (if available)
+   * @param c         On return, centrality estimate [%] (if available)
    * @param npart     On return, number of participants (if available)
    * @param nbin      On return, number of binary collisions (if available)
    * @param phiR      On return, reaction plane angle (if available)
index 76ae5de9c7d586fcaf48141ec21afd4acfaa8581..85cc3bbdbf441d79205b2eeb3fcaf31e08ce4cad 100644 (file)
@@ -98,7 +98,7 @@ public:
   /** 
    * Initialize 
    * 
-   * @param default eta axis from parent task 
+   * @param axis Default eta axis from parent task 
    */
   void Init(const TAxis& axis);
   /** 
index 6013234aaf021c787862e680b4dd79dc5e6d29bb..d66dff3ce6304aae3dfcf818c61af698c244d938 100644 (file)
@@ -102,6 +102,7 @@ AliForwarddNdetaTask::CentralityBin::End(TList*      sums,
                                         UShort_t    scheme,
                                         const TH2F* shapeCorr, 
                                         Double_t    trigEff,
+                                        Double_t    trigEff0,
                                         Bool_t      symmetrice,
                                         Int_t       rebin, 
                                         Bool_t      rootProj,
@@ -116,7 +117,7 @@ AliForwarddNdetaTask::CentralityBin::End(TList*      sums,
   DGUARD(fDebug, 1, "In End of %s with corrEmpty=%d, cutEdges=%d, rootProj=%d", 
         GetName(), corrEmpty, cutEdges, rootProj);
   AliBasedNdetaTask::CentralityBin::End(sums, results, scheme, 
-                                       shapeCorr, trigEff, 
+                                       shapeCorr, trigEff, trigEff0,
                                        symmetrice, rebin, 
                                        rootProj, corrEmpty, cutEdges,
                                        triggerMask, marker, color, mclist, 
@@ -145,14 +146,17 @@ AliForwarddNdetaTask::CentralityBin::End(TList*      sums,
     AliError("Triggers histogram not set");
     return;
   }
+
   Double_t ntotal   = 0;
   Double_t epsilonT = trigEff;
+#if 0
   // TEMPORARY FIX
   if (triggerMask == AliAODForwardMult::kNSD) {
     // This is a local change 
     epsilonT = 0.92; 
     AliWarning(Form("Using hard-coded NSD trigger efficiency of %f",epsilonT));
   }
+#endif
   AliInfo("Adding per-ring histograms to output");
   Double_t scaler = Normalization(*fTriggers, scheme, epsilonT, ntotal);
   TIter next(res->GetHists());
index 87a460d5f90882d84348b1cb1d6bbaaa4c809ea8..0e2026a03aa15990cf214afdb6e1fcd5ab2ad192 100644 (file)
@@ -132,6 +132,7 @@ protected:
      * @param scheme      Normalisation scheme options
      * @param shapeCorr   Shape correction or nil
      * @param trigEff     Trigger efficiency 
+     * @param trigEff0    0-bin trigger efficiency 
      * @param symmetrice  Whether to symmetrice the results
      * @param rebin       Whether to rebin the results
      * @param rootProj    If true, use TH2::ProjectionX
@@ -148,6 +149,7 @@ protected:
                     UShort_t    scheme,
                     const TH2F* shapeCorr, 
                     Double_t    trigEff,
+                    Double_t    trigEff0,
                     Bool_t      symmetrice,
                     Int_t       rebin, 
                     Bool_t      rootProj,
index ca949b98c4e74c04d9d9b16cbce5df1947ec79cd..fe545e8c9e2e81b36214e3d58d0354d0d766f7bb 100644 (file)
@@ -192,6 +192,7 @@ AliMCTruthdNdetaTask::CentralityBin::End(TList*      sums,
                                         UShort_t    scheme,
                                         const TH2F* shapeCorr, 
                                         Double_t    trigEff,
+                                        Double_t    trigEff0,
                                         Bool_t      symmetrice,
                                         Int_t       rebin, 
                                         Bool_t      rootProj,
@@ -208,13 +209,13 @@ AliMCTruthdNdetaTask::CentralityBin::End(TList*      sums,
               "shapeCorr=%p, trigEff=%f, symmetrice=%d, rebin=%d, "
               "rootProj=%d, corrEmpty=%d, cutEdges=%d, triggerMask=0x%08x, "
               "marker=%d (%d)", 
-              sums, results, scheme, shapeCorr, trigEff, symmetrice, 
+              sums, results, scheme, shapeCorr, trigEff, trigEff0, symmetrice, 
               rebin, rootProj, corrEmpty, cutEdges, triggerMask, marker,
               GetMarkerStyle(kStar)));
 #endif
 
   AliBasedNdetaTask::CentralityBin::End(sums, results, scheme, 
-                                       shapeCorr, trigEff, 
+                                       shapeCorr, trigEff, trigEff0,
                                        symmetrice, rebin, 
                                        rootProj, corrEmpty, cutEdges,
                                        triggerMask, marker, color, mclist, 
index f9c190a8f585e8957a938d63803593fe8859f351..36986b3a3e9bc88c3a1e0b930c362e6028560c9a 100644 (file)
@@ -166,6 +166,7 @@ protected:
      * @param scheme      Normalisation scheme options
      * @param shapeCorr   Shape correction or nil
      * @param trigEff     Trigger efficiency 
+     * @param trigEff0    0-bin trigger efficiency 
      * @param symmetrice  Whether to symmetrice the results
      * @param rebin       Whether to rebin the results
      * @param rootProj    If true, use TH2::ProjectionX
@@ -182,6 +183,7 @@ protected:
                     UShort_t    scheme,
                     const TH2F* shapeCorr, 
                     Double_t    trigEff,
+                    Double_t    trigEff0,
                     Bool_t      symmetrice,
                     Int_t       rebin, 
                     Bool_t      rootProj,
index 86be1dc2c5dc8535fa7aa8abbbcd7eb2aad457ea..1d2005c7709b069d3004ecb152dc1ad57bbe365d 100644 (file)
@@ -28,6 +28,23 @@ CentralAODConfig(AliCentralMultiplicityTask* task)
   task->SetUseSecondary(true);
   // Whether to do correction for acceptance
   task->SetUseAcceptance(true);
+
+  // --- Event inspector ---------------------------------------------
+  // Set the number of SPD tracklets for which we consider the event a
+  // low flux event
+  task->GetInspector().SetLowFluxCut(1000); 
+  // Set the maximum error on v_z [cm]
+  task->GetInspector().SetMaxVzErr(0.2);
+  // Least number of constributors to 2nd pile-up vertex
+  task->GetInspector().SetMinPileupContributors(3);
+  // Least distance from primary to 2nd pile-up vertex (cm)
+  task->GetInspector().SetMinPileupDistance(.8);
+  // V0-AND triggered events flagged as NSD 
+  task->GetInspector().SetUseV0AndForNSD(false);
+  // Use primary vertex selection from 1st physics WG
+  // task->GetInspector().SetUseFirstPhysicsVtx(true);
+  // Use satellite collisions
+  // task->GetInspector().SetUseDisplacedVertices(true);
   // task->GetInspector().SetDebug(4);
 
   // task->GetManager().SetSecMapPath(".");
index 2bff1cbf9e32edc1fced20ae2a679728a03fa4a3..7a88035ca3af7c090688747d51f35551cafb165a 100644 (file)
@@ -529,11 +529,14 @@ struct dNdetaDrawer
   /** 
    * Get the results from the top-level list 
    * 
-   * @param list  List 
-   * @param name  name 
-   * @param max   On return, maximum of data 
-   * @param rmax  On return, maximum of ratios
-   * @param amax  On return, maximum of left-right comparisons
+   * @param list    List 
+   * @param mcList  List of histograms from MC
+   * @param empCorr Emperical correction if any
+   * @param name    name 
+   * @param max     On return, maximum of data 
+   * @param rmax    On return, maximum of ratios
+   * @param amax    On return, maximum of left-right comparisons
+   * @param truths  List of MC truths to compare to. 
    *
    * @return Array of results
    */
@@ -703,6 +706,8 @@ struct dNdetaDrawer
    * Fetch results for a particular centrality bin
    * 
    * @param list       List 
+   * @param mcList     List of MC results
+   * @param empCorr    Emperical correction if any 
    * @param name       Name 
    * @param thisOther  Other graphs 
    * @param color      Color 
@@ -710,6 +715,7 @@ struct dNdetaDrawer
    * @param max        On return, data maximum
    * @param rmax       On return, ratio maximum 
    * @param amax       On return, left-right maximum 
+   * @param truth      MC truth to compare to or possibly update
    *
    * @return Histogram of results 
    */
@@ -917,12 +923,13 @@ struct dNdetaDrawer
   /** 
    * Build main legend 
    * 
-   * @param stack   Stack to include 
-   * @param mg      (optional) Multi graph to include 
-   * @param x1      Lower X coordinate in the range [0,1]
-   * @param y1      Lower Y coordinate in the range [0,1]
-   * @param x2      Upper X coordinate in the range [0,1]
-   * @param y2             Upper Y coordinate in the range [0,1]
+   * @param stack    Stack to include 
+   * @param mg       (optional) Multi graph to include 
+   * @param x1       Lower X coordinate in the range [0,1]
+   * @param y1       Lower Y coordinate in the range [0,1]
+   * @param x2       Upper X coordinate in the range [0,1]
+   * @param y2              Upper Y coordinate in the range [0,1]
+   * @param forceCol If non-zero, force this many columns
    */
   void BuildLegend(THStack* stack, TMultiGraph* mg, 
                   Double_t x1, Double_t y1, Double_t x2, Double_t y2,
index 0de5a230d7b0985de1717ff339ddda91a1ef0f63..af7d1cca062753b2944db32ccdf8cde0af6eb1b4 100644 (file)
@@ -74,9 +74,11 @@ ForwardAODConfig(AliForwardMultiplicityBase* task)
   // Least distance from primary to 2nd pile-up vertex (cm)
   task->GetEventInspector().SetMinPileupDistance(.8);
   // V0-AND triggered events flagged as NSD 
-  task->GetEventInspector().SetUseV0AndForNSD(true);
+  task->GetEventInspector().SetUseV0AndForNSD(false);
   // Use primary vertex selection from 1st physics WG
   // task->GetEventInspector().SetUseFirstPhysicsVtx(true);
+  // Use satellite collisions
+  // task->GetEventInspector().SetUseDisplacedVertices(true);
 
   // --- Sharing filter ----------------------------------------------
   // Set the low cut used for sharing - overrides settings in eloss fits
index e1e216088fe61477aaca1667d73ad4844bd90696..f72bf6e9b07462cd17b6a3f04e81754f60b898e2 100644 (file)
@@ -57,9 +57,9 @@
  * 
  * or using the program @b runTrain
  * 
- * @verbatim
  > runTrain --class=&lt;class&gt; --name=&lt;name&gt; [&lt;options&gt;
-   @endverbatim
+ * @code
* > runTrain --class=<class> --name=<name> [<options>
+ * @endcode
  *
  * Here, 
  *
  * setting used for the train and can easily be used to run merging
  * and terminate as needed.
  *
+ * @section train_setup_proof_spec PROOF specifics
+ *
+ * Local and Grid jobs are in a sense very similar.  That is, the
+ * individual Grid jobs are very much like Local jobs, in that they
+ * always produce output files which albiet not after Terminate.
+ *
+ * PROOF jobs are very different.  In a PROOF analysis, each slave
+ * only produces in memory output which is then sent via net
+ * connections (sockets) to the master.  One therefore needs to be
+ * very of output object ownership and the like.  
+ *
+ * Another major difference is that output files are generated within
+ * the PROOF cluster, and are generally not accessible from the
+ * outside.  For plain PROOF clusters in a local area network or
+ * so-called <i>Lite</i> session, it is generally not a problem since
+ * the files are accessible on the LAN or local machine for Lite
+ * sessions.  However, for large scale analysis farms (AAFs), the
+ * workers and masters are generally on a in-accessible sub-net, and
+ * there's no direct access to the produced files.  Now, for normal
+ * output files, like histogram files, etc. there are provisions for
+ * this, which means the final merged output is sent back to the
+ * client.  Special output, such as AODs, are however not merged nor
+ * sent back to the user by default.  There are two ways to deal with this: 
+ * 
+ * <ol>
+ *  <li> Register the output tree as a data set on the cluster.  This is useful if you need to process the results again on the cluster.</li>
+ *  <li> Send the output to a (possibly custom) XRootd server.  This is useful if you need to process the output outside of the cluster</li> 
+ * </ol>
+ *
+ * The first mode is specified by passing the option
+ * <tt>dsname=</tt><i>&lt;name&gt;</i> in the cluster URI.  The created
+ * dataset will normally be made in
+ * <tt>/default/</tt><i>&lt;user&gt;</i><tt>/</tt><i>&lt;name&gt;</i>. If the
+ * <tt>=</tt><i>&lt;name&gt;</i> part is left out, the <i>escaped name</i> of
+ * the job will be used.  
+ *
+ * The second mode is triggered by passing the option
+ * <tt>storage=<i>URI</i></tt> to the train setup.  The <i>URI</i>
+ * should be of the form
+ *
+ * @code
+ *   rootd://<host>[:<port>]/<path>
+ * @endcode
+ * 
+ * where <i>&lt;host&gt;</i> is the name of a machine accessible by
+ * the cluster, <i>&lt;port&gt;</i> is an optional port number (e.g.,
+ * if different from 1093), and <i>&lt;path&gt;</i> is an absolute
+ * path on <i>&lt;host&gt;</i>.
+ * 
+ * The XRootd process should be started (optionally by the user) on
+ * <i>&lt;host&gt;</i> as
+ *
+ * @code
+ *    xrootd -p <port> <path>
+ * @endcode
+ *
+ * When running jobs on AAFs, one can use the Grid handler to set-up
+ * aspects of the job.  However, sometimes it's desirable to leave the
+ * Grid handler out.  To do that, pass the option <tt>plain</tt> in
+ * the cluster URI.
+ *
  * @section train_setup_input Specifying the input
  * @subsection train_setup_local Local data input
  * 
  * @subsection train_setup_proof PROOF input. 
  * 
  * The input data for a PROOF based analysis can be specified as per a
- * Local job, in which case the data must be available to the slaves
- * at the specified locations, or one can specify a data-set name via 
+ * Local job if the cluster used is local, in which case the data must
+ * be available to the slaves at the specified locations, or one can
+ * specify a data-set name via
  * 
  * @code 
  *   train->SetDataSet("<data-set-name>");
  * @endcode 
  *
+ * @b Note: For AAFs using the Grid Handler one <i>must</i> use data sets. 
+ *
  * @subsection train_setup_grid_esd Grid ESD input. 
  *
  * Suppose the ESD files are stored on the Grid as