"RecKineITSTPC",
"Primary",
"HFEITS",
+ "HFETOF",
"HFETRD"
};
fTOFMISMATCHStep(kFALSE),
fUseMixedVertex(kTRUE),
fIsIPSigmacut(kFALSE),
+ fFractionOfSharedTPCClusters(-1.0),
+ fMaxImpactParameterRpar(kFALSE),
fHistQA(0x0),
fCutList(0x0),
fDebugLevel(0)
fTOFMISMATCHStep(kFALSE),
fUseMixedVertex(kTRUE),
fIsIPSigmacut(kFALSE),
+ fFractionOfSharedTPCClusters(-1.0),
+ fMaxImpactParameterRpar(kFALSE),
fHistQA(0x0),
fCutList(0x0),
fDebugLevel(0)
fTOFMISMATCHStep(kFALSE),
fUseMixedVertex(kTRUE),
fIsIPSigmacut(kFALSE),
+ fFractionOfSharedTPCClusters(-1.0),
+ fMaxImpactParameterRpar(kFALSE),
fHistQA(0x0),
fCutList(0x0),
fDebugLevel(0)
target.fTOFMISMATCHStep = fTOFMISMATCHStep;
target.fUseMixedVertex = fUseMixedVertex;
target.fIsIPSigmacut = fIsIPSigmacut;
+ target.fFractionOfSharedTPCClusters = fFractionOfSharedTPCClusters;
+ target.fMaxImpactParameterRpar = fMaxImpactParameterRpar;
target.fDebugLevel = 0;
memcpy(target.fProdVtx, fProdVtx, sizeof(Double_t) * 4);
SetRecKineITSTPCCutList();
SetRecPrimaryCutList();
SetHFElectronITSCuts();
+ SetHFElectronTOFCuts();
SetHFElectronTRDCuts();
SetHFElectronDcaCuts();
cfm->SetParticleCutsList(kStepRecKineITSTPC + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartRecKineITSTPCCuts")));
cfm->SetParticleCutsList(kStepRecPrim + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartPrimCuts")));
cfm->SetParticleCutsList(kStepHFEcutsITS + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsITS")));
+ cfm->SetParticleCutsList(kStepHFEcutsTOF+ kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsTOF")));
cfm->SetParticleCutsList(kStepHFEcutsTRD + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsTRD")));
cfm->SetParticleCutsList(kStepHFEcutsDca + kRecOffset + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsDca")));
SetRecKineITSTPCCutList();
SetRecPrimaryCutList();
SetHFElectronITSCuts();
+ SetHFElectronTOFCuts();
SetHFElectronTRDCuts();
SetHFElectronDcaCuts();
// Set the cut in the TPC number of clusters
hfecuts->SetMinNClustersTPC(fMinClustersTPC, fTPCclusterDef);
hfecuts->SetClusterRatioTPC(fMinClusterRatioTPC, fTPCratioDef);
+ if(fFractionOfSharedTPCClusters > 0.0) hfecuts->SetFractionOfTPCSharedClusters(fFractionOfSharedTPCClusters);
AliCFTrackKineCuts *kineCuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineRec", (Char_t *)"REC Kine Cuts");
kineCuts->SetPtRange(fPtRange[0], fPtRange[1]);
primaryCut->SetAcceptKinkDaughters(kFALSE);
if(IsQAOn()) primaryCut->SetQAOn(fHistQA);
+ AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsPrimaryCutsextra","Extra cuts from the HFE group");
+ hfecuts->SetMaxImpactParameterRpar(fMaxImpactParameterRpar);
+
TObjArray *primCuts = new TObjArray;
primCuts->SetName("fPartPrimCuts");
primCuts->AddLast(primaryCut);
+ if(fMaxImpactParameterRpar){
+ primCuts->AddLast(hfecuts);
+ }
fCutList->AddLast(primCuts);
}
}
//__________________________________________________________________
-void AliHFEcuts::SetHFElectronTRDCuts(){
+void AliHFEcuts::SetHFElectronTOFCuts(){
//
// Special Cuts introduced by the HFElectron Group: TRD
//
AliDebug(2, "Called\n");
- AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTRD","Extra cuts from the HFE group");
- if(fMinTrackletsTRD > 0.) hfecuts->SetMinTrackletsTRD(fMinTrackletsTRD);
+ AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTOF","Extra cuts from the HFE group on TOF PID");
if(fTOFPIDStep) hfecuts->SetTOFPID(kTRUE);
if(fTOFMISMATCHStep) hfecuts->SetTOFMISMATCH(kTRUE);
if(IsQAOn()) hfecuts->SetQAOn(fHistQA);
hfecuts->SetDebugLevel(fDebugLevel);
+ TObjArray *hfeCuts = new TObjArray;
+ hfeCuts->SetName("fPartHFECutsTOF");
+ hfeCuts->AddLast(hfecuts);
+ fCutList->AddLast(hfeCuts);
+}
+
+//__________________________________________________________________
+void AliHFEcuts::SetHFElectronTRDCuts(){
+ //
+ // Special Cuts introduced by the HFElectron Group: TRD
+ //
+ AliDebug(2, "Called\n");
+ AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTRD","Extra cuts from the HFE group on TRD PID");
+ if(fMinTrackletsTRD > 0.) hfecuts->SetMinTrackletsTRD(fMinTrackletsTRD);
+ if(IsQAOn()) hfecuts->SetQAOn(fHistQA);
+ hfecuts->SetDebugLevel(fDebugLevel);
+
TObjArray *hfeCuts = new TObjArray;
hfeCuts->SetName("fPartHFECutsTRD");
hfeCuts->AddLast(hfecuts);
kStepRecKineITSTPC = 1,
kStepRecPrim = 2,
kStepHFEcutsITS = 3,
- kStepHFEcutsTRD = 4,
- kNcutStepsRecTrack = 5
+ kStepHFEcutsTOF = 4,
+ kStepHFEcutsTRD = 5,
+ kNcutStepsRecTrack = 6
} RecoCutStep_t;
typedef enum{
kStepHFEcutsDca = 0,
void SetTOFPIDStep(Bool_t tofPidStep) {fTOFPIDStep = tofPidStep;};
void SetTOFMISMATCHStep(Bool_t tofMismatchStep) {fTOFMISMATCHStep = tofMismatchStep;};
void SetUseMixedVertex(Bool_t useMixedVertex) {fUseMixedVertex = useMixedVertex;};
+ void SetFractionOfSharedTPCClusters( Bool_t fractionOfSharedTPCClusters) {fFractionOfSharedTPCClusters = fractionOfSharedTPCClusters;};
+ void SetMaxImpactParameterRpar(Bool_t maxImpactParameterRpar) { fMaxImpactParameterRpar = maxImpactParameterRpar; };
inline void CreateStandardCuts();
void SetRecKineITSTPCCutList();
void SetRecPrimaryCutList();
void SetHFElectronITSCuts();
+ void SetHFElectronTOFCuts();
void SetHFElectronTRDCuts();
void SetHFElectronDcaCuts();
void SetEventCutList(Int_t istep);
Bool_t fUseMixedVertex; // Use primary vertex from track only as before
Float_t fIPCutParams[4]; // Parameters of impact parameter cut parametrization
Bool_t fIsIPSigmacut; // if abs IP cut or IP sigma cut
+ Double_t fFractionOfSharedTPCClusters; // Fraction of shared TPC clusters
+ Bool_t fMaxImpactParameterRpar; // Max impact parameter
+
TList *fHistQA; //! QA Histograms
fTOFmismatch(kFALSE),
fTPCclusterDef(0),
fTPCclusterRatioDef(0),
+ fMaxImpactParameterRpar(kFALSE),
+ fFractionOfTPCSharedClusters(-1.0),
fCheck(kFALSE),
fQAlist(0x0) ,
fDebugLevel(0)
fTOFmismatch(c.fTOFmismatch),
fTPCclusterDef(c.fTPCclusterDef),
fTPCclusterRatioDef(c.fTPCclusterRatioDef),
+ fMaxImpactParameterRpar(c.fMaxImpactParameterRpar),
+ fFractionOfTPCSharedClusters(c.fFractionOfTPCSharedClusters),
fCheck(c.fCheck),
fQAlist(0x0),
fDebugLevel(0)
fPixelITS = c.fPixelITS;
fTPCclusterDef = c.fTPCclusterDef;
fTPCclusterRatioDef = c.fTPCclusterRatioDef;
+ fMaxImpactParameterRpar = c.fMaxImpactParameterRpar;
+ fFractionOfTPCSharedClusters = c.fFractionOfTPCSharedClusters;
fTOFpid = c.fTOFpid;
fTOFmismatch = c.fTOFmismatch;
fCheck = c.fCheck;
Float_t impactR, impactZ;
Double_t hfeimpactR, hfeimpactnsigmaR;
Double_t hfeimpactRcut, hfeimpactnsigmaRcut;
+ Double_t maximpactRcut;
+ Bool_t passimpactRcut = kTRUE;
+ Bool_t passsharedTPCcut = kTRUE;
Bool_t tofstep = kTRUE;
Bool_t tofmismatchstep = kTRUE;
GetImpactParameters(track, impactR, impactZ);
GetHFEImpactParameterCuts(track, hfeimpactRcut, hfeimpactnsigmaRcut);
GetHFEImpactParameters(track, hfeimpactR, hfeimpactnsigmaR);
}
+ if(fMaxImpactParameterRpar) {
+ GetMaxImpactParameterCutR(track,maximpactRcut);
+ }
UInt_t nclsTPC = GetTPCncls(track);
// printf("Check TPC findable clusters: %d, found Clusters: %d\n", track->GetTPCNclsF(), track->GetTPCNcls());
+ Float_t fractionSharedClustersTPC = GetTPCsharedClustersRatio(track);
Double_t ratioTPC = GetTPCclusterRatio(track);
UChar_t trdTracklets;
trdTracklets = GetTRDnTrackletsPID(track);
Int_t status2 = GetITSstatus(track, 1);
Bool_t statusL0 = CheckITSstatus(status1);
Bool_t statusL1 = CheckITSstatus(status2);
+ if(fFractionOfTPCSharedClusters > 0.0) {
+ if(TMath::Abs(fractionSharedClustersTPC) >= fFractionOfTPCSharedClusters) passsharedTPCcut = kFALSE;
+ }
if(TESTBIT(fRequirements, kMinImpactParamR)){
// cut on min. Impact Parameter in Radial direction
if(TMath::Abs(impactR) >= fImpactParamCut[0]) SETBIT(survivedCut, kMinImpactParamR);
// cut on max. Impact Parameter in Radial direction
if(TMath::Abs(impactR) <= fImpactParamCut[2]) SETBIT(survivedCut, kMaxImpactParamR);
}
+ if(fMaxImpactParameterRpar) {
+ if(TMath::Abs(impactR) >= maximpactRcut) passimpactRcut = kFALSE;
+ }
if(TESTBIT(fRequirements, kMaxImpactParamZ)){
// cut on max. Impact Parameter in Z direction
if(TMath::Abs(impactZ) <= fImpactParamCut[3]) SETBIT(survivedCut, kMaxImpactParamZ);
}
- if(fRequirements == survivedCut && tofstep && tofmismatchstep){
+ if(fRequirements == survivedCut && tofstep && tofmismatchstep && passimpactRcut && passsharedTPCcut){
//
// Track selected
//
return nClusters;
}
+//______________________________________________________
+Float_t AliHFEextraCuts::GetTPCsharedClustersRatio(AliVTrack *track){
+ //
+ // Get fraction of shared TPC clusters
+ //
+ Float_t fracClustersTPCShared = 0.0;
+ TString type = track->IsA()->GetName();
+ if(!type.CompareTo("AliESDtrack")){
+ AliESDtrack *esdtrack = dynamic_cast<AliESDtrack *>(track);
+ if(esdtrack){ // coverity
+ Float_t nClustersTPC = esdtrack->GetTPCclusters(0);
+ Int_t nClustersTPCShared = esdtrack->GetTPCnclsS();
+ if (nClustersTPC!=0) {
+ fracClustersTPCShared = Float_t(nClustersTPCShared)/Float_t(nClustersTPC);
+ }
+ }
+ }
+ return fracClustersTPCShared;
+}
+
//______________________________________________________
Double_t AliHFEextraCuts::GetTPCclusterRatio(AliVTrack *track){
//
hfeimpactnsigmaRcut = fIPcutParam[3]; // sigma cut
}
}
+//______________________________________________________
+void AliHFEextraCuts::GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maximpactRcut){
+ //
+ // Get max impact parameter cut r (pt dependent)
+ //
+
+ TString type = track->IsA()->GetName();
+ if(!type.CompareTo("AliESDtrack")){
+ AliESDtrack *esdtrack = dynamic_cast<AliESDtrack *>(track);
+ if(!esdtrack) return;
+ Double_t pt = esdtrack->Pt();
+ if(pt > 0.15) {
+ maximpactRcut = 0.0182 + 0.035/TMath::Power(pt,1.01); // abs R cut
+ }
+ else maximpactRcut = 9999999999.0;
+ }
+}
inline void SetMinNClustersTPC(Int_t minclusters, ETPCclusterDef_t def);
void SetTOFPID(Bool_t tofPid) { fTOFpid = tofPid;}
void SetTOFMISMATCH(Bool_t tofMismatch) { fTOFmismatch = tofMismatch;}
+ void SetMaxImpactParameterRpar(Bool_t maxImpactParameterRpar) {fMaxImpactParameterRpar = maxImpactParameterRpar;}
+ void SetFractionOfTPCSharedClusters(Double_t fractionOfTPCSharedClusters) {fFractionOfTPCSharedClusters = fractionOfTPCSharedClusters;}
void SetCheckITSstatus(Bool_t check) { fCheck = check; };
Bool_t GetCheckITSstatus() const { return fCheck; };
void GetImpactParameters(AliVTrack *track, Float_t &radial, Float_t &z);
void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy);
void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut);
+ void GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maximpactRcut);
+ Float_t GetTPCsharedClustersRatio(AliVTrack *track);
private:
typedef enum{
Bool_t fTOFmismatch; // TOF mismatch
UChar_t fTPCclusterDef; // TPC cluster definition Bitmap
UChar_t fTPCclusterRatioDef; // TPC cluster ratio definition Bitmap
+ Bool_t fMaxImpactParameterRpar; // Parametrized max impact parameter cut
+ Double_t fFractionOfTPCSharedClusters; // Cut on fraction of shared clusters
Bool_t fCheck; // check
TList *fQAlist; //! Directory for QA histograms
for(Int_t mom = 0; mom < 2; mom++){
fIsHeavy[mom] = 0;
}
+ memset(fElecBackgroundFactor, 0, sizeof(Double_t) * kElecBgSpecies * kBgPtBins);
+ memset(fBinLimit, 0, sizeof(Double_t) * (kBgPtBins+1));
}
//_______________________________________________________________________________________________
for(Int_t mom = 0; mom < 2; mom++){
fIsHeavy[mom] = 0;
}
+ memset(fElecBackgroundFactor, 0, sizeof(Double_t) * kElecBgSpecies * kBgPtBins);
+ memset(fBinLimit, 0, sizeof(Double_t) * (kBgPtBins+1));
}
//_______________________________________________________________________________________________
//
}
+//_______________________________________________________________________________________________
+void AliHFEmcQA::SetBackgroundWeightFactor(Double_t *elecBackgroundFactor, Double_t *binLimit)
+{
+ memcpy(fElecBackgroundFactor,elecBackgroundFactor,sizeof(Double_t) * kElecBgSpecies * kBgPtBins);
+ memcpy(fBinLimit,binLimit,sizeof(Double_t) * (kBgPtBins+1));
+/*
+ for(Int_t j=0;j < 6;j++){
+ for(Int_t i=0;i < 44;i++){
+ fElecBackgroundFactor[j][i] = elecBackgroundFactor[j][i];
+ }
+ }
+ for(Int_t i=0;i < 45;i++){
+ fBinLimit[i]=binLimit[i];
+ }
+ */
+}
+
//__________________________________________
void AliHFEmcQA::CreatDefaultHistograms(TList * const qaList)
{
CreateHistograms(AliHFEmcQA::kCharm,2,"mcqa_unitY_"); // create histograms for charm
CreateHistograms(AliHFEmcQA::kBeauty,2,"mcqa_unitY_"); // create histograms for beauty
CreateHistograms(AliHFEmcQA::kOthers,2,"mcqa_unitY_"); // create histograms for beauty
- CreateHistograms(AliHFEmcQA::kCharm,3,"mcqa_reccut_"); // create histograms for charm
- CreateHistograms(AliHFEmcQA::kBeauty,3,"mcqa_reccut_"); // create histograms for beauty
- CreateHistograms(AliHFEmcQA::kOthers,3,"mcqa_reccut_"); // create histograms for beauty
- CreateHistograms(AliHFEmcQA::kCharm,4,"mcqa_recpidcut_"); // create histograms for charm
- CreateHistograms(AliHFEmcQA::kBeauty,4,"mcqa_recpidcut_"); // create histograms for beauty
- CreateHistograms(AliHFEmcQA::kOthers,4,"mcqa_recpidcut_"); // create histograms for beauty
- CreateHistograms(AliHFEmcQA::kCharm,5,"mcqa_secvtxcut_"); // create histograms for charm
- CreateHistograms(AliHFEmcQA::kBeauty,5,"mcqa_secvtxcut_"); // create histograms for beauty
- CreateHistograms(AliHFEmcQA::kOthers,5,"mcqa_secvtxcut_"); // create histograms for beauty
// check D spectra
TString kDspecies[9];
binEdges[0] = AliHFEtools::MakeLogarithmicBinning(iBin[0], kPtbound[0], kPtbound[1]);
// bin size is chosen to consider ALICE D measurement
- Double_t xbins[13]={0,0.5,1.0,2.0,3.0,4.0,5.0,6.0,8.0,12,16,20,50};
+ Double_t xbins[15]={0,0.5,1.0,2.0,3.0,4.0,5.0,6.0,8.0,12,16,20,30,40,50};
Double_t ybins[10]={-7.5,-1.0,-0.9,-0.8,-0.5,0.5,0.8,0.9,1.0,7.5};
TString hname;
for (Int_t iDmeson=0; iDmeson<9; iDmeson++){
hname = "Dmeson"+kDspecies[iDmeson];
- fhD[iDmeson] = new TH2F(hname,hname+";p_{T} (GeV/c)",12,xbins,9,ybins);
+ fhD[iDmeson] = new TH2F(hname,hname+";p_{T} (GeV/c)",14,xbins,9,ybins);
hname = "DmesonLogbin"+kDspecies[iDmeson];
fhDLogbin[iDmeson] = new TH1F(hname,hname+";p_{T} (GeV/c)",iBin[0],binEdges[0]);
if(fQAhistos) fQAhistos->Add(fhD[iDmeson]);
binEdges[0] = AliHFEtools::MakeLogarithmicBinning(iBin[0], kPtbound[0], kPtbound[1]);
- Double_t xcorrbin[201];
- for (int icorrbin = 0; icorrbin< 201; icorrbin++){
+ Double_t xcorrbin[501];
+ for (int icorrbin = 0; icorrbin< 501; icorrbin++){
xcorrbin[icorrbin]=icorrbin*0.1;
}
hname = hnopt+"ePtRatio_"+kqTypeLabel[kQuark];
fHistComm[iq][icut].fePtRatio = new TH2F(hname,hname+";p_{T} (GeV/c);momentum fraction",200,0,20,100,0,1);
hname = hnopt+"PtCorr_"+kqTypeLabel[kQuark];
- fHistComm[iq][icut].fPtCorr = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,xcorrbin,44,binEdges[0]);
+ fHistComm[iq][icut].fPtCorr = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",500,xcorrbin,44,binEdges[0]);
//fHistComm[iq][icut].fPtCorr = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,0,20,200,0,20);
hname = hnopt+"PtCorrDp_"+kqTypeLabel[kQuark];
- fHistComm[iq][icut].fPtCorrDp= new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,xcorrbin,44,binEdges[0]);
+ fHistComm[iq][icut].fPtCorrDp= new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",500,xcorrbin,44,binEdges[0]);
//fHistComm[iq][icut].fPtCorrDp= new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,0,20,200,0,20);
hname = hnopt+"PtCorrD0_"+kqTypeLabel[kQuark];
- fHistComm[iq][icut].fPtCorrD0 = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,xcorrbin,44,binEdges[0]);
+ fHistComm[iq][icut].fPtCorrD0 = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",500,xcorrbin,44,binEdges[0]);
//fHistComm[iq][icut].fPtCorrD0 = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,0,20,200,0,20);
hname = hnopt+"PtCorrDrest_"+kqTypeLabel[kQuark];
- fHistComm[iq][icut].fPtCorrDrest = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,xcorrbin,44,binEdges[0]);
+ fHistComm[iq][icut].fPtCorrDrest = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",500,xcorrbin,44,binEdges[0]);
//fHistComm[iq][icut].fPtCorrDrest = new TH2F(hname,hname+";D p_{T} (GeV/c);e p_{T} (GeV/c)",200,0,20,200,0,20);
hname = hnopt+"DePtRatio_"+kqTypeLabel[kQuark];
fHistComm[iq][icut].fDePtRatio = new TH2F(hname,hname+";p_{T} (GeV/c);momentum fraction",100,0,20,100,0,1);
}
+//__________________________________________
void AliHFEmcQA::GetMesonKine()
{
//
if(!((id2-id1)==2)) continue;
for(int idx=id1; idx<=id2; idx++){
if(!(mctrackdaugt = fMCEvent->GetTrack(idx))) continue;
- mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt);
+ if(!(mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt))) continue;
if(abs(mctrackd->PdgCode()) == 11 && TMath::Abs(mctrackd->Eta())<0.8)
fMCQACollection->Fill("piondaughters",mctrackd->Pt());
}
if(!((id2-id1)==2||(id2-id1)==3)) continue;
for(int idx=id1; idx<=id2; idx++){
if(!(mctrackdaugt = fMCEvent->GetTrack(idx))) continue;
- mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt);
+ if(!(mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt))) continue;
if(abs(mctrackd->PdgCode()) == 11 && TMath::Abs(mctrackd->Eta())<0.8)
fMCQACollection->Fill("etadaughters",mctrackd->Pt());
}
if(!((id2-id1)==1||(id2-id1)==2)) continue;
for(int idx=id1; idx<=id2; idx++){
if(!(mctrackdaugt = fMCEvent->GetTrack(idx))) continue;
- mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt);
+ if(!(mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt))) continue;
if(abs(mctrackd->PdgCode()) == 11 && TMath::Abs(mctrackd->Eta())<0.8)
fMCQACollection->Fill("omegadaughters",mctrackd->Pt());
}
if(!((id2-id1)==1)) continue;
for(int idx=id1; idx<=id2; idx++){
if(!(mctrackdaugt = fMCEvent->GetTrack(idx))) continue;
- mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt);
+ if(!(mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt))) continue;
if(abs(mctrackd->PdgCode()) == 11 && TMath::Abs(mctrackd->Eta())<0.8)
fMCQACollection->Fill("phidaughters",mctrackd->Pt());
}
if(!((id2-id1)==2||(id2-id1)==3)) continue;
for(int idx=id1; idx<=id2; idx++){
if(!(mctrackdaugt = fMCEvent->GetTrack(idx))) continue;
- mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt);
+ if(!(mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt))) continue;
if(abs(mctrackd->PdgCode()) == 11 && TMath::Abs(mctrackd->Eta())<0.8)
fMCQACollection->Fill("etapdaughters",mctrackd->Pt());
}
if(!((id2-id1)==1)) continue;
for(int idx=id1; idx<=id2; idx++){
if(!(mctrackdaugt = fMCEvent->GetTrack(idx))) continue;
- mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt);
+ if(!(mctrackd = dynamic_cast<AliMCParticle *>(mctrackdaugt))) continue;
if(abs(mctrackd->PdgCode()) == 11 && TMath::Abs(mctrackd->Eta())<0.8)
fMCQACollection->Fill("rhodaughters",mctrackd->Pt());
}
return origin;
}
+//__________________________________________
+Double_t AliHFEmcQA::GetWeightFactor(AliMCParticle *mctrack){
+ //
+ // Get weighting factor for the realistic background estimation
+ //
+ AliMCParticle *mctrackmother = NULL;
+ Double_t weightElecBg = 0.;
+ Double_t mesonPt = 0.;
+ Double_t bgcategory = 0.;
+ Int_t mArr = -1;
+ Int_t mesonID = GetElecSource(mctrack->Particle());
+ if(mesonID==kGammaPi0 || mesonID==kPi0) mArr=0; //pion
+ else if(mesonID==kGammaEta || mesonID==kEta) mArr=1; //eta
+ else if(mesonID==kGammaOmega || mesonID==kOmega) mArr=2; //omega
+ else if(mesonID==kGammaPhi || mesonID==kPhi) mArr=3; //phi
+ else if(mesonID==kGammaEtaPrime || mesonID==kEtaPrime) mArr=4; //etaprime
+ else if(mesonID==kGammaRho0 || mesonID==kRho0) mArr=5; //rho
+
+ if(!(mArr<0)){
+ if(mesonID>=kGammaPi0) { // conversion electron, be careful with the enum odering
+ Int_t glabel=TMath::Abs(mctrack->GetMother()); // gamma label
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ glabel=TMath::Abs(mctrackmother->GetMother()); // gamma's mother's label
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonPt = mctrackmother->Pt(); //meson pt
+ bgcategory = 1.;
+ }
+ }
+ }
+ else{ // nonHFE except for the conversion electron
+ Int_t glabel=TMath::Abs(mctrack->GetMother());
+ if((mctrackmother = dynamic_cast<AliMCParticle *>(fMCEvent->GetTrack(glabel)))){
+ mesonPt=mctrackmother->Pt(); //meson pt
+ bgcategory = -1.;
+ }
+ }
+ weightElecBg=fElecBackgroundFactor[mArr][kBgPtBins-1];
+ for(int ii=0; ii<kBgPtBins; ii++){
+ if( (mesonPt > fBinLimit[ii]) && (mesonPt < fBinLimit[ii+1])){
+ weightElecBg = fElecBackgroundFactor[mArr][ii];
+ }
+ }
+ /*for(int jj=0; jj<6; jj++){
+ for(int ii=0; ii<kBgPtBins; ii++){
+ printf("species= %d ptbin= %d wfactor= %lf\n",jj,ii,fElecBackgroundFactor[jj][ii]);
+ }
+ }*/
+ }
+
+ return bgcategory*weightElecBg;
+}
+
//__________________________________________
void AliHFEmcQA::AliHists::FillList(TList *l) const {
//
class TString;
class AliMCEvent;
class AliGenEventHeader;
+class AliMCParticle;
class AliAODMCParticle;
class AliHFEcollection;
enum ProcessType {
kPairCreationFromq, kPairCreationFromg, kFlavourExitation, kGluonSplitting, kInitialPartonShower, kLightQuarkShower
};
+ enum{
+ kBgPtBins = 44,
+ kElecBgSpecies = 6
+ };
+
AliHFEmcQA();
AliHFEmcQA(const AliHFEmcQA &p); // copy constructor
void GetQuarkKine(TParticle *part, Int_t iTrack, const Int_t kquark); // get heavy quark kinematics distribution
void GetHadronKine(TParticle *part, const Int_t kquark); // get heavy hadron kinematics distribution
void GetDecayedKine(TParticle *part, const Int_t kquark, const Int_t kdecayed, Int_t icut); // get decay electron kinematics distribution
- void GetDecayedKine(AliAODMCParticle *mcpart, const Int_t kquark, Int_t kdecayed, Int_t icut); // get decay electron kinematics for AOD
+ void GetDecayedKine(AliAODMCParticle *mcpart, const Int_t kquark, Int_t kdecayed, Int_t icut); // get decay electron kinematics for AOD
void GetMesonKine(); // get meson and its decay electron pt spectra
void EndOfEventAna(const Int_t kquark); // run analysis which should be done at the end of the event loop
- Int_t GetSource(const TParticle * const mcpart); // return source id
- Int_t GetElecSource(TParticle * const mcpart); // return electron source id
- Int_t GetSource(const AliAODMCParticle * const mcpart); // return electron source id for AOD
+ Int_t GetSource(const TParticle * const mcpart); // return source id
+ Int_t GetElecSource(TParticle * const mcpart); // return electron source id
+ Int_t GetSource(const AliAODMCParticle * const mcpart); // return electron source id for AOD
+ Double_t GetWeightFactor(AliMCParticle *mctrack); // return weighting factor for electron's mother meson
+
+ void SetBackgroundWeightFactor(Double_t *elecBackgroundFactor, Double_t *binLimit);
+// void SetBackgroundWeightFactor(Double_t const elecBackgroundFactor[6][44], Double_t const binLimit[45]) {fElecBackgroundFactor=elecBackgroundFactor; fBinLimit=binLimit;}
protected:
void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); //
Int_t fNparents; // number of heavy hadrons to be considered
Int_t fParentSelect[2][7]; // heavy hadron species
+ Double_t fElecBackgroundFactor[6][44]; // Electron background factors
+ Double_t fBinLimit[45]; // Electron background bins
+
ClassDef(AliHFEmcQA,1);
};
container[3] = step;
fHistos->Fill("hTPCsigma", container);
- container[2] = trdpid ? trdpid->GetElectronLikelihood(track->GetRecTrack(), anatype) : 0;
+ container[2] = trdpid->GetElectronLikelihood(track->GetRecTrack(), anatype);
fHistos->Fill("hTRDlikelihood", container);
if(track->IsESDanalysis()){
- container[2] = trdpid ? trdpid->GetTRDSignalV1(dynamic_cast<const AliESDtrack *>(track->GetRecTrack())) : 0;
+ container[2] = trdpid->GetTRDSignalV1(dynamic_cast<const AliESDtrack *>(track->GetRecTrack()));
fHistos->Fill("hTRDtruncatedMean", container);
}
for(UInt_t ily = 0; ily < 6; ily++){
- container[2] = trdpid ? trdpid->GetChargeLayer(track->GetRecTrack(), ily, anatype) : 0;
+ container[2] = trdpid->GetChargeLayer(track->GetRecTrack(), ily, anatype);
fHistos->Fill("hTRDcharge", container);
}
}