]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility to retrieve sub-event correlation histos
authorfprino <fprino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 May 2013 08:36:58 +0000 (08:36 +0000)
committerfprino <fprino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 May 2013 08:36:58 +0000 (08:36 +0000)
PWGHF/vertexingHF/charmFlow/AliEventPlaneResolutionHandler.cxx
PWGHF/vertexingHF/charmFlow/AliEventPlaneResolutionHandler.h

index 58371e7de0ba243e8faf7a2e6651237a17fa2144..f781a8262bea2d8714ac22a53183a1223c886a7a 100644 (file)
@@ -46,6 +46,9 @@ AliEventPlaneResolutionHandler::AliEventPlaneResolutionHandler():TObject(),
   fNsubevents(2),
   fExtrapToFull(kFALSE),
   fWeight(0),
+  fHistoAB(0x0),
+  fHistoBC(0x0),
+  fHistoAC(0x0),
   fRootFileName("$ALICE_ROOT/PWGHF/vertexingHF/charmFlow/EventPlaneResolutionHistos.root")
 {
   // Default contructor
@@ -63,6 +66,9 @@ AliEventPlaneResolutionHandler::AliEventPlaneResolutionHandler(TString filename)
   fNsubevents(2),
   fExtrapToFull(kFALSE),
   fWeight(0),
+  fHistoAB(0x0),
+  fHistoBC(0x0),
+  fHistoAC(0x0),
   fRootFileName(filename.Data())
 {
   // Standard contructor
@@ -72,6 +78,8 @@ AliEventPlaneResolutionHandler::AliEventPlaneResolutionHandler(TString filename)
 Double_t AliEventPlaneResolutionHandler::GetEventPlaneResolution(Double_t minCent, Double_t maxCent){
   // method to compute the event plane resolution starting from correlations
 
+  TDirectory *current = gDirectory;
+
   TFile* inputFile=new TFile(fRootFileName.Data());
   if(!inputFile || (inputFile && !inputFile->IsOpen())){
     printf("Root file not opened --- Return dummy resolution value\n");
@@ -148,11 +156,21 @@ Double_t AliEventPlaneResolutionHandler::GetEventPlaneResolution(Double_t minCen
   if(fNsubevents==2){
     if(fExtrapToFull) resol=AliVertexingHFUtils::GetFullEvResol(hevpls1);
     else resol=AliVertexingHFUtils::GetSubEvResol(hevpls1);
+    current->cd();
+    if(fHistoAB) delete fHistoAB;
+    fHistoAB=(TH1F*)hevpls1->Clone("hCorrelSubAB");
   }else if(fNsubevents==3){
     Double_t correl1=hevpls1->GetMean();
     Double_t correl2=hevpls2->GetMean();
     Double_t correl3=hevpls3->GetMean();
     resol=TMath::Sqrt(correl1*correl2/correl3);
+    current->cd();
+    if(fHistoAB) delete fHistoAB;
+    fHistoAB=(TH1F*)hevpls1->Clone("hCorrelSubAB");
+    if(fHistoBC) delete fHistoBC;
+    fHistoBC=(TH1F*)hevpls2->Clone("hCorrelSubBC");
+    if(fHistoAC) delete fHistoAC;
+    fHistoAC=(TH1F*)hevpls3->Clone("hCorrelSubAC");
   }
   inputFile->Close();
   return resol;
index b89719b063256a543db2f2e1636dbddcdc0a71ec..d437b3dc231b5efa68cb1cb3c027533dce8fa0cb 100644 (file)
@@ -51,6 +51,15 @@ class AliEventPlaneResolutionHandler : public TObject{
   }
   Double_t GetEventPlaneResolution(Double_t minCent, Double_t maxCent);
 
+  TH1F* GetSubEvABCorrelHisto() const{
+    return fHistoAB;
+  }
+  TH1F* GetSubEvBCCorrelHisto() const{
+    return fHistoBC;
+  }
+  TH1F* GetSubEvACCorrelHisto() const{
+    return fHistoAC;
+  }
 
 
   enum EEventPlane {kTPCFullEta, kTPCPosEta,kVZERO,kVZEROA,kVZEROC};
@@ -78,6 +87,9 @@ class AliEventPlaneResolutionHandler : public TObject{
   Double_t fYield24[20];     // values of D0 yield 2<pt<4 in the subranges
   Double_t fYield46[20];     // values of D0 yield 4<pt<6 in the subranges
   Double_t fYield612[20];    // values of D0 yield 6<pt<12 in the subranges
+  TH1F*    fHistoAB;         // histo of subevents A-B   
+  TH1F*    fHistoBC;         // histo of subevents B-C   
+  TH1F*    fHistoAC;         // histo of subevents A-C   
   TString  fRootFileName;    // file with histos of correlations
 
   ClassDef(AliEventPlaneResolutionHandler,0)