fDoImpParDstar(kFALSE),
fNImpParBins(400),
fLowerImpPar(-2000.),
- fHigherImpPar(2000.)
+ fHigherImpPar(2000.),
+ fDoDStarVsY(kFALSE)
{
//
// Default ctor
fDoImpParDstar(kFALSE),
fNImpParBins(400),
fLowerImpPar(-2000.),
- fHigherImpPar(2000.)
+ fHigherImpPar(2000.),
+ fDoDStarVsY(kFALSE)
{
//
// Constructor. Initialization of Inputs and Outputs
AliAODRecoDecayHF2Prong* theD0particle = (AliAODRecoDecayHF2Prong*)dstarD0pi->Get2Prong();
if (!theD0particle) continue;
- Int_t isDStar = 0;
+ Int_t isDStar = 0;
TClonesArray *mcArray = 0;
AliAODMCHeader *mcHeader=0;
Bool_t isPrimary=kTRUE;
- Float_t truePt=0.;
- Float_t xDecay=0.;
- Float_t yDecay=0.;
- Float_t zDecay=0.;
Float_t pdgCode=-2;
Float_t trueImpParXY=0.;
Int_t checkOrigin = CheckOrigin(mcArray,partDSt);
if(checkOrigin==5) isPrimary=kFALSE;
AliAODMCParticle *dg0 = (AliAODMCParticle*)mcArray->At(partDSt->GetDaughter(0));
- AliAODMCParticle *dg01 = (AliAODMCParticle*)mcArray->At(dg0->GetDaughter(0));
- truePt=dg0->Pt();
- xDecay=dg01->Xv();
- yDecay=dg01->Yv();
- zDecay=dg01->Zv();
+ // AliAODMCParticle *dg01 = (AliAODMCParticle*)mcArray->At(dg0->GetDaughter(0));
pdgCode=TMath::Abs(partDSt->GetPdgCode());
if(!isPrimary){
trueImpParXY=GetTrueImpactParameterD0(mcHeader,mcArray,dg0)*1000.;
pdgCode=-1;
}
}
-
+
+ if(pdgCode==-1) AliDebug(2,"No particle assigned! check\n");
+
Int_t ptbin=fCuts->PtBin(dstarD0pi->Pt());
// quality selction on tracks and region of interest
Double_t invmassDelta = dstarD0pi->DeltaInvMass();
if (TMath::Abs(invmassDelta-(mPDGDstar-mPDGD0))>fPeakWindow) continue;
-
-
- Int_t isSelected=fCuts->IsSelected(dstarD0pi,AliRDHFCuts::kCandidate); //selected
-
+ Int_t isSelected=fCuts->IsSelected(dstarD0pi,AliRDHFCuts::kCandidate,aodEvent); //selected
+
// after cuts
if(fDoImpParDstar && isSelected){
fHistMassPtImpParTCDs[0]->Fill(arrayForSparse);
}
}
+ if (fDoDStarVsY && isSelected){
+ ((TH3F*) (fOutputPID->FindObject("deltamassVsyVsPt")))->Fill(dstarD0pi->DeltaInvMass(),dstarD0pi->YDstar(),dstarD0pi->Pt() );
+ }
+
+
// fill PID
FillSpectrum(dstarD0pi,isDStar,fCuts,isSelected,fOutputPID);
SideBandBackground(dstarD0pi,fCuts,isSelected, fOutputPID);
//swich off the PID selection
fCuts->SetUsePID(kFALSE);
- Int_t isSelectedNoPID=fCuts->IsSelected(dstarD0pi,AliRDHFCuts::kCandidate); //selected
+ Int_t isSelectedNoPID=fCuts->IsSelected(dstarD0pi,AliRDHFCuts::kCandidate, aodEvent); //selected
fCuts->SetUsePID(kTRUE);
FillSpectrum(dstarD0pi,isDStar,fCuts,isSelectedNoPID,fOutputAll);
- SideBandBackground(dstarD0pi,fCuts,isSelectedNoPID, fOutputAll);
+ // SideBandBackground(dstarD0pi,fCuts,isSelectedNoPID, fOutputAll);
// rare D search ------
if(fDoSearch){
TLorentzVector lorentzTrack1(0,0,0,0); // lorentz 4 vector
TLorentzVector lorentzTrack2(0,0,0,0); // lorentz 4 vector
- for (Int_t i=0; i<aodEvent->GetNTracks(); i++){
+ for (Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
- AliAODTrack* aodTrack = aodEvent->GetTrack(i);
+ AliAODTrack* aodTrack = dynamic_cast<AliAODTrack*>(aodEvent->GetTrack(i));
+ if(!aodTrack) AliFatal("Not a standard AOD");
if(dstarD0pi->Charge() == aodTrack->Charge()) continue;
if((!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)|| (!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
// define histograms
DefineHistograms();
- //Counter for Normalization
- fCounter = new AliNormalizationCounter(Form("%s",GetOutputSlot(5)->GetContainer()->GetName()));
- fCounter->Init();
+ //Counter for Normalization
+ fCounter = new AliNormalizationCounter(Form("%s",GetOutputSlot(5)->GetContainer()->GetName()));
+ fCounter->Init();
- if(fDoImpParDstar) CreateImpactParameterHistos();
+ if(fDoImpParDstar) CreateImpactParameterHistos();
PostData(1,fOutput);
PostData(2,fOutputAll);
fOutputPID->Add(etapidMass);
fOutputPID->Add(etapidSgn);
fOutputPID->Add(etapidBkg);
-
+
+ if (fDoDStarVsY){
+ TH3F* deltamassVsyVsPtPID = new TH3F("deltamassVsyVsPt", "delta mass Vs y Vs pT; #DeltaM [GeV/c^{2}]; y; p_{T} [GeV/c]", 700,0.13,0.2, 40, -1, 1, 36, 0., 36.);
+ fOutputPID->Add(deltamassVsyVsPtPID);
+ }
return;
}
//________________________________________________________________________
if(!isSel) return;
Int_t ptbin=cuts->PtBin(part->Pt());
-
- Bool_t massInRange=kFALSE;
-
+
// select the side bands intervall
Double_t invmassD0 = part->InvMassD0();
if(TMath::Abs(invmassD0-1.865)>4*fD0Window && TMath::Abs(invmassD0-1.865)<8*fD0Window){
// for pt and eta
Double_t invmassDelta = part->DeltaInvMass();
- if (TMath::Abs(invmassDelta-0.14557)<fPeakWindow) massInRange=kTRUE;
TString fillthis="";
fillthis="histSideBandMass_";
AliAODRecoDecayHF2Prong* theD0particle = (AliAODRecoDecayHF2Prong*)part->Get2Prong();
- Int_t okD0WrongSign,okD0barWrongSign;
+ Int_t okD0WrongSign;
Double_t wrongMassD0=0.;
Int_t isSelected=cuts->IsSelected(part,AliRDHFCuts::kCandidate); //selected
}
okD0WrongSign = 1;
- okD0barWrongSign = 1;
//if is D*+ than assume D0bar
if(part->Charge()>0 && (isSelected ==1)) {
okD0WrongSign = 0;
}
- if(part->Charge()<0 && (isSelected ==2)){
- okD0barWrongSign = 0;
- }
// assign the wrong mass in case the cuts return both D0 and D0bar
if(part->Charge()>0 && (isSelected ==3)) {
okD0WrongSign = 0;
- } else if(part->Charge()<0 && (isSelected ==3)){
- okD0barWrongSign = 0;
}
//wrong D0 inv mass
}
}
+
//-------------------------------------------------------------------------------
Int_t AliAnalysisTaskSEDStarSpectra::CheckOrigin(TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate) const {
//
Int_t istep = 0;
Int_t abspdgGranma =0;
Bool_t isFromB=kFALSE;
- Bool_t isQuarkFound=kFALSE;
while (mother >0 ){
istep++;
AliAODMCParticle* mcGranma = dynamic_cast<AliAODMCParticle*>(arrayMC->At(mother));
if ((abspdgGranma > 500 && abspdgGranma < 600) || (abspdgGranma > 5000 && abspdgGranma < 6000)){
isFromB=kTRUE;
}
- if(abspdgGranma==4 || abspdgGranma==5) isQuarkFound=kTRUE;
mother = mcGranma->GetMother();
}else{
AliError("Failed casting the mother particle!");