if(TMath::Abs(negativeMC->GetPdgCode())!=11 || TMath::Abs(positiveMC->GetPdgCode())!=11){
continue;
}
- if(negativeMC->GetPdgCode()==positiveMC->GetPdgCode()){
+ if(negativeMC->GetPdgCode() == positiveMC->GetPdgCode()){
continue;
}
- if(negativeMC->GetUniqueID() != 5 || positiveMC->GetUniqueID() !=5){
+ if(negativeMC->GetUniqueID() != 5 || positiveMC->GetUniqueID() !=5){ // id 5 is conversion
continue;
}
if(fV0Reader->GetMotherMCParticle()->GetPdgCode() == 22){
+ if(fDoCF){
+ Double_t containerInput[3];
+ containerInput[0] = fV0Reader->GetMotherCandidatePt();
+ containerInput[1] = fV0Reader->GetMotherCandidateEta();
+ containerInput[2] = fV0Reader->GetMotherCandidateMass();
+ fCFManager->GetParticleContainer()->Fill(containerInput,kStepTrueGamma); // for CF
+ }
+
fHistograms->FillHistogram("ESD_TrueConvGamma_Pt", fV0Reader->GetMotherCandidatePt());
fHistograms->FillHistogram("ESD_TrueConvGamma_Energy", fV0Reader->GetMotherCandidateEnergy());
fHistograms->FillHistogram("ESD_TrueConvGamma_Eta", fV0Reader->GetMotherCandidateEta());
kStepLikeSign = 2,
kStepTPCRefit = 3,
kStepKinks = 4,
- kStepGetOnFly = 5,
- kStepNContributors = 6,
- kStepTPCPID = 7,
- kStepR = 8,
- kStepLine = 9,
- kStepZ = 10,
- kStepNDF = 11,
- kStepChi2 = 12,
- kStepEta = 13,
- kStepPt = 14
+ kStepdEdx = 5,
+ kStepGetOnFly = 6,
+ kStepNContributors = 7,
+ kStepTPCPID = 8,
+ kStepR = 9,
+ kStepLine = 10,
+ kStepZ = 11,
+ kStepNDF = 12,
+ kStepChi2 = 13,
+ kStepEta = 14,
+ kStepPt = 15,
+ kStepTrueGamma = 16
};
-
+
AliV0Reader* fV0Reader; // The V0 reader object
AliStack * fStack; // pointer to the MC particle stack
// TClonesArray *fAODObjects;
- ClassDef(AliAnalysisTaskGammaConversion, 5); // Analysis task for gamma conversions
+ ClassDef(AliAnalysisTaskGammaConversion, 6); // Analysis task for gamma conversions
};
#endif //ALIANALYSISTASKGAMMA_H
Int_t z = GetZBinIndex(zvalue);
Int_t m = GetMultiplicityBinIndex(multiplicity);
- if(fBGEventCounter[z][m] >= fNEvents -1){
+ if(fBGEventCounter[z][m] >= fNEvents){
fBGEventCounter[z][m]=0;
}
Int_t eventCounter=fBGEventCounter[z][m];
//set the z and multiplicity numbers
fBGEvents[z][m][eventCounter].fZVertexPosition = zvalue;
fBGEvents[z][m][eventCounter].fChargedTrackMultiplicity = multiplicity;
+ fBGEventCounter[z][m]++;
}
AliGammaConversionKFVector* AliGammaConversionBGHandler::GetBGGoodV0s(Int_t event, Double_t zvalue, Int_t multiplicity){
return &(fBGEvents[z][m][event].fReconstructedGammas);
}
+
+void AliGammaConversionBGHandler::PrintBGArray(){
+ for(Int_t z=0;z<fNBinsZ;z++){
+ cout<<"Getting the data for z bin: "<<z<<endl;
+ for(Int_t multiplicity=0;multiplicity<fNBinsMultiplicity;multiplicity++){
+ cout<<"Getting the data for multiplicity bin: "<<multiplicity<<endl;
+ for(Int_t event=0;event<fNEvents;event++){
+ if(fBGEvents[z][multiplicity][event].fReconstructedGammas.size()>0){
+ cout<<"Event: "<<event<<" has: "<<fBGEvents[z][multiplicity][event].fReconstructedGammas.size()<<endl;
+ }
+ }
+ }
+ }
+}
AliGammaConversionKFVector* GetBGGoodV0s(Int_t event, Double_t zvalue, Int_t multiplicity);
+ void PrintBGArray();
+
private:
Int_t fNEvents;
}
fCurrentEventGoodV0s->Delete();
fCurrentV0IndexNumber=0;
+ // fBGEventHandler->PrintBGArray(); // for debugging
}
kStepLikeSign = 2,
kStepTPCRefit = 3,
kStepKinks = 4,
- kStepGetOnFly = 5,
- kStepNContributors = 6,
- kStepTPCPID = 7,
- kStepR = 8,
- kStepLine = 9,
- kStepZ = 10,
- kStepNDF = 11,
- kStepChi2 = 12,
- kStepEta = 13,
- kStepPt = 14
+ kStepdEdx = 5,
+ kStepGetOnFly = 6,
+ kStepNContributors = 7,
+ kStepTPCPID = 8,
+ kStepR = 9,
+ kStepLine = 10,
+ kStepZ = 11,
+ kStepNDF = 12,
+ kStepChi2 = 13,
+ kStepEta = 14,
+ kStepPt = 15,
+ kStepTrueGamma = 16
};
-
-
AliV0Reader(); //constructor
AliV0Reader(const AliV0Reader & g); //copy constructor
AliV0Reader & operator = (const AliV0Reader & g); //assignment operator
AliGammaConversionBGHandler *fBGEventHandler;
Bool_t fBGEventInitialized;
- ClassDef(AliV0Reader,8)
+ ClassDef(AliV0Reader,9)
};
#endif
//Pt-plots
-Int_t kGCnXBinsPt = 200;
+Int_t kGCnXBinsPt = 500;
Double_t kGCfirstXBinPt = 0.;
Double_t kGClastXBinPt = 50.;
Int_t kGCnXBinsSpectra = 500;
Double_t kGCfirstXBinSpectra = 0.;
Double_t kGClastXBinSpectra = 1.;
-Int_t kGCnYBinsSpectra = 100;
+Int_t kGCnYBinsSpectra = 500;
Double_t kGCfirstYBinSpectra = 0.;
Double_t kGClastYBinSpectra = 50.;
UInt_t imass = 2;
//how many selection steps
- UInt_t nstep = 15;
+ UInt_t nstep = 17;
const Int_t nvar = 3;
const Int_t nbin0 = kGCnXBinsPt;
const Int_t nbin1 = kGCnXBinsEta;