]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
-documentation updates
authorjbook <jbook@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Jun 2013 12:03:57 +0000 (12:03 +0000)
committerjbook <jbook@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Jun 2013 12:03:57 +0000 (12:03 +0000)
-updates on HF helper class
-new flow variables

PWGDQ/dielectron/AliDielectronHFhelper.cxx
PWGDQ/dielectron/AliDielectronHFhelper.h
PWGDQ/dielectron/AliDielectronHelper.cxx
PWGDQ/dielectron/AliDielectronHelper.h
PWGDQ/dielectron/AliDielectronMC.cxx
PWGDQ/dielectron/AliDielectronV0Cuts.cxx
PWGDQ/dielectron/AliDielectronVarManager.cxx
PWGDQ/dielectron/AliDielectronVarManager.h

index 8094d0f18753aa655f4f41b6e649aaf883429239..3197a06a05df78069f515f743a5b2400f44db7fc 100644 (file)
 **************************************************************************/
 
 ///////////////////////////////////////////////////////////////////////////
-//       Dielectron Histogram framework helper                     //
+//       Dielectron Histogram framework helper                           //
 //                                                                       //
 /*
 
+A helper class to extract objects(histograms and/or profiles) from
+a AliDielctronHF array of objects.
 
 
+How to use it:
 
+  AliDielectronHFhelper *hf = new AliDielectronHFhelper("path/to/the/output/file.root", "ConfigName");
+  // print the structure
+  hf->Print();
 
+  //apply some cuts and print them
+  hf->SetRangeUser("cut1name",cutmin1,cutmax1);
+  hf->SetRangeUser(AliDielectronVarManager::kPt,ptmin,ptmax);
+  hf->PrintCuts();
 
+  // collect 1-,2- or 3-dim histograms or profiles with error option (default:"")
+  TObjArray *arrHists = hf->CollectHistos(AliDielectronVarManager::kM);
+  TObjArray *arrProfs = hf->CollectProfiles("",AliDielectronVarManager::kM,AliDielectronVarManager::kPt);
 
-
+  // then you are left with an array of histograms for all pair types or MC signals
 
 */
 //                                                                       //
 #include "AliDielectronHFhelper.h"
 #include "AliDielectronHF.h"
 
-//ClassImp(AliDielectronHFhelper)
+ClassImp(AliDielectronHFhelper)
 
 //const char* AliDielectronHFhelper::fCutVars[AliDielectronHFhelper::kMaxCuts] = {"","","","","","","","","",""};
 
 //________________________________________________________________
 AliDielectronHFhelper::AliDielectronHFhelper(const char* filename, const char* container) :
   TNamed(),
-  fArrPairType(0x0),
+  fMainArr(0x0),
   fCutVars(0x0),
   fCutLowLimits(0),
   fCutUpLimits(0)
@@ -73,7 +86,7 @@ AliDielectronHFhelper::~AliDielectronHFhelper()
   //
   // dtor
   //
-  if(fArrPairType) delete fArrPairType;
+  if(fMainArr) delete fMainArr;
   if(fCutVars)     delete fCutVars;
 
 }
@@ -82,7 +95,7 @@ AliDielectronHFhelper::~AliDielectronHFhelper()
 void AliDielectronHFhelper::SetHFArray(const char* filename, const char* container)
 {
   //
-  // get HF containers from file
+  // get HF container from file
   //
 
   TFile *f = TFile::Open(filename);
@@ -103,8 +116,8 @@ void AliDielectronHFhelper::SetHFArray(const char* filename, const char* contain
        TString objname(obj->GetName());
 
        if( objname.Contains(Form("%s_HF",container)) && obj->IsA()==TObjArray::Class()) {
-         fArrPairType = new TObjArray( *(dynamic_cast<TObjArray*>(obj)) );
-         //fArrPairType->Print();
+         fMainArr = new TObjArray( *(dynamic_cast<TObjArray*>(obj)) );
+         //fMainArr->Print();
          return;
        }
       }
@@ -118,7 +131,6 @@ void AliDielectronHFhelper::SetRangeUser(const char *varname, Double_t min, Doub
   //
   // Set range from variable name
   //
-  //  Int_t size=sizeof(fCutVars)/sizeof(const char*);
 
   Int_t size=fCutLowLimits.GetNrows();
 
@@ -165,8 +177,8 @@ void AliDielectronHFhelper::UnsetRangeUser(const char *varname, Bool_t leg)
   //
   // unset range from variable name
   //
+
   Int_t size=fCutLowLimits.GetNrows();
-  //  PrintCuts();
   TVectorD newlow;
   TVectorD newup;
 
@@ -212,118 +224,169 @@ void AliDielectronHFhelper::UnsetRangeUser(AliDielectronVarManager::ValueTypes t
 }
 
 //________________________________________________________________
-TObjArray* AliDielectronHFhelper::CollectHistos()
+TObjArray* AliDielectronHFhelper::CollectProfiles(TString option,
+                                                 AliDielectronVarManager::ValueTypes varx,
+                                                 AliDielectronVarManager::ValueTypes vary,
+                                                 AliDielectronVarManager::ValueTypes varz,
+                                                 AliDielectronVarManager::ValueTypes vart)
 {
   //
-  // collect histograms for all kind of pair types or sources
+  // collect 1-3 dimensional TProfiles for all kind of pair types or sources
   //
 
-  TObjArray *collection = new TObjArray(AliDielectron::kEv1PMRot+1);
-
-  TObjArray *histArr = (TObjArray*) fArrPairType->Clone("tmpArr");
-  if(!histArr) return 0x0;
-  histArr->SetOwner(kTRUE);
-
-  // loop over max. available pair types
-  for(Int_t i=0; i<AliDielectron::kEv1PMRot+1; i++) {
-
-    collection->AddAt(GetHistogram(AliDielectron::PairClassName(i),histArr), i);
+  // reconstruct the histogram/profile name resp. key
+  Int_t dim    = 0;
+  if(varx < AliDielectronVarManager::kNMaxValues) dim++;
+  if(vary < AliDielectronVarManager::kNMaxValues) dim++;
+  if(varz < AliDielectronVarManager::kNMaxValues) dim++;
+  Bool_t bPairClass=0;
+  if( varx < AliDielectronVarManager::kPairMax ||
+      vary < AliDielectronVarManager::kPairMax ||
+      varz < AliDielectronVarManager::kPairMax ||
+      vart < AliDielectronVarManager::kPairMax  ) bPairClass=kTRUE;
+  Bool_t bprf = !(option.Contains("hist",TString::kIgnoreCase));
+  Bool_t bStdOpt=kTRUE;
+  if(option.Contains("S",TString::kIgnoreCase) || option.Contains("rms",TString::kIgnoreCase)) bStdOpt=kFALSE;
+
+  TString key = "";
+  if(bprf) dim--;
+  switch(dim) {
+  case 3:
+    key+=Form("%s_",AliDielectronVarManager::GetValueName(varx));
+    key+=Form("%s_",AliDielectronVarManager::GetValueName(vary));
+    key+=Form("%s",AliDielectronVarManager::GetValueName(varz));
+    if(bprf) key+=Form("-%s%s",AliDielectronVarManager::GetValueName(vart),(bStdOpt ? "avg" : "rms"));
+    break;
+  case 2:
+    key+=Form("%s_",AliDielectronVarManager::GetValueName(varx));
+    key+=Form("%s",AliDielectronVarManager::GetValueName(vary));
+    if(bprf) key+=Form("-%s%s",AliDielectronVarManager::GetValueName(varz),(bStdOpt ? "avg" : "rms"));
+    break;
+  case 1:
+    key+=Form("%s",AliDielectronVarManager::GetValueName(varx));
+    if(bprf) key+=Form("-%s%s",AliDielectronVarManager::GetValueName(vary),(bStdOpt ? "avg" : "rms"));
+    break;
+  }
+  // to differentiate btw. leg and pair histos
+  if(bPairClass) key.Prepend("p");
+  // prepend HF
+  key.Prepend("HF_");
+
+  //TODO:  printf("--------> KEY: %s \n",key.Data());
+  // get the requested object from the arrays
+  TObjArray *collection = new TObjArray(fMainArr->GetEntriesFast());
+
+  TObjArray *cloneArr = (TObjArray*) fMainArr->Clone("tmpArr");
+  if(!cloneArr) return 0x0;
+  cloneArr->SetOwner(kTRUE);
+
+  // loop over all pair types or sources
+  for(Int_t i=0; i<cloneArr->GetEntriesFast(); i++) {
+    if(!cloneArr->At(i)) continue;
+
+    // find histogram of interest from array of objects
+    TObjArray *arr = (TObjArray*) GetObject(cloneArr->At(i)->GetName(),cloneArr);
+    if(arr) {
+      collection->AddAt(arr->FindObject(key.Data()), i);
+    }
 
   }
 
   // clean up the clone
-  if(histArr) {
-    delete histArr;
-    histArr=0;
+  if(cloneArr) {
+    delete cloneArr;
+    cloneArr=0;
   }
 
   return collection;
 }
 
 //________________________________________________________________
-TH1* AliDielectronHFhelper::GetHistogram(const char *step, TObjArray *histArr)
+TObject* AliDielectronHFhelper::GetObject(const char *step, TObjArray *histArr)
 {
   //
-  // main function to recieve a single histogram
-  // TODO: check memory
+  // main function to recieve a pair type or MC signal array
+  //
 
   AliDebug(1,Form(" Step %s selected",step));
+  // TODO: check memory
 
-  TObjArray *histos= 0x0;
-  TH1 *hist        = 0x0;
+  TObjArray *stepArr = 0x0; // this is the requested step
+  TObject *hist      = 0x0;
   if(!histArr) {
-    histos = (TObjArray*) fArrPairType->FindObject(step)->Clone("tmpArr");
+    stepArr = (TObjArray*) fMainArr->FindObject(step)->Clone("tmpArr");
   }
   else {
-    histos = (TObjArray*) histArr->FindObject(step);
+    stepArr = (TObjArray*) histArr->FindObject(step);
   }
 
-  if(histos) hist   = FindHistograms(histos);
+  if(stepArr) hist   = FindObjects(stepArr);
   return hist;
 
 }
 
 //________________________________________________________________
-TH1* AliDielectronHFhelper::FindHistograms(TObjArray *histos)
+TObject* AliDielectronHFhelper::FindObjects(TObjArray *stepArr)
 {
   //
-  // exclude histograms
+  // apply cuts and exclude objects from the array
   //
 
   // debug
-  // TString title    = histos->At(0)->GetTitle();
+  // TString title    = stepArr->At(0)->GetTitle();
   // TObjArray* vars  = title.Tokenize(":");
   // AliDebug(1,Form(" number of cuts/vars: %d/%d",fCutLowLimits.GetNrows(),vars->GetEntriesFast()));
 
   // check for missing cuts
-  CheckCuts(histos);
+  CheckCuts(stepArr);
 
   // loop over all cuts
   for(Int_t icut=0; icut<fCutLowLimits.GetNrows(); icut++) {
 
-    Bool_t bFndBin = kFALSE; // exact bin found
-    const char *cutvar   = fCutVars->At(icut)->GetName();
-    Double_t min   = fCutLowLimits(icut);
-    Double_t max   = fCutUpLimits(icut);
+    Bool_t bFndBin      = kFALSE; // bin with exact limits found
+    const char *cutvar  = fCutVars->At(icut)->GetName(); // cut variable
+    Double_t min        = fCutLowLimits(icut);           // lower limit
+    Double_t max        = fCutUpLimits(icut);            // upper limit
     AliDebug(5,Form(" Cut %d: %s [%.2f,%.2f]",icut,cutvar,min,max));
 
-    // loop over all histograms
-    for(Int_t i=0; i<histos->GetEntriesFast(); i++) {
+    // loop over the full grid of given step
+    for(Int_t i=0; i<stepArr->GetEntriesFast(); i++) {
 
       // continue if already empty
-      if(!histos->At(i)) continue;
+      if(!stepArr->At(i)) continue;
 
-      // collect binning from histo title
-      TString title    = histos->At(i)->GetName();
+      // collect bins from the name
+      TString title    = stepArr->At(i)->GetName();
       if(title.IsNull()) continue;
-      AliDebug(10,Form(" histo title: %s",title.Data()));
+      AliDebug(5,Form(" %03d object name: %s",i,title.Data()));
 
+      // loop over all variables
       TObjArray *vars  = title.Tokenize(":");
       for(Int_t ivar=0; ivar<vars->GetEntriesFast(); ivar++) {
        TString binvar = vars->At(ivar)->GetName();
-       AliDebug(10,Form(" Check ivar %d binvar %s",ivar,binvar.Data()));
+       AliDebug(10,Form(" --> %d check bin var %s",ivar,binvar.Data()));
 
-       // check for cuts and ranges by the user
+       // check cuts set by the user, and compare to the bin limits
        if(binvar.Contains(cutvar)) {
+         // bin limits
          TObjArray *limits = binvar.Tokenize("#");
-
-         Double_t binmin = atof(limits->At(1)->GetName());
-         Double_t binmax = atof(limits->At(2)->GetName());
+         Double_t binmin = atof(limits->At(1)->GetName()); // lower bin limit
+         Double_t binmax = atof(limits->At(2)->GetName()); // upper bin limit
          AliDebug(10,Form(" bin %s var %s [%.2f,%.2f]",binvar.Data(),limits->At(0)->GetName(),binmin,binmax));
+         if(limits) delete limits;
 
-         // remove histogram from array
+         // cut and remove objects from the array
          if(binmin < min || binmax < min || binmin > max || binmax > max ) {
-           AliDebug(10,Form(" removed, out of range min %.2f,%.2f  max %.2f,%.2f",binmin,min,binmax,max));
-           histos->AddAt(0x0,i);
+           AliDebug(10,Form(" removed, out of range! lower bin,cut: %.2f,%.2f or upper bin,cut: %.2f>%.2f",binmin,min,binmax,max));
+           stepArr->AddAt(0x0,i);
          }
          if(bFndBin && !(binmin == min && binmax == max)) {
-           histos->AddAt(0x0,i);
-           AliDebug(10,Form(" removed, within range min %.2f,%.2f  max %.2f,%.2f",binmin,min,binmax,max));
+           stepArr->AddAt(0x0,i);
+           AliDebug(10,Form(" removed, within range! lower bin,cut: %.2f,%.2f or upper bin,cut: %.2f,%.2f",binmin,min,binmax,max));
          }
-         // clean up
-         if(limits) delete limits;
 
-         // do we have found an exact bin
+         // did we found a bin with exact the cut ranges
+         // this can happen only once per variable
          if(binmin==min && binmax==max) bFndBin=kTRUE;
 
        }
@@ -336,24 +399,24 @@ TH1* AliDielectronHFhelper::FindHistograms(TObjArray *histos)
 
   }
 
-  // compress the array by removing all empty histos
-  histos->Compress();
-  AliDebug(1,Form(" Compression: %d histograms left",histos->GetEntriesFast()));
+  // compress the array by removing all empty entries
+  stepArr->Compress();
+  AliDebug(1,Form(" Compression: %d objects left",stepArr->GetEntriesFast()));
 
-  // merge histograms
-  TH1* hist = MergeHistos(histos);
-  if(hist) AliDebug(1,Form(" Merging: %e histogram entries",hist->GetEntries()));
+  // merge left objects
+  TObject* hist = Merge(stepArr);
+  //  if(hist) AliDebug(1,Form(" Merging: %e  entries",hist->GetEntries()));
   return hist;
 }
 
 //________________________________________________________________
-TH1* AliDielectronHFhelper::MergeHistos(TObjArray *arr)
+TObject* AliDielectronHFhelper::Merge(TObjArray *arr)
 {
   //
-  // merge histos to one single histogram
+  // merge left objects to a single one
   //
 
-  if(arr->GetEntriesFast()<1) { AliError(" No more histosgrams left!"); return 0x0; }
+  if(arr->GetEntriesFast()<1) { AliError(" No more objects left!"); return 0x0; }
 
   TObject *final=arr->At(0)->Clone();
   if(!final) return 0x0;
@@ -367,22 +430,22 @@ TH1* AliDielectronHFhelper::MergeHistos(TObjArray *arr)
   //  final->SetTitle(""); //TODO: change in future
   for(Int_t i=1; i<arr->GetEntriesFast(); i++) {
     listH.Add(arr->At(i));
+    //   printf("%d: ent %.0f \n",i,((TH1*)((TObjArray*)arr->At(i))->At(0))->GetEntries());
     //    final->Add((TH1*)arr->At(i));
   }
   //  arr->Clear();
 
   final->Execute("Merge", listHargs.Data(), &error);
-  return (TH1*)final;
+  return final;
 }
 
 //________________________________________________________________
 void AliDielectronHFhelper::CheckCuts(TObjArray *arr)
 {
   //
-  // Compare histo binning and cut variables. Add necessary cuts (largest limits)
+  // Compare binning and cut variables. Add necessary cuts (full range, no exclusion)
   //
 
-
   // build array with bin variable, minimum and maximum bin values
   TString titleFIRST       = arr->First()->GetName();
   TString titleLAST        = arr->Last()->GetName();
@@ -441,18 +504,22 @@ void AliDielectronHFhelper::Print(const Option_t* /*option*/) const
   //
   // Print out object contents
   //
-  AliInfo(Form(" Container:               %s",fArrPairType->GetName()));
+  AliInfo(Form(" Container:               %s",fMainArr->GetName()));
 
   // pairtypes, steps and sources
-  AliInfo(Form(" Number of filled steps:  %d",fArrPairType->GetEntries()));
-  for(Int_t istep=0; istep<fArrPairType->GetEntriesFast(); istep++) {
-    if(fArrPairType->At(istep))
-      AliInfo(Form(" step %d: %s",istep,fArrPairType->At(istep)->GetName()));
+  Int_t stepLast=0;
+  AliInfo(Form(" Number of filled steps:  %d",fMainArr->GetEntries()));
+  for(Int_t istep=0; istep<fMainArr->GetEntriesFast(); istep++) {
+    if(fMainArr->At(istep)) {
+      AliInfo(Form(" step %d: %s",istep,fMainArr->At(istep)->GetName()));
+      stepLast=istep;
+    }
   }
 
-  AliInfo(Form(" Number of histograms:    %d",((TObjArray*)fArrPairType->At(0))->GetEntriesFast()));
+  AliInfo(Form(" Number of objects:    %d",
+              ((TObjArray*) ((TObjArray*)fMainArr->At(stepLast)) ->First())->GetEntriesFast()));
 
-  TString title       = ((TObjArray*)fArrPairType->At(0))->First()->GetTitle();
+  TString title       = ((TObjArray*)fMainArr->At(stepLast))->First()->GetName();
   TObjArray* binvars  = title.Tokenize(":");
   AliInfo(Form(" Number of variables:     %d",binvars->GetEntriesFast()));
   delete binvars;
@@ -471,7 +538,7 @@ void AliDielectronHFhelper::PrintCuts()
 {
 
   //
-  // Print out object contents
+  // Print cuts
   //
 
   // loop over all cuts
index 9666797a71c6e619970d4e8dded6fdcdf5fc46f3..75d5f6638d7fa049f5f7f5b07d87ad0506fcc044 100644 (file)
@@ -5,8 +5,8 @@
 
 //#############################################################
 //#                                                           #
-//#             Class AliDielectronHF                         #
-//#       Dielectron Histogram Framework helper         #
+//#             Class AliDielectronHFhelper                   #
+//#       Dielectron Histogram Framework helper               #
 //#                                                           #
 //#  Authors:                                                 #
 //#   Julian    Book,     Uni Ffm / Julian.Book@cern.ch       #
@@ -36,26 +36,34 @@ public:
   void UnsetRangeUser(const char* varname, Bool_t leg=kFALSE);
   void UnsetRangeUser(AliDielectronVarManager::ValueTypes type, Bool_t leg=kFALSE);
 
-  TObjArray* CollectHistos();
+  TObjArray* CollectHistos(AliDielectronVarManager::ValueTypes varx,
+                          AliDielectronVarManager::ValueTypes vary=AliDielectronVarManager::kNMaxValues,
+                          AliDielectronVarManager::ValueTypes varz=AliDielectronVarManager::kNMaxValues)
+  { return CollectProfiles("hist",varx,vary,varz); }
+  TObjArray* CollectProfiles(TString option,
+                            AliDielectronVarManager::ValueTypes varx,
+                            AliDielectronVarManager::ValueTypes vary=AliDielectronVarManager::kNMaxValues,
+                            AliDielectronVarManager::ValueTypes varz=AliDielectronVarManager::kNMaxValues,
+                            AliDielectronVarManager::ValueTypes vart=AliDielectronVarManager::kNMaxValues);
 
-  TH1* GetHistogram(const char *step, TObjArray *histArr=0x0);
-  TH1* FindHistograms(TObjArray *histos);
-  TH1* MergeHistos(TObjArray *arr);
+  TObject* GetObject(const char *step, TObjArray *histArr=0x0);
+  TObject* FindObjects(TObjArray *histos);
+  TObject* Merge(TObjArray *arr);
 
   void CheckCuts(TObjArray *arr);
   virtual void Print(const Option_t* option ="") const ;
   void PrintCuts();
 
 private:
-  TObjArray *fArrPairType;         // array of pair types, sources or steps
-  TObjArray *fCutVars;             // array for cut variables
-  TVectorD fCutLowLimits;
-  TVectorD fCutUpLimits;
+  TObjArray *fMainArr;         // main array of pair types or sources
+  TObjArray *fCutVars;         // array for cut variables
+  TVectorD fCutLowLimits;      // vector to store the lower cut limits
+  TVectorD fCutUpLimits;       // vector to store the upper cut limits
 
   AliDielectronHFhelper(const AliDielectronHFhelper &c);
   AliDielectronHFhelper &operator=(const AliDielectronHFhelper &c);
 
-  ClassDef(AliDielectronHFhelper,0)                   // HF  helper class
+  ClassDef(AliDielectronHFhelper,1)                   // HF  helper class
 };
 
 //
index a4a6f500578f2c48796bbe0bb8228f255d7602de..1b5a694b74520863ee0dad9da2a60129bcb2e1a6 100644 (file)
@@ -50,6 +50,8 @@
 #include "AliDielectronVarManager.h"
 #include "AliDielectronHelper.h"
 
+//ClassImp(AliDielectronHelper)
+
 //_____________________________________________________________________________
 TVectorD* AliDielectronHelper::MakeLogBinning(Int_t nbinsX, Double_t xmin, Double_t xmax)
 {
index de8b052b3a45c6d855bb60fe35b343ea9391d475..92821305e3d7087ab4aeabaefcb7b76322f28848 100644 (file)
@@ -23,8 +23,6 @@ class AliMCEvent;
 namespace AliDielectronHelper
 {
 
-
-
 TVectorD* MakeLogBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
 TVectorD* MakeLinBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
 TVectorD* MakeArbitraryBinning(const char* bins);
index 75367372fede8dfe0fdf7eb6c7cae1d5b8586c8a..0fc9c34c3244277e453511d0999640a4267135db 100644 (file)
@@ -44,6 +44,8 @@
 #include "AliDielectronSignalMC.h"
 #include "AliDielectronMC.h"
 
+ClassImp(AliDielectronMC)
+
 AliDielectronMC* AliDielectronMC::fgInstance=0x0;
 
 //____________________________________________________________
index b115b812a9029c137a2858a552d4c6047a19826e..10e218dbccf4a98e6f787d4f0cb50b540e7fa067 100644 (file)
 **************************************************************************/
 
 ///////////////////////////////////////////////////////////////////////////
-//   Cut class providing cuts to all infomation                          //
-//     available for the AliVParticle interface                          //
+//   Cut class providing cuts to V0 candidates                           //
+//   Selection or deselection of V0 candiates can be done.               //
 //                                                                       //
 // Authors:                                                              //
-//   Julian Book <Julian.Book@cern.ch>                                  //
+//   Julian Book <Julian.Book@cern.ch>                                   //
 /*
 
 
index f5c7a88819d2d3cfe4946bc0159db744d4cbc3c1..8d39afe3d290fbd93452b5eb93ef316586e1655b 100644 (file)
@@ -158,6 +158,8 @@ const char* AliDielectronVarManager::fgkParticleNames[AliDielectronVarManager::k
   {"kRotPairz",                 "kRotPairz",                                          "(rad.)"},
   {"Cos2PhiCS",              "cos(2#phi_{CS})",                                    ""},
   {"CosTilPhiCS",            "cos(#phi_{CS})",                                     ""},
+  {"CosPhiH2",               "cos(2#phi)",                                         ""},
+  {"SinPhiH2",               "sin(2#phi)",                                         ""},
   {"DeltaPhiV0ArpH2",        "#phi^{pair}-#Psi^{V0A}",                             ""},
   {"DeltaPhiV0CrpH2",        "#phi^{pair}-#Psi^{V0C}",                             ""},
   {"DeltaPhiV0ACrpH2",       "#phi^{pair}-#Psi^{V0AC}",                            ""},
@@ -172,6 +174,7 @@ const char* AliDielectronVarManager::fgkParticleNames[AliDielectronVarManager::k
   {"v0CrpH2FlowV2",          "cos(2(#phi^{pair}-#Psi^{V0C}))",                     ""},
   {"v0ACrpH2FlowV2",         "cos(2(#phi^{pair}-#Psi^{V0AC}))",                    ""},
   {"TPCrpH2FlowV2",          "cos(2(#phi^{pair}-#Psi^{TPC}))",                     ""},
+  {"TPCrpH2FlowV2Sin",       "sin(2(#phi^{pair}-#Psi^{TPC}))",                     ""},
   {"LegDistance",            "d^{legs}",                                           "(cm)"},
   {"LegDistanceXY",          "d^{legs}_{xy}",                                      "(cm)"},
   {"DeltaEta",               "#Delta #eta",                                        ""},
@@ -316,8 +319,10 @@ const char* AliDielectronVarManager::fgkParticleNames[AliDielectronVarManager::k
   {"V0AV0CDiffH2",           "cos(2(#Psi^{V0A}-#Psi^{V0C}))",                      ""},
   {"TPCxH2",                 "Q_{x}^{TPC}",                                        ""},
   {"TPCyH2",                 "Q_{y}^{TPC}",                                        ""},
-  {"TPCmagH2",               "|#vec{Q}^{TPC}|",                                   ""},
+  {"TPCmagH2",               "|#vec{Q}^{TPC}|",                                    ""},
   {"TPCrpH2",                "#Psi^{TPC}",                                         ""},
+  {"CosTPCrpH2",             "cos(2#Psi^{TPC})",                                   ""},
+  {"SinTPCrpH2",             "sin(2#Psi^{TPC})",                                   ""},
   {"TPCsub1xH2",             "Q_{x}^{TPCsub1}",                                    ""},
   {"TPCsub1yH2",             "Q_{y}^{TPCsub1}",                                    ""},
   {"TPCsub1rpH2",            "#Psi^{TPCsub1}",                                     ""},
index 1a7bfd95d15ba7fbaf25c7e1a8ef1bb2c833d5e8..0ca74e81e7e9214f2489727bfb6e067add26e40b 100644 (file)
@@ -213,6 +213,8 @@ public:
        kRotPairz,               //ee plane vector
        kCos2PhiCS,              // Cosine of 2*phi in mother's rest frame in the Collins-Soper picture
     kCosTilPhiCS,            // Shifted phi depending on kThetaCS
+    kCosPhiH2,               // cosine of pair phi for 2nd harmonic
+    kSinPhiH2,               // sinus  of pair phi for 2nd harmonic
     kDeltaPhiV0ArpH2,        // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-A
     kDeltaPhiV0CrpH2,        // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-C
     kDeltaPhiV0ACrpH2,       // Delta phi of the pair with respect to the 2nd order harmonic reaction plane from V0-A + V0-C
@@ -227,6 +229,7 @@ public:
     kv0CrpH2FlowV2,          // v2 coefficient with respect to the 2nd order reaction plane from V0-C
     kv0ACrpH2FlowV2,         // v2 coefficient with respect to the 2nd order reaction plane from V0-A + V0-C
     kTPCrpH2FlowV2,          // v2 coefficient with respect to the 2nd order reaction plane from TPC
+    kTPCrpH2FlowV2Sin,       // sinus of v2 coefficient with respect to the 2nd order reaction plane from TPC
 
     kLegDist,                // distance of the legs
     kLegDistXY,              // distance of the legs in XY
@@ -314,6 +317,8 @@ public:
     kTPCyH2,                  // TPC y-component of the Q vector for 2nd harmonic (corrected)
     kTPCmagH2,                // TPC reaction plane the Q vectors magnitude for 2nd harmonic (corrected)
     kTPCrpH2,                 // TPC reaction plane angle of the Q vector for 2nd harmonic (corrected)
+    kCosTPCrpH2,              // cosine of TPC reaction plane angle of the Q vector for 2nd harmonic (corrected)
+    kSinTPCrpH2,              // sinus of TPC reaction plane angle of the Q vector for 2nd harmonic (corrected)
     kTPCsub1xH2,              // TPC x-component of the Q vector for 2nd harmonic (corrected, sub event 1) 
     kTPCsub1yH2,              // TPC y-component of the Q vector for 2nd harmonic (corrected, sub event 1)
     kTPCsub1rpH2,             // TPC reaction plane of the Q vector for 2nd harmonic (corrected, sub event 1)
@@ -1346,7 +1351,10 @@ inline void AliDielectronVarManager::FillVarDielectronPair(const AliDielectronPa
         */
   }
   //common, regardless of calculation method 
-   // Flow quantities
+
+  // Flow quantities
+  values[AliDielectronVarManager::kCosPhiH2] = TMath::Cos(2*values[AliDielectronVarManager::kPhi]);
+  values[AliDielectronVarManager::kSinPhiH2] = TMath::Sin(2*values[AliDielectronVarManager::kPhi]);
   Double_t delta=0.0;
   // v2 with respect to VZERO-A event plane
   delta = values[AliDielectronVarManager::kPhi] - fgData[AliDielectronVarManager::kV0ArpH2];
@@ -1377,6 +1385,8 @@ inline void AliDielectronVarManager::FillVarDielectronPair(const AliDielectronPa
   values[AliDielectronVarManager::kv0ArpH2FlowV2]    = TMath::Cos( 2*(values[AliDielectronVarManager::kPhi] - values[AliDielectronVarManager::kv0ArpH2]) );
   values[AliDielectronVarManager::kv0CrpH2FlowV2]    = TMath::Cos( 2*(values[AliDielectronVarManager::kPhi] - values[AliDielectronVarManager::kv0CrpH2]) );
   values[AliDielectronVarManager::kTPCrpH2FlowV2]    = TMath::Cos( 2*(values[AliDielectronVarManager::kPhi] - values[AliDielectronVarManager::kTPCrpH2]) );
+  values[AliDielectronVarManager::kTPCrpH2FlowV2Sin] = TMath::Sin( 2*(values[AliDielectronVarManager::kPhi] - values[AliDielectronVarManager::kTPCrpH2]) );
+
 
   // keep the interval [-pi,+pi]
   if ( values[AliDielectronVarManager::kDeltaPhiv0ArpH2] > TMath::Pi() ) 
@@ -1920,6 +1930,10 @@ inline void AliDielectronVarManager::FillVarTPCEventPlane(const AliEventplane *e
       values[AliDielectronVarManager::kTPCyH2]   = qcorr->Y();
       values[AliDielectronVarManager::kTPCmagH2] = qcorr->Mod();
       values[AliDielectronVarManager::kTPCrpH2]  = ((TMath::Abs(qcorr->X())>1.0e-10) ? TMath::ATan2(qcorr->Y(),qcorr->X())/2.0 : 0.0);
+      // detector effects
+      values[AliDielectronVarManager::kCosTPCrpH2]     = TMath::Cos( 2.* values[AliDielectronVarManager::kTPCrpH2] );
+      values[AliDielectronVarManager::kSinTPCrpH2]     = TMath::Sin( 2.* values[AliDielectronVarManager::kTPCrpH2] );
+
       // correlations for event plane resoultion
       values[AliDielectronVarManager::kv0ATPCDiffH2]   = TMath::Cos( 2.*(values[AliDielectronVarManager::kv0ArpH2] - 
                                                                         values[AliDielectronVarManager::kTPCrpH2]) );