/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Authors: Svein Lindal, Daniel Lohner *
- * Version 1.0 *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
+ * *
+ * Authors: Svein Lindal, Daniel Lohner *
+ * Version 1.0 *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
**************************************************************************/
////////////////////////////////////////////////
#include "AliPIDResponse.h"
#include "TH1.h"
#include "TH2.h"
+#include "TF1.h"
#include "AliStack.h"
#include "AliAODConversionMother.h"
#include "TObjString.h"
"SharedElectronCuts", //23
"RejectToCloseV0s", //24
"DcaRPrimVtx", //25
- "DcaZPrimVtx" //26
+ "DcaZPrimVtx", //26
+ "EvetPlane" //27
};
fPIDMinPProtonRejectionLowP(2),
fPIDMinPPionRejectionLowP(0),
fDoQtGammaSelection(kTRUE),
- fDoHighPtQtGammaSelection(kFALSE),
+ fDo2DQt(kFALSE),
fQtMax(100),
- fHighPtQtMax(0.),
- fPtBorderForQt(0),
fXVertexCut(0.),
fYVertexCut(0.),
fZVertexCut(0.),
fRemovePileUp(kFALSE),
fOpeningAngle(0.005),
fPsiPairCut(10000),
+ fDo2DPsiPairChi2(kFALSE),
fCosPAngleCut(10000),
fDoToCloseV0sCut(kFALSE),
fRejectExtraSignals(0),
fminV0Dist(200.),
fDoSharedElecCut(kFALSE),
+ fDoPhotonQualitySelectionCut(kFALSE),
+ fPhotonQualityCut(0),
fOfflineTriggerMask(0),
fHasV0AND(kTRUE),
fIsSDDFired(kTRUE),
fElectronLabelArray(NULL),
fDCAZPrimVtxCut(1000),
fDCARPrimVtxCut(1000),
+ fInPlaneOutOfPlane(0),
fConversionPointXArray(0.0),
fConversionPointYArray(0.0),
fConversionPointZArray(0.0),
fNameHistoReweightingPi0(""),
fNameHistoReweightingEta(""),
fNameHistoReweightingK0s(""),
+ fNameFitDataPi0(""),
+ fNameFitDataEta(""),
+ fNameFitDataK0s(""),
+ hEtaDistV0s(NULL),
+ hEtaDistV0sAfterdEdxCuts(NULL),
hdEdxCuts(NULL),
hTPCdEdxbefore(NULL),
hTPCdEdxafter(NULL),
hTOFbefore(NULL),
hTOFSigbefore(NULL),
hTOFSigafter(NULL),
+ hPsiPairDeltaPhiafter(NULL),
hTrackCuts(NULL),
hPhotonCuts(NULL),
hInvMassbefore(NULL),
hCentrality(NULL),
hCentralityVsNumberOfPrimaryTracks(NULL),
hVertexZ(NULL),
+ hEventPlanePhi(NULL),
hTriggerClass(NULL),
hTriggerClassSelected(NULL),
hReweightMCHistPi0(NULL),
hReweightMCHistEta(NULL),
hReweightMCHistK0s(NULL),
+ fFitDataPi0(NULL),
+ fFitDataEta(NULL),
+ fFitDataK0s(NULL),
fPreSelCut(kFALSE),
fTriggerSelectedManually(kFALSE),
fSpecialTriggerName("")
-
+
{
InitPIDResponse();
for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;}
fPIDMinPProtonRejectionLowP(ref.fPIDMinPProtonRejectionLowP),
fPIDMinPPionRejectionLowP(ref.fPIDMinPPionRejectionLowP),
fDoQtGammaSelection(ref.fDoQtGammaSelection),
- fDoHighPtQtGammaSelection(ref.fDoHighPtQtGammaSelection),
+ fDo2DQt(ref.fDo2DQt),
fQtMax(ref.fQtMax),
- fHighPtQtMax(ref.fHighPtQtMax),
- fPtBorderForQt(ref.fPtBorderForQt),
fXVertexCut(ref.fXVertexCut),
fYVertexCut(ref.fYVertexCut),
fZVertexCut(ref.fZVertexCut),
fRemovePileUp(ref.fRemovePileUp),
fOpeningAngle(ref.fOpeningAngle),
fPsiPairCut(ref.fPsiPairCut),
+ fDo2DPsiPairChi2(ref.fDo2DPsiPairChi2),
fCosPAngleCut(ref.fCosPAngleCut),
fDoToCloseV0sCut(ref.fDoToCloseV0sCut),
fRejectExtraSignals(ref.fRejectExtraSignals),
fminV0Dist(ref.fminV0Dist),
fDoSharedElecCut(ref.fDoSharedElecCut),
+ fDoPhotonQualitySelectionCut(ref.fDoPhotonQualitySelectionCut),
+ fPhotonQualityCut(ref.fPhotonQualityCut),
fOfflineTriggerMask(ref.fOfflineTriggerMask),
fHasV0AND(ref.fHasV0AND),
fIsSDDFired(ref.fIsSDDFired),
fElectronLabelArray(NULL),
fDCAZPrimVtxCut(ref.fDCAZPrimVtxCut),
fDCARPrimVtxCut(ref.fDCAZPrimVtxCut),
+ fInPlaneOutOfPlane(ref.fInPlaneOutOfPlane),
fConversionPointXArray(ref.fConversionPointXArray),
fConversionPointYArray(ref.fConversionPointYArray),
fConversionPointZArray(ref.fConversionPointZArray),
fNameHistoReweightingPi0(ref.fNameHistoReweightingPi0),
fNameHistoReweightingEta(ref.fNameHistoReweightingEta),
fNameHistoReweightingK0s(ref.fNameHistoReweightingK0s),
+ fNameFitDataPi0(ref.fNameFitDataPi0),
+ fNameFitDataEta(ref.fNameFitDataEta),
+ fNameFitDataK0s(ref.fNameFitDataK0s),
+ hEtaDistV0s(NULL),
+ hEtaDistV0sAfterdEdxCuts(NULL),
hdEdxCuts(NULL),
hTPCdEdxbefore(NULL),
hTPCdEdxafter(NULL),
hTOFbefore(NULL),
hTOFSigbefore(NULL),
hTOFSigafter(NULL),
+ hPsiPairDeltaPhiafter(NULL),
hTrackCuts(NULL),
hPhotonCuts(NULL),
hInvMassbefore(NULL),
hCentrality(NULL),
hCentralityVsNumberOfPrimaryTracks(NULL),
hVertexZ(NULL),
+ hEventPlanePhi(NULL),
hTriggerClass(NULL),
hTriggerClassSelected(NULL),
- hReweightMCHistPi0(NULL),
- hReweightMCHistEta(NULL),
- hReweightMCHistK0s(NULL),
+ hReweightMCHistPi0(ref.hReweightMCHistPi0),
+ hReweightMCHistEta(ref.hReweightMCHistEta),
+ hReweightMCHistK0s(ref.hReweightMCHistK0s),
+ fFitDataPi0(ref.fFitDataPi0),
+ fFitDataEta(ref.fFitDataEta),
+ fFitDataK0s(ref.fFitDataK0s),
fPreSelCut(ref.fPreSelCut),
fTriggerSelectedManually(ref.fTriggerSelectedManually),
fSpecialTriggerName(ref.fSpecialTriggerName)
// Destructor
//Deleting fHistograms leads to seg fault it it's added to output collection of a task
// if(fHistograms)
- // delete fHistograms;
+ // delete fHistograms;
// fHistograms = NULL;
if(fCutString != NULL){
delete fCutString;
else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data()));
}
- if (hReweightMCHistPi0) fHistograms->Add(hReweightMCHistPi0);
- if (hReweightMCHistEta) fHistograms->Add(hReweightMCHistEta);
- if (hReweightMCHistK0s) fHistograms->Add(hReweightMCHistK0s);
-
+ if (hReweightMCHistPi0){
+ hReweightMCHistPi0->SetName("MCInputForWeightingPi0");
+ fHistograms->Add(hReweightMCHistPi0);
+ }
+ if (hReweightMCHistEta){
+ hReweightMCHistEta->SetName("MCInputForWeightingEta");
+ fHistograms->Add(hReweightMCHistEta);
+ }
+ if (hReweightMCHistK0s){
+ hReweightMCHistK0s->SetName("MCInputForWeightingK0s");
+ fHistograms->Add(hReweightMCHistK0s);
+ }
+// if (fFitDataPi0){
+// fFitDataPi0->SetName("DataFitForWeightingPi0");
+// fHistograms->Add(fFitDataPi0);
+// }
+// if (fFitDataEta){
+// fFitDataEta->SetName("DataFitForWeightingEta");
+// fHistograms->Add(fFitDataEta);
+// }
+// if (fFitDataK0s){
+// fFitDataK0s->SetName("DataFitForWeightingK0s");
+// fHistograms->Add(fFitDataK0s);
+// }
// IsPhotonSelected
- hCutIndex=new TH1F(Form("IsPhotonSelected %s",GetCutNumber().Data()),"IsPhotonSelected",10,-0.5,9.5);
+ hCutIndex=new TH1F(Form("IsPhotonSelected %s",GetCutNumber().Data()),"IsPhotonSelected",11,-0.5,10.5);
hCutIndex->GetXaxis()->SetBinLabel(kPhotonIn+1,"in");
hCutIndex->GetXaxis()->SetBinLabel(kOnFly+1,"onfly");
hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks");
hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts");
hCutIndex->GetXaxis()->SetBinLabel(kConvPointFail+1,"ConvPoint fail");
hCutIndex->GetXaxis()->SetBinLabel(kPhotonCuts+1,"PhotonCuts");
+ hCutIndex->GetXaxis()->SetBinLabel(kEventPlane+1,"EventPlane");
hCutIndex->GetXaxis()->SetBinLabel(kPhotonOut+1,"out");
fHistograms->Add(hCutIndex);
fHistograms->Add(hTrackCuts);
// Photon Cuts
- hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",14,-0.5,13.5);
+ hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",15,-0.5,14.5);
hPhotonCuts->GetXaxis()->SetBinLabel(1,"in");
hPhotonCuts->GetXaxis()->SetBinLabel(2,"qtcut");
hPhotonCuts->GetXaxis()->SetBinLabel(3,"chi2");
hPhotonCuts->GetXaxis()->SetBinLabel(9,"CosPAngle");
hPhotonCuts->GetXaxis()->SetBinLabel(10,"DCA R");
hPhotonCuts->GetXaxis()->SetBinLabel(11,"DCA Z");
- hPhotonCuts->GetXaxis()->SetBinLabel(12,"out");
+ hPhotonCuts->GetXaxis()->SetBinLabel(12,"Photon Quality");
+ hPhotonCuts->GetXaxis()->SetBinLabel(13,"out");
fHistograms->Add(hPhotonCuts);
if(preCut){
fHistograms->Add(hInvMassbefore);
hArmenterosbefore=new TH2F(Form("Armenteros_before %s",GetCutNumber().Data()),"Armenteros_before",200,-1,1,1000,0,1.);
fHistograms->Add(hArmenterosbefore);
+ hEtaDistV0s = new TH1F(Form("Eta_before %s",GetCutNumber().Data()),"Eta_before",2000,-2,2);
+ fHistograms->Add(hEtaDistV0s);
+
}
hInvMassafter=new TH1F(Form("InvMass_after %s",GetCutNumber().Data()),"InvMass_after",1000,0,0.3);
fHistograms->Add(hInvMassafter);
hTOFSigafter=new TH2F(Form("Gamma_TOFSig_after %s",GetCutNumber().Data()),"TOF Sigma Gamma after" ,150,0.03,20,400,-6,10);
fHistograms->Add(hTOFSigafter);
+ hEtaDistV0sAfterdEdxCuts = new TH1F(Form("Eta_afterdEdx %s",GetCutNumber().Data()),"Eta_afterdEdx",2000,-2,2);
+ fHistograms->Add(hEtaDistV0sAfterdEdxCuts);
+
+ hPsiPairDeltaPhiafter=new TH2F(Form("Gamma_PsiPairDeltaPhi_after %s",GetCutNumber().Data()),"Psi Pair vs Delta Phi Gamma after" ,200,-2,2,200,-2,2);
+ fHistograms->Add(hPsiPairDeltaPhiafter);
+
TAxis *AxisAfter = hTPCdEdxSigafter->GetXaxis();
Int_t bins = AxisAfter->GetNbins();
Double_t from = AxisAfter->GetXmin();
}
delete [] newBins;
+ hCentrality=new TH1F(Form("Centrality %s",GetCutNumber().Data()),"Centrality",100,0,100);
+ fHistograms->Add(hCentrality);
+ hCentralityVsNumberOfPrimaryTracks=new TH2F(Form("Centrality vs Primary Tracks %s",GetCutNumber().Data()),"Centrality vs Primary Tracks ",100,0,100,4000,0,4000);
+ fHistograms->Add(hCentralityVsNumberOfPrimaryTracks);
+
// Event Cuts and Info
if(preCut){
hV0EventCuts=new TH1F(Form("ESD_EventCuts %s",GetCutNumber().Data()),"Event Cuts",7,-0.5,6.5);
hV0EventCuts->GetXaxis()->SetBinLabel(7,"out");
fHistograms->Add(hV0EventCuts);
- hCentrality=new TH1F(Form("Centrality %s",GetCutNumber().Data()),"Centrality",1000,0,100);
- fHistograms->Add(hCentrality);
- hCentralityVsNumberOfPrimaryTracks=new TH2F(Form("Centrality vs Primary Tracks %s",GetCutNumber().Data()),"Centrality vs Primary Tracks ",100,0,100,3000,0,3000);
- fHistograms->Add(hCentralityVsNumberOfPrimaryTracks);
hVertexZ=new TH1F(Form("VertexZ %s",GetCutNumber().Data()),"VertexZ",1000,-50,50);
fHistograms->Add(hVertexZ);
hTriggerClassSelected->GetXaxis()->SetBinLabel(33,"V0AND");
hTriggerClassSelected->GetXaxis()->SetBinLabel(34,"NOT kFastOnly");
fHistograms->Add(hTriggerClassSelected);
+
+ hEventPlanePhi=new TH1F(Form("EventPlaneMinusPhotonAngle %s",GetCutNumber().Data()),"EventPlaneMinusPhotonAngle",360,-TMath::Pi(),TMath::Pi());
+ fHistograms->Add(hEventPlanePhi);
+
+
}
TH1::AddDirectory(kTRUE);
}
}
if(abs(ePos->Vz()) > fMaxZ){
- return kFALSE; // outside material
+ return kFALSE; // outside material
}
if(abs(eNeg->Vz()) > fMaxZ){
- return kFALSE; // outside material
+ return kFALSE; // outside material
}
if( ePos->R() <= ((abs(ePos->Vz()) * fLineCutZRSlope) - fLineCutZValue)){
// MonteCarlo Photon Selection
if(!aodmcArray)return kFALSE;
-
+
if (particle->GetPdgCode() == 22){
if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) )
return kFALSE;
return kFALSE; // the gamma has a mother, and it is not a primary particle
}
}
-
+
if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma
// looking for conversion gammas (electron + positron from pairbuilding (= 5) )
}
}
}
-
+
if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production
return kFALSE;
}
Double_t rPos = sqrt( (ePos->Xv()*ePos->Xv()) + (ePos->Yv()*ePos->Yv()) );
Double_t rNeg = sqrt( (eNeg->Xv()*eNeg->Xv()) + (eNeg->Yv()*eNeg->Yv()) );
-
+
if(rPos>fMaxR){
return kFALSE; // cuts on distance from collision point
}
if(abs(ePos->Zv()) > fMaxZ){
- return kFALSE; // outside material
+ return kFALSE; // outside material
}
if(abs(eNeg->Zv()) > fMaxZ){
- return kFALSE; // outside material
+ return kFALSE; // outside material
}
if( rPos <= ((abs(ePos->Zv()) * fLineCutZRSlope) - fLineCutZValue)){
// Fill Histos before Cuts
if(hInvMassbefore)hInvMassbefore->Fill(photon->GetMass());
-
if(hArmenterosbefore)hArmenterosbefore->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt());
// Gamma selection based on QT from Armenteros
return kFALSE;
}
+ Double_t magField = event->GetMagneticField();
+ if( magField < 0.0 ){
+ magField = 1.0;
+ } else {
+ magField = -1.0;
+ }
+
+ AliVTrack * electronCandidate = GetTrack(event,photon->GetTrackLabelNegative() );
+ AliVTrack * positronCandidate = GetTrack(event,photon->GetTrackLabelPositive() );
+ Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi());
cutIndex++; //7
if(!PsiPairCut(photon)) {
AliAODConversionPhoton* photonAOD = dynamic_cast<AliAODConversionPhoton*>(photon);
if (photonAOD){
photonAOD->CalculateDistanceOfClossetApproachToPrimVtx(event->GetPrimaryVertex());
-
+
cutIndex++; //9
if(photonAOD->GetDCArToPrimVtx() > fDCARPrimVtxCut) { //DCA R cut of photon to primary vertex
if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //9
return kFALSE;
}
-
+
cutIndex++; //10
if(abs(photonAOD->GetDCAzToPrimVtx()) > fDCAZPrimVtxCut) { //DCA Z cut of photon to primary vertex
if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //10
cutIndex++; //10
}
cutIndex++; //11
+
+ if (photonAOD){
+ if (fDoPhotonQualitySelectionCut && photonAOD->GetPhotonQuality() != fPhotonQualityCut){
+ if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //11
+ return kFALSE;
+ }
+ }
+ cutIndex++; //12
if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //11
// Histos after Cuts
if(hInvMassafter)hInvMassafter->Fill(photon->GetMass());
if(hArmenterosafter)hArmenterosafter->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt());
-
+ if(hPsiPairDeltaPhiafter)hPsiPairDeltaPhiafter->Fill(deltaPhi,photon->GetPsiPair());
return kTRUE;
}
FillPhotonCutIndex(kTrackCuts);
return kFALSE;
}
-
+ if (hEtaDistV0s)hEtaDistV0s->Fill(photon->GetPhotonEta());
// dEdx Cuts
if(!dEdxCuts(negTrack) || !dEdxCuts(posTrack)) {
FillPhotonCutIndex(kdEdxCuts);
return kFALSE;
}
-
+ if (hEtaDistV0sAfterdEdxCuts)hEtaDistV0sAfterdEdxCuts->Fill(photon->GetPhotonEta());
// Photon Cuts
if(!PhotonCuts(photon,event)){
FillPhotonCutIndex(kPhotonCuts);
///________________________________________________________________________
Bool_t AliConversionCuts::ArmenterosQtCut(AliConversionPhotonBase *photon)
{ // Armenteros Qt Cut
-
- if(fDoHighPtQtGammaSelection){
- if(photon->GetPhotonPt() < fPtBorderForQt){
- if(photon->GetArmenterosQt()>fQtMax){
- return kFALSE;
- }
- } else {
- if(photon->GetArmenterosQt()>fHighPtQtMax){
- return kFALSE;
- }
+ if(fDo2DQt){
+ if ( !(TMath::Power(photon->GetArmenterosAlpha()/0.95,2)+TMath::Power(photon->GetArmenterosQt()/fQtMax,2) < 1) ){
+ return kFALSE;
}
} else {
-
if(photon->GetArmenterosQt()>fQtMax){
return kFALSE;
}
cutIndex++;
// Number of TPC Clusters
-
-
+
+
if( negTrack->GetNcls(1) < fMinClsTPC || posTrack->GetNcls(1) < fMinClsTPC ) {
if(hTrackCuts)hTrackCuts->Fill(cutIndex);
return kFALSE;
cutIndex++;
// Single Pt Cut
- if( negTrack->Pt()< fSinglePtCut || posTrack->Pt()< fSinglePtCut){
+ if( negTrack->Pt()< fSinglePtCut || posTrack->Pt()< fSinglePtCut){
if(hTrackCuts)hTrackCuts->Fill(cutIndex);
return kFALSE;
}
///________________________________________________________________________
Bool_t AliConversionCuts::dEdxCuts(AliVTrack *fCurrentTrack){
// Electron Identification Cuts for Photon reconstruction
-
if(!fPIDResponse){InitPIDResponse();}// Try to reinitialize PID Response
if(!fPIDResponse){AliError("No PID Response"); return kTRUE;}// if still missing fatal error
if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal());
cutIndex++;
-
if(fDodEdxSigmaCut == kTRUE){
// TPC Electron Line
if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine ||
}
}
cutIndex++;
-
if(fDoProtonRejectionLowP == kTRUE){
if( fCurrentTrack->P()<fPIDMinPProtonRejectionLowP ){
if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){
if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){
if(hTOFbefore){
Double_t t0 = fPIDResponse->GetTOFResponse().GetStartTime(fCurrentTrack->P());
- Double_t times[5];
+ Double_t times[AliPID::kSPECIESC];
fCurrentTrack->GetIntegratedTimes(times);
- Double_t TOFsignal = fCurrentTrack->GetTOFsignal();
+ Double_t TOFsignal = fCurrentTrack->GetTOFsignal();
Double_t dT = TOFsignal - t0 - times[0];
hTOFbefore->Fill(fCurrentTrack->P(),dT);
}
if(hTOFSigafter)hTOFSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron));
}
cutIndex++;
-
// Apply TRD PID
if(fDoTRDPID){
if(!fPIDResponse->IdentifiedAsElectronTRD(fCurrentTrack,fPIDTRDEfficiency)){
if(hdEdxCuts)hdEdxCuts->Fill(cutIndex);
if(hTPCdEdxSigafter)hTPCdEdxSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron));
if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal());
+
return kTRUE;
}
if (photon->GetPhotonP()!=0.){
trackNegAsy= track->P()/photon->GetPhotonP();
}
-
+
if( trackNegAsy<fMinPhotonAsymmetry ||trackNegAsy>(1.- fMinPhotonAsymmetry)){
return kFALSE;
}
track = dynamic_cast<AliVTrack*>(event->GetTrack(label));
return track;
}
- else{
+ else{
for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) {
track = dynamic_cast<AliVTrack*>(event->GetTrack(ii));
if(track){
Double_t *posProbArray = new Double_t[AliPID::kSPECIES];
Double_t *negProbArray = new Double_t[AliPID::kSPECIES];
- AliESDtrack* negTrack = esdEvent->GetTrack(photon->GetTrackLabelNegative());
- AliESDtrack* posTrack = esdEvent->GetTrack(photon->GetTrackLabelPositive());
+ AliESDtrack* negTrack = esdEvent->GetTrack(photon->GetTrackLabelNegative());
+ AliESDtrack* posTrack = esdEvent->GetTrack(photon->GetTrackLabelPositive());
if(negProbArray && posProbArray){
}
return kTRUE;
}
-
+///________________________________________________________________________
void AliConversionCuts::LoadReweightingHistosMCFromFile() {
AliInfo("Entering loading of histograms for weighting");
if(!f){
AliError(Form("file for weighting %s not found",fPathTrFReweighting.Data()));
return;
- }
+ }
if (fNameHistoReweightingPi0.CompareTo("") != 0 && fDoReweightHistoMCPi0 ){
- hReweightMCHistPi0 = (TH1D*)f->Get(fNameHistoReweightingPi0.Data());
+ TH1D *hReweightMCHistPi0temp = (TH1D*)f->Get(fNameHistoReweightingPi0.Data());
+ hReweightMCHistPi0 = new TH1D(*hReweightMCHistPi0temp);
+ hReweightMCHistPi0->SetDirectory(0);
if (hReweightMCHistPi0) AliInfo(Form("%s has been loaded from %s", fNameHistoReweightingPi0.Data(),fPathTrFReweighting.Data() ));
- else AliWarning(Form("%s not found in %s",fPathTrFReweighting.Data(), fNameHistoReweightingPi0.Data() ));
+ else AliWarning(Form("%s not found in %s", fNameHistoReweightingPi0.Data() ,fPathTrFReweighting.Data()));
+ }
+ if (fNameFitDataPi0.CompareTo("") != 0 && fDoReweightHistoMCPi0 ){
+ TF1 *fFitDataPi0temp = (TF1*)f->Get(fNameFitDataPi0.Data());
+ fFitDataPi0 = new TF1(*fFitDataPi0temp);
+ if (fFitDataPi0) AliInfo(Form("%s has been loaded from %s", fNameFitDataPi0.Data(),fPathTrFReweighting.Data() ));
+ else AliWarning(Form("%s not found in %s",fPathTrFReweighting.Data(), fNameFitDataPi0.Data() ));
}
+
if (fNameHistoReweightingEta.CompareTo("") != 0 && fDoReweightHistoMCEta){
- hReweightMCHistEta = (TH1D*)f->Get(fNameHistoReweightingEta.Data());
+ TH1D *hReweightMCHistEtatemp = (TH1D*)f->Get(fNameHistoReweightingEta.Data());
+ hReweightMCHistEta = new TH1D(*hReweightMCHistEtatemp);
+ hReweightMCHistEta->SetDirectory(0);
if (hReweightMCHistEta) AliInfo(Form("%s has been loaded from %s", fNameHistoReweightingEta.Data(),fPathTrFReweighting.Data() ));
- else AliWarning(Form("%s not found in %s",fPathTrFReweighting.Data(), fNameHistoReweightingEta.Data() ));
+ else AliWarning(Form("%s not found in %s", fNameHistoReweightingEta.Data(),fPathTrFReweighting.Data() ));
+ }
+
+ if (fNameFitDataEta.CompareTo("") != 0 && fDoReweightHistoMCEta){
+ TF1 *fFitDataEtatemp = (TF1*)f->Get(fNameFitDataEta.Data());
+ fFitDataEta = new TF1(*fFitDataEtatemp);
+ if (fFitDataEta) AliInfo(Form("%s has been loaded from %s", fNameFitDataEta.Data(),fPathTrFReweighting.Data() ));
+ else AliWarning(Form("%s not found in %s", fNameFitDataEta.Data(),fPathTrFReweighting.Data() ));
}
if (fNameHistoReweightingK0s.CompareTo("") != 0 && fDoReweightHistoMCK0s){
- hReweightMCHistK0s = (TH1D*)f->Get(fNameHistoReweightingK0s.Data());
+ TH1D *hReweightMCHistK0stemp = (TH1D*)f->Get(fNameHistoReweightingK0s.Data());
+ hReweightMCHistK0s = new TH1D(*hReweightMCHistK0stemp);
+ hReweightMCHistK0s->SetDirectory(0);
if (hReweightMCHistK0s) AliInfo(Form("%s has been loaded from %s", fNameHistoReweightingK0s.Data(),fPathTrFReweighting.Data() ));
- else AliWarning(Form("%s not found in %s",fPathTrFReweighting.Data(), fNameHistoReweightingK0s.Data() ));
-
+ else AliWarning(Form("%s not found in %s", fNameHistoReweightingK0s.Data(),fPathTrFReweighting.Data() ));
}
+ if (fNameFitDataK0s.CompareTo("") != 0 && fDoReweightHistoMCK0s){
+ TF1 *fFitDataK0stemp = (TF1*)f->Get(fNameFitDataK0s.Data());
+ fFitDataK0s = new TF1(*fFitDataK0stemp);
+ if (fFitDataK0s) AliInfo(Form("%s has been loaded from %s", fNameFitDataK0s.Data(),fPathTrFReweighting.Data() ));
+ else AliWarning(Form("%s not found in %s", fNameFitDataK0s.Data(),fPathTrFReweighting.Data() ));
+ }
+ f->Close();
+ delete f;
+
}
///________________________________________________________________________
Bool_t AliConversionCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) {
// Initialize Cuts from a given Cut string
- if(fDoReweightHistoMCPi0 || fDoReweightHistoMCEta || fDoReweightHistoMCK0s) LoadReweightingHistosMCFromFile();
-
+ if(fDoReweightHistoMCPi0 || fDoReweightHistoMCEta || fDoReweightHistoMCK0s) {
+ AliInfo("Weighting was enabled");
+ LoadReweightingHistosMCFromFile();
+ }
+
AliInfo(Form("Set Photoncut Number: %s",analysisCutSelection.Data()));
if(analysisCutSelection.Length()!=kNCuts) {
AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts));
}
const char *cutSelection = analysisCutSelection.Data();
-#define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0'
+#define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0'
for(Int_t ii=0;ii<kNCuts;ii++){
ASSIGNARRAY(ii);
}
if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE;
}
- //PrintCuts();
+ PrintCutsWithValues();
return kTRUE;
}
return kTRUE;
} else return kFALSE;
+ case kInPlaneOutOfPlane:
+ if( SetInPlaneOutOfPlane(value)) {
+ fCuts[kInPlaneOutOfPlane] = value;
+ UpdateCutString();
+ return kTRUE;
+ } else return kFALSE;
+
+
+
case kNCuts:
AliError("Cut id out of range");
return kFALSE;
printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]);
}
}
+
+void AliConversionCuts::PrintCutsWithValues() {
+ // Print out current Cut Selection with value
+ if (fIsHeavyIon == 0) {
+ printf("Running in pp mode \n");
+ if (fSpecialTrigger == 0){
+ printf("\t only events triggered by V0OR will be analysed \n");
+ } else if (fSpecialTrigger == 1){
+ printf("\t only events triggered by V0AND will be analysed \n");
+ } else if (fSpecialTrigger == 2){
+ printf("\t only events where SDD was present will be analysed \n");
+ } else if (fSpecialTrigger == 3){
+ printf("\t only events where SDD was present will be analysed and triggered by VOAND\n");
+ } else if (fSpecialTrigger > 3){
+ printf("\t only events triggered by %s \n", fSpecialTriggerName.Data());
+ }
+ } else if (fIsHeavyIon == 1){
+ printf("Running in PbPb mode \n");
+ if (fDetectorCentrality == 0){
+ printf("\t centrality selection based on V0M \n");
+ } else if (fDetectorCentrality == 1){
+ printf("\t centrality selection based on Cl1 \n");
+ }
+ if (fModCentralityClass == 0){
+ printf("\t %d - %d \n", fCentralityMin*10, fCentralityMax*10);
+ } else if ( fModCentralityClass == 1){
+ printf("\t %d - %d \n", fCentralityMin*5, fCentralityMax*5);
+ } else if ( fModCentralityClass == 2){
+ printf("\t %d - %d \n", fCentralityMin*5+45, fCentralityMax*5+45);
+ } else if (fModCentralityClass == 3){
+ printf("\t %d - %d, with Track mult in MC as data \n", fCentralityMin*10, fCentralityMax*10);
+ } else if ( fModCentralityClass == 4){
+ printf("\t %d - %d, with Track mult in MC as data \n", fCentralityMin*5, fCentralityMax*5);
+ } else if ( fModCentralityClass == 5){
+ printf("\t %d - %d, with Track mult in MC as data \n", fCentralityMin*5+45, fCentralityMax*5+45);
+ }
+ if (fSpecialTrigger == 0){
+ printf("\t only events triggered by kMB, kCentral, kSemiCentral will be analysed \n");
+ } else if (fSpecialTrigger > 4){
+ printf("\t only events triggered by %s \n", fSpecialTriggerName.Data());
+ }
+ } else if (fIsHeavyIon == 2){
+ printf("Running in pPb mode \n");
+ if (fDetectorCentrality == 0){
+ printf("\t centrality selection based on V0A \n");
+ } else if (fDetectorCentrality == 1){
+ printf("\t centrality selection based on Cl1 \n");
+ }
+ if (fModCentralityClass == 0){
+ printf("\t %d - %d \n", fCentralityMin*10, fCentralityMax*10);
+ }
+ if (fSpecialTrigger == 0){
+ printf("\t only events triggered by kINT7 will be analysed \n");
+ } else if (fSpecialTrigger > 4){
+ printf("\t only events triggered by %s \n", fSpecialTriggerName.Data());
+ }
+ }
+ printf("Electron cuts: \n");
+ if (fEtaCutMin > -0.1) printf("\t %3.2f < eta_{e} < %3.2f\n", fEtaCutMin, fEtaCut );
+ else printf("\t eta_{e} < %3.2f\n", fEtaCut );
+ printf("\t p_{T,e} > %3.2f\n", fSinglePtCut );
+ printf("\t %3.2f < n sigma e < %3.2f\n", fPIDnSigmaBelowElectronLine, fPIDnSigmaAboveElectronLine );
+
+ printf("Photon cuts: \n");
+ printf("\t %3.2f < R_{conv} < %3.2f\n", fMinR, fMaxR );
+ printf("\t Z_{conv} < %3.2f\n", fMaxZ );
+ if (fEtaCutMin > -0.1) printf("\t %3.2f < eta_{conv} < %3.2f\n", fEtaCutMin, fEtaCut );
+ else printf("\t eta_{conv} < %3.2f\n", fEtaCut );
+ printf("\t p_{T,gamma} > %3.2f\n", fPtCut );
+ if (fDo2DQt){
+ printf("\t 2 dimensional q_{T} cut applied with maximum of %3.2f \n", fQtMax );
+ } else {
+ printf("\t 1 dimensional q_{T} cut applied with maximum of %3.2f \n", fQtMax );
+ }
+ if (fDo2DPsiPairChi2){
+ printf("\t 2 dimensional triangle chi^{2} and psi_{pair} cut applied with maximum of chi^{2} = %3.2f and |psi_{pair}| = %3.2f \n", fChi2CutConversion, fPsiPairCut );
+ } else {
+ printf("\t chi^{2} max cut chi^{2} < %3.2f \n", fChi2CutConversion );
+ printf("\t psi_{pair} max cut |psi_{pair}| < %3.2f \n", fPsiPairCut );
+ }
+ printf("\t cos(Theta_{point}) > %3.2f \n", fCosPAngleCut );
+ printf("\t dca_{R} < %3.2f \n", fDCARPrimVtxCut );
+ printf("\t dca_{Z} < %3.2f \n", fDCAZPrimVtxCut );
+ if (fDoPhotonQualitySelectionCut) printf("\t selection based on photon quality with quality %d \n", fPhotonQualityCut );
+}
+
///________________________________________________________________________
Bool_t AliConversionCuts::SetIsHeavyIon(Int_t isHeavyIon)
{ // Set Cut
case 3:
fSpecialTrigger=3; // V0AND plus with SDD requested
break;
- // allows to run MB & 6 other different trigger classes in parallel with the same photon cut
- case 4:
+ // allows to run MB & 6 other different trigger classes in parallel with the same photon cut
+ case 4:
fSpecialTrigger=4; // different trigger class as MB
fTriggerSelectedManually = kTRUE;
break;
- case 5:
+ case 5:
fSpecialTrigger=4; // different trigger class as MB
fTriggerSelectedManually = kTRUE;
break;
- case 6:
+ case 6:
fSpecialTrigger=4; // different trigger class as MB
fTriggerSelectedManually = kTRUE;
break;
- case 7:
+ case 7:
fSpecialTrigger=4; // different trigger class as MB
fTriggerSelectedManually = kTRUE;
break;
- case 8:
+ case 8:
fSpecialTrigger=4; // different trigger class as MB
fTriggerSelectedManually = kTRUE;
- break;
- case 9:
+ break;
+ case 9:
fSpecialTrigger=4; // different trigger class as MB
fTriggerSelectedManually = kTRUE;
- break;
+ break;
default:
AliError("Warning: Special Trigger Not known");
return kFALSE;
switch(etaCut){
case 0: // 0.9
- fEtaCut = 0.9;
+ fEtaCut = 0.9;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
- case 1: // 1.2 // changed from 1.2 to 0.6 on 2013.06.10
- fEtaCut = 0.6;
+ case 1: // 0.6 // changed from 1.2 to 0.6 on 2013.06.10
+ fEtaCut = 0.6;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
- case 2: // 1.4
- fEtaCut = 1.4;
+ case 2: // 1.4
+ fEtaCut = 1.4;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
- case 3: // 0.8
- fEtaCut = 0.8;
+ case 3: // 0.65
+ fEtaCut = 0.65;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
case 4: // 0.75
- fEtaCut = 0.75;
+ fEtaCut = 0.75;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
case 5: // 0.5
- fEtaCut = 0.5;
+ fEtaCut = 0.5;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
case 6: // 5.
- fEtaCut = 5.;
+ fEtaCut = 5.;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
case 7:
- fEtaCut = 0.3;
- fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
- fLineCutZRSlopeMin = 0.;
- break;
+ if (fIsHeavyIon==1){
+ fEtaCut = 0.7;
+ fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
+ fEtaCutMin = -0.1;
+ fLineCutZRSlopeMin = 0.;
+ break;
+ } else {
+ fEtaCut = 0.3;
+ fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
+ fEtaCutMin = -0.1;
+ fLineCutZRSlopeMin = 0.;
+ break;
+ }
// case 8: // 0.1 - 0.8
- // fEtaCut = 0.9;
+ // fEtaCut = 0.9;
// fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- // fEtaCutMin = 0.1;
+ // fEtaCutMin = 0.1;
// fLineCutZRSlopeMin = tan(2*atan(exp(-fEtaCutMin)));
// break;
case 8: // 0.4
- fEtaCut = 0.4;
+ fEtaCut = 0.4;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
case 9: // 10
- fEtaCut = 10;
+ fEtaCut = 10;
fLineCutZRSlope = tan(2*atan(exp(-fEtaCut)));
- fEtaCutMin = -0.1;
+ fEtaCutMin = -0.1;
fLineCutZRSlopeMin = 0.;
break;
default:
break;
case 8:
fMaxR = 180.;
- fMinR = 35.;
+ fMinR = 12.5;
break;
case 9:
- fMaxR = 35.;
- fMinR = 5.;
+ fMaxR = 180.;
+ fMinR = 7.5;
break;
default:
case 0: //
fQtMax=1.;
fDoQtGammaSelection=kFALSE;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
case 1:
fQtMax=0.1;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
case 2:
fQtMax=0.07;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
case 3:
fQtMax=0.05;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
case 4:
fQtMax=0.03;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
case 5:
fQtMax=0.02;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
case 6:
fQtMax=0.02;
- fDoHighPtQtGammaSelection=kTRUE;
- fHighPtQtMax=0.06;
- fPtBorderForQt=2.5;
+ fDo2DQt=kTRUE;
break;
case 7:
fQtMax=0.15;
- fDoHighPtQtGammaSelection=kFALSE;
- fHighPtQtMax=100.;
- fPtBorderForQt=100.;
+ fDo2DQt=kFALSE;
break;
+ case 8:
+ fQtMax=0.05;
+ fDo2DQt=kTRUE;
+ break;
+ case 9:
+ fQtMax=0.03;
+ fDo2DQt=kTRUE;
+ break;
default:
AliError(Form("Warning: QtMaxCut not defined %d",QtMaxCut));
return kFALSE;
fPsiPairCut = 0.035; //
break;
case 4:
- fPsiPairCut = 0.15; //
- break;
- case 5:
fPsiPairCut = 0.2; //
+ break;
+ case 5:
+ fPsiPairCut = 0.1; //
+ fDo2DPsiPairChi2 = kTRUE;
break;
case 6:
- fPsiPairCut = 0.03; //
+ fPsiPairCut = 0.05; //
+ fDo2DPsiPairChi2 = kTRUE;
break;
case 7:
- fPsiPairCut = 0.025; //
+ fPsiPairCut = 0.035; //
+ fDo2DPsiPairChi2 = kTRUE;
break;
case 8:
- fPsiPairCut = 0.01; //
+ fPsiPairCut = 0.2; //
+ fDo2DPsiPairChi2 = kTRUE; //
break;
case 9:
fPsiPairCut = 0.5; //
fMinPPhotonAsymmetryCut=3.5;
fMinPhotonAsymmetry=0.06;
break;
+ case 3:
+ fDoPhotonAsymmetryCut=1;
+ fMinPPhotonAsymmetryCut=0.0;
+ fMinPhotonAsymmetry=0.05;
+ break;
default:
AliError(Form("PhotonAsymmetryCut not defined %d",doPhotonAsymmetryCut));
return kFALSE;
switch(cosCut){
case 0:
- fCosPAngleCut = TMath::Pi(); // -1
+ fCosPAngleCut = -1;
break;
case 1:
- fCosPAngleCut = 0.1; // 0.99500
+ fCosPAngleCut = 0;
break;
case 2:
- fCosPAngleCut = 0.05; // 0.99875
+ fCosPAngleCut = 0.5;
break;
case 3:
- fCosPAngleCut = 0.025; // 0.99969
+ fCosPAngleCut = 0.75;
break;
case 4:
- fCosPAngleCut = 0.01; // 0.99995
+ fCosPAngleCut = 0.85;
break;
case 5:
- fCosPAngleCut = 0.2; // 0.98007
+ fCosPAngleCut = 0.88;
break;
case 6:
- fCosPAngleCut = 0.5; // 0.87758
+ fCosPAngleCut = 0.9;
break;
case 7:
- fCosPAngleCut = 0.075; // 0.73169
+ fCosPAngleCut = 0.95;
break;
default:
AliError(Form("Cosine Pointing Angle cut not defined %d",cosCut));
///________________________________________________________________________
Bool_t AliConversionCuts::SetSharedElectronCut(Int_t sharedElec) {
- switch(sharedElec){
- case 0:
- fDoSharedElecCut = kFALSE;
- break;
- case 1:
- fDoSharedElecCut = kTRUE;
- break;
- default:
- AliError(Form("Shared Electron Cut not defined %d",sharedElec));
- return kFALSE;
+ switch(sharedElec){
+ case 0:
+ fDoSharedElecCut = kFALSE;
+ fDoPhotonQualitySelectionCut = kFALSE;
+ fPhotonQualityCut = 0;
+ break;
+ case 1:
+ fDoSharedElecCut = kTRUE;
+ fDoPhotonQualitySelectionCut = kFALSE;
+ fPhotonQualityCut = 0;
+ break;
+ case 2:
+ fDoSharedElecCut = kFALSE;
+ fDoPhotonQualitySelectionCut = kTRUE;
+ fPhotonQualityCut = 1;
+ break;
+ case 3:
+ fDoSharedElecCut = kFALSE;
+ fDoPhotonQualitySelectionCut = kTRUE;
+ fPhotonQualityCut = 2;
+ break;
+ case 4:
+ fDoSharedElecCut = kFALSE;
+ fDoPhotonQualitySelectionCut = kTRUE;
+ fPhotonQualityCut = 3;
+ break;
+ default:
+ AliError(Form("Shared Electron Cut not defined %d",sharedElec));
+ return kFALSE;
}
return kTRUE;
}
///________________________________________________________________________
-Bool_t AliConversionCuts::SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx){
+Bool_t AliConversionCuts::SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx){
// Set Cut
switch(DCAZPhotonPrimVtx){
case 0: //
- fDCAZPrimVtxCut = 1000;
+ fDCAZPrimVtxCut = 1000;
break;
case 1: //
fDCAZPrimVtxCut = 10;
}
///________________________________________________________________________
-Bool_t AliConversionCuts::SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx){
+Bool_t AliConversionCuts::SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx){
// Set Cut
switch(DCARPhotonPrimVtx){
case 0: //
- fDCARPrimVtxCut = 1000;
+ fDCARPrimVtxCut = 1000;
break;
case 1: //
fDCARPrimVtxCut = 10;
return kTRUE;
}
+///________________________________________________________________________
+Bool_t AliConversionCuts::SetInPlaneOutOfPlane(Int_t inOutPlane){
+ // Set Cut
+ switch(inOutPlane){
+ case 0: //
+ fInPlaneOutOfPlane = 0; // No Event Plane
+ break;
+ case 1: //
+ fInPlaneOutOfPlane = 1; // In-Plane
+ break;
+ case 2: //
+ fInPlaneOutOfPlane = 2; // Out-Of-Plane
+ break;
+ default:
+ cout<<"Warning: In-Plane or Out-Of-Plane not defined "<<inOutPlane<<endl;
+ return kFALSE;
+ }
+ return kTRUE;
+}
+
//-------------------------------------------------------------
Double_t AliConversionCuts::GetCentrality(AliVEvent *event)
if(fCentralityMin == fCentralityMax ) return kTRUE;//0-100%
else if(fCentralityMax==0) fCentralityMax=10; //CentralityRange = fCentralityMin-100%
-
+
Double_t centrality=GetCentrality(event);
if(centrality<0)return kFALSE;
return kTRUE;
else return kFALSE;
}
-
+
Int_t nprimaryTracks = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetNumberOfPrimaryTracks();
- Int_t PrimaryTracks10[10][2] =
+ Int_t PrimaryTracks10[10][2] =
{
{9999,9999}, // 0
- {1210,1210}, // 10
- { 817, 817}, // 20
- { 536, 536}, // 30
- { 337, 337}, // 40
- { 197, 197}, // 50
- { 106, 106}, // 60
- { 51, 51}, // 70
- { 21, 21}, // 80
+ {1210, 928}, // 10
+ { 817, 658}, // 20
+ { 536, 435}, // 30
+ { 337, 276}, // 40
+ { 197, 162}, // 50
+ { 106, 100}, // 60
+ { 51, 44}, // 70
+ { 21, 18}, // 80
{ 0, 0} // 90
};
- Int_t PrimaryTracks5a[10][2] =
+ Int_t PrimaryTracks5a[10][2] =
{
{9999,9999}, // 0
- {1485,2560}, // 5
- {1210,2070}, // 10
- { 995,1730}, // 15
- { 817,1415}, // 20
- { 666,1145}, // 25
- { 536, 925}, // 30
- { 428, 735}, // 35
- { 337, 557}, // 40
- { 260, 445} // 45
+ {1485,1168}, // 5
+ {1210, 928}, // 10
+ { 995, 795}, // 15
+ { 817, 658}, // 20
+ { 666, 538}, // 25
+ { 536, 435}, // 30
+ { 428, 350}, // 35
+ { 337, 276}, // 40
+ { 260, 214} // 45
};
- Int_t PrimaryTracks5b[10][2] =
+ Int_t PrimaryTracks5b[10][2] =
{
- { 260, 445}, // 45
- { 197, 333}, // 50 // Below still ESDS for AODs
- { 147, 147}, // 55
- { 106, 106}, // 60
- { 75, 75}, // 65
- { 51, 51}, // 70
- { 34, 34}, // 75
- { 21, 21}, // 80
- { 13, 13}, // 85
+ { 260, 214}, // 45
+ { 197, 162}, // 50
+ { 147, 125}, // 55
+ { 106, 100}, // 60
+ { 75, 63}, // 65
+ { 51, 44}, // 70
+ { 34, 29}, // 75
+ { 21, 18}, // 80
+ { 13, 11}, // 85
{ 0, 0} // 90
};
Int_t column = -1;
if(event->IsA()==AliESDEvent::Class()) column = 0;
if(event->IsA()==AliAODEvent::Class()) column = 1;
-
+
if (fModCentralityClass == 3){
if(fMCEvent){
if(nprimaryTracks > PrimaryTracks10[fCentralityMax][column] && nprimaryTracks <= PrimaryTracks10[fCentralityMin][column])
Bool_t AliConversionCuts::VertexZCut(AliVEvent *event){
// Cut on z position of primary vertex
Double_t fVertexZ=event->GetPrimaryVertex()->GetZ();
-
+ Double_t fVertexZSPD = 0;
+ AliESDEvent *fESDEvent=dynamic_cast<AliESDEvent*>(event);
+ if(fESDEvent){
+ fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ();
+ }
+ AliAODEvent *fAODEvent=dynamic_cast<AliAODEvent*>(event);
+ if(fAODEvent){
+ fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ();
+ }
+
if(abs(fVertexZ)>fMaxVertexZ)return kFALSE;
+ TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()
+ ->GetTask("V0ReaderV1"))->GetPeriodName();
+ if (periodName.CompareTo("LHC11h")==0){
+ if (abs(fVertexZ-fVertexZSPD) > 0.1) return kFALSE;
+ }
if (fIsHeavyIon == 2){
if(fUtils->IsFirstEventInChunk(event)) return kFALSE;
if(!fUtils->IsVertexSelected2013pA(event)) return kFALSE;
-
+ if(fUtils->IsPileUpEvent(event)) return kFALSE;
}
return kTRUE;
if(fESDEvent){
if (fESDEvent->GetPrimaryVertex() != NULL){
if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) {
-// cout << "accepted global" << fESDEvent->GetEventNumberInFile() << " with NCont: " << fESDEvent->GetPrimaryVertex()->GetNContributors() << endl;
+// cout << "accepted global" << fESDEvent->GetEventNumberInFile() << " with NCont: " << fESDEvent->GetPrimaryVertex()->GetNContributors() << endl;
return fESDEvent->GetPrimaryVertex()->GetNContributors();
}
}
if(fESDEvent->GetPrimaryVertexSPD() !=NULL){
if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) {
-// cout << "accepted SPD" << fESDEvent->GetEventNumberInFile() << " with NCont: " << fESDEvent->GetPrimaryVertexSPD()->GetNContributors() << endl;
+// cout << "accepted SPD" << fESDEvent->GetEventNumberInFile() << " with NCont: " << fESDEvent->GetPrimaryVertexSPD()->GetNContributors() << endl;
return fESDEvent->GetPrimaryVertexSPD()->GetNContributors();
} else {
AliWarning(Form("Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName()));
AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
UInt_t isSelected = AliVEvent::kAny;
+ TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetPeriodName();
+// cout << periodName.Data() << endl;
+
if (fInputHandler==NULL) return kFALSE;
if( fInputHandler->GetEventSelection() || fInputEvent->IsA()==AliAODEvent::Class()) {
if (!fTriggerSelectedManually){
if (fPreSelCut) fOfflineTriggerMask = AliVEvent::kAny;
else {
if (fIsHeavyIon == 1) fOfflineTriggerMask = AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral;
- else if (fIsHeavyIon == 2) fOfflineTriggerMask = AliVEvent::kINT7;
- else fOfflineTriggerMask = AliVEvent::kMB;
- }
+ else if (fIsHeavyIon == 2) fOfflineTriggerMask = AliVEvent::kINT7;
+ else if (periodName.CompareTo("LHC11c") == 0 || periodName.CompareTo("LHC11d") == 0 || periodName.CompareTo("LHC11e") == 0 || periodName.CompareTo("LHC11f") == 0 || periodName.CompareTo("LHC11g") == 0 || periodName.CompareTo("LHC12a") == 0 || periodName.CompareTo("LHC12b") == 0 || periodName.CompareTo("LHC12c") == 0 || periodName.CompareTo("LHC12d") == 0 || periodName.CompareTo("LHC11f") == 0 || periodName.CompareTo("LHC13g") == 0 ) fOfflineTriggerMask = AliVEvent::kINT7;
+ else fOfflineTriggerMask = AliVEvent::kMB;
+ }
}
// Get the actual offline trigger mask for the event and AND it with the
// requested mask. If no mask requested select by default the event.
// if (fPreSelCut) cout << "Trigger selected from outside: "<< fTriggerSelectedManually <<"\t Offline Trigger mask for Precut: " << fOfflineTriggerMask << endl;
// else cout << "Trigger selected from outside: "<< fTriggerSelectedManually <<"\t Offline Trigger mask: " << fOfflineTriggerMask << endl;
-
+
if (fOfflineTriggerMask)
isSelected = fOfflineTriggerMask & fInputHandler->IsEventSelected();
}
Bool_t AliConversionCuts::CosinePAngleCut(const AliConversionPhotonBase * photon, AliVEvent * event) const {
///Check if passes cosine of pointing angle cut
- if(GetCosineOfPointingAngle(photon, event) < (TMath::Cos(fCosPAngleCut))){
+ if(GetCosineOfPointingAngle(photon, event) < fCosPAngleCut){
return kFALSE;
}
return kTRUE;
///________________________________________________________________________
Bool_t AliConversionCuts::PsiPairCut(const AliConversionPhotonBase * photon) const {
- if(photon->GetPsiPair() > fPsiPairCut){
- return kFALSE;}
- else{return kTRUE;}
-
+ if (fDo2DPsiPairChi2){
+ if (abs(photon->GetPsiPair()) < -fPsiPairCut/fChi2CutConversion*photon->GetChi2perNDF() + fPsiPairCut ){
+ return kTRUE;
+ } else {
+ return kFALSE;
+ }
+ } else {
+ if(abs(photon->GetPsiPair()) > fPsiPairCut){
+ return kFALSE;}
+ else{return kTRUE;}
+ }
}
///________________________________________________________________________
///________________________________________________________________________
void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderList, AliVEvent *MCEvent){
-
-
- if(fNotRejectedStart){
- delete[] fNotRejectedStart;
- fNotRejectedStart = NULL;
- }
- if(fNotRejectedEnd){
- delete[] fNotRejectedEnd;
- fNotRejectedEnd = NULL;
- }
- if(fGeneratorNames){
- delete[] fGeneratorNames;
- fGeneratorNames = NULL;
- }
-
- if(rejection == 0) return; // No Rejection
-
- AliGenCocktailEventHeader *cHeader = 0x0;
- AliAODMCHeader *cHeaderAOD = 0x0;
- Bool_t headerFound = kFALSE;
-
- if(MCEvent->IsA()==AliMCEvent::Class()){
- cHeader = dynamic_cast<AliGenCocktailEventHeader*>(dynamic_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
- if(cHeader) headerFound = kTRUE;
- }
- if(MCEvent->IsA()==AliAODEvent::Class()){ // MCEvent is a AODEvent in case of AOD
- cHeaderAOD = dynamic_cast<AliAODMCHeader*>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName()));
- if(cHeaderAOD) headerFound = kTRUE;
- }
-
- if(headerFound){
- TList *genHeaders = 0x0;
- if(cHeader) genHeaders = cHeader->GetHeaders();
- if(cHeaderAOD){
- genHeaders = cHeaderAOD->GetCocktailHeaders();
- if(genHeaders->GetEntries()==1){
- SetRejectExtraSignalsCut(0);
- return;
- }
- }
- AliGenEventHeader* gh = 0;
- fnHeaders = 0;
- if(rejection == 1 || rejection == 3) fnHeaders = 1; // MinBiasHeader
- if(rejection == 2){ // TList of Headers Names
- for(Int_t i = 0; i<genHeaders->GetEntries();i++){
- gh = (AliGenEventHeader*)genHeaders->At(i);
- TString GeneratorName = gh->GetName();
- for(Int_t j = 0; j<HeaderList->GetEntries();j++){
- TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
- if(GeneratorName.CompareTo(GeneratorInList) == 0){
- fnHeaders++;
- continue;
- }
- }
- }
- }
-
- fNotRejectedStart = new Int_t[fnHeaders];
- fNotRejectedEnd = new Int_t[fnHeaders];
- fGeneratorNames = new TString[fnHeaders];
-
- if(rejection == 1 || rejection == 3){
- fNotRejectedStart[0] = 0;
- fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
- fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
- return;
- }
-
- Int_t firstindex = 0;
- Int_t lastindex = -1;
- Int_t nummer = 0;
- for(Int_t i = 0; i<genHeaders->GetEntries();i++){
- gh = (AliGenEventHeader*)genHeaders->At(i);
- TString GeneratorName = gh->GetName();
- lastindex = lastindex + gh->NProduced();
- for(Int_t j = 0; j<HeaderList->GetEntries();j++){
- TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
- if(GeneratorName.CompareTo(GeneratorInList) == 0){
- fNotRejectedStart[nummer] = firstindex;
- fNotRejectedEnd[nummer] = lastindex;
- fGeneratorNames[nummer] = GeneratorName;
- //cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl;
- nummer++;
- continue;
- }
- }
- firstindex = firstindex + gh->NProduced();
- }
- } else { // No Cocktail Header Found
- fNotRejectedStart = new Int_t[1];
- fNotRejectedEnd = new Int_t[1];
-
- fnHeaders = 1;
- fNotRejectedStart[0] = 0;
- fNotRejectedEnd[0] = static_cast<AliMCEvent*>(MCEvent)->Stack()->GetNprimary()-1;
- fGeneratorNames = new TString[1];
- fGeneratorNames[0] = "NoCocktailGeneratorFound";
-
- AliGenPythiaEventHeader *mcHeaderPythia = dynamic_cast<AliGenPythiaEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
- if (mcHeaderPythia) fGeneratorNames[0] = "NoCocktailGeneratorFound_Pythia";
- AliGenDPMjetEventHeader *mcHeaderPhojet = dynamic_cast<AliGenDPMjetEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
- if (mcHeaderPhojet) fGeneratorNames[0] = "NoCocktailGeneratorFound_Phojet";
- AliGenHijingEventHeader *mcHeaderHijing = dynamic_cast<AliGenHijingEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
- if (mcHeaderHijing) fGeneratorNames[0] = "NoCocktailGeneratorFound_Hijing";
-
- SetRejectExtraSignalsCut(0);
- }
-
+ TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetPeriodName();
+
+
+ if(fNotRejectedStart){
+ delete[] fNotRejectedStart;
+ fNotRejectedStart = NULL;
+ }
+ if(fNotRejectedEnd){
+ delete[] fNotRejectedEnd;
+ fNotRejectedEnd = NULL;
+ }
+ if(fGeneratorNames){
+ delete[] fGeneratorNames;
+ fGeneratorNames = NULL;
+ }
+
+ if(rejection == 0) return; // No Rejection
+
+ AliGenCocktailEventHeader *cHeader = 0x0;
+ AliAODMCHeader *cHeaderAOD = 0x0;
+ Bool_t headerFound = kFALSE;
+ AliStack *fMCStack = 0x0;
+ TClonesArray *fMCStackAOD = 0x0;
+ if(MCEvent->IsA()==AliMCEvent::Class()){
+ cHeader = dynamic_cast<AliGenCocktailEventHeader*>(dynamic_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
+ if(cHeader) headerFound = kTRUE;
+ fMCStack = dynamic_cast<AliStack*>(dynamic_cast<AliMCEvent*>(MCEvent)->Stack());
+ }
+ if(MCEvent->IsA()==AliAODEvent::Class()){ // MCEvent is a AODEvent in case of AOD
+ cHeaderAOD = dynamic_cast<AliAODMCHeader*>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName()));
+ fMCStackAOD = dynamic_cast<TClonesArray*>(MCEvent->FindListObject(AliAODMCParticle::StdBranchName()));
+
+
+ if(cHeaderAOD) headerFound = kTRUE;
+ }
+
+ if(headerFound){
+ TList *genHeaders = 0x0;
+ if(cHeader) genHeaders = cHeader->GetHeaders();
+ if(cHeaderAOD){
+ genHeaders = cHeaderAOD->GetCocktailHeaders();
+ if(genHeaders->GetEntries()==1){
+ SetRejectExtraSignalsCut(0);
+ return;
+ }
+ }
+ AliGenEventHeader* gh = 0;
+ fnHeaders = 0;
+ Int_t firstindexA = 0;
+ Int_t lastindexA = -1;
+ if(rejection == 1 || rejection == 3) fnHeaders = 1; // MinBiasHeader
+ if(rejection == 2){ // TList of Headers Names
+ for(Int_t i = 0; i<genHeaders->GetEntries();i++){
+ gh = (AliGenEventHeader*)genHeaders->At(i);
+ TString GeneratorName = gh->GetName();
+ lastindexA = lastindexA + gh->NProduced();
+ cout << i << "\t" << GeneratorName.Data() << endl;
+ for(Int_t j = 0; j<HeaderList->GetEntries();j++){
+ TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
+ if(GeneratorName.CompareTo(GeneratorInList) == 0){
+ if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){
+ if(fMCStack){
+ if (fMCStack->Particle(firstindexA)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA)->GetPdgCode() == 221 ) {
+ if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
+ if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+ fnHeaders++;
+ continue;
+ }
+ } else {
+ fnHeaders++;
+ continue;
+ }
+ }
+ }
+ if ( fMCStackAOD){
+ AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindexA));
+ if ( aodMCParticle->GetPdgCode() == 111 || aodMCParticle->GetPdgCode() == 221 ){
+ if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
+ if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+ fnHeaders++;
+ continue;
+ }
+ } else {
+ fnHeaders++;
+ continue;
+ }
+ }
+ }
+ }
+ fnHeaders++;
+ continue;
+ }
+ }
+ firstindexA = firstindexA + gh->NProduced();
+ }
+ }
+
+ fNotRejectedStart = new Int_t[fnHeaders];
+ fNotRejectedEnd = new Int_t[fnHeaders];
+ fGeneratorNames = new TString[fnHeaders];
+
+ if(rejection == 1 || rejection == 3){
+ fNotRejectedStart[0] = 0;
+ fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1;
+ fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName();
+ return;
+ }
+
+ Int_t firstindex = 0;
+ Int_t lastindex = -1;
+ Int_t number = 0;
+ for(Int_t i = 0; i<genHeaders->GetEntries();i++){
+ gh = (AliGenEventHeader*)genHeaders->At(i);
+ TString GeneratorName = gh->GetName();
+ lastindex = lastindex + gh->NProduced();
+ for(Int_t j = 0; j<HeaderList->GetEntries();j++){
+ TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString();
+ if(GeneratorName.CompareTo(GeneratorInList) == 0){
+ if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){
+ if(fMCStack){
+ if (fMCStack->Particle(firstindex)->GetPdgCode() == 111 || fMCStack->Particle(firstindex)->GetPdgCode() == 221 ) {
+ if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
+ if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+ fNotRejectedStart[number] = firstindex;
+ fNotRejectedEnd[number] = lastindex;
+ fGeneratorNames[number] = GeneratorName;
+ number++;
+ continue;
+ }
+ } else {
+ fNotRejectedStart[number] = firstindex;
+ fNotRejectedEnd[number] = lastindex;
+ fGeneratorNames[number] = GeneratorName;
+ number++;
+ continue;
+ }
+ }
+ }
+ if ( fMCStackAOD){
+ AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindex));
+ if ( aodMCParticle->GetPdgCode() == 111 || aodMCParticle->GetPdgCode() == 221 ){
+ if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){
+ if (gh->NProduced() > 10 && (fMCStack->Particle(firstindexA+10)->GetPdgCode() == 111 || fMCStack->Particle(firstindexA+10)->GetPdgCode() == 221 )){
+ fNotRejectedStart[number] = firstindex;
+ fNotRejectedEnd[number] = lastindex;
+ fGeneratorNames[number] = GeneratorName;
+ number++;
+ continue;
+ }
+ } else {
+ fNotRejectedStart[number] = firstindex;
+ fNotRejectedEnd[number] = lastindex;
+ fGeneratorNames[number] = GeneratorName;
+ number++;
+ continue;
+ }
+ }
+ }
+
+ } else {
+ fNotRejectedStart[number] = firstindex;
+ fNotRejectedEnd[number] = lastindex;
+ fGeneratorNames[number] = GeneratorName;
+ // cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl;
+ number++;
+ continue;
+ }
+ }
+ }
+ firstindex = firstindex + gh->NProduced();
+ }
+ } else { // No Cocktail Header Found
+ fNotRejectedStart = new Int_t[1];
+ fNotRejectedEnd = new Int_t[1];
+
+ fnHeaders = 1;
+ fNotRejectedStart[0] = 0;
+ fNotRejectedEnd[0] = static_cast<AliMCEvent*>(MCEvent)->Stack()->GetNprimary()-1;
+ fGeneratorNames = new TString[1];
+ fGeneratorNames[0] = "NoCocktailGeneratorFound";
+
+ AliGenPythiaEventHeader *mcHeaderPythia = dynamic_cast<AliGenPythiaEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
+ if (mcHeaderPythia) fGeneratorNames[0] = "NoCocktailGeneratorFound_Pythia";
+ AliGenDPMjetEventHeader *mcHeaderPhojet = dynamic_cast<AliGenDPMjetEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
+ if (mcHeaderPhojet) fGeneratorNames[0] = "NoCocktailGeneratorFound_Phojet";
+ AliGenHijingEventHeader *mcHeaderHijing = dynamic_cast<AliGenHijingEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader());
+ if (mcHeaderHijing) fGeneratorNames[0] = "NoCocktailGeneratorFound_Hijing";
+
+ SetRejectExtraSignalsCut(0);
+ }
}
+
//_________________________________________________________________________
Int_t AliConversionCuts::IsParticleFromBGEvent(Int_t index, AliStack *MCStack, AliVEvent *InputEvent){
return accepted;
}
+
//_________________________________________________________________________
-Int_t AliConversionCuts::IsEventAcceptedByConversionCut(AliConversionCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Bool_t isHeavyIon){
+Int_t AliConversionCuts::IsEventAcceptedByConversionCut(AliConversionCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Int_t isHeavyIon){
if ( !IsTriggerSelected(InputEvent) )
return 3;
-
- if(isHeavyIon && !(IsCentralitySelected(InputEvent,MCEvent)))
- return 1; // Check Centrality --> Not Accepted => eventQuality = 1
- if(!isHeavyIon && GetIsFromPileup()){
+ if(isHeavyIon != 0 && !(IsCentralitySelected(InputEvent,MCEvent)))
+ return 1; // Check Centrality --> Not Accepted => eventQuality = 1
+
+
+ if(isHeavyIon == 0 && GetIsFromPileup()){
if(InputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){
return 6; // Check Pileup --> Not Accepted => eventQuality = 6
}
}
-
+
Bool_t hasV0And = ReaderCuts->HasV0AND();
Bool_t isSDDFired = ReaderCuts->IsSDDFired();
if( (IsSpecialTrigger() == 2 || IsSpecialTrigger() == 3) && !isSDDFired && !MCEvent)
if( (IsSpecialTrigger() == 1 || IsSpecialTrigger() == 3) && !hasV0And)
return 8; // V0AND requested but no fired
-
+
+ if(hCentrality)hCentrality->Fill(GetCentrality(InputEvent));
+ if(hCentralityVsNumberOfPrimaryTracks)
+ hCentralityVsNumberOfPrimaryTracks->Fill(GetCentrality(InputEvent),
+ ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()
+ ->GetTask("V0ReaderV1"))->GetNumberOfPrimaryTracks());
return 0;
}
+
//_________________________________________________________________________
Float_t AliConversionCuts::GetWeightForMeson(TString period, Int_t index, AliStack *MCStack, AliVEvent *InputEvent){
- if (!(period.CompareTo("LHC12f1a") == 0 || period.CompareTo("LHC12f1b") == 0 || period.CompareTo("LHC12i3") == 0 || period.CompareTo("LHC11a10a") == 0 || period.CompareTo("LHC11a10b") == 0 || period.CompareTo("LHC11a10b_bis") == 0 || period.CompareTo("LHC11a10a_bis") == 0 || period.CompareTo("LHC11a10b_plus") == 0 || period.CompareTo("LHC13d2") == 0)) return 1.;
-
+ if (!(period.CompareTo("LHC12f1a") == 0 || period.CompareTo("LHC12f1b") == 0 || period.CompareTo("LHC12i3") == 0 || period.CompareTo("LHC11a10a") == 0 || period.CompareTo("LHC11a10b") == 0 || period.CompareTo("LHC11a10b_bis") == 0 || period.CompareTo("LHC11a10a_bis") == 0 || period.CompareTo("LHC11a10b_plus") == 0 || period.Contains("LHC13d2")|| period.Contains("LHC14a1") ||
+ period.CompareTo("LHC13e7") == 0 || period.Contains("LHC13b2_efix"))) return 1.;
+
Int_t kCaseGen = 0;
for (Int_t i = 0; i < fnHeaders; i++){
if (index >= fNotRejectedStart[i] && index < fNotRejectedEnd[i]+1){
kCaseGen = 1;
} else if (fGeneratorNames[i].CompareTo("DPMJET") == 0){
kCaseGen = 2;
- } else if (fGeneratorNames[i].CompareTo("HIJING") == 0 ||
- fGeneratorNames[i].CompareTo("Hijing") == 0 ||
+ } else if (fGeneratorNames[i].CompareTo("HIJING") == 0 ||
+ fGeneratorNames[i].CompareTo("Hijing") == 0 ||
fGeneratorNames[i].Contains("hijing")){
kCaseGen = 3;
} else if (fGeneratorNames[i].CompareTo("BOX") == 0){
- kCaseGen = 4;
+ kCaseGen = 4;
} else if (fGeneratorNames[i].CompareTo("PARAM") == 0){
kCaseGen = 5;
} else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound") == 0){
} else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Hijing") == 0){
kCaseGen = 3;
}
+ if (period.Contains("LHC13d2") || period.CompareTo("LHC13e7") == 0 || period.Contains("LHC13b2_efix") || period.Contains("LHC14a1") ){
+ kCaseGen = 3;
+ }
}
}
if (kCaseGen == 0) return 1;
-
+
Double_t mesonPt = 0;
Double_t mesonMass = 0;
mesonPt = aodMCParticle->Pt();
mesonMass = aodMCParticle->GetCalcMass();
PDGCode = aodMCParticle->GetPdgCode();
- }
+ }
Float_t functionResultMC = 1.;
if (kCaseGen == 1){ // Pythia 6
} else if (kCaseGen == 3 ){ // HIJING
if ( PDGCode == 111 && fDoReweightHistoMCPi0 && hReweightMCHistPi0!= 0x0){
functionResultMC = hReweightMCHistPi0->Interpolate(mesonPt);
- }
+ }
+ if ( PDGCode == 221 && fDoReweightHistoMCEta && hReweightMCHistEta!= 0x0){
+ functionResultMC = hReweightMCHistEta->Interpolate(mesonPt);
+ }
if ( PDGCode == 310 && fDoReweightHistoMCK0s && hReweightMCHistK0s!= 0x0){
functionResultMC = hReweightMCHistK0s->Interpolate(mesonPt);
}
functionResultData = dNdyData / ( 2 * TMath::Pi())*(nData-1.)*(nData-2.) / (nData*tData*(nData*tData+mesonMass*(nData-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nData*tData), -nData);
// cout << functionResultData << endl;
} else {
- Float_t a = 0.;
- Float_t b = 0.;
- Float_t c = 0.;
- Float_t d = 0.;
- Float_t e = 0.;
- if ( PDGCode == 111 ){
- if (fModCentralityClass == 1 && fCentralityMin == 0 && fCentralityMax == 1 ){ // 0-5 % PbPb
- a = 25.8747458223;
- b = 5.8761820045;
- c = -33.9928191673;
- d = 3.0731850142;
- e = 13.2500447620;
- } else if (fModCentralityClass == 1 && fCentralityMin == 1 && fCentralityMax == 2){ // 5-10% PbPb
- a = 21.7518148922;
- b = 5.8441200081;
- c = -17.1497051691;
- d = 2.3799090842;
- e = 5.4346404718;
- } else if (fModCentralityClass == 0 && fCentralityMin == 0 && fCentralityMax == 1){ // 0-10% PbPb
- a = 22.9852133622;
- b = 5.8602063916;
- c = -17.0992478654;
- d = 2.4426218039;
- e = 5.1194526345;
- } else if (fModCentralityClass == 0 && fCentralityMin == 1 && fCentralityMax == 2){ // 10-20% PbPb
- a = 19.3237333776;
- b = 5.8145906958;
- c = -13.8316665424;
- d = 2.3737630637;
- e = 4.7690300693;
- } else if (fModCentralityClass == 0 && fCentralityMin == 2 && fCentralityMax == 4){ // 20-40% PbPb
- a = 11.2656032751;
- b = 5.8003194354;
- c = -13.3936105929;
- d = 2.3371452334;
- e = 4.4726244958;
- } else if (fModCentralityClass == 0 && fCentralityMin == 4 && fCentralityMax == 6){ // 40-60% PbPb
- a = 4.1578154081;
- b = 5.6450005163;
- c = -8.4309375240;
- d = 1.8918308704;
- e = 2.9429194709;
- } else if (fModCentralityClass == 0 && fCentralityMin == 6 && fCentralityMax == 8){ // 60-80% PbPb
- a = 1.0635443810;
- b = 5.1337469970;
- c = -8.5906997238;
- d = 2.9794995997;
- e = 3.9294980048;
- } else if (fModCentralityClass == 0 && fCentralityMin == 0 && fCentralityMax == 2){ // 0-20% PbPb
- a = 21.7018745556;
- b = 5.9019352094;
- c = -14.2295510326;
- d = 2.2104490688;
- e = 4.2969671500;
- } else if (fModCentralityClass == 0 && fCentralityMin == 0 && fCentralityMax == 4){ // 0-40% PbPb
- a = 16.8227412106;
- b = 5.8660502207;
- c = -12.0978551215;
- d = 2.1695068981;
- e = 3.5349621182;
- } else if (fModCentralityClass == 0 && fCentralityMin == 0 && fCentralityMax == 8){ // 0-80% PbPb
- a = 9.4675681080;
- b = 5.8114944205;
- c = -10.4901523616;
- d = 2.0607982712;
- e = 2.9262259130;
- } else if (fModCentralityClass == 0 && fCentralityMin == 4 && fCentralityMax == 8){ // 60-80% PbPb
- a = 2.5985551785;
- b = 5.4118895738;
- c = -8.2510958428;
- d = 2.2551249190;
- e = 3.0700919491;
- }
-
- functionResultData = a*TMath::Power(mesonPt,-1*(b+c/(TMath::Power(mesonPt,d)+e)));
- }
-
+ if ( PDGCode == 111 && fDoReweightHistoMCPi0 && fFitDataPi0!= 0x0){
+ functionResultData = fFitDataPi0->Eval(mesonPt);
+ }
+ if ( PDGCode == 221 && fDoReweightHistoMCEta && fFitDataEta!= 0x0){
+ functionResultData = fFitDataEta->Eval(mesonPt);
+ }
+ if ( PDGCode == 310 && fDoReweightHistoMCK0s && fFitDataK0s!= 0x0){
+ functionResultData = fFitDataK0s->Eval(mesonPt);
+ }
+
}
-
+
Double_t weight = 1;
if (PDGCode == 111 || PDGCode == 221){
if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){
weight = functionResultData/functionResultMC;
if ( kCaseGen == 3){
- if (!(fDoReweightHistoMCPi0 && hReweightMCHistPi0!= 0x0 && PDGCode == 111)){
- weight = 1.;
+ if (PDGCode == 111){
+ if (!(fDoReweightHistoMCPi0 && hReweightMCHistPi0!= 0x0 && PDGCode == 111)){
+ weight = 1.;
+ }
+ }
+ if (PDGCode == 221){
+ if (!(fDoReweightHistoMCEta && hReweightMCHistEta!= 0x0 && PDGCode == 221)){
+ weight = 1.;
+ }
}
}
- if (!isfinite(functionResultData)) weight = 1.;
- if (!isfinite(weight)) weight = 1.;
+ if (!isfinite(functionResultData)) weight = 1.;
+ if (!isfinite(weight)) weight = 1.;
}
} else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){
weight = functionResultMC;
}
-
+
// if (fModCentralityClass == 0 && fCentralityMin == 4 && fCentralityMax == 6 && PDGCode == 111){
// cout << period.Data() << "\t" << kCaseGen << "\t" <<fModCentralityClass<< "\t" <<fCentralityMin<< "\t" <<fCentralityMax << "\t" << mesonPt << "\t" <<mesonMass<< "\t"<<functionResultData << "\t"<< functionResultMC << "\t" << weight <<endl;
// }
AliConversionCuts* AliConversionCuts::GetStandardCuts2010PbPb(){
//Create and return standard 2010 PbPb cuts
AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010PbPb","StandardCuts2010PbPb");
- if(!cuts->InitializeCutsFromCutString("1000002042092970023220000")){
- cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
+ if(!cuts->InitializeCutsFromCutString("100000204209297002322000000")){
+ cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;}
return cuts;
}
AliConversionCuts* AliConversionCuts::GetStandardCuts2010pp(){
//Create and return standard 2010 PbPb cuts
AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010pp","StandardCuts2010pp");
- if(!cuts->InitializeCutsFromCutString("0000011002093663003800000")){
- cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
+ if(!cuts->InitializeCutsFromCutString("000001100209366300380000000")){
+ cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;}
return cuts;
}
///________________________________________________________________________
periodName.CompareTo("LHC13c2") == 0 || //MC Starlight, coherent J/Psi, UPC muon anchor LHC13d+e
periodName.CompareTo("LHC13b4") == 0 || //MC Pythia 6 (Jet-Jet), anchor LHC13b
periodName.CompareTo("LHC13b2_fix_1") == 0 || //MC DPMJET, anchr LHC13b+c
+ periodName.CompareTo("LHC13b2_efix_p1") == 0 || //MC DPMJET, anchr LHC13b+c
+ periodName.CompareTo("LHC13b2_efix_p2") == 0 || //MC DPMJET, anchr LHC13b+c
+ periodName.CompareTo("LHC13b2_efix_p3") == 0 || //MC DPMJET, anchr LHC13b+c
+ periodName.CompareTo("LHC13b2_efix_p4") == 0 || //MC DPMJET, anchr LHC13b+c
+ periodName.CompareTo("LHC13e7") == 0 || //MC DPMJET, anchr LHC13b+c
periodName.CompareTo("LHC13b3") == 0 || //MC HIJING, weighted to number of events per run, anchor LHC13b
periodName.CompareTo("LHC13b2") == 0 || // MC DPMJET, wrong energy, anchor LHC13b
periodName.CompareTo("LHC13b2_plus") == 0 || // MC DPMJET, weighted to number event per run, anchor LHC13b
}
else printf(" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(GetCutNumber()).Data());
}
+
+///________________________________________________________________________
+Bool_t AliConversionCuts::InPlaneOutOfPlaneCut(Double_t photonPhi, Double_t eventPlaneAngle, Bool_t fill){
+
+ //GetPhotonPhi() 0-2 Pi //eventPlaneAngle -1pi-1pi
+ eventPlaneAngle=eventPlaneAngle+TMath::Pi();
+ Double_t gammaToEPAngle = eventPlaneAngle-photonPhi;
+ if(gammaToEPAngle < 0) gammaToEPAngle=gammaToEPAngle+2*TMath::Pi();
+ gammaToEPAngle = gammaToEPAngle-TMath::Pi(); // angle from -pi +pi
+
+ if(!fInPlaneOutOfPlane){
+ if(fill&&hEventPlanePhi)hEventPlanePhi->Fill(gammaToEPAngle);
+ return kTRUE;
+ }
+ else if(fInPlaneOutOfPlane == 1){
+ if(abs(gammaToEPAngle)<=0.25*TMath::Pi() || abs(gammaToEPAngle)>=0.75*TMath::Pi()){
+ if(fill&&hEventPlanePhi)hEventPlanePhi->Fill(gammaToEPAngle);
+ return kTRUE;
+ }
+ else return kFALSE;
+ }
+ else if(fInPlaneOutOfPlane == 2){
+ if(abs(gammaToEPAngle)>0.25*TMath::Pi() && abs(gammaToEPAngle)<0.75*TMath::Pi()){
+ if(fill&&hEventPlanePhi)hEventPlanePhi->Fill(gammaToEPAngle);
+ return kTRUE;
+ }
+ else return kFALSE;
+ }
+ return kFALSE;
+
+}
+