#include "AliGammaConversionBGHandler.h"
#include "AliESDCaloCluster.h" // for combining PHOS and GammaConv
#include "AliKFVertex.h"
-#include "AliV0.h"
class AliCFContainer;
class AliCFManager;
class AliKFVertex;
fHistograms->FillHistogram("ESD_TrueConvGamma_P_AsymmetryP",fV0Reader->GetMotherCandidateP(),fV0Reader->GetPositiveTrackP()/fV0Reader->GetMotherCandidateP());
fHistograms->FillHistogram("ESD_TrueConvGamma_E_dEdxP",fV0Reader->GetNegativeTrackP(),fV0Reader->GetNegativeTrackTPCdEdx());
fHistograms->FillHistogram("ESD_TrueConvGamma_P_dEdxP",fV0Reader->GetPositiveTrackP(),fV0Reader->GetPositiveTrackTPCdEdx());
-
+ fHistograms->FillHistogram("ESD_TrueConvGamma_alfa_qt",armenterosQtAlfa[1],armenterosQtAlfa[0]);
+
//store MCTruth properties
if(twoGammaCandidate->GetNDF()>0){
chi2TwoGammaCandidate = twoGammaCandidate->GetChi2()/twoGammaCandidate->GetNDF();
+ fHistograms->FillHistogram("ESD_Mother_Chi2",chi2TwoGammaCandidate);
if(chi2TwoGammaCandidate>0 && chi2TwoGammaCandidate<fV0Reader->GetChi2CutMeson()){
TVector3 momentumVectorTwoGammaCandidate(twoGammaCandidate->GetPx(),twoGammaCandidate->GetPy(),twoGammaCandidate->GetPz());
Double_t xPrimaryVertex=vtxT3D->GetXv();
Double_t yPrimaryVertex=vtxT3D->GetYv();
Double_t zPrimaryVertex=vtxT3D->GetZv();
- Float_t primvertex[3]={xPrimaryVertex,yPrimaryVertex,zPrimaryVertex};
+ // Float_t primvertex[3]={xPrimaryVertex,yPrimaryVertex,zPrimaryVertex};
Float_t nsigmaTPCtrackPos;
Float_t nsigmaTPCtrackNeg;
Float_t cpa=vertex.GetV0CosineOfPointingAngle(xPrimaryVertex,yPrimaryVertex,zPrimaryVertex);
- AliV0 pvertex;
- pvertex.SetParamN(nt);
- pvertex.SetParamP(pt);
- pvertex.Update(primvertex);
- Float_t v0Rr=pvertex.GetRr();
+
// cout<< "v0Rr::"<< v0Rr<<endl;
// if (pvertex.GetRr()<0.5){
// continue;
fHistograms->FillHistogram("ESD_RecalculateV0_P_dEdxP",curElecPosAt.P(),posTrack->GetTPCsignal());
fHistograms->FillHistogram("ESD_RecalculateV0_cpa",cpa);
fHistograms->FillHistogram("ESD_RecalculateV0_dca",dca);
- fHistograms->FillHistogram("ESD_RecalculateV0_Rr",v0Rr);
fHistograms->FillHistogram("ESD_RecalculateV0_normdistP",normdistP);
fHistograms->FillHistogram("ESD_RecalculateV0_normdistN",normdistN);
fPIDMinPKaonRejectionLowP(0),
fPIDMinPProtonRejectionLowP(0),
fPIDMinPPionRejectionLowP(0),
+ fDoQtGammaSelection(kFALSE),
+ fQtMax(100.),
fXVertexCut(0.),
fYVertexCut(0.),
fZVertexCut(0.),
fBGEventHandler(NULL),
fBGEventInitialized(kFALSE),
fEsdTrackCuts(NULL),
- fNumberOfESDTracks(0)
+ fNumberOfESDTracks(0),
+ nEventsForBGCalculation(10)
{
//fESDpid = new AliESDpid;
}
fPIDMinPKaonRejectionLowP(original.fPIDMinPKaonRejectionLowP),
fPIDMinPProtonRejectionLowP(original.fPIDMinPProtonRejectionLowP),
fPIDMinPPionRejectionLowP(original.fPIDMinPPionRejectionLowP),
+ fDoQtGammaSelection(original.fDoQtGammaSelection),
+ fQtMax(original.fQtMax),
fXVertexCut(original.fXVertexCut),
fYVertexCut(original.fYVertexCut),
fZVertexCut(original.fZVertexCut),
fBGEventHandler(original.fBGEventHandler),
fBGEventInitialized(original.fBGEventInitialized),
fEsdTrackCuts(original.fEsdTrackCuts),
- fNumberOfESDTracks(original.fNumberOfESDTracks)
+ fNumberOfESDTracks(original.fNumberOfESDTracks),
+ nEventsForBGCalculation(original.nEventsForBGCalculation)
{
}
multiplicityBinLimitsArray[3] = 27.5;
multiplicityBinLimitsArray[4] = 41.5;
- fBGEventHandler = new AliGammaConversionBGHandler(8,5,10);
+ fBGEventHandler = new AliGammaConversionBGHandler(8,5,nEventsForBGCalculation);
/*
// ---------------------------------
}
}
-
+ // Gamma selection based on QT from Armenteros
+ if(fDoQtGammaSelection == kTRUE){
+ if(armenterosQtAlfa[0]>fQtMax){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutQt_InvMass",GetMotherCandidateMass());
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+
//checks if we have a prim vertex
if(fESDEvent->GetPrimaryVertex()->GetNContributors()<=0) {
if(fHistograms != NULL){
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-const int c_array_size = 12;
+const int c_array_size = 13;
class AliAnalysisDataContainer;
class AliGammaConversionHistograms;
Bool_t kGCRecalculateV0ForGamma = kFALSE;
/** ---------------------------------- define cuts here ------------------------------------*/
-TString kGCAnalysisCutSelectionId="900011100010"; // do not cheange here, use -set-cut-selection in argument instead
+TString kGCAnalysisCutSelectionId="9000111000100"; // do not change here, use -set-cut-selection in argument instead
+
+Int_t kGCNEventsForBGCalculation=10;
Int_t kGCpidOfNegativeTrack=11;
Int_t kGCpidOfPositiveTrack=-11;
Bool_t kGCplotESDTrueConvGammaPAsymmetryP = kTRUE;
Bool_t kGCplotESDTrueConvGammaEdEdxP = kTRUE;
Bool_t kGCplotESDTrueConvGammaPdEdxP = kTRUE;
-
+Bool_t kGCplotESDTrueConvGammaQtAlfa = kTRUE;
Bool_t kGCplotESDTrueConvGammaPtvsChi2 = kTRUE;
Bool_t kGCplotESDTrueConvGammaEtavsChi2 = kTRUE;
Bool_t kGCplotESDNoCutConversionMCZR = kFALSE;
Bool_t kGCplotESDNoCutConversionMCXY = kFALSE;
+Bool_t kGCplotESDMotherChi2 = kTRUE;
Bool_t kGCplotESDMotherOpeningAngleGamma = kTRUE;
Bool_t kGCplotESDMotherEnergy = kFALSE;
Bool_t kGCplotESDMotherPt = kFALSE;
Bool_t kGCplotESDCutPionRejectionLowP =kTRUE;
Bool_t kGCplotESDCutProtonRejectionLowP=kTRUE;
Bool_t kGCplotESDCutKaonRejectionLowP =kTRUE;
+Bool_t kGCplotESDCutQtGammaSelection=kTRUE;
Bool_t kGCplotESDCutR = kTRUE;
Bool_t kGCplotESDCutLine = kTRUE;
Bool_t kGCplotESDCutZ = kTRUE;
Double_t kGCPIDMinPPionRejectionLowP=0.5;
+Bool_t kGCdoQtGammaSelection=kTRUE;
+Double_t kGCQtMax=100.;
+
+
+
Bool_t scanArguments(TString arguments){
Bool_t iResult = kTRUE;
AliCFManager *man = new AliCFManager();
man->SetParticleContainer(container);
-
+ for(int i = 0;i<nstep;i++){
+ TObjArray *tmp = new TObjArray(0);
+ man->SetParticleCutsList(i,tmp) ;
+ }
+
// end ---------------------------------------------------------------------------
v0Reader->SetPIDMinPKaonRejectionLowP(kGCPIDMinPKaonRejectionLowP);
v0Reader->SetPIDMinPProtonRejectionLowP(kGCPIDMinPProtonRejectionLowP);
v0Reader->SetPIDMinPPionRejectionLowP(kGCPIDMinPPionRejectionLowP);
-
+ v0Reader->SetDoQtGammaSelection(kGCdoQtGammaSelection);
+ v0Reader->SetQtMax(kGCQtMax);
+ v0Reader->SetNEventsForBG(kGCNEventsForBGCalculation);
// Create the GammaConversionTask
TStopwatch timer;
timer.Start();
gSystem->Load("libTree.so");
- gSystem->Load("libGui.so");
- gSystem->Load("libMinuit.so");
gSystem->Load("libGeom");
- gSystem->Load("libProof");
- gSystem->Load("libRAWDatabase");
////
//Setting up ESD.par//
setupPar("ESD");
gSystem->Load("libVMC.so");
gSystem->Load("libESD.so");
-
-
- gSystem->Load("libCDB.so");
- gSystem->Load("libSTEER.so");
////
////
if(kGCplotESDTrueConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
if(kGCplotESDTrueConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
if(kGCplotESDTrueConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
-
+ if(kGCplotESDTrueConvGammaQtAlfa== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
if(kGCplotESDTrueConvGammaMCPtEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_MC_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
if(kGCplotESDTrueConversionMCZR == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_MC_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
if(kGCplotESDNoCutConversionMCXY == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_MC_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
-
+ if(kGCplotESDMotherChi2 == kTRUE){ histograms->AddHistogram("ESD_Mother_Chi2","" , kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
if(kGCplotESDMotherOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_Mother_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
if(kGCplotESDMotherEnergy == kTRUE){ histograms->AddHistogram("ESD_Mother_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
if(kGCplotESDMotherPt == kTRUE){ histograms->AddHistogram("ESD_Mother_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
if(kGCplotESDCutdedxSigmaPionLine == kTRUE){histograms->AddHistogram("ESD_CutdEdxSigmaPionLine_InvMass" ,"dedx PionLine" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutPionRejectionLowP==kTRUE){histograms->AddHistogram("ESD_CutPionRejectionLowP_InvMass" ,"dedx PionRejection LowP" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutKaonRejectionLowP==kTRUE){histograms->AddHistogram("ESD_CutKaonRejectionLowP_InvMass" ,"dedx KaonRejection LowP" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
+ if(kGCplotESDCutQtGammaSelection==kTRUE){histograms->AddHistogram("ESD_CutQt_InvMass","ESD_CutQt_InvMass",kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
+
if(kGCplotESDCutProtonRejectionLowP==kTRUE){histograms->AddHistogram("ESD_CutProtonRejectionLowP_InvMass" ,"dedx ProtonRejection LowP" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutR == kTRUE){histograms->AddHistogram("ESD_CutR_InvMass" ,"Above RMax" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutNDF == kTRUE){histograms->AddHistogram("ESD_CutNDF_InvMass" ,"NDF <= 0" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
// set the cuts depending on the Cut Selection Id
// first number is dummy always set to 9
// const char* cutSelection = analysisCutSelection.Data();
- if(analysisCutSelection.Length()!=12){
+ if(analysisCutSelection.Length()!=13){
cout<<"Cut selection has the wrong length!"<<endl;
return 0;
}
Int_t etaCut=array[9];
Int_t chi2MesonCut=array[10];
Int_t LowPRejectionSigmaCut=array[11];
+ Int_t QtMaxCut=array[12];
- cout<<"LowPRejectionSigmaCut"<<LowPRejectionSigmaCut<<endl;
+ cout<<"QtMaxCut:"<<QtMaxCut<<endl;
+ cout<<"LowPRejectionSigmaCut:"<<LowPRejectionSigmaCut<<endl;
cout<<"chi2MesonCut: "<< chi2MesonCut<<endl;
cout<<"etaCut: "<<etaCut<<endl;
cout<<"clsTPCCut: "<<clsTPCCut<<endl;
case 2: // 1.5 GeV
kGCPIDMinPnSigmaAbovePionLine=1.5;
break;
+ case 3: // 20.0 GeV
+ kGCPIDMinPnSigmaAbovePionLine=20.;
+ break;
+ case 4: // 50.0 GeV
+ kGCPIDMinPnSigmaAbovePionLine=50.;
+ break;
default:
return iResult;
}
default:
return iResult;
}
+ switch(QtMaxCut){
+ case 0: //
+ kGCQtMax=1.;
+ break;
+ case 1:
+ kGCQtMax=0.1;
+ break;
+ case 2:
+ kGCQtMax=0.07;
+ break;
+ case 3:
+ kGCQtMax=0.05;
+ break;
+ case 4:
+ kGCQtMax=0.03;
+ break;
+ default:
+ return iResult;
+ }
iResult=1;
return iResult;
ASSIGNARRAY(9);
ASSIGNARRAY(10);
ASSIGNARRAY(11);
+ ASSIGNARRAY(12);
}
}