return GetLevidNdpt(mass,T,n,norm,name);
break;
case kOneOverMtdNdmt:
- return GetLevidNdmt(mass,T,n,norm,name);
+ return GetLevidNdmt(mass,T,n,norm,name,kOneOverMtdNdmt);
+ break;
+ case kdNdmt:
+ return GetLevidNdmt(mass,T,n,norm,name,kdNdmt);
+ break;
+ case kOneOverMtdNdmtMinusM:
+ return GetLevidNdmt(mass,T,n,norm,name,kOneOverMtdNdmtMinusM);
break;
default:
AliFatal("Not implemented");
}
-TF1 * AliBWFunc::GetLevidNdmt(Double_t mass, Double_t temp, Double_t n, Double_t norm, const char * name){
+TF1 * AliBWFunc::GetLevidNdmt(Double_t mass, Double_t temp, Double_t n, Double_t norm, const char * name, VarType_t var){
- // Levi function, dNdmt
+ // Levi function, 1/mt dNdmt
char formula[500];
-
- // sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x -[3])/([1]*[2]) )^(-[1])");
- sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + x/([1]*[2]) )^(-[1])");
+ if (var == kOneOverMtdNdmt)
+ sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x -[3])/([1]*[2]) )^(-[1])");
+ else if (var == kdNdmt)
+ sprintf(formula,"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x-[3])/([1]*[2]) )^(-[1])");
+ if (var == kOneOverMtdNdmtMinusM)
+ sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x)/([1]*[2]) )^(-[1])");
+
+ //sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + x/([1]*[2]) )^(-[1])");
// sprintf(formula,"[0] * ( 1 + x/([1]*[2]) )^(-[1])");
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, n, temp,mass);
+
// Test Function
Double_t AliBWFunc::IntegrandTest(const double * x, const double* p){
public:
// define the variables used for the function
- typedef enum {kdNdpt,kOneOverPtdNdpt,kOneOverMtdNdmt} VarType_t;
+ typedef enum {kdNdpt,kOneOverPtdNdpt,kOneOverMtdNdmt,kdNdmt,kOneOverMtdNdmtMinusM} VarType_t;
AliBWFunc();
~AliBWFunc();
// 1/mt dNdmt
// Levi
- TF1 * GetLevidNdmt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char * name = "fLeviMt");
-
+ TF1 * GetLevidNdmt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char * name = "fLeviMt", VarType_t var = kOneOverMtdNdmt);
// gereral setters
void SetLineWidth(Width_t width) { fLineWidth = width;}
Float_t * xbins = new Float_t[nbins+1];
for(Int_t ibins = 0; ibins <= nbins; ibins++){
xbins[ibins] = TMath::Sqrt(hpt->GetBinLowEdge(ibins+1)*hpt->GetBinLowEdge(ibins+1) +
- mass *mass) - mass;
-// xbins[ibins] = TMath::Sqrt(hpt->GetBinLowEdge(ibins+1)*hpt->GetBinLowEdge(ibins+1) +
-// mass *mass);
+ mass *mass) - mass;
+ // xbins[ibins] = TMath::Sqrt(hpt->GetBinLowEdge(ibins+1)*hpt->GetBinLowEdge(ibins+1) +
+ // mass *mass);
// cout << ibins << " "<< xbins[ibins] << endl;
}
hmt->SetXTitle("m_{t} - m_{0} (GeV/c^{2})");
hmt->SetYTitle("1/m_{t} dN/dm_{t} (a.u.)");
-
+ hmt->SetMarkerStyle(hpt->GetMarkerStyle());
+ hmt->SetMarkerColor(hpt->GetMarkerColor());
+ hmt->SetLineColor(hpt->GetLineColor());
+
return hmt;
}
// Switches
Bool_t convertToMT = 0;
-Bool_t sumCharge = kFALSE;
+Bool_t sumCharge = 1;
Int_t whatToFit = kStatErrors;
-Bool_t doPrint = 0;
+Bool_t doPrint = 1;
Bool_t scaleKaons = kFALSE;
Bool_t drawStar = kFALSE; // Overlay star when doing fits
Bool_t correctSecondaries = 1;
Bool_t showMC=kTRUE;
Bool_t showE735=kTRUE;
Bool_t useSecCorrFromDCA=kFALSE;
-const char * printFormats = "png"; // format in which canvases will be printed, if PrintCanvas is called (not all prints are based on printcanvas at the moment). This is a comma separated list.
+const char * printFormats = "eps"; // format in which canvases will be printed, if PrintCanvas is called (not all prints are based on printcanvas at the moment). This is a comma separated list.
void CombineSpectra(Int_t analysisType=kDoHelp, Int_t locfitFuncID = kFitLevi) { //kDoSuperposition;//kDoDrawWithModels;// kDoFits; //kDoRatios;
AliBWTools::GetMeanSquare(func, mean2, mean2e, 0.,100., normPar);
}
AliBWTools::GetMeanDataAndExtrapolation(hToFit, func, meanDF, meanDFe, 0.,100.);
- // FIXME CANCELLAMI
- mean = AliBWTools::GetMean (hToFit, 0.,100., &meane);
- AliBWTools::GetMeanDataAndExtrapolation(hToFit, func, meanDF, meanDFe, AliBWTools::GetLowestNotEmptyBinEdge(hToFit),AliBWTools::GetHighestNotEmptyBinEdge(hToFit));
- // --
table.SetNextCol(mean, meane ,-4);
table.SetNextCol(meanDF, meanDFe,-4);
c2r->cd();
ALICEWorkInProgress(c2r,"","ALICE Preliminary");
l->Draw();
- PrintCanvas(c2,"eps,root,png");
- PrintCanvas(c2r,"eps,root,png");
+ PrintCanvas(c2,printFormats);
+ PrintCanvas(c2r,printFormats);
}
}
// ITS + TPC (Marek)
- // f = TFile::Open("./Files/SpectraCorrectedITSBeforeProtons20100720.root");
+ //f = TFile::Open("./Files/SpectraCorrectedITSBeforeProtons20100720.root");
f = TFile::Open("./Files/SpectraCorrectedITSBeforeProtons14092010new.root");
TList * list = (TList*) gDirectory->Get("output");
hSpectra[kITSTPC][kPion] [kPos]= (TH1F*) list->FindObject("Pions");
hSpectra[kTPC][kKaon][icharge]->SetBinError (ibin,0);
}
}
+ if (pt < 0.25) {
+ hSpectra[kTPC][kKaon][kNeg]->SetBinContent(ibin,0);
+ hSpectra[kTPC][kKaon][kNeg]->SetBinError (ibin,0);
+ }
if (pt < 0.45) {
for(Int_t icharge = 0; icharge < kNCharge; icharge++){
hSpectra[kTPC][kProton][icharge]->SetBinContent(ibin,0);
// Apply correction factors
// Secondaries for protons
- // f = new TFile ("./Files/corrFactorProtons_20100615.root");
+ //f = new TFile ("./Files/corrFactorProtons_20100615.root");
f = new TFile ("./Files/corrFactorProtons_2010_09_15.root");
TH1F * hCorrSecondaries = (TH1F*) gDirectory->Get("corrFactorProtons");
if(correctSecondaries) {
//
// You have to provide:
// - file: file name
- // - histo: histogram name name (assumend to be in the mail folder of the file)
+ // - histo: histogram name name (assumend to be in the main folder of the file)
// - partName: it is used to get the mass of the particle from
// TDatabasePDG. If you are not sure, just use a part of the name: a
// list of names matching it is printed on screen
}
Double_t mass = TDatabasePDG::Instance()->GetParticle(partName)->Mass();
+ cout << "Fitting ["<<partName<<"], mass: " << mass << endl;
+
TF1* func = 0;
Int_t normPar = -1;
if (fitFunc == kFitLevi) {