}
}
+//____________________________________________________________________//
+const char* AliBalance::GetAnalysisType() {
+ //0:y - 1:eta - 2:Qlong - 3:Qout - 4:Qside - 5:Qinv - 6:phi
+ TString analysisType;
+ switch(fAnalysisType) {
+ case 0:
+ analysisType = "Rapidity";
+ break;
+ case 1:
+ analysisType = "Pseudo-rapidity";
+ break;
+ case 2:
+ analysisType = "Qlong";
+ break;
+ case 3:
+ analysisType = "Qout";
+ break;
+ case 4:
+ analysisType = "Qside";
+ break;
+ case 5:
+ analysisType = "Qinv";
+ break;
+ case 6:
+ analysisType = "Phi";
+ break;
+ default:
+ break;
+ }
+ analysisType += "\nInterval: ";
+ analysisType += fP2Start; analysisType += " - "; analysisType += fP2Stop;
+ analysisType += "\nSteps: "; analysisType += fP2Step;
+ analysisType += "\nBins: "; analysisType += fNumberOfBins;
+
+ return analysisType.Data();
+}
+
//____________________________________________________________________//
void AliBalance::SetParticles(TLorentzVector *P, Double_t *charge, Int_t dim) {
// Sets a new particle with given 4-momentum and charge.
return gr;
}
+
+//____________________________________________________________________//
+void AliBalance::Merge(AliBalance *b) {
+ //Merging function to be used for proof and grid
+ fNp += b->GetNp();
+ fNn += b->GetNn();
+ for(Int_t i = 0; i < fNumberOfBins; i++) {
+ fNnn[i] += b->GetNnn(i);
+ fNpp[i] += b->GetNpp(i);
+ fNpn[i] += b->GetNpn(i);
+ }
+}
void SetAnalysisType(Int_t iType);
void SetInterval(Double_t p2Start, Double_t p2Stop);
+ Int_t GetNumberOfBins() {return fNumberOfBins;}
+ const char* GetAnalysisType();
+
void SetNp(Int_t np) {fNp = np;}
void SetNn(Int_t nn) {fNn = nn;}
void SetNnn(Double_t *nn);
TGraphErrors *DrawBalance();
void PrintResults();
+ void Merge(AliBalance *b);
+
private:
Double_t *fCharge; //matrix with the charge of each track
Int_t fNtrack; //number of tracks to compute the BF