#include "TNtuple.h"
//#include "AliCFManager.h" // for CF
//#include "AliCFContainer.h" // for CF
+#include "AliESDInputHandler.h"
+#include "AliAnalysisManager.h"
#include "AliGammaConversionAODObject.h"
#include "AliGammaConversionBGHandler.h"
#include "AliESDCaloCluster.h" // for combining PHOS and GammaConv
-
+#include "AliKFVertex.h"
+#include "AliV0.h"
class AliCFContainer;
class AliCFManager;
class AliKFVertex;
fDoOmegaMeson(kFALSE),
fDoJet(kFALSE),
fDoChic(kFALSE),
+ fRecalculateV0ForGamma(kFALSE),
fKFReconstructedGammasTClone(NULL),
fKFReconstructedPi0sTClone(NULL),
+ fKFRecalculatedGammasTClone(NULL),
fCurrentEventPosElectronTClone(NULL),
fCurrentEventNegElectronTClone(NULL),
fKFReconstructedGammasCutTClone(NULL),
fElectronv2(),
fGammav1(),
fGammav2(),
+ fElectronRecalculatedv1(),
+ fElectronRecalculatedv2(),
fElectronMass(-1),
fGammaMass(-1),
fPi0Mass(-1),
fDoOmegaMeson(kFALSE),
fDoJet(kFALSE),
fDoChic(kFALSE),
+ fRecalculateV0ForGamma(kFALSE),
fKFReconstructedGammasTClone(NULL),
fKFReconstructedPi0sTClone(NULL),
+ fKFRecalculatedGammasTClone(NULL),
fCurrentEventPosElectronTClone(NULL),
fCurrentEventNegElectronTClone(NULL),
fKFReconstructedGammasCutTClone(NULL),
fElectronv2(),
fGammav1(),
fGammav2(),
+ fElectronRecalculatedv1(),
+ fElectronRecalculatedv2(),
fElectronMass(-1),
fGammaMass(-1),
fPi0Mass(-1),
// Define standard ESD track cuts for Gamma-hadron correlation
SetESDtrackCuts();
+
}
AliAnalysisTaskGammaConversion::~AliAnalysisTaskGammaConversion()
{
// Execute analysis for current event
+ // Load the esdpid from the esdhandler if exists (tender was applied) otherwise set the Bethe Bloch parameters
+
+ AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
+ AliESDInputHandler *esdHandler=0x0;
+ if ( (esdHandler=dynamic_cast<AliESDInputHandler*>(man->GetInputEventHandler())) && esdHandler->GetESDpid() ){
+ AliV0Reader::SetESDpid(esdHandler->GetESDpid());
+ } else {
+ //load esd pid bethe bloch parameters depending on the existance of the MC handler
+ // yes: MC parameters
+ // no: data parameters
+ if (!AliV0Reader::GetESDpid()){
+ if (fMCEvent ) {
+ AliV0Reader::InitESDpid();
+ } else {
+ AliV0Reader::InitESDpid(1);
+ }
+ }
+ }
+
if(fV0Reader == NULL){
// Write warning here cuts and so on are default if this ever happens
if(fKFReconstructedPi0sTClone == NULL){
fKFReconstructedPi0sTClone = new TClonesArray("AliKFParticle",0);
}
+
+ if(fKFRecalculatedGammasTClone == NULL){
+ fKFRecalculatedGammasTClone = new TClonesArray("AliKFParticle",0);
+ }
+
//clear TClones
fKFReconstructedGammasTClone->Delete();
fPreviousEventTLVNegElectronTClone->Delete();
fPreviousEventTLVPosElectronTClone->Delete();
fKFReconstructedPi0sTClone->Delete();
+ fKFRecalculatedGammasTClone->Delete();
//clear vectors
fElectronv1.clear();
fGammav1.clear();
fGammav2.clear();
+ fElectronRecalculatedv1.clear();
+ fElectronRecalculatedv2.clear();
+
fChargedParticles->Delete();
//Clear the data in the v0Reader
fV0Reader->UpdateEventByEventData();
-
+ if(fRecalculateV0ForGamma==kTRUE){
+ RecalculateV0ForGamma();
+ }
PostData(1, fOutputContainer);
PostData(2, fCFManager->GetParticleContainer()); // for CF
Int_t rBin = fHistograms->GetRBin(ePos->R());
Int_t zBin = fHistograms->GetZBin(ePos->Vz());
Int_t phiBin = fHistograms->GetPhiBin(particle->Phi());
+ Double_t rFMD=30;
TVector3 vtxPos(ePos->Vx(),ePos->Vy(),ePos->Vz());
// fHistograms->FillHistogram(nameMCMappingPhiInR, tmpPhi);
fHistograms->FillHistogram(nameMCMappingPhiInZ, vtxPos.Phi());
+
+ if(ePos->R()<rFMD){
+ TString nameMCMappingFMDPhiInZ="";
+ nameMCMappingFMDPhiInZ.Form("MC_Conversion_Mapping_FMD_Phi_in_Z_%02d",zBin);
+ fHistograms->FillHistogram(nameMCMappingFMDPhiInZ, vtxPos.Phi());
+ }
+
TString nameMCMappingRInZ="";
nameMCMappingRInZ.Form("MC_Conversion_Mapping_R_in_Z_%02d",zBin);
fHistograms->FillHistogram(nameMCMappingRInZ,ePos->R() );
TString nameMCMappingMidPtPhiInZ="";
nameMCMappingMidPtPhiInZ.Form("MC_Conversion_Mapping_MidPt_Phi_in_Z_%02d",zBin);
fHistograms->FillHistogram(nameMCMappingMidPtPhiInZ, vtxPos.Phi());
+
+
+ if(ePos->R()<rFMD){
+ TString nameMCMappingMidPtFMDPhiInZ="";
+ nameMCMappingMidPtFMDPhiInZ.Form("MC_Conversion_Mapping_MidPt_FMD_Phi_in_Z_%02d",zBin);
+ fHistograms->FillHistogram(nameMCMappingMidPtFMDPhiInZ, vtxPos.Phi());
+ }
+
TString nameMCMappingMidPtRInZ="";
nameMCMappingMidPtRInZ.Form("MC_Conversion_Mapping_MidPt_R_in_Z_%02d",zBin);
fV0Reader->GetPositiveESDTrack()->GetKinkIndex(0) > 0) {
continue;
}
-
+ if(TMath::Abs(fV0Reader->GetMotherCandidateEta())> fV0Reader->GetEtaCut()){
+ continue;
+ }
+ if(TMath::Abs(fV0Reader->GetPositiveTrackEta())> fV0Reader->GetEtaCut()){
+ continue;
+ }
+ if(TMath::Abs(fV0Reader->GetNegativeTrackEta())> fV0Reader->GetEtaCut()){
+ continue;
+ }
+ if((TMath::Abs(fV0Reader->GetZ())*fV0Reader->GetLineCutZRSlope())-fV0Reader->GetLineCutZValue() > fV0Reader->GetXYRadius() ){ // cuts out regions where we do not reconstruct
+ continue;
+ }
if(fDoMCTruth){
if(fV0Reader->HasSameMCMother() == kFALSE){
fHistograms->FillHistogram("ESD_ConvGamma_E_dEdxP",fV0Reader->GetNegativeTrackP(),fV0Reader->GetNegativeTrackTPCdEdx());
fHistograms->FillHistogram("ESD_ConvGamma_P_dEdxP",fV0Reader->GetPositiveTrackP(),fV0Reader->GetPositiveTrackTPCdEdx());
+ Double_t negPID=0;
+ Double_t posPID=0;
+ fV0Reader->GetPIDProbability(negPID,posPID);
+ fHistograms->FillHistogram("ESD_ConvGamma_E_EProbP",fV0Reader->GetNegativeTrackP(),negPID);
+ fHistograms->FillHistogram("ESD_ConvGamma_P_EProbP",fV0Reader->GetPositiveTrackP(),posPID);
+
+ Double_t negPIDmupi=0;
+ Double_t posPIDmupi=0;
+ fV0Reader->GetPIDProbabilityMuonPion(negPIDmupi,posPIDmupi);
+ fHistograms->FillHistogram("ESD_ConvGamma_E_mupiProbP",fV0Reader->GetNegativeTrackP(),negPIDmupi);
+ fHistograms->FillHistogram("ESD_ConvGamma_P_mupiProbP",fV0Reader->GetPositiveTrackP(),posPIDmupi);
+
Double_t armenterosQtAlfa[2];
fV0Reader->GetArmenterosQtAlfa(fV0Reader-> GetNegativeKFParticle(),
fV0Reader-> GetPositiveKFParticle(),
Int_t rBin = fHistograms->GetRBin(fV0Reader->GetXYRadius());
Int_t zBin = fHistograms->GetZBin(fV0Reader->GetZ());
Int_t phiBin = fHistograms->GetPhiBin(fV0Reader->GetNegativeTrackPhi());
+ Double_t rFMD=30;
+
TVector3 vtxConv(fV0Reader->GetX(),fV0Reader->GetY(), fV0Reader->GetZ());
// Double_t motherCandidateEta= fV0Reader->GetMotherCandidateEta();
// fHistograms->FillHistogram(nameESDMappingPhiInR, fV0Reader->GetMotherCandidatePhi());
fHistograms->FillHistogram(nameESDMappingPhiInZ, vtxConv.Phi());
+ if(fV0Reader->GetXYRadius()<rFMD){
+ TString nameESDMappingFMDPhiInZ="";
+ nameESDMappingFMDPhiInZ.Form("ESD_Conversion_Mapping_FMD_Phi_in_Z_%02d",zBin);
+ fHistograms->FillHistogram(nameESDMappingFMDPhiInZ, vtxConv.Phi());
+ }
+
+
TString nameESDMappingRInZ="";
nameESDMappingRInZ.Form("ESD_Conversion_Mapping_R_in_Z_%02d",zBin);
fHistograms->FillHistogram(nameESDMappingRInZ, fV0Reader->GetXYRadius());
TString nameESDMappingMidPtPhiInZ="";
nameESDMappingMidPtPhiInZ.Form("ESD_Conversion_Mapping_MidPt_Phi_in_Z_%02d",zBin);
fHistograms->FillHistogram(nameESDMappingMidPtPhiInZ, vtxConv.Phi());
+ if(fV0Reader->GetXYRadius()<rFMD){
+ TString nameESDMappingMidPtFMDPhiInZ="";
+ nameESDMappingMidPtFMDPhiInZ.Form("ESD_Conversion_Mapping_MidPt_FMD_Phi_in_Z_%02d",zBin);
+ fHistograms->FillHistogram(nameESDMappingMidPtFMDPhiInZ, vtxConv.Phi());
+ }
+
TString nameESDMappingMidPtRInZ="";
nameESDMappingMidPtRInZ.Form("ESD_Conversion_Mapping_MidPt_R_in_Z_%02d",zBin);
//resolution
Double_t mcpt = fV0Reader->GetMotherMCParticle()->Pt();
Double_t esdpt = fV0Reader->GetMotherCandidatePt();
- Double_t resdPt = 0;
+ Double_t resdPt = 0.;
if(mcpt > 0){
- resdPt = ((esdpt - mcpt)/mcpt)*100;
+ resdPt = ((esdpt - mcpt)/mcpt)*100.;
}
else if(mcpt < 0){
cout<<"Pt of MC particle is negative, this will cause wrong calculation of resPt"<<endl;
fHistograms->FillHistogram("Resolution_ESD_Pt", esdpt);
fHistograms->FillHistogram("Resolution_Gamma_dPt_Phi", fV0Reader->GetMotherCandidatePhi(), resdPt);
- Double_t resdZ = 0;
+ Double_t resdZ = 0.;
if(fV0Reader->GetNegativeMCParticle()->Vz() != 0){
- resdZ = ((fV0Reader->GetZ() -fV0Reader->GetNegativeMCParticle()->Vz())/fV0Reader->GetNegativeMCParticle()->Vz())*100;
+ resdZ = ((fV0Reader->GetZ() -fV0Reader->GetNegativeMCParticle()->Vz())/fV0Reader->GetNegativeMCParticle()->Vz())*100.;
}
- Double_t resdZAbs = 0;
+ Double_t resdZAbs = 0.;
resdZAbs = (fV0Reader->GetZ() -fV0Reader->GetNegativeMCParticle()->Vz());
fHistograms->FillHistogram("Resolution_dZAbs_VS_R", fV0Reader->GetNegativeMCParticle()->R(), resdZAbs);
// new for dPt_Pt-histograms for Electron and Positron
Double_t mcEpt = fV0Reader->GetNegativeMCParticle()->Pt();
- Double_t resEdPt = 0;
+ Double_t resEdPt = 0.;
if (mcEpt > 0){
- resEdPt = ((fV0Reader->GetNegativeTrackPt()-mcEpt)/mcEpt)*100;
+ resEdPt = ((fV0Reader->GetNegativeTrackPt()-mcEpt)/mcEpt)*100.;
}
UInt_t statusN = fV0Reader->GetNegativeESDTrack()->GetStatus();
// AliESDtrack * negTrk = fV0Reader->GetNegativeESDTrack();
Double_t mcPpt = fV0Reader->GetPositiveMCParticle()->Pt();
Double_t resPdPt = 0;
if (mcPpt > 0){
- resPdPt = ((fV0Reader->GetPositiveTrackPt()-mcPpt)/mcPpt)*100;
+ resPdPt = ((fV0Reader->GetPositiveTrackPt()-mcPpt)/mcPpt)*100.;
}
UInt_t statusP = fV0Reader->GetPositiveESDTrack()->GetStatus();
}
- Double_t resdR = 0;
+ Double_t resdR = 0.;
if(fV0Reader->GetNegativeMCParticle()->R() != 0){
- resdR = ((fV0Reader->GetXYRadius() - fV0Reader->GetNegativeMCParticle()->R())/fV0Reader->GetNegativeMCParticle()->R())*100;
+ resdR = ((fV0Reader->GetXYRadius() - fV0Reader->GetNegativeMCParticle()->R())/fV0Reader->GetNegativeMCParticle()->R())*100.;
}
- Double_t resdRAbs = 0;
+ Double_t resdRAbs = 0.;
resdRAbs = (fV0Reader->GetXYRadius() - fV0Reader->GetNegativeMCParticle()->R());
fHistograms->FillHistogram("Resolution_dRAbs_VS_R", fV0Reader->GetNegativeMCParticle()->R(), resdRAbs);
fHistograms->FillHistogram("Resolution_ESD_R", fV0Reader->GetXYRadius());
fHistograms->FillHistogram("Resolution_R_dPt", fV0Reader->GetNegativeMCParticle()->R(), resdPt);
- Double_t resdPhiAbs=0;
- resdPhiAbs=0;
+ Double_t resdPhiAbs=0.;
+ resdPhiAbs=0.;
resdPhiAbs= (fV0Reader->GetMotherCandidatePhi()-fV0Reader->GetNegativeMCParticle()->Phi());
fHistograms->FillHistogram("Resolution_dPhiAbs_VS_R", fV0Reader->GetNegativeMCParticle()->R(), resdPhiAbs);
fHistograms->FillHistogram("ESD_Mother_ZR", twoGammaCandidate->GetZ(), spaceVectorTwoGammaCandidate.Pt());
fHistograms->FillHistogram("ESD_Mother_XY", twoGammaCandidate->GetX(), twoGammaCandidate->GetY());
fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
+ if(alfa<fV0Reader->GetAlphaCutMeson()){
+ fHistograms->FillHistogram("ESD_Mother_InvMass_vs_Pt_alpha",massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
+ }
fHistograms->FillHistogram("ESD_Mother_InvMass",massTwoGammaCandidate);
+ if(fCalculateBackground){
+ AliGammaConversionBGHandler * bgHandler = fV0Reader->GetBGHandler();
+ Int_t mbin= bgHandler->GetMultiplicityBinIndex(fV0Reader->CountESDTracks());
+ fHistograms->FillHistogram(Form("%dESD_Mother_InvMass_vs_Pt",mbin),massTwoGammaCandidate ,momentumVectorTwoGammaCandidate.Pt());
+ }
// if(fDoNeutralMesonV0MCCheck){
if(fDoMCTruth){
//Kenneth: Checking the eta of the gamma to check the difference between 0.9 and 1.2
else rapidity = 0.5*(TMath::Log((backgroundCandidate->GetE() +backgroundCandidate->GetPz()) / (backgroundCandidate->GetE()-backgroundCandidate->GetPz())));
-
+ Double_t alfa=0.0;
+ if( (currentEventGoodV0.GetE()+previousGoodV0.GetE()) != 0){
+ alfa=TMath::Abs((currentEventGoodV0.GetE()-previousGoodV0.GetE())
+ /(currentEventGoodV0.GetE()+previousGoodV0.GetE()));
+ }
+
if(openingAngleBG < fMinOpeningAngleGhostCut ){
delete backgroundCandidate;
fHistograms->FillHistogram("ESD_Background_InvMass_vs_Pt",massBG,momentumVectorbackgroundCandidate.Pt());
fHistograms->FillHistogram("ESD_Background_InvMass",massBG);
+ if(alfa<fV0Reader->GetAlphaCutMeson()){
+ fHistograms->FillHistogram("ESD_Background_InvMass_vs_Pt_alpha",massBG,momentumVectorbackgroundCandidate.Pt());
+ }
if ( TMath::Abs(currentEventGoodV0.GetEta())<0.9 && TMath::Abs(previousGoodV0.GetEta())<0.9 ){
fHistograms->FillHistogram("ESD_Background_InvMass_vs_Pt_Fiducial",massBG,momentumVectorbackgroundCandidate.Pt());
fHistograms->FillHistogram("ESD_Background_InvMass_Fiducial",massBG);
fHistograms->FillHistogram("ESD_NumberOfGoodESDTracksVtx",numberOfESDTracks);
}
}
+void AliAnalysisTaskGammaConversion::RecalculateV0ForGamma(){
+
+ Double_t massE=0.00051099892;
+ TLorentzVector curElecPos;
+ TLorentzVector curElecNeg;
+ TLorentzVector curGamma;
+
+ TLorentzVector curGammaAt;
+ TLorentzVector curElecPosAt;
+ TLorentzVector curElecNegAt;
+ AliKFVertex primVtxGamma(*(fESDEvent->GetPrimaryVertex()));
+ AliKFVertex primVtxImprovedGamma = primVtxGamma;
+
+ const AliESDVertex *vtxT3D=fESDEvent->GetPrimaryVertex();
+
+ Double_t xPrimaryVertex=vtxT3D->GetXv();
+ Double_t yPrimaryVertex=vtxT3D->GetYv();
+ Double_t zPrimaryVertex=vtxT3D->GetZv();
+ Float_t primvertex[3]={xPrimaryVertex,yPrimaryVertex,zPrimaryVertex};
+
+ Float_t nsigmaTPCtrackPos;
+ Float_t nsigmaTPCtrackNeg;
+ Float_t nsigmaTPCtrackPosToPion;
+ Float_t nsigmaTPCtrackNegToPion;
+ AliKFParticle* negKF=NULL;
+ AliKFParticle* posKF=NULL;
+
+ for(Int_t iTracks = 0; iTracks < fESDEvent->GetNumberOfTracks(); iTracks++){
+ AliESDtrack* posTrack = fESDEvent->GetTrack(iTracks);
+ if(!posTrack){
+ continue;
+ }
+ if (posKF) delete posKF; posKF=NULL;
+ if(posTrack->GetSign()<0) continue;
+ if(!(posTrack->GetStatus() & AliESDtrack::kTPCrefit))continue;
+ if(posTrack->GetKinkIndex(0)>0 ) continue;
+ if(posTrack->GetNcls(1)<50)continue;
+ Double_t momPos[3];
+ // posTrack->GetConstrainedPxPyPz(momPos);
+ posTrack->GetPxPyPz(momPos);
+ AliESDtrack *ptrk=fESDEvent->GetTrack(iTracks);
+ curElecPos.SetXYZM(momPos[0],momPos[1],momPos[2],massE);
+ if(TMath::Abs(curElecPos.Eta())<0.9) continue;
+ posKF = new AliKFParticle( *(posTrack),-11);
+
+ nsigmaTPCtrackPos = fV0Reader->GetESDpid()->NumberOfSigmasTPC(posTrack,AliPID::kElectron);
+ nsigmaTPCtrackPosToPion = fV0Reader->GetESDpid()->NumberOfSigmasTPC(posTrack,AliPID::kPion);
+
+ if ( nsigmaTPCtrackPos>5.|| nsigmaTPCtrackPos<-2.){
+ continue;
+ }
+
+ if(pow((momPos[0]*momPos[0]+momPos[1]*momPos[1]+momPos[2]*momPos[2]),0.5)>0.5 && nsigmaTPCtrackPosToPion<1){
+ continue;
+ }
+
+
+
+ for(Int_t jTracks = 0; jTracks < fESDEvent->GetNumberOfTracks(); jTracks++){
+ AliESDtrack* negTrack = fESDEvent->GetTrack(jTracks);
+ if(!negTrack){
+ continue;
+ }
+ if (negKF) delete negKF; negKF=NULL;
+ if(negTrack->GetSign()>0) continue;
+ if(!(negTrack->GetStatus() & AliESDtrack::kTPCrefit))continue;
+ if(negTrack->GetKinkIndex(0)>0 ) continue;
+ if(negTrack->GetNcls(1)<50)continue;
+ Double_t momNeg[3];
+ // negTrack->GetConstrainedPxPyPz(momNeg);
+ negTrack->GetPxPyPz(momNeg);
+
+ nsigmaTPCtrackNeg = fV0Reader->GetESDpid()->NumberOfSigmasTPC(negTrack,AliPID::kElectron);
+ nsigmaTPCtrackNegToPion = fV0Reader->GetESDpid()->NumberOfSigmasTPC(negTrack,AliPID::kPion);
+ if ( nsigmaTPCtrackNeg>5. || nsigmaTPCtrackNeg<-2.){
+ continue;
+ }
+ if(pow((momNeg[0]*momNeg[0]+momNeg[1]*momNeg[1]+momNeg[2]*momNeg[2]),0.5)>0.5 && nsigmaTPCtrackNegToPion<1){
+ continue;
+ }
+ AliESDtrack *ntrk=fESDEvent->GetTrack(jTracks);
+ curElecNeg.SetXYZM(momNeg[0],momNeg[1],momNeg[2],massE);
+ if(TMath::Abs(curElecNeg.Eta())<0.9) continue;
+ negKF = new AliKFParticle( *(negTrack) ,11);
+
+ Double_t b=fESDEvent->GetMagneticField();
+ Double_t xn, xp, dca=ntrk->GetDCA(ptrk,b,xn,xp);
+ AliExternalTrackParam nt(*ntrk), pt(*ptrk);
+ nt.PropagateTo(xn,b); pt.PropagateTo(xp,b);
+
+
+ //--- Like in ITSV0Finder
+ AliExternalTrackParam ntAt0(*ntrk), ptAt0(*ptrk);
+ Double_t xxP,yyP,alphaP;
+ Double_t rP[3];
+
+ // if (!ptAt0.GetGlobalXYZat(ptAt0->GetX(),xxP,yyP,zzP)) continue;
+ if (!ptAt0.GetXYZAt(ptAt0.GetX(),b,rP)) continue;
+ xxP=rP[0];
+ yyP=rP[1];
+ alphaP = TMath::ATan2(yyP,xxP);
+
+
+ ptAt0.Propagate(alphaP,0,b);
+ Float_t ptfacP = (1.+100.*TMath::Abs(ptAt0.GetC(b)));
+
+ // Double_t distP = ptAt0.GetY();
+ Double_t normP = ptfacP*TMath::Sqrt(ptAt0.GetSigmaY2());
+ Double_t normdist0P = TMath::Abs(ptAt0.GetY()/normP);
+ Double_t normdist1P = TMath::Abs((ptAt0.GetZ()-zPrimaryVertex)/(ptfacP*TMath::Sqrt(ptAt0.GetSigmaZ2())));
+ Double_t normdistP = TMath::Sqrt(normdist0P*normdist0P+normdist1P*normdist1P);
+
+
+ Double_t xxN,yyN,alphaN;
+ Double_t rN[3];
+ // if (!ntAt0.GetGlobalXYZat(ntAt0->GetX(),xxN,yyN,zzN)) continue;
+ if (!ntAt0.GetXYZAt(ntAt0.GetX(),b,rN)) continue;
+ xxN=rN[0];
+ yyN=rN[1];
+
+ alphaN = TMath::ATan2(yyN,xxN);
+
+ ntAt0.Propagate(alphaN,0,b);
+
+ Float_t ptfacN = (1.+100.*TMath::Abs(ntAt0.GetC(b)));
+ // Double_t distN = ntAt0.GetY();
+ Double_t normN = ptfacN*TMath::Sqrt(ntAt0.GetSigmaY2());
+ Double_t normdist0N = TMath::Abs(ntAt0.GetY()/normN);
+ Double_t normdist1N = TMath::Abs((ntAt0.GetZ()-zPrimaryVertex)/(ptfacN*TMath::Sqrt(ntAt0.GetSigmaZ2())));
+ Double_t normdistN = TMath::Sqrt(normdist0N*normdist0N+normdist1N*normdist1N);
+
+ //-----------------------------
+
+ Double_t momNegAt[3];
+ nt.GetPxPyPz(momNegAt);
+ curElecNegAt.SetXYZM(momNegAt[0],momNegAt[1],momNegAt[2],massE);
+
+ Double_t momPosAt[3];
+ pt.GetPxPyPz(momPosAt);
+ curElecPosAt.SetXYZM(momPosAt[0],momPosAt[1],momPosAt[2],massE);
+ if(dca>1){
+ continue;
+ }
+
+ // Double_t dneg= negTrack->GetD(xPrimaryVertex,yPrimaryVertex,b);
+ // Double_t dpos= posTrack->GetD(xPrimaryVertex,yPrimaryVertex,b);
+ AliESDv0 vertex(nt,jTracks,pt,iTracks);
+
+
+ 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;
+ //}
+ // cout<<"vertex.GetChi2V0()"<<vertex.GetChi2V0()<<endl;
+ if(cpa<0.9)continue;
+ // if (vertex.GetChi2V0() > 30) continue;
+ // cout<<"xp+xn::"<<xp<<" "<<xn<<endl;
+ if ((xn+xp) < 0.4) continue;
+ if (TMath::Abs(ntrk->GetD(xPrimaryVertex,yPrimaryVertex,b))<0.05)
+ if (TMath::Abs(ptrk->GetD(xPrimaryVertex,yPrimaryVertex,b))<0.05) continue;
+
+ //cout<<"pass"<<endl;
+
+ AliKFParticle v0GammaC;
+ v0GammaC+=(*negKF);
+ v0GammaC+=(*posKF);
+ v0GammaC.SetMassConstraint(0,0.001);
+ primVtxImprovedGamma+=v0GammaC;
+ v0GammaC.SetProductionVertex(primVtxImprovedGamma);
+
+
+ curGamma=curElecNeg+curElecPos;
+ curGammaAt=curElecNegAt+curElecPosAt;
+
+ // invariant mass versus pt of K0short
+
+ Double_t chi2V0GammaC=100000.;
+ if( v0GammaC.GetNDF() != 0) {
+ chi2V0GammaC = v0GammaC.GetChi2()/v0GammaC.GetNDF();
+ }else{
+ cout<< "ERROR::v0K0C.GetNDF()" << endl;
+ }
+
+ if(chi2V0GammaC<200 &&chi2V0GammaC>0 ){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_RecalculateV0_InvMass",v0GammaC.GetMass());
+ fHistograms->FillHistogram("ESD_RecalculateV0_Pt",v0GammaC.GetPt());
+ fHistograms->FillHistogram("ESD_RecalculateV0_E_dEdxP",curElecNegAt.P(),negTrack->GetTPCsignal());
+ 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);
+
+ new((*fKFRecalculatedGammasTClone)[fKFRecalculatedGammasTClone->GetEntriesFast()]) AliKFParticle(v0GammaC);
+ fElectronRecalculatedv1.push_back(iTracks);
+ fElectronRecalculatedv2.push_back(jTracks);
+ }
+ }
+ }
+ }
+
+ for(Int_t firstGammaIndex=0;firstGammaIndex<fKFRecalculatedGammasTClone->GetEntriesFast();firstGammaIndex++){
+ for(Int_t secondGammaIndex=firstGammaIndex+1;secondGammaIndex<fKFRecalculatedGammasTClone->GetEntriesFast();secondGammaIndex++){
+ AliKFParticle * twoGammaDecayCandidateDaughter0 = (AliKFParticle *)fKFRecalculatedGammasTClone->At(firstGammaIndex);
+ AliKFParticle * twoGammaDecayCandidateDaughter1 = (AliKFParticle *)fKFRecalculatedGammasTClone->At(secondGammaIndex);
+
+ if(fElectronRecalculatedv1[firstGammaIndex]==fElectronRecalculatedv1[secondGammaIndex]){
+ continue;
+ }
+ if( fElectronRecalculatedv2[firstGammaIndex]==fElectronRecalculatedv2[secondGammaIndex]){
+ continue;
+ }
+
+ AliKFParticle twoGammaCandidate(*twoGammaDecayCandidateDaughter0,*twoGammaDecayCandidateDaughter1);
+ fHistograms->FillHistogram("ESD_RecalculateGG_InvMass",twoGammaCandidate.GetMass());
+ fHistograms->FillHistogram("ESD_RecalculateGG_InvMass_vs_Pt",twoGammaCandidate.GetMass(),twoGammaCandidate.GetPt());
+ }
+ }
+}
void AliAnalysisTaskGammaConversion::CalculateJetCone(Int_t gammaIndex){
// CaculateJetCone
class TNtuple;
class AliGammaConversionHistograms;
class AliESDv0;
+class AliV0;
class AliKFParticle;
+class AliKFVertex;
class AliESDInputHandler;
class AliESDEvent;
class AliAODEvent;
void ProcessGammasForNeutralMesonAnalysis();
void ProcessGammasForOmegaMesonAnalysis();
void ProcessConvPHOSGammasForNeutralMesonAnalysis();
-
+ void RecalculateV0ForGamma();
// for CF
void SetCFManager(AliCFManager * const io) {fCFManager = io;};
AliCFManager *GetCFManager() const {return fCFManager;}
void SetDoNeutralMesonV0MCCheck(Bool_t flag){fDoNeutralMesonV0MCCheck=flag;}
void SetDoJet(Bool_t flag){fDoJet=flag;}
void SetDoChic(Bool_t flag){fDoChic=flag;}
-
+ void SetRecalculateV0ForGamma(Bool_t flag){fRecalculateV0ForGamma=flag;}
+
void SetElectronMass(Double_t electronMass){fElectronMass = electronMass;}
void SetGammaMass(Double_t gammaMass){fGammaMass = gammaMass;}
void SetGammaWidth(Double_t gammaWidth){fGammaWidth = gammaWidth;}
Bool_t fDoOmegaMeson; // flag
Bool_t fDoJet; // flag
Bool_t fDoChic; // flag
+ Bool_t fRecalculateV0ForGamma;//flag
TClonesArray * fKFReconstructedGammasTClone; //! transient
TClonesArray * fKFReconstructedPi0sTClone; //! transient
+ TClonesArray * fKFRecalculatedGammasTClone; //! transient
TClonesArray * fCurrentEventPosElectronTClone; //! transient
TClonesArray * fCurrentEventNegElectronTClone; //! transient
TClonesArray * fKFReconstructedGammasCutTClone; //! transient
vector<Int_t> fGammav1; // vector containing index of gamma 1
vector<Int_t> fGammav2; // vector containing index of gamma 2
+
+ vector<Int_t> fElectronRecalculatedv1; // vector containing index of electron 1
+ vector<Int_t> fElectronRecalculatedv2; // vector containing index of electron 2
+ // AliESDpid * fESDpid; // esd pid
///////Chi_c Analysis///////////////////////////
#include "TList.h"
#include "TH1F.h"
#include "TH2F.h"
-
+#include "AliLog.h"
using namespace std;
}
}
-void AliGammaConversionHistograms::AddHistogram(TString histogramName, TString histogramTitle, Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
+void AliGammaConversionHistograms::AddHistogram(TString histogramName, TString histogramTitle, Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle, Int_t logAxis){
// see header file for documentation
if( fHistogramMap->Contains(histogramName.Data()) == kFALSE ){
TH2F *tmp = new TH2F(histogramName, histogramTitle,nXBins,firstX,lastX,nYBins,firstY,lastY);
tmp->GetYaxis()->SetTitle(yAxisTitle);
TObjString *tobjstring = new TObjString(histogramName.Data());
fHistogramMap->Add((TObject*)tobjstring,(TObject*)tmp);
+
+ if(logAxis >= 0){
+ BinLogAxis(histogramName.Data(), logAxis);
+ }
}
else{
cout << "Warning: Histogram ( "<<histogramName.Data()<<" ) already exists " << endl;
}
}
+Bool_t AliGammaConversionHistograms::BinLogAxis(const char* name, Int_t dim){
+
+ //
+ // converts the axis (defined by the dimension) of THx or THnSparse
+ // object to Log scale. Number of bins and bin min and bin max are preserved
+
+
+ TObject *o = fHistogramMap->GetValue(name);
+ TAxis *axis = 0x0;
+ if(o->InheritsFrom("TH1")){
+ axis = (dynamic_cast<TH1F*>(o))->GetXaxis();
+ }
+ if(o->InheritsFrom("TH2")){
+ if(0 == dim){
+ axis = (dynamic_cast<TH2F*>(o))->GetXaxis();
+ }
+ else if(1 == dim){
+ axis = (dynamic_cast<TH2F*>(o))->GetYaxis();
+ }
+ else{
+ // AliError("Only dim = 0 or 1 possible for TH2F");
+ }
+ }
+ // if(o->InheritsFrom("THnSparse")){
+ // axis = (dynamic_cast<THnSparse*>(o))->GetAxis(dim);
+ //}
+
+ if(!axis){
+ //AliError(Form("Axis '%d' could not be identified in the object '%s'\n", dim, name));
+ return kFALSE;
+ }
+
+ Int_t bins = axis->GetNbins();
+
+ Double_t from = axis->GetXmin();
+ if(from <= 0){
+ // AliError(Form(" Log binning not possible for object '%s'because the '%d' axis starts from '%f\n'", name, dim, from));
+ return kFALSE;
+ }
+ Double_t to = axis->GetXmax();
+ Double_t *newBins = new Double_t[bins+1];
+ newBins[0] = from;
+ Double_t factor = TMath::Power(to/from, 1./bins);
+ for(Int_t i=1; i<=bins; ++i){
+ newBins[i] = factor * newBins[i-1];
+ }
+ axis->Set(bins, newBins);
+ delete newBins;
+
+ return kTRUE;
+
+
+}
+
void AliGammaConversionHistograms::AddTable(TString tableName,TString tableTitle,Int_t nXBins,const char * axesLabel[]){
//see header file for documentation
fRBinLimits[8]=42.;
fRBinLimits[9]=55.;
fRBinLimits[10]=72.;
- fRBinLimits[11]=81.5;
+ fRBinLimits[11]=79.5; // change from 81.5 to 79.5 to have CE in 1 r bin 81.05
fRBinLimits[12]=90.;
fRBinLimits[13]=500.;
titleMCPhiInZ.Form("MC Mapping of Phi in Z%02d",z);
// AddHistogram(nameMCPhiInR, titleMCPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
AddHistogram(nameMCPhiInZ, titleMCPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+
+ //Mapping Phi in Z for FMD
+ TString nameMCFMDPhiInZ="";
+ nameMCFMDPhiInZ.Form("MC_Conversion_Mapping_FMD_Phi_in_Z_%02d",z);
+ TString titleMCFMDPhiInZ="";
+ titleMCFMDPhiInZ.Form("MC Mapping FMD of Phi in Z%02d",z);
+ // AddHistogram(nameMCPhiInR, titleMCPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
+ AddHistogram(nameMCFMDPhiInZ, titleMCFMDPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
//Mapping R in Z
// AddHistogram(nameMCPhiInR, titleMCPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
AddHistogram(nameMCMidPtPhiInZ, titleMCMidPtPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+ //Mapping Phi in Z Middle Pt for FMD
+ TString nameMCMidPtFMDPhiInZ="";
+ nameMCMidPtFMDPhiInZ.Form("MC_Conversion_Mapping_MidPt_FMD_Phi_in_Z_%02d",z);
+ TString titleMCMidPtFMDPhiInZ="";
+ titleMCMidPtFMDPhiInZ.Form("MC Mapping Middle Pt of Phi in Z%02d",z);
+ // AddHistogram(nameMCPhiInR, titleMCPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
+ AddHistogram(nameMCMidPtFMDPhiInZ, titleMCMidPtFMDPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+
+
//Mapping R in Z Middle Pt
TString nameMCMidPtRInZ="";
TString nameESDPhiInZ="";
nameESDPhiInZ.Form("ESD_Conversion_Mapping_Phi_in_Z_%02d",z);
TString titleESDPhiInZ="";
- titleESDPhiInZ.Form("ESD Mapping of Phi in R%02d",z);
+ titleESDPhiInZ.Form("ESD Mapping of Phi in Z%02d",z);
// AddHistogram(nameESDPhiInR, titleESDPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
AddHistogram(nameESDPhiInZ, titleESDPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+
+ //Mapping Phi in Z for FMD
+ TString nameESDFMDPhiInZ="";
+ nameESDFMDPhiInZ.Form("ESD_Conversion_Mapping_FMD_Phi_in_Z_%02d",z);
+ TString titleESDFMDPhiInZ="";
+ titleESDFMDPhiInZ.Form("ESD Mapping FMD of Phi in Z%02d",z);
+ // AddHistogram(nameESDPhiInR, titleESDPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
+ AddHistogram(nameESDFMDPhiInZ, titleESDFMDPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+
+
//Mapping R in Z
TString nameESDRInZ="";
nameESDRInZ.Form("ESD_Conversion_Mapping_R_in_Z_%02d",z);
// AddHistogram(nameESDPhiInR, titleESDPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
AddHistogram(nameESDMidPtPhiInZ, titleESDMidPtPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+ //Mapping Phi in Z Middle Pt for FMD
+ TString nameESDMidPtFMDPhiInZ="";
+ nameESDMidPtFMDPhiInZ.Form("ESD_Conversion_Mapping_MidPt_FMD_Phi_in_Z_%02d",z);
+ TString titleESDMidPtFMDPhiInZ="";
+ titleESDMidPtFMDPhiInZ.Form("ESD Mapping Middle Pt FMD of Phi in Z%02d",z);
+ // AddHistogram(nameESDPhiInR, titleESDPhiInR, nXBins, firstX, lastX, xAxisTitle, yAxisTitle);
+ AddHistogram(nameESDMidPtFMDPhiInZ, titleESDMidPtFMDPhiInZ, nXBins, -TMath::Pi(), TMath::Pi(), xAxisTitle, yAxisTitle);
+
+
//Mapping R in Z Middle Pt
TString nameESDMidPtRInZ="";
nameESDMidPtRInZ.Form("ESD_Conversion_Mapping_MidPt_R_in_Z_%02d",z);
/*
* Adds a TH2F histogram to the histogram map and create a key for it
*/
- void AddHistogram(TString histogramName, TString histogramTitle, Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle="", TString yAxisTitle="");
+ void AddHistogram(TString histogramName, TString histogramTitle, Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle="", TString yAxisTitle="", Int_t logAxis =-1);
+
+ /*
+ * Create a logx binning suitable for dEdx plots
+ */
+ Bool_t BinLogAxis(const char* name, Int_t dim);
+
/*
* Adds a TH1F Table to the table map and create a key for it
ClassImp(AliV0Reader)
+AliESDpid* AliV0Reader::fgESDpid = 0x0;
AliV0Reader::AliV0Reader() :
TObject(),
// fESDHandler(NULL),
fESDEvent(NULL),
fCFManager(NULL),
- fESDpid(NULL),
+ //fESDpid(NULL),
fHistograms(NULL),
fCurrentV0IndexNumber(0),
fCurrentV0(NULL),
fLineCutZValue(0.),
fChi2CutConversion(0.),
fChi2CutMeson(0.),
+ fAlphaCutMeson(1.),
fPIDProbabilityCutNegativeParticle(0),
fPIDProbabilityCutPositiveParticle(0),
fDodEdxSigmaCut(kFALSE),
fPIDnSigmaBelowElectronLine(-100),
fPIDnSigmaAbovePionLine(-100),
fPIDMinPnSigmaAbovePionLine(100),
+ fDoKaonRejectionLowP(kFALSE),
+ fDoProtonRejectionLowP(kFALSE),
+ fDoPionRejectionLowP(kFALSE),
+ fPIDnSigmaAtLowPAroundKaonLine(0),
+ fPIDnSigmaAtLowPAroundProtonLine(0),
+ fPIDnSigmaAtLowPAroundPionLine(0),
+ fPIDMinPKaonRejectionLowP(0),
+ fPIDMinPProtonRejectionLowP(0),
+ fPIDMinPPionRejectionLowP(0),
fXVertexCut(0.),
fYVertexCut(0.),
fZVertexCut(0.),
fEsdTrackCuts(NULL),
fNumberOfESDTracks(0)
{
- fESDpid = new AliESDpid;
+ //fESDpid = new AliESDpid;
}
// fESDHandler(original.fESDHandler),
fESDEvent(original.fESDEvent),
fCFManager(original.fCFManager),
- fESDpid(original.fESDpid),
+ // fESDpid(original.fESDpid),
fHistograms(original.fHistograms),
fCurrentV0IndexNumber(original.fCurrentV0IndexNumber),
fCurrentV0(original.fCurrentV0),
fLineCutZValue(original.fLineCutZValue),
fChi2CutConversion(original.fChi2CutConversion),
fChi2CutMeson(original.fChi2CutMeson),
+ fAlphaCutMeson(original.fAlphaCutMeson),
fPIDProbabilityCutNegativeParticle(original.fPIDProbabilityCutNegativeParticle),
fPIDProbabilityCutPositiveParticle(original.fPIDProbabilityCutPositiveParticle),
fDodEdxSigmaCut(original.fDodEdxSigmaCut),
fPIDnSigmaBelowElectronLine(original.fPIDnSigmaBelowElectronLine),
fPIDnSigmaAbovePionLine(original.fPIDnSigmaAbovePionLine),
fPIDMinPnSigmaAbovePionLine(original.fPIDMinPnSigmaAbovePionLine),
+ fDoKaonRejectionLowP(original.fDoKaonRejectionLowP),
+ fDoProtonRejectionLowP(original.fDoProtonRejectionLowP),
+ fDoPionRejectionLowP(original.fDoPionRejectionLowP),
+ fPIDnSigmaAtLowPAroundKaonLine(original.fPIDnSigmaAtLowPAroundKaonLine),
+ fPIDnSigmaAtLowPAroundProtonLine(original.fPIDnSigmaAtLowPAroundProtonLine),
+ fPIDnSigmaAtLowPAroundPionLine(original.fPIDnSigmaAtLowPAroundPionLine),
+ fPIDMinPKaonRejectionLowP(original.fPIDMinPKaonRejectionLowP),
+ fPIDMinPProtonRejectionLowP(original.fPIDMinPProtonRejectionLowP),
+ fPIDMinPPionRejectionLowP(original.fPIDMinPPionRejectionLowP),
fXVertexCut(original.fXVertexCut),
fYVertexCut(original.fYVertexCut),
fZVertexCut(original.fZVertexCut),
}
AliV0Reader::~AliV0Reader()
{
- if(fESDpid){
- delete fESDpid;
- }
+ // if(fESDpid){
+ // delete fESDpid;
+ //}
}
//____________________________________________________________________________
//print warning here
}
// Better parameters for MonteCarlo from A. Kalweit 2010/01/8
- fESDpid->GetTPCResponse().SetBetheBlochParameters( 2.15898e+00/50.,
- 1.75295e+01,
- 3.40030e-09,
- 1.96178e+00,
- 3.91720e+00);
+// fESDpid->GetTPCResponse().SetBetheBlochParameters( 2.15898e+00/50.,
+// 1.75295e+01,
+// 3.40030e-09,
+// 1.96178e+00,
+// 3.91720e+00);
}
else{
// Better parameters for data from A. Kalweit 2010/01/8
- fESDpid->GetTPCResponse().SetBetheBlochParameters(0.0283086,
- 2.63394e+01,
- 5.04114e-11,
- 2.12543e+00,
- 4.88663e+00);
+ // fESDpid->GetTPCResponse().SetBetheBlochParameters(0.0283086,
+// 2.63394e+01,
+// 5.04114e-11,
+// 2.12543e+00,
+// 4.88663e+00);
}
// for CF
if(fDodEdxSigmaCut == kTRUE){
- if( fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
- fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ||
- fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
- fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ){
+ if( fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
+ fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ||
+ fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
+ fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine ){
//iResult=kFALSE;
if(fHistograms != NULL ){
fHistograms->FillHistogram("ESD_CutdEdxSigmaElectronLine_InvMass",GetMotherCandidateMass());
}
if( fCurrentPositiveESDTrack->P()>fPIDMinPnSigmaAbovePionLine){
- if(fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
- fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
- fESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
+ if(fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
+ fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
+ fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
// iResult=kFALSE;
if(fHistograms != NULL){
fHistograms->FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass());
}
if( fCurrentNegativeESDTrack->P()>fPIDMinPnSigmaAbovePionLine){
- if(fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
- fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
- fESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
+ if(fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine &&
+ fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&&
+ fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){
// iResult=kFALSE;
if(fHistograms != NULL){
fHistograms->FillHistogram("ESD_CutdEdxSigmaPionLine_InvMass",GetMotherCandidateMass());
}
}
+ // Float_t fPIDMinPKaonRejectionLowP=1.5;
+ if(fDoKaonRejectionLowP == kTRUE){
+ if( fCurrentNegativeESDTrack->P()<fPIDMinPKaonRejectionLowP ){
+ if( TMath::Abs(fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutKaonRejectionLowP_InvMass",GetMotherCandidateMass());
+ // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+ // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+ //fUpdateV0AlreadyCalled = kTRUE;
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+ if( fCurrentPositiveESDTrack->P()<fPIDMinPKaonRejectionLowP ){
+ if( TMath::Abs(fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutKaonRejectionLowP_InvMass",GetMotherCandidateMass());
+ // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+ // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+ //fUpdateV0AlreadyCalled = kTRUE;
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+ }
+ // Float_t fPIDMinPProtonRejection=2;
+ if(fDoProtonRejectionLowP == kTRUE){
+ if( fCurrentNegativeESDTrack->P()<fPIDMinPProtonRejectionLowP){
+ if( TMath::Abs(fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutProtonRejectionLowP_InvMass",GetMotherCandidateMass());
+ // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+ // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+ //fUpdateV0AlreadyCalled = kTRUE;
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+ if( fCurrentPositiveESDTrack->P()<fPIDMinPProtonRejectionLowP ){
+ if( TMath::Abs(fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutProtonRejectionLowP_InvMass",GetMotherCandidateMass());
+ // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+ // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+ //fUpdateV0AlreadyCalled = kTRUE;
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+
+ }
+ // Float_t fPIDMinPPionRejection=0.3;
+ if(fDoPionRejectionLowP == kTRUE){
+ if( fCurrentNegativeESDTrack->P()<fPIDMinPPionRejectionLowP ){
+ if( TMath::Abs(fgESDpid->NumberOfSigmasTPC(fCurrentNegativeESDTrack,AliPID::kPion))<fPIDnSigmaAtLowPAroundPionLine){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutPionRejectionLowP_InvMass",GetMotherCandidateMass());
+ // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+ // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+ //fUpdateV0AlreadyCalled = kTRUE;
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+ if( fCurrentPositiveESDTrack->P()<fPIDMinPPionRejectionLowP ){
+ if( TMath::Abs(fgESDpid->NumberOfSigmasTPC(fCurrentPositiveESDTrack,AliPID::kPion))<fPIDnSigmaAtLowPAroundPionLine){
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_CutPionRejectionLowP_InvMass",GetMotherCandidateMass());
+ // to avoid filling the other cut histograms. So in this case fUpdateV0AlreadyCalled also serves as a flag for the histogram filling
+ // it will anyway be set to true at the end of the UpdateV0Information function, and there are no return until the end
+ //fUpdateV0AlreadyCalled = kTRUE;
+ }
+ fCurrentV0IndexNumber++;
+ continue;
+ }
+ }
+ }
+
//checks if we have a prim vertex
if(fESDEvent->GetPrimaryVertex()->GetNContributors()<=0) {
Double_t convpos[2];
convpos[0]=0;
convpos[1]=0;
+
GetConvPosXY(GetPositiveESDTrack(),GetNegativeESDTrack(),GetMagneticField(),convpos);
fCurrentXValue = convpos[0];
fCurrentYValue = convpos[1];
Bool_t iResult=kFALSE;
- Double_t *posProbArray = new Double_t[10];
- Double_t *negProbArray = new Double_t[10];
- AliESDtrack* negTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
- AliESDtrack* posTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
-
+ // Double_t *posProbArray = new Double_t[10];
+ // Double_t *negProbArray = new Double_t[10];
+ //-AM The TPCpid method expects an array of length kSPECIES that is 5 not 10
+
+ Double_t *posProbArray = new Double_t[AliPID::kSPECIES];
+ Double_t *negProbArray = new Double_t[AliPID::kSPECIES];
+
+ AliESDtrack* negTrack = GetNegativeESDTrack();
+ AliESDtrack* posTrack = GetPositiveESDTrack();
+ //fESDEvent->GetTrack(fCurrentV0->GetNindex());
+ //fESDEvent->GetTrack(fCurrentV0->GetPindex());
+ //-AM for switchtracks==true the above is a bug
+
negTrack->GetTPCpid(negProbArray);
posTrack->GetTPCpid(posProbArray);
void AliV0Reader::GetPIDProbability(Double_t &negPIDProb,Double_t & posPIDProb){
// see header file for documentation
- Double_t *posProbArray = new Double_t[10];
- Double_t *negProbArray = new Double_t[10];
- AliESDtrack* negTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
- AliESDtrack* posTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
-
+ //Double_t *posProbArray = new Double_t[10];
+ // Double_t *negProbArray = new Double_t[10];
+ //-AM The TPCpid method expects an array of length kSPECIES that is 5 not 10
+ Double_t *posProbArray = new Double_t[AliPID::kSPECIES];
+ Double_t *negProbArray = new Double_t[AliPID::kSPECIES];
+
+// AliESDtrack* negTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
+// AliESDtrack* posTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
+ //-AM for switchtracks the above is a bug
+ AliESDtrack* negTrack = GetNegativeESDTrack();
+ AliESDtrack* posTrack = GetPositiveESDTrack();
+
+
negTrack->GetTPCpid(negProbArray);
posTrack->GetTPCpid(posProbArray);
delete [] posProbArray;
delete [] negProbArray;
}
+void AliV0Reader::GetPIDProbabilityMuonPion(Double_t &negPIDProb,Double_t & posPIDProb){
+ // see header file for documentation
+
+
+ Double_t *posProbArray = new Double_t[AliPID::kSPECIES];
+ Double_t *negProbArray = new Double_t[AliPID::kSPECIES];
+
+ // AliESDtrack* negTrack = fESDEvent->GetTrack(fCurrentV0->GetNindex());
+ // AliESDtrack* posTrack = fESDEvent->GetTrack(fCurrentV0->GetPindex());
+ //-AM for switchtracks the above is a bug
+
+ AliESDtrack* negTrack = GetNegativeESDTrack();
+ AliESDtrack* posTrack = GetPositiveESDTrack();
+
+ negTrack->GetTPCpid(negProbArray);
+ posTrack->GetTPCpid(posProbArray);
+
+ // if(negProbArray!=NULL && posProbArray!=NULL){ // this is not allowed anymore for some reason(RC19)
+ if(negProbArray && posProbArray){
+ negPIDProb = negProbArray[1]+negProbArray[2];
+ posPIDProb = posProbArray[1]+posProbArray[2];
+ }
+ delete [] posProbArray;
+ delete [] negProbArray;
+}
void AliV0Reader::UpdateEventByEventData(){
//see header file for documentation
#include <vector>
#include "AliCFManager.h"
#include "AliGammaConversionBGHandler.h"
+#include "AliESDpid.h"
class TClonesArray;
class TFormula;
class TChain;
class AliCFManager; // for CF
class AliCFContainer; // for CF
-class AliESDpid; // for dEdx cut based on nSigma to particle lines
+//class AliESDpid; // for dEdx cut based on nSigma to particle lines
class AliESDtrackCuts;
class AliV0Reader : public TObject {
/*
* Returns the negative ESD track which belongs to fCurrentV0
*/
- AliESDtrack* GetNegativeESDTrack(){return fESDEvent->GetTrack(fCurrentV0->GetNindex());}
+ // AliESDtrack* GetNegativeESDTrack(){return fESDEvent->GetTrack(fCurrentV0->GetNindex());}
+ AliESDtrack* GetNegativeESDTrack(){return fCurrentNegativeESDTrack;}
/*
* Returns the positive ESD track which belongs to fCurrentV0
*/
- AliESDtrack* GetPositiveESDTrack(){return fESDEvent->GetTrack(fCurrentV0->GetPindex());}
+ // AliESDtrack* GetPositiveESDTrack(){return fESDEvent->GetTrack(fCurrentV0->GetPindex());}
+ AliESDtrack* GetPositiveESDTrack(){return fCurrentPositiveESDTrack;}
/*
* Returns the negative KF particle which belongs to fCurrentV0
* Checks if the PID of the two particles are within our cuts.
*/
void GetPIDProbability(Double_t &negPIDProb, Double_t &posPIDProb);
+
+ /*
+ * Checks if the PID of the two particles are within our cuts.
+ */
+ void GetPIDProbabilityMuonPion(Double_t &negPIDProb, Double_t &posPIDProb);
/*
*Get the negative MC TParticle from the stack
*/
Double_t GetChi2CutMeson() const{return fChi2CutMeson;}
+ /*
+ * Gets the alpha cut value for the mesons.
+ */
+ Double_t GetAlphaCutMeson() const{return fAlphaCutMeson;}
+
+
Double_t GetPositiveTrackLength() const{return fCurrentPositiveESDTrack->GetIntegratedLength();}
Double_t GetNegativeTrackLength() const{return fCurrentNegativeESDTrack->GetIntegratedLength();}
*/
void SetChi2CutMeson(Double_t chi2){fChi2CutMeson=chi2;}
+ /*
+ * Sets the AlphaCut for the mesons.
+ */
+ void SetAlphaCutMeson(Double_t alpha){fAlphaCutMeson=alpha;}
+
+
/*
* Sets the XVertexCut value.
*/
void SetDodEdxSigmaCut( Bool_t dodEdxSigmaCut){fDodEdxSigmaCut=dodEdxSigmaCut;}
+ /*
+ * Sets the flag to enable/disable the cut dedx N sigma for Kaon Rejection at low p
+ */
+ void SetDoKaonRejectionLowP( Bool_t doKaonRejectionLowP){fDoKaonRejectionLowP=doKaonRejectionLowP;}
+ /*
+ * Sets the flag to enable/disable the cut dedx N sigma for Proton Rejection at low p
+ */
+ void SetDoProtonRejectionLowP( Bool_t doProtonRejectionLowP){fDoProtonRejectionLowP=doProtonRejectionLowP;}
+
+ /*
+ * Sets the flag to enable/disable the cut dedx N sigma for Pion Rejection at low p
+ */
+ void SetDoPionRejectionLowP( Bool_t doPionRejectionLowP){fDoPionRejectionLowP=doPionRejectionLowP;}
+
+ /*
+ * Sets the PIDMinPnSigmaAroundKaon cut value for the tracks.
+ */
+ void SetPIDnSigmaAtLowPAroundKaonLine(Double_t nSigmaAtLowPAroundKaon){fPIDnSigmaAtLowPAroundKaonLine =nSigmaAtLowPAroundKaon;}
+
+ /*
+ * Sets the PIDMinPnSigmaAroundProton cut value for the tracks.
+ */
+ void SetPIDnSigmaAtLowPAroundProtonLine(Double_t nSigmaAtLowPAroundProton){fPIDnSigmaAtLowPAroundProtonLine =nSigmaAtLowPAroundProton;}
+
+ /*
+ * Sets the PIDMinPnSigmaAroundPion cut value for the tracks.
+ */
+ void SetPIDnSigmaAtLowPAroundPionLine(Double_t nSigmaAtLowPAroundPion){fPIDnSigmaAtLowPAroundPionLine =nSigmaAtLowPAroundPion;}
+
+ /*
+ * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
+ */
+ void SetPIDMinPKaonRejectionLowP(Double_t PIDMinPKaonRejectionLowP ){fPIDMinPKaonRejectionLowP=PIDMinPKaonRejectionLowP;}
+
+ /*
+ * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
+ */
+ void SetPIDMinPProtonRejectionLowP(Double_t PIDMinPProtonRejectionLowP ){fPIDMinPProtonRejectionLowP=PIDMinPProtonRejectionLowP;}
+ /*
+ * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
+ */
+ void SetPIDMinPPionRejectionLowP(Double_t PIDMinPPionRejectionLowP ){fPIDMinPPionRejectionLowP=PIDMinPPionRejectionLowP;}
/*
* Updates the V0 information of the current V0.
Bool_t CheckIfPi0IsMother(Int_t label);
+ static void InitESDpid(Int_t type=0);
+ static void SetESDpid(AliESDpid * const pid) {fgESDpid=pid;}
+ static AliESDpid* GetESDpid() {return fgESDpid;}
+
+
+
private:
AliStack * fMCStack; // pointer to MonteCarlo particle stack
// AliMCEventHandler* fMCTruth; // for CF pointer to the MC object
// AliCFContainer *container;
// for dEdx cut based on nSigma to a particle line
- AliESDpid * fESDpid; // esd pid
+ //AliESDpid * fESDpid; // esd pid
AliGammaConversionHistograms *fHistograms; // pointer to histogram handling class
Double_t fLineCutZValue; //linecut
Double_t fChi2CutConversion; //chi2cut
Double_t fChi2CutMeson; //chi2cut
+ Double_t fAlphaCutMeson; //alphacut
Double_t fPIDProbabilityCutNegativeParticle; //pid cut
Double_t fPIDProbabilityCutPositiveParticle; //pid cut
Bool_t fDodEdxSigmaCut; // flag to use the dEdxCut based on sigmas
Double_t fPIDnSigmaBelowElectronLine; // sigma cut
Double_t fPIDnSigmaAbovePionLine; // sigma cut
Double_t fPIDMinPnSigmaAbovePionLine; // sigma cut
+ Double_t fDoKaonRejectionLowP; // Kaon rejection at low p
+ Double_t fDoProtonRejectionLowP; // Proton rejection at low p
+ Double_t fDoPionRejectionLowP; // Pion rejection at low p
+ Double_t fPIDnSigmaAtLowPAroundKaonLine; // sigma cut
+ Double_t fPIDnSigmaAtLowPAroundProtonLine; // sigma cut
+ Double_t fPIDnSigmaAtLowPAroundPionLine; // sigma cut
+ Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection
+ Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection
+ Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection
+
Double_t fXVertexCut; //vertex cut
Double_t fYVertexCut; //vertex cut
Double_t fZVertexCut; // vertexcut
AliESDtrackCuts *fEsdTrackCuts; // track cuts
Int_t fNumberOfESDTracks; //track counter
+ static AliESDpid* fgESDpid; // ESD pid object
+
ClassDef(AliV0Reader,10)
};
+
+inline void AliV0Reader::InitESDpid(Int_t type)
+{
+ //
+ // initialize PID parameters
+ // type=0 is simulation
+ // type=1 is data
+
+ if (!fgESDpid) fgESDpid=new AliESDpid;
+ Double_t alephParameters[5];
+ // simulation
+ alephParameters[0] = 2.15898e+00/50.;
+ alephParameters[1] = 1.75295e+01;
+ alephParameters[2] = 3.40030e-09;
+ alephParameters[3] = 1.96178e+00;
+ alephParameters[4] = 3.91720e+00;
+ fgESDpid->GetTOFResponse().SetTimeResolution(80.);
+
+ // data
+ if (type==1){
+ alephParameters[0] = 0.0283086;
+ alephParameters[1] = 2.63394e+01;
+ alephParameters[2] = 5.04114e-11;
+ alephParameters[3] = 2.12543e+00;
+ alephParameters[4] = 4.88663e+00;
+ fgESDpid->GetTOFResponse().SetTimeResolution(130.);
+ fgESDpid->GetTPCResponse().SetMip(47.9);
+ }
+
+ fgESDpid->GetTPCResponse().SetBetheBlochParameters(
+ alephParameters[0],alephParameters[1],alephParameters[2],
+ alephParameters[3],alephParameters[4]);
+
+ fgESDpid->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);
+
+}
+
#endif
+
+
#-*- Mode: Makefile -*-
-SRCS = GammaConv/AliV0Reader.cxx GammaConv/AliAnalysisTaskGammaConversion.cxx GammaConv/AliGammaConversionHistograms.cxx GammaConv/AliGammaConversionAODObject.cxx GammaConv/AliGammaConversionBGHandler.cxx
+SRCS = GammaConv/AliAnalysisTaskGammaConversion.cxx GammaConv/AliV0Reader.cxx GammaConv/AliGammaConversionHistograms.cxx GammaConv/AliGammaConversionAODObject.cxx GammaConv/AliGammaConversionBGHandler.cxx
HDRS:= $(SRCS:.cxx=.h)
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-const int c_array_size = 10;
+const int c_array_size = 12;
class AliAnalysisDataContainer;
class AliGammaConversionHistograms;
Bool_t kGCdoNeutralMesonV0MCCheck =kFALSE;
Bool_t kGCrunOmegaMeson = kFALSE;
Bool_t kGCrunRES = kFALSE;
-
+Bool_t kGCRecalculateV0ForGamma = kFALSE;
/** ---------------------------------- define cuts here ------------------------------------*/
-TString kGCAnalysisCutSelectionId="9010111000"; // do not cheange here, use -set-cut-selection in argument instead
+TString kGCAnalysisCutSelectionId="900011100010"; // do not cheange here, use -set-cut-selection in argument instead
Int_t kGCpidOfNegativeTrack=11;
Int_t kGCpidOfPositiveTrack=-11;
Double_t kGCminClsTPCCut= 0.;
Double_t kGCchi2CutConversion = 30.;
Double_t kGCchi2CutMeson = 50.;
+Double_t kGCalphaCutMeson = 0.7;
Double_t kGCLineCutZRSlope = tan(2*atan(exp(-kGCetaCut)));
Double_t kGCLineCutZValue = 7.;
Bool_t kGCplotESDConvGammaPAsymmetryP = kTRUE;
Bool_t kGCplotESDConvGammaEdEdxP = kTRUE;
Bool_t kGCplotESDConvGammaPdEdxP = kTRUE;
+Bool_t kGCplotESDConvGammaEeProbP = kTRUE;
+Bool_t kGCplotESDConvGammaPeProbP = kTRUE;
+Bool_t kGCplotESDConvGammaEmupiProbP = kTRUE;
+Bool_t kGCplotESDConvGammaPmupiProbP = kTRUE;
+
Bool_t kGCplotESDConvGammaQtAlfa = kTRUE;
Bool_t kGCplotESDCutPIDProb = kTRUE;
Bool_t kGCplotESDCutdedxSigmaElectronLine=kTRUE;
Bool_t kGCplotESDCutdedxSigmaPionLine=kTRUE;
+Bool_t kGCplotESDCutPionRejectionLowP =kTRUE;
+Bool_t kGCplotESDCutProtonRejectionLowP=kTRUE;
+Bool_t kGCplotESDCutKaonRejectionLowP =kTRUE;
Bool_t kGCplotESDCutR = kTRUE;
Bool_t kGCplotESDCutLine = kTRUE;
Bool_t kGCplotESDCutZ = kTRUE;
Bool_t kGCplotESDCutChi2 = kTRUE;
Bool_t kGCplotESDCutEta = kTRUE;
Bool_t kGCplotESDCutPt = kTRUE;
+Bool_t kGCplotESDCutSinglePt = kTRUE;
Bool_t kGCplotESDTrueConvGammaTrackLength =kFALSE;
Bool_t kGCplotESDTrueConvGammaTrackLengthVSInvMass =kFALSE;
//P-plots
Int_t kGCnXBinsP = 200;
-Double_t kGCfirstXBinP = 0.;
+Double_t kGCfirstXBinP = 0.05;
Double_t kGClastXBinP = 50.;
//dEdx-plots
Double_t kGCfirstYBindEdx = 0.;
Double_t kGClastYBindEdx = 200.;
+//EProb-plots
+Int_t kGCnYBinsEProb = 200;
+Double_t kGCfirstYBinEProb = 0.;
+Double_t kGClastYBinEProb = 1.;
+
//Qt-plots
Int_t kGCnYBinsQt = 250;
Double_t kGCfirstYBinQt = 0.;
//ResolutionPlots
//RESdPt
-Int_t kGCnXBinsResdPt=1000;
+Int_t kGCnXBinsResdPt=500;
Int_t kGCfirstXBinResdPt= 0;
Int_t kGClastXBinResdPt=100;
-Int_t kGCnYBinsResdPt=500;
+Int_t kGCnYBinsResdPt=200;
Int_t kGCfirstYBinResdPt= -10;
Int_t kGClastYBinResdPt=10;
//RESdR
-Int_t kGCnXBinsResdR=500;
+Int_t kGCnXBinsResdR=400;
Int_t kGCfirstXBinResdR= 0;
-Int_t kGClastXBinResdR=250;
+Int_t kGClastXBinResdR=200;
Int_t kGCnYBinsResdR=100;
Int_t kGCfirstYBinResdR= -25;
Int_t kGClastYBinResdR=25;
Int_t kGCnXBinsPi0Mass = 1000;
Double_t kGCfirstXBinPi0Mass = 0.;
Double_t kGClastXBinPi0Mass = 1.;
-Double_t kGCfirstXBinPi0Alpha = -1.;
+Double_t kGCfirstXBinPi0Alpha = 0.;
Double_t kGClastXBinPi0Alpha = 1.;
Double_t kGCfirstYBinSpectra = 0.;
Double_t kGClastYBinSpectra = 25.;
-Double_t kGCfirstXBinAlpha = -1.;
+Double_t kGCfirstXBinAlphaG = -1.;
+Double_t kGCfirstXBinAlpha = 0.;
Double_t kGClastXBinAlpha = 1.;
//track length plots
/**------------------------------Flag to apply dEdx cut base on sigmas to electron line----------*/
Bool_t kGCdodEdxSigmaCut= kTRUE;
/**------------------------------end Flag to apply NsigmadEdx cut ----------*/
+
Double_t kGCPIDnSigmaAboveElectronLine=5;
Double_t kGCPIDnSigmaBelowElectronLine=-3;
Double_t kGCPIDnSigmaAbovePionLine=0;
Double_t kGCPIDMinPnSigmaAbovePionLine=1;
-
+/**------- Flag to apply rejection at LowP of Kaons, protons , pions------------*/
+Bool_t kGCdoPionRejectionLowP=kTRUE;
+Bool_t kGCdoKaonRejectionLowP=kTRUE;
+Bool_t kGCdoProtonRejectionLowP=kTRUE;
+/**---------------------------------------*/
+
+Double_t kGCPIDnSigmaAtLowPAroundKaonLine=0;
+Double_t kGCPIDnSigmaAtLowPAroundProtonLine=0;
+Double_t kGCPIDnSigmaAtLowPAroundPionLine=0;
+
+Double_t kGCPIDMinPKaonRejectionLowP=1.5;
+Double_t kGCPIDMinPProtonRejectionLowP=2.;
+Double_t kGCPIDMinPPionRejectionLowP=0.5;
Bool_t scanArguments(TString arguments){
cout<<"Running Resolution"<<endl;
kGCrunRES = kTRUE;
}
+ else if (argument.CompareTo("-run-recalculateV0") == 0){
+ cout<<"Running RecalculateV0ForGamma"<<endl;
+ kGCRecalculateV0ForGamma=kTRUE;
+ }
else if (argument.CompareTo("-jet-off") == 0){
cout<<"Skipping jet analysis"<<endl;
kGCrunJet = kFALSE;
AliCFManager *man = new AliCFManager();
man->SetParticleContainer(container);
- for(int i = 0;i<nstep;i++){
- TObjArray *tmp = new TObjArray(0);
- man->SetParticleCutsList(i,tmp) ;
- }
+
// end ---------------------------------------------------------------------------
cout<<"Analyis cut selection ID is: "<<kGCAnalysisCutSelectionId.Data()<<endl;
// outputfile += Form(":PWG4_GammaConversion_%s",kGCAnalysisCutSelectionId.Data());
outputfile += Form(":PWG4_GammaConversion");
- /*
- // this is not really needed
- if(kGCrunNeutralMeson==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCrunJet==kTRUE) outputfile +="1"; else outputfile +="0";
+// if(kGCrunNeutralMeson==kTRUE) outputfile +="1"; else outputfile +="0";
+
+// if(kGCrunJet==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCrunChic==kTRUE) outputfile +="1"; else outputfile +="0";
+// if(kGCrunChic==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCrunCF==kTRUE) outputfile +="1"; else outputfile +="0";
+// if(kGCrunCF==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCcalculateBackground==kTRUE) outputfile +="1"; else outputfile +="0";
+// if(kGCcalculateBackground==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCdoNeutralMesonV0MCCheck==kTRUE) outputfile +="1"; else outputfile +="0";
+// if(kGCdoNeutralMesonV0MCCheck==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCrunOmegaMeson==kTRUE) outputfile +="1"; else outputfile +="0";
+// if(kGCrunOmegaMeson==kTRUE) outputfile +="1"; else outputfile +="0";
+
+// if(kGCrunRES==kTRUE) outputfile +="1"; else outputfile +="0";
- if(kGCrunRES==kTRUE) outputfile +="1"; else outputfile +="0";
- */
outputfile += Form("_%s",kGCAnalysisCutSelectionId.Data());
cout<<"Ouput file::"<< outputfile <<endl;
v0Reader->SetMinClsTPCCut(kGCminClsTPCCut);
v0Reader->SetChi2CutConversion(kGCchi2CutConversion);
v0Reader->SetChi2CutMeson(kGCchi2CutMeson);
+ v0Reader->SetAlphaCutMeson(kGCalphaCutMeson);
v0Reader->SetPIDProbability(kGCprobElectron);
v0Reader->SetXVertexCut(kGCxVertexCut);
v0Reader->SetYVertexCut(kGCyVertexCut);
v0Reader->SetOnFlyFlag(kGCUseOnFlyV0Finder);
v0Reader->SetCalculateBackground(kGCcalculateBackground);
+ // for the rejection at LowP based on Dedx signal
+
+ v0Reader->SetDoKaonRejectionLowP(kGCdoKaonRejectionLowP);
+ v0Reader->SetDoProtonRejectionLowP(kGCdoProtonRejectionLowP);
+ v0Reader->SetDoPionRejectionLowP(kGCdoPionRejectionLowP);
+ v0Reader->SetPIDnSigmaAtLowPAroundKaonLine(kGCPIDnSigmaAtLowPAroundKaonLine);
+ v0Reader->SetPIDnSigmaAtLowPAroundProtonLine(kGCPIDnSigmaAtLowPAroundProtonLine);
+ v0Reader->SetPIDnSigmaAtLowPAroundPionLine(kGCPIDnSigmaAtLowPAroundPionLine);
+ v0Reader->SetPIDMinPKaonRejectionLowP(kGCPIDMinPKaonRejectionLowP);
+ v0Reader->SetPIDMinPProtonRejectionLowP(kGCPIDMinPProtonRejectionLowP);
+ v0Reader->SetPIDMinPPionRejectionLowP(kGCPIDMinPPionRejectionLowP);
+
// Create the GammaConversionTask
gammaconversion->SetDoJet(kGCrunJet);
gammaconversion->SetDoChic(kGCrunChic);
gammaconversion->SetDoOmegaMeson(kGCrunOmegaMeson);
-
+ gammaconversion->SetRecalculateV0ForGamma(kGCRecalculateV0ForGamma);
// for CF
gammaconversion->SetCFManager(man);
gammaconversion->SetDoCF(kGCrunCF);
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");
////
////
////
cout<<"compiling CORRFW"<<endl;
setupPar("CORRFW");
- gSystem->Load("CORRFW.so");
+ gSystem->Load("libCORRFW.so");
////
//Setting up PWG4GammaConv.par//
if(kGCplotESDConvGammaLikelihoodAP == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_LikelihoodAP" ,"" , kGCnXBinsLikelihoodAP, kGCfirstXBinLikelihoodAP, kGClastXBinLikelihoodAP, "", "");}
if(kGCplotESDConvGammaEAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
if(kGCplotESDConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
- if(kGCplotESDConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "");}
- if(kGCplotESDConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "");}
+ if(kGCplotESDConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
+ if(kGCplotESDConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
+
+ if(kGCplotESDConvGammaEeProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_EProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
+ if(kGCplotESDConvGammaPeProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_EProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
+ if(kGCplotESDConvGammaEmupiProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_mupiProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
+ if(kGCplotESDConvGammaPmupiProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_mupiProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
- if(kGCplotESDConvGammaQtAlfa== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlpha, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
+ if(kGCplotESDConvGammaQtAlfa== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
if(kGCplotESDTrueConvGammaLikelihoodAP == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_LikelihoodAP" ,"" , kGCnXBinsLikelihoodAP, kGCfirstXBinLikelihoodAP, kGClastXBinLikelihoodAP, "", "");}
if(kGCplotESDTrueConvGammaEAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_E_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
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,"", "");}
- if(kGCplotESDTrueConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "");}
+ 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(kGCplotESDTrueConvGammaMCPtEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_MC_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
if(kGCplotESDNoCutConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
- if(kGCplotESDNoCutConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "");}
- if(kGCplotESDNoCutConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "");}
+ if(kGCplotESDNoCutConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
+ if(kGCplotESDNoCutConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
if(kGCplotESDNoCutConvGammaMCPtEta == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_MC_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
if(kGCplotESDNoCutConversionMCZR == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_MC_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
histograms->AddHistogram("Resolution_E_dPt_Pt_ITS5" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
histograms->AddHistogram("Resolution_E_dPt_Pt_ITS6" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
histograms->AddHistogram("Resolution_E_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
- histograms->AddHistogram("Resolution_E_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");
- histograms->AddHistogram("Resolution_E_nTRDtracklets_MCPt","" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");
- histograms->AddHistogram("Resolution_E_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5, -0.5, 201,"", "");
- histograms->AddHistogram("Resolution_E_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5, -0.5, 201.,"", "");
+ histograms->AddHistogram("Resolution_E_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");
+ histograms->AddHistogram("Resolution_E_nTRDtracklets_MCPt","" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");
+ histograms->AddHistogram("Resolution_E_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201, -0.5, 200.5,"", "");
+ histograms->AddHistogram("Resolution_E_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201, -0.5, 200.5,"", "");
// histograms->AddHistogram("Resolution_E_TRDsignal_ESDPt","", fV0Reader->GetNegativeTrackPt(), fV0Reader->GetNegativeESDTrack()->GetTRDsignal());
// :::::::::::::::::::::::::::::::::::::::: histograms for positrons :::::::::::::::::::::::::::::::::::::::::::::::::::
histograms->AddHistogram("Resolution_P_dPt_Pt_ITS5" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
histograms->AddHistogram("Resolution_P_dPt_Pt_ITS6" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
histograms->AddHistogram("Resolution_P_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
- histograms->AddHistogram("Resolution_P_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");
- histograms->AddHistogram("Resolution_P_nTRDtracklets_MCPt","", kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");
- histograms->AddHistogram("Resolution_P_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5, -0.5, 201.,"", "");
- histograms->AddHistogram("Resolution_P_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5,-0.5, 201.0,"", "");
+ histograms->AddHistogram("Resolution_P_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");
+ histograms->AddHistogram("Resolution_P_nTRDtracklets_MCPt","", kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");
+ histograms->AddHistogram("Resolution_P_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201, -0.5, 200.5,"", "");
+ histograms->AddHistogram("Resolution_P_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201,-0.5, 200.5,"", "");
// histograms->AddHistogram("Resolution_P_TRDsignal_ESDPt", "",fV0Reader->GetPositiveTrackPt(), fV0Reader->GetPositiveESDTrack()->GetTRDsignal());
} //end of specific trigger study resolution plots
} //end if(kGCrunRES=true)
if(kGCplotESDCutdedxSigmaElectronLine == kTRUE){histograms->AddHistogram("ESD_CutdEdxSigmaElectronLine_InvMass" ,"dedx ElectronLine" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
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(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,"","");}
if(kGCplotESDCutChi2 == kTRUE){histograms->AddHistogram("ESD_CutChi2_InvMass" ,"#chi^{2} > Max" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutEta == kTRUE){histograms->AddHistogram("ESD_CutEta_InvMass" ,"Above #eta max" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
+ if(kGCplotESDCutSinglePt == kTRUE){histograms->AddHistogram("ESD_CutSinglePt_InvMass" ,"Below p_{t} min" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutPt == kTRUE){histograms->AddHistogram("ESD_CutPt_InvMass" ,"Below p_{t} min" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutLine == kTRUE){histograms->AddHistogram("ESD_CutLine_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDCutZ == kTRUE){histograms->AddHistogram("ESD_CutZ_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDAllV0s == kTRUE){histograms->AddHistogram("ESD_AllV0s_InvMass" ,"All V0s" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
if(kGCplotESDAllV0sCurrentFinder == kTRUE){histograms->AddHistogram("ESD_AllV0sCurrentFinder_InvMass" ,"All V0s Current Finder" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
- if(kGCplotESDAllV0sCurrentFinderQtAlfa== kTRUE){ histograms->AddHistogram("ESD_AllV0sCurrentFinder_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlpha, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
+ if(kGCplotESDAllV0sCurrentFinderQtAlfa== kTRUE){ histograms->AddHistogram("ESD_AllV0sCurrentFinder_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
if(kGCplotESDTrueConvGammaTrackLength == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLength","Track length of TrueConvGamma",kGCnXBinsTrackLength,kGCfirstXBinTrackLength,kGClastXBinTrackLength,"","");}
if(kGCplotESDTrueConvGammaTrackLengthVSInvMass == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLengthVSInvMass","Track length of TrueConvGamma vs Inv mass",kGCnXBinsTrackLength,kGCfirstXBinTrackLength,kGClastXBinTrackLength,kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,"","");}
}
if(kGCplotPi0Spectra == kTRUE){
- histograms->AddHistogram("ESD_Mother_alfa","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alfa","Counts");
+ histograms->AddHistogram("ESD_Mother_alfa","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alpha","Counts");
histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_alpha" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
histograms->AddHistogram("ESD_Mother_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
histograms->AddHistogram("ESD_Mother_InvMass_1212","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
histograms->AddHistogram("ESD_Mother_InvMass_0912","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
}
if(kGCplotPi0Spectra == kTRUE && kGCcalculateBackground == kTRUE){
+ for(Int_t m=0;m<4;m++){
+ histograms->AddHistogram(Form("%dESD_Mother_InvMass_vs_Pt",m) ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+ }
for(Int_t z=0;z<8;z++){
for(Int_t m=0;m<4;m++){
histograms->AddHistogram(Form("%d%dESD_Background_InvMass_vs_Pt",z,m) ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
}
histograms->AddHistogram("ESD_Background_InvMass_vs_Pt" ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
- histograms->AddHistogram("ESD_Background_InvMass","Invariant mass background",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
+ histograms->AddHistogram("ESD_Background_InvMass_vs_Pt_alpha" ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+
+
+ histograms->AddHistogram("ESD_Background_InvMass","Invariant mass background",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
histograms->AddHistogram("ESD_Background_InvMass_vs_Pt_Fiducial" ,"Background Invariant Mass vs Pt |eta|<0.9" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
histograms->AddHistogram("ESD_Background_InvMass_Fiducial","Invariant mass background |eta|<0.9",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
histograms->AddHistogram("ESD_multiplicity_distribution" ,"multiplicity distribution" , 200, 0, 200,"counts","Multiplicity");
histograms->AddHistogram("ESD_ZvsMultiplicity" ,"Z vs Multiplicity" , 1000, -10, 10,200,0,200,"Z[cm]","Multiplicity");
}
+
+ if(kGCRecalculateV0ForGamma==kTRUE){
+ histograms->AddHistogram("ESD_RecalculateV0_InvMass","", kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");
+ histograms->AddHistogram("ESD_RecalculateV0_Pt","",kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
+ histograms->AddHistogram("ESD_RecalculateV0_E_dEdxP","",kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);
+ histograms->AddHistogram("ESD_RecalculateV0_P_dEdxP","",kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);
+ histograms->AddHistogram("ESD_RecalculateV0_cpa","",1000,-1.,1.,"","");
+ histograms->AddHistogram("ESD_RecalculateV0_dca","",100,0.,10.,"","");
+ histograms->AddHistogram("ESD_RecalculateV0_Rr","",250,0.,250.,"","");
+ histograms->AddHistogram("ESD_RecalculateV0_normdistP","",250,0.,250.,"","");
+ histograms->AddHistogram("ESD_RecalculateV0_normdistN","",250,0.,250.,"","");
+
+ histograms->AddHistogram("ESD_RecalculateGG_InvMass","",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
+ histograms->AddHistogram("ESD_RecalculateGG_InvMass_vs_Pt","", kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
+
+ }
+
+
}
// 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()!=10){
+ if(analysisCutSelection.Length()!=12){
cout<<"Cut selection has the wrong length!"<<endl;
return 0;
}
Int_t singlePtCut=array[7];
Int_t clsTPCCut=array[8];
Int_t etaCut=array[9];
+ Int_t chi2MesonCut=array[10];
+ Int_t LowPRejectionSigmaCut=array[11];
-
-
+ cout<<"LowPRejectionSigmaCut"<<LowPRejectionSigmaCut<<endl;
+ cout<<"chi2MesonCut: "<< chi2MesonCut<<endl;
cout<<"etaCut: "<<etaCut<<endl;
cout<<"clsTPCCut: "<<clsTPCCut<<endl;
cout<<"singlePtCut: "<<singlePtCut<<endl;
default:
return iResult;
}
+
switch(eProbCut){
- case 0: // 0.
- kGCprobElectron = 0.000;
+ case 0:
+ kGCprobElectron=0;
+ break;
+ case 1:
+ kGCprobElectron=0.1;
break;
- case 1: // 0.001
- kGCprobElectron = 0.001;
+ case 2:
+ kGCprobElectron=0.5;
break;
- case 2: // 0.01
- kGCprobElectron = 0.01;
+ case 3:
+ kGCprobElectron=0.7;
break;
default:
return iResult;
kGCPIDnSigmaBelowElectronLine=-3;
kGCPIDnSigmaAboveElectronLine=5;
break;
+ case 3: // -4,5
+ kGCPIDnSigmaBelowElectronLine=-4;
+ kGCPIDnSigmaAboveElectronLine=5;
+ break;
default:
return iResult;
}
case 2: // 1
kGCPIDnSigmaAbovePionLine=1;
break;
+ case 3: // 1
+ kGCPIDnSigmaAbovePionLine=-1;
+ break;
+ case 4: // 1
+ kGCPIDnSigmaAbovePionLine=-1.5;
+ break;
default:
return iResult;
}
case 2: // 30
kGCchi2CutConversion = 30.;
break;
+ case 3:
+ kGCchi2CutConversion = 200.;
+ break;
+ case 4:
+ kGCchi2CutConversion = 500.;
+ break;
+ case 5:
+ kGCchi2CutConversion = 1000.;
+ break;
default:
return iResult;
}
return iResult;
}
+ switch(chi2MesonCut){
+ case 0: // 100.
+ kGCchi2CutMeson = 100.;
+ break;
+ case 1: // 50.
+ kGCchi2CutMeson = 50.;
+ break;
+ case 2: // 30.
+ kGCchi2CutMeson = 30.;
+ break;
+ case 3:
+ kGCchi2CutMeson = 200.;
+ break;
+ case 4:
+ kGCchi2CutMeson = 500.;
+ break;
+ case 5:
+ kGCchi2CutMeson = 1000.;
+ break;
+ default:
+ return iResult;
+ }
+
+
+ switch(LowPRejectionSigmaCut){
+ case 0: //
+ kGCPIDnSigmaAtLowPAroundKaonLine=0;
+ kGCPIDnSigmaAtLowPAroundProtonLine=0;
+ kGCPIDnSigmaAtLowPAroundPionLine=0;
+ break;
+ case 1: //
+ kGCPIDnSigmaAtLowPAroundKaonLine=0.5;
+ kGCPIDnSigmaAtLowPAroundProtonLine=0.5;
+ kGCPIDnSigmaAtLowPAroundPionLine=0.5;
+ break;
+ case 2: //
+ kGCPIDnSigmaAtLowPAroundKaonLine=1;
+ kGCPIDnSigmaAtLowPAroundProtonLine=1;
+ kGCPIDnSigmaAtLowPAroundPionLine=1;
+ break;
+ case 3: //
+ kGCPIDnSigmaAtLowPAroundKaonLine=2.;
+ kGCPIDnSigmaAtLowPAroundProtonLine=2.;
+ kGCPIDnSigmaAtLowPAroundPionLine=2.;
+ break;
+ default:
+ return iResult;
+ }
+
iResult=1;
return iResult;
}
ASSIGNARRAY(7);
ASSIGNARRAY(8);
ASSIGNARRAY(9);
+ ASSIGNARRAY(10);
+ ASSIGNARRAY(11);
}
}