add HBT like cut in Balance Function analysis (default: OFF)
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2012 09:22:38 +0000 (09:22 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2012 09:22:38 +0000 (09:22 +0000)
PWGCF/EBYE/BalanceFunctions/AliBalance.cxx
PWGCF/EBYE/BalanceFunctions/AliBalance.h
PWGCF/EBYE/macros/AddTaskBalanceCentralityTrain.C
PWGCF/EBYE/macros/configBalanceFunctionAnalysis.C

index 30b6575..611ed65 100644 (file)
@@ -43,6 +43,7 @@ ClassImp(AliBalance)
 AliBalance::AliBalance() :
   TObject(), 
   bShuffle(kFALSE),
+  bHBTcut(kFALSE),
   fAnalysisLevel("ESD"),
   fAnalyzedEvents(0) ,
   fCentralityId(0) ,
@@ -96,7 +97,9 @@ AliBalance::AliBalance() :
 
 //____________________________________________________________________//
 AliBalance::AliBalance(const AliBalance& balance):
-  TObject(balance), bShuffle(balance.bShuffle), 
+  TObject(balance), 
+  bShuffle(balance.bShuffle),
+  bHBTcut(balance.bHBTcut), 
   fAnalysisLevel(balance.fAnalysisLevel),
   fAnalyzedEvents(balance.fAnalyzedEvents), 
   fCentralityId(balance.fCentralityId),
@@ -388,6 +391,13 @@ void AliBalance::CalculateBalance(Float_t fCentrality,vector<Double_t> **chargeV
        dphi = TMath::Abs(phi1 - phi2);
        if(dphi>180) dphi = 360 - dphi;  //dphi should be between 0 and 180!
 
+       // HBT like cut
+       if(bHBTcut){
+         if( dphi < 3 || deta < 0.01 ){
+           continue;
+         }
+       }
+
        //0:y - 1:eta - 2:Qlong - 3:Qout - 4:Qside - 5:Qinv - 6:phi
        if((rap1 >= fP1Start[kRapidity]) && (rap1 <= fP1Stop[kRapidity]) && (rap2 >= fP1Start[kRapidity]) && (rap2 <= fP1Stop[kRapidity])) {
 
index 679ea53..54a7ed8 100644 (file)
@@ -46,6 +46,7 @@ class AliBalance : public TObject {
   void SetAnalysisLevel(const char* analysisLevel) {
     fAnalysisLevel = analysisLevel;}
   void SetShuffle(Bool_t shuffle) {bShuffle = shuffle;}
+  void SetHBTcut(Bool_t HBTcut) {bHBTcut = HBTcut;}
   void SetInterval(Int_t iAnalysisType, Double_t p1Start, Double_t p1Stop,
                   Int_t ibins, Double_t p2Start, Double_t p2Stop);
   void SetCentralityInterval(Double_t cStart, Double_t cStop)  { fCentStart = cStart; fCentStop = cStop;};
@@ -110,7 +111,9 @@ class AliBalance : public TObject {
   void PrintResults(Int_t iAnalysisType, TH1D *gHist);
 
  private:
-  Bool_t bShuffle; //shuffled balance function object
+  Bool_t bShuffle; // shuffled balance function object
+  Bool_t bHBTcut;  // apply HBT like cuts
+
   TString fAnalysisLevel; //ESD, AOD or MC
   Int_t fAnalyzedEvents; //number of events that have been analyzed
 
index 1bc91d0..6a0fb7e 100644 (file)
@@ -31,6 +31,7 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
                                                 Bool_t kUsePID = kFALSE,\r
                                                 Int_t AODfilterBit = 128,\r
                                                 Bool_t bCentralTrigger = kFALSE,\r
+                                                Bool_t bHBTcut = kFALSE,\r
                                                 TString fileNameBase="AnalysisResults") {\r
 \r
   // Creates a balance function analysis task and adds it to the analysis manager.\r
@@ -62,6 +63,7 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
   centralityName+="_Bit";\r
   centralityName+=Form("%d",AODfilterBit);\r
   if(bCentralTrigger)   centralityName+="_withCentralTrigger";\r
+  if(bHBTcut)   centralityName+="_withHBTcut";\r
 \r
 \r
 \r
@@ -93,16 +95,16 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
   AliBalance *bfs = 0;  // shuffled Balance function object\r
 \r
   if (analysisType=="ESD"){\r
-    bf  = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax);\r
-    if(gRunShuffling) bfs = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kTRUE);\r
+    bf  = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kFALSE,bHBTcut);\r
+    if(gRunShuffling) bfs = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kTRUE,bHBTcut);\r
   }\r
   else if (analysisType=="AOD"){\r
-    bf  = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax);\r
-    if(gRunShuffling) bfs = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kTRUE);\r
+    bf  = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kFALSE,bHBTcut);\r
+    if(gRunShuffling) bfs = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kTRUE,bHBTcut);\r
   }\r
   else if (analysisType=="MC"){\r
-    bf  = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax);\r
-    if(gRunShuffling) bfs = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax,kTRUE);\r
+    bf  = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax,kFALSE,bHBTcut);\r
+    if(gRunShuffling) bfs = GetBalanceFunctionObject("MC",centralityEstimator,centrMin,centrMax,kTRUE,bHBTcut);\r
   }\r
   else{\r
     ::Error("AddTaskBF", "analysis type NOT known.");\r
index ee4850c..f1f5d37 100644 (file)
@@ -3,11 +3,13 @@ AliBalance *GetBalanceFunctionObject(const char* analysisLevel = "ESD",
                                     const char* centralityName = 0x0,\r
                                     Double_t centrMin = 0.,\r
                                     Double_t centrMax = 100.,\r
-                                    Bool_t bShuffle = kFALSE) {\r
+                                    Bool_t bShuffle = kFALSE,\r
+                                    Bool_t bHBTcut = kFALSE) {\r
   //Function to setup the AliBalance object and return it\r
   AliBalance *gBalance = new AliBalance();\r
   gBalance->SetAnalysisLevel(analysisLevel);\r
   gBalance->SetShuffle(bShuffle);\r
+  gBalance->SetHBTcut(bHBTcut);\r
   if(centralityName) gBalance->SetCentralityIdentifier(centralityName);\r
   gBalance->SetCentralityInterval(centrMin,centrMax);\r
 \r