SetEventNumber((int)fCommonHists->GetHistMultOrig()->GetEntries());
//cout<<"number of events processed is "<<fEventNumber<<endl;
+ //Get multiplicity for RP selection
+ Double_t dMultRP = fCommonHists->GetHistMultRP()->GetMean();
+ if (fDebug) cout<<"The average multiplicity is "<<dMultRP<<endl;
+
//set the sum of Q vectors
fQsum->Set(fHistQsumforChi->GetBinContent(1),fHistQsumforChi->GetBinContent(2));
SetQ2sum(fHistQsumforChi->GetBinContent(3));
Double_t dVmin = -1.;
if (dR0+dBinsize!=0.) {dVplus = dJ01/(dR0+dBinsize);}
if (dR0-dBinsize!=0.) {dVmin = dJ01/(dR0-dBinsize);}
- //convert V to v (normally v = V/M, but here V=v because the Q-vector is scaled by 1/M)
- dv = dVtheta;
- Double_t dvplus = dVplus;
- Double_t dvmin = dVmin;
+ //convert V to v
+ Double_t dvplus = -1.;
+ Double_t dvmin= -1.;
+ if (fUseSum){
+ //for SUM: V=v because the Q-vector is scaled by 1/M
+ dv = dVtheta;
+ dvplus = dVplus;
+ dvmin = dVmin; }
+ else {
+ //for PRODUCT: v=V/M
+ if (dMultRP!=0.){
+ dv = dVtheta/dMultRP;
+ dvplus = dVplus/dMultRP;
+ dvmin = dVmin/dMultRP; }}
+
if (fDebug) cout<<"dv = "<<dv<<" and dvplus = "<<dvplus<< " and dvmin = "<<dvmin<<endl;
//fill the histograms
//get average value of fVtheta = fV
dV /=iNtheta;
-
+ if (!fUseSum) { if (dMultRP!=0.){dV /=dMultRP;}} //scale with multiplicity for PRODUCT
+
//sigma2 and chi
Double_t dSigma2 = 0;
Double_t dChi= 0;
cout<<" Lee-Yang Zeroes PRODUCT "<<endl;}
cout<<endl;
cout<<"Chi = "<<dChi<<endl;
- cout<<endl;
+ //cout<<endl;
}
// recalculate statistical errors on integrated flow
//calculate the average of fVtheta = fV
dV /= iNtheta;
+ if (!fUseSum) { if (dMultRP!=0.) { dV /=dMultRP; }} //scale by the multiplicity for PRODUCT
if (dV==0.) { cout<<"dV = 0! Leaving LYZ analysis."<<endl; return kFALSE; }
//sigma2 and chi (for statistical error calculations)
cout<<endl;
cout<<"Chi = "<<dChi<<endl;
cout<<"dV = "<<dV<<" +- "<<dVErr<<endl;
- cout<<endl;
+ //cout<<endl;
}
//copy content of profile into TH1D and add error and fill the AliFlowCommonHistResults
TComplex cG = TComplex::One();
Double_t dOrder = 2.;
- Double_t dWgt = 1./anEvent->GetEventNSelTracksRP(); //weight with the multiplicity
+ Double_t dWgt = 1.;
+ //Double_t dWgt = 1./anEvent->GetEventNSelTracksRP(); //weight with the multiplicity
Int_t iNumberOfTracks = anEvent->NumberOfTracks();
TComplex cdGr0(0.,0.);
Double_t dOrder = 2.;
Double_t dWgt = 1.;
-
+ //Double_t dWgt = 1./anEvent->GetEventNSelTracksRP(); //weight with the multiplicity
+
Int_t iNumberOfTracks = anEvent->NumberOfTracks();
Int_t iNtheta = AliFlowLYZConstants::kTheta;
cout<<"The input file is "<<inputFileNameLYZ2SUM.Data()<<endl;
TFile* fInputFileLYZ2SUM = new TFile(inputFileNameLYZ2SUM.Data(),"READ");
if(!fInputFileLYZ2SUM || fInputFileLYZ2SUM->IsZombie()) {
- cerr << " ERROR: NO First Run SUM file... " << endl ;
+ cerr << " ERROR: To run LYZ2SUM you need the output file from LYZ1SUM. This file is not there! Please run LYZ1SUM first." << endl ;
break;
}
else {
cout<<"The input file is "<<inputFileNameLYZ2PROD.Data()<<endl;
TFile* fInputFileLYZ2PROD = new TFile(inputFileNameLYZ2PROD.Data(),"READ");
if(!fInputFileLYZ2PROD || fInputFileLYZ2PROD->IsZombie()) {
- cerr << " ERROR: NO First Run PROD file... " << endl ;
+ cerr << " ERROR: To run LYZ2PROD you need the output file from LYZ1PROD. This file is not there! Please run LYZ1PROD first." << endl ;
break;
}
else {
cout<<"The input file is "<<inputFileNameLYZEP.Data()<<endl;
TFile* fInputFileLYZEP = new TFile(inputFileNameLYZEP.Data(),"READ");
if(!fInputFileLYZEP || fInputFileLYZEP->IsZombie()) {
- cerr << " ERROR: NO Second Run file... " << endl ;
+ cerr << " ERROR: To run LYZEP you need the output file from LYZ2SUM. This file is not there! Please run LYZ2SUM first." << endl ;
break;
}
else {
AliCFTrackKineCuts* mcKineCuts1 = new AliCFTrackKineCuts("mcKineCuts1","MC-level kinematic cuts");
mcKineCuts1->SetPtRange(ptmin1,ptmax1);
mcKineCuts1->SetRapidityRange(ymin1,ymax1);
- mcKineCuts1->SetChargeMC(charge1);
+ //mcKineCuts1->SetChargeMC(charge1);
if (QA) {
mcKineCuts1->SetQAOn(qaRP);
}
AliCFTrackKineCuts* mcKineCuts2 = new AliCFTrackKineCuts("mcKineCuts2","MC-level kinematic cuts");
mcKineCuts2->SetPtRange(ptmin2,ptmax2);
mcKineCuts2->SetRapidityRange(ymin2,ymax2);
- mcKineCuts2->SetChargeMC(charge2);
+ //mcKineCuts2->SetChargeMC(charge2);
if (QA) {
mcKineCuts2->SetQAOn(qaPOI);
}
AliCFTrackKineCuts *recKineCuts1 = new AliCFTrackKineCuts("recKineCuts1","rec-level kine cuts");
recKineCuts1->SetPtRange(ptmin1,ptmax1);
recKineCuts1->SetRapidityRange(ymin1,ymax1);
- recKineCuts1->SetChargeRec(charge1);
+ //recKineCuts1->SetChargeRec(charge1);
if (QA) {
recKineCuts1->SetQAOn(qaRP);
}
AliCFTrackKineCuts *recKineCuts2 = new AliCFTrackKineCuts("recKineCuts2","rec-level kine cuts");
recKineCuts2->SetPtRange(ptmin2,ptmax2);
recKineCuts2->SetRapidityRange(ymin2,ymax2);
- recKineCuts2->SetChargeRec(charge2);
+ //recKineCuts2->SetChargeRec(charge2);
if (QA) {
recKineCuts2->SetQAOn(qaPOI);
}
// RUN SETTINGS
//flow analysis method can be: (set to kTRUE or kFALSE)
Bool_t SP = kTRUE;
-Bool_t LYZ1SUM = kFALSE;
-Bool_t LYZ1PROD = kFALSE;
+Bool_t LYZ1SUM = kTRUE;
+Bool_t LYZ1PROD = kTRUE;
Bool_t LYZ2SUM = kFALSE;
Bool_t LYZ2PROD = kFALSE;
-Bool_t LYZEP = kTRUE;
+Bool_t LYZEP = kFALSE;
Bool_t GFC = kTRUE;
Bool_t QC = kTRUE;
-Bool_t FQD = kTRUE;
-Bool_t MCEP = kTRUE; //does not work yet 24/12/08
+Bool_t FQD = kFALSE;
+Bool_t MCEP = kFALSE; //does not work yet 24/12/08
//--------------------------------------------------------------------------------------
// Weights
TString inputFileNameLYZ2SUM = "outputLYZ1SUManalysis.root" ;
TFile* inputFileLYZ2SUM = new TFile(inputFileNameLYZ2SUM.Data(),"READ");
if(!inputFileLYZ2SUM || inputFileLYZ2SUM->IsZombie()) {
- cerr << " ERROR: NO First Run SUM file... " << endl ;
+ cerr << " ERROR: To run LYZ2SUM you need the output file from LYZ1SUM. This file is not there! Please run LYZ1SUM first." << endl ;
break;
}
else {
TString inputFileNameLYZ2PROD = "outputLYZ1PRODanalysis.root" ;
TFile* inputFileLYZ2PROD = new TFile(inputFileNameLYZ2PROD.Data(),"READ");
if(!inputFileLYZ2PROD || inputFileLYZ2PROD->IsZombie()) {
- cerr << " ERROR: NO First Run PROD file... " << endl ;
+ cerr << " ERROR: To run LYZ2PROD you need the output file from LYZ1PROD. This file is not there! Please run LYZ1PROD first." << endl ;
break;
}
else {
TString inputFileNameLYZEP = "outputLYZ2SUManalysis.root" ;
TFile* inputFileLYZEP = new TFile(inputFileNameLYZEP.Data(),"READ");
if(!inputFileLYZEP || inputFileLYZEP->IsZombie()) {
- cerr << " ERROR: NO Second Run file... " << endl ;
+ cerr << " ERROR: To run LYZEP you need the output file from LYZ2SUM. This file is not there! Please run LYZ2SUM first." << endl ;
break;
}
else {
// RUN SETTINGS
// flow analysis method can be: (set to kTRUE or kFALSE)
Bool_t SP = kTRUE;
-Bool_t LYZ1SUM = kFALSE;
-Bool_t LYZ1PROD = kFALSE;
+Bool_t LYZ1SUM = kTRUE;
+Bool_t LYZ1PROD = kTRUE;
Bool_t LYZ2SUM = kFALSE;
Bool_t LYZ2PROD = kFALSE;
-Bool_t LYZEP = kTRUE;
+Bool_t LYZEP = kFALSE;
Bool_t GFC = kTRUE;
Bool_t QC = kTRUE;
-Bool_t FQD = kTRUE;
-Bool_t MCEP = kTRUE;
+Bool_t FQD = kFALSE;
+Bool_t MCEP = kFALSE;
//--------------------------------------------------------------------------------------
// Weights
TString inputFileNameLYZ2SUM = "outputLYZ1SUManalysis.root" ;
TFile* inputFileLYZ2SUM = new TFile(inputFileNameLYZ2SUM.Data(),"READ");
if(!inputFileLYZ2SUM || inputFileLYZ2SUM->IsZombie()) {
- cerr << " ERROR: NO First Run SUM file... " << endl ;
+ cerr << " ERROR: To run LYZ2SUM you need the output file from LYZ1SUM. This file is not there! Please run LYZ1SUM first." << endl ;
break;
}
else {
TString inputFileNameLYZ2PROD = "outputLYZ1PRODanalysis.root" ;
TFile* inputFileLYZ2PROD = new TFile(inputFileNameLYZ2PROD.Data(),"READ");
if(!inputFileLYZ2PROD || inputFileLYZ2PROD->IsZombie()) {
- cerr << " ERROR: NO First Run PROD file... " << endl ;
+ cerr << " ERROR: To run LYZ2PROD you need the output file from LYZ1PROD. This file is not there! Please run LYZ1PROD first." << endl ;
break;
}
else {
TString inputFileNameLYZEP = "outputLYZ2SUManalysis.root" ;
TFile* inputFileLYZEP = new TFile(inputFileNameLYZEP.Data(),"READ");
if(!inputFileLYZEP || inputFileLYZEP->IsZombie()) {
- cerr << " ERROR: NO Second Run file... " << endl ;
+ cerr << " ERROR: To run LYZEP you need the output file from LYZ2SUM. This file is not there! Please run LYZ2SUM first." << endl ;
break;
}
else {