added setters for common ranges histograms
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Jul 2010 09:43:28 +0000 (09:43 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Jul 2010 09:43:28 +0000 (09:43 +0000)
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.h

index b5859cb..7a13843 100644 (file)
@@ -62,7 +62,7 @@
 
 // Interface to make the Flow Event Simple used in the flow analysis methods
 #include "AliFlowEvent.h"
-
+#include "AliFlowCommonConstants.h"
 #include "AliAnalysisTaskFlowEvent.h"
 
 #include "AliLog.h"
@@ -86,6 +86,21 @@ AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() :
   fMinB(0.01),
   fMaxB(1.0),
   fQA(kFALSE),
+  fNbinsMult(10000),
+  fNbinsPt(100),   
+  fNbinsPhi(100),
+  fNbinsEta(200),
+  fNbinsQ(500),
+  fMultMin(0.),            
+  fMultMax(10000.),
+  fPtMin(0.),       
+  fPtMax(10.),
+  fPhiMin(0.),      
+  fPhiMax(TMath::TwoPi()),
+  fEtaMin(-5.),             
+  fEtaMax(5.),      
+  fQMin(0.),        
+  fQMax(3.),
   fMCReactionPlaneAngle(0.),
   fCount(0),
   fNoOfLoops(1),
@@ -117,6 +132,21 @@ AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, TString RPt
   fMinB(0.01),
   fMaxB(1.0),
   fQA(on),
+  fNbinsMult(10000),
+  fNbinsPt(100),   
+  fNbinsPhi(100),
+  fNbinsEta(200),
+  fNbinsQ(500),
+  fMultMin(0.),            
+  fMultMax(10000.),
+  fPtMin(0.),       
+  fPtMax(10.),
+  fPhiMin(0.),      
+  fPhiMax(TMath::TwoPi()),
+  fEtaMin(-5.),             
+  fEtaMax(5.),      
+  fQMin(0.),        
+  fQMax(3.),
   fMCReactionPlaneAngle(0.),
   fCount(0),
   fNoOfLoops(1),
@@ -173,6 +203,25 @@ void AliAnalysisTaskFlowEvent::UserCreateOutputObjects()
     AliError("WRONG ANALYSIS TYPE! only ESD, ESDMCkineESD, ESDMCkineMC, AOD and MC are allowed.");
     exit(1);
   }
+
+  //set the common constants
+  AliFlowCommonConstants* cc = AliFlowCommonConstants::GetMaster();
+  cc->SetNbinsMult(fNbinsMult);
+  cc->SetNbinsPt(fNbinsPt);
+  cc->SetNbinsPhi(fNbinsPhi); 
+  cc->SetNbinsEta(fNbinsEta);
+  cc->SetNbinsQ(fNbinsQ);
+  cc->SetMultMin(fMultMin);
+  cc->SetMultMax(fMultMax);
+  cc->SetPtMin(fPtMin);
+  cc->SetPtMax(fPtMax);
+  cc->SetPhiMin(fPhiMin);
+  cc->SetPhiMax(fPhiMax);
+  cc->SetEtaMin(fEtaMin);
+  cc->SetEtaMax(fEtaMax);
+  cc->SetQMin(fQMin);
+  cc->SetQMax(fQMax);
+
 }
 
 //________________________________________________________________________
index b92e0f2..9e7acdc 100644 (file)
@@ -57,7 +57,26 @@ class AliAnalysisTaskFlowEvent : public AliAnalysisTaskSE {
   void          SetQAOn(Bool_t kt)        {this->fQA = kt; }
   Bool_t        GetQAOn()                 {return this->fQA; }
 
-  //setters for adding by hand flow values (afterburner)
+  // setters for common constants
+  void SetNbinsMult( Int_t i ) { fNbinsMult = i; }
+  void SetNbinsPt( Int_t i )   { fNbinsPt = i; }
+  void SetNbinsPhi( Int_t i )  { fNbinsPhi = i; }
+  void SetNbinsEta( Int_t i )  { fNbinsEta = i; }
+  void SetNbinsQ( Int_t i )    { fNbinsQ = i; }
+   
+  void SetMultMin( Double_t i ) { fMultMin = i; }
+  void SetMultMax( Double_t i ) { fMultMax = i; }
+  void SetPtMin( Double_t i )   { fPtMin = i; }
+  void SetPtMax( Double_t i )   { fPtMax = i; }
+  void SetPhiMin( Double_t i )  { fPhiMin = i; }
+  void SetPhiMax( Double_t i )  { fPhiMax = i; }
+  void SetEtaMin( Double_t i )  { fEtaMin = i; }
+  void SetEtaMax( Double_t i )  { fEtaMax = i; }
+  void SetQMin( Double_t i )    { fQMin = i; }
+  void SetQMax( Double_t i )    { fQMax = i; }
+  // end setters common constants
+
+  // setters for adding by hand flow values (afterburner)
   void SetMCReactionPlaneAngle(Double_t fPhiRP)  { this->fMCReactionPlaneAngle = fPhiRP; }
   void SetNoOfLoops(Int_t noofl) {this->fNoOfLoops = noofl;}
   Int_t GetNoOfLoops() const {return this->fNoOfLoops;} 
@@ -69,41 +88,63 @@ class AliAnalysisTaskFlowEvent : public AliAnalysisTaskSE {
   Int_t GetMultiplicityOfEvent() const {return this->fMultiplicityOfEvent;} 
   void SetSigmaMultiplicityOfEvent(Int_t sigmultevnt) {this->fSigmaMultiplicityOfEvent = sigmultevnt;}
   Int_t GetSigmaMultiplicityOfEvent() const {return this->fSigmaMultiplicityOfEvent;} 
-  //end setters afterburner
+  // end setters afterburner
 
  private:
 
   AliAnalysisTaskFlowEvent(const AliAnalysisTaskFlowEvent& aAnalysisTask);
   AliAnalysisTaskFlowEvent& operator=(const AliAnalysisTaskFlowEvent& aAnalysisTask); 
 
-  //  TFile*        fOutputFile;              // temporary output file for testing
-  //  AliESDEvent*  fESD;                   // ESD object
-  //  AliAODEvent*  fAOD;                   // AOD object
-  TString       fAnalysisType;          // can be MC, ESD or AOD
-  TString       fRPType;                // can be Global or Tracklet or FMD
-  AliCFManager* fCFManager1;            // correction framework manager
-  AliCFManager* fCFManager2;            // correction framework manager
-  TList*        fQAInt;                 // QA histogram list
-  TList*        fQADiff;                // QA histogram list
-  Int_t         fMinMult;               // Minimum multiplicity from tracks selected using CORRFW
-  Int_t         fMaxMult;               // Maximum multiplicity from tracks selected using CORRFW 
-  Double_t      fMinA;                  // Minimum of eta range for subevent A
-  Double_t      fMaxA;                  // Maximum of eta range for subevent A
-  Double_t      fMinB;                  // Minimum of eta range for subevent B
-  Double_t      fMaxB;                  // Maximum of eta range for subevent B
-
-  Bool_t fQA;                             // flag to set the filling of the QA hostograms
+  //  TFile*        fOutputFile;    // temporary output file for testing
+  //  AliESDEvent*  fESD;           // ESD object
+  //  AliAODEvent*  fAOD;           // AOD object
+  TString       fAnalysisType;      // can be MC, ESD or AOD
+  TString       fRPType;            // can be Global or Tracklet or FMD
+  AliCFManager* fCFManager1;        // correction framework manager
+  AliCFManager* fCFManager2;        // correction framework manager
+  TList*        fQAInt;             // QA histogram list
+  TList*        fQADiff;            // QA histogram list
+  Int_t         fMinMult;           // Minimum multiplicity from tracks selected using CORRFW
+  Int_t         fMaxMult;           // Maximum multiplicity from tracks selected using CORRFW 
+  Double_t      fMinA;              // Minimum of eta range for subevent A
+  Double_t      fMaxA;              // Maximum of eta range for subevent A
+  Double_t      fMinB;              // Minimum of eta range for subevent B
+  Double_t      fMaxB;              // Maximum of eta range for subevent B
+
+  Bool_t fQA;                       // flag to set the filling of the QA hostograms
+
+  // setters for common constants
+  //histogram sizes
+  Int_t  fNbinsMult; // histogram size
+  Int_t  fNbinsPt;   // histogram size
+  Int_t  fNbinsPhi;  // histogram size
+  Int_t  fNbinsEta;  // histogram size
+  Int_t  fNbinsQ;    // histogram size
+  // Histograms limits
+  Double_t  fMultMin;  // histogram limit 
+  Double_t  fMultMax;  // histogram limit
+  Double_t  fPtMin;    // histogram limit
+  Double_t  fPtMax;    // histogram limit
+  Double_t  fPhiMin;   // histogram limit
+  Double_t  fPhiMax;   // histogram limit
+  Double_t  fEtaMin;   // histogram limit
+  Double_t  fEtaMax;   // histogram limit
+  Double_t  fQMin;     // histogram limit
+  Double_t  fQMax;     // histogram limit
+  // end common constants
+
   // values afterburner
-  Double_t  fMCReactionPlaneAngle;   // the angle of the reaction plane from the MC truth
-  Int_t     fCount;   // counter for the number of events processed
-  Int_t     fNoOfLoops; // number of times to use the same particle (nonflow) 
-  Double_t  fEllipticFlowValue; // Add Flow. Must be in range [0,1].
-  Double_t  fSigmaEllipticFlowValue; // Sigma Flow (Gaussian). Must be in range [0,1].
-  Int_t     fMultiplicityOfEvent; // Set maximal multiplicity.
+  Double_t  fMCReactionPlaneAngle;     // the angle of the reaction plane from the MC truth
+  Int_t     fCount;                    // counter for the number of events processed
+  Int_t     fNoOfLoops;                // number of times to use the same particle (nonflow) 
+  Double_t  fEllipticFlowValue;        // Add Flow. Must be in range [0,1].
+  Double_t  fSigmaEllipticFlowValue;   // Sigma Flow (Gaussian). Must be in range [0,1].
+  Int_t     fMultiplicityOfEvent;      // Set maximal multiplicity.
   Int_t     fSigmaMultiplicityOfEvent; // Sigma multiplicity (Gaussian).
     
-  TRandom3* fMyTRandom3; // our TRandom3 generator
-  Bool_t fbAfterburnerOn;
+  TRandom3* fMyTRandom3;     // TRandom3 generator
+  Bool_t    fbAfterburnerOn;
   // end afterburner
   
   ClassDef(AliAnalysisTaskFlowEvent, 1); // example of analysis