ClassImp(AliDielectronEventCuts)
+const char* AliDielectronEventCuts::fgkVtxNames[AliDielectronEventCuts::kVtxTracksOrSPD+1] = {"Tracks", "SPD", "TPC", "Any", "TracksOrSPD"};
+
AliDielectronEventCuts::AliDielectronEventCuts() :
AliAnalysisCuts(),
fVtxZmin(0.),
return kTRUE;
}
+//________________________________________________________________________
+void AliDielectronEventCuts::Print(const Option_t* /*option*/) const
+{
+ //
+ // Print cuts and the range
+ //
+ printf("cut ranges for '%s'\n",GetTitle());
+ printf("All Cuts have to be fulfilled\n");
+
+ Int_t iCut=0;
+ if(fRequireVtx) {
+ printf("Cut %02d: vertex required \n",iCut); iCut++; }
+ printf("Cut %02d: vertex type: %s \n", iCut, fgkVtxNames[fVtxType]); iCut++;
+ if(fMinVtxContributors) {
+ printf("Cut %02d: vertex contributors >= %d \n", iCut, fMinVtxContributors); iCut++; }
+ if(fVtxZmin<fVtxZmax) {
+ printf("Cut %02d: %f < %s < %f\n", iCut, fVtxZmin, "Zvtx", fVtxZmax); iCut++;}
+ if(fCentMin<fCentMax) {
+ printf("Cut %02d: %f < %s < %f\n", iCut, fCentMin, "V0centrality", fCentMax);iCut++; }
+ if(fMultITSTPC) {
+ printf("Cut %02d: cut on multiplcity ITS vs. TPC \n", iCut); iCut++; }
+ if(fRequireV0and) {
+ printf("Cut %02d: require V0and type: %c \n", iCut, fRequireV0and); iCut++; }
+
+}
+
kPdgCode, // PDG code
kPdgCodeMother,
kPdgCodeGrandMother, // PDG code of the grandmother
+ kHasCocktailMother, // true if particle is added via MC generator cocktail (AliDielectronSignal::kDirect)
+ kHasCocktailGrandMother, // true if particle is added via MC generator cocktail (AliDielectronSignal::kDirect)
kNumberOfDaughters, // number of daughters
kHaveSameMother, // check that particles have the same mother (MC)
kIsJpsiPrimary, // check if the particle is primary (MC)
values[AliDielectronVarManager::kPdgCode]=-1;
values[AliDielectronVarManager::kPdgCodeMother]=-1;
values[AliDielectronVarManager::kPdgCodeGrandMother]=-1;
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=0;
values[AliDielectronVarManager::kNumberOfDaughters]=-999;
AliDielectronMC *mc=AliDielectronMC::Instance();
if (mc->HasMC()){
- if (mc->GetMCTrack(particle))
+ if (mc->GetMCTrack(particle)) {
values[AliDielectronVarManager::kPdgCode]=mc->GetMCTrack(particle)->PdgCode();
-
+ Int_t trkLbl = mc->GetMCTrack(particle)->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailMother]=mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect);
+ }
AliMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother
if (motherMC){
values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
+ Int_t motherLbl = motherMC->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=mc->CheckParticleSource(motherLbl, AliDielectronSignalMC::kDirect);
motherMC=mc->GetMCTrackMother(motherMC); //grand motherMC
if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
values[AliDielectronVarManager::kPdgCode]=-1;
values[AliDielectronVarManager::kPdgCodeMother]=-1;
values[AliDielectronVarManager::kPdgCodeGrandMother]=-1;
-
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=0;
+
values[AliDielectronVarManager::kNumberOfDaughters]=-1;
AliDielectronMC *mc=AliDielectronMC::Instance();
if (mc->HasMC()){
- if (mc->GetMCTrack(particle))
+ if (mc->GetMCTrack(particle)) {
values[AliDielectronVarManager::kPdgCode]=mc->GetMCTrack(particle)->PdgCode();
-
+ Int_t trkLbl = mc->GetMCTrack(particle)->GetLabel();
+ // printf("trklbl %d for %p->%p \n",trkLbl,particle,mc->GetMCTrack(particle));
+ values[AliDielectronVarManager::kHasCocktailMother]=mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect);
+ }
AliAODMCParticle *motherMC=mc->GetMCTrackMother(particle); //mother
if (motherMC){
values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
-
+ Int_t motherLbl = motherMC->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=mc->CheckParticleSource(motherLbl, AliDielectronSignalMC::kDirect);
+
motherMC=mc->GetMCTrackMother(motherMC); //grand motherMC
if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
}
values[AliDielectronVarManager::kPdgCode] = -1;
values[AliDielectronVarManager::kPdgCodeMother] = -1;
values[AliDielectronVarManager::kPdgCodeGrandMother] = -1;
-
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=0;
+
// Fill common AliVParticle interface information
FillVarVParticle(particle, values);
// Fill AliMCParticle interface specific information
values[AliDielectronVarManager::kPdgCode] = particle->PdgCode();
+ Int_t trkLbl = particle->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailMother]=mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect);
AliMCParticle *motherMC = mc->GetMCTrackMother(particle);
if (motherMC){
values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
+ Int_t motherLbl = motherMC->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=mc->CheckParticleSource(motherLbl, AliDielectronSignalMC::kDirect);
+
motherMC=mc->GetMCTrackMother(motherMC); //grand mother
if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
}
values[AliDielectronVarManager::kPdgCode] = 0;
values[AliDielectronVarManager::kPdgCodeMother] = 0;
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
AliDielectronMC *mc=AliDielectronMC::Instance();
AliVParticle* mother=0x0;
values[AliDielectronVarManager::kPdgCode] = -1;
values[AliDielectronVarManager::kPdgCodeMother] = -1;
values[AliDielectronVarManager::kPdgCodeGrandMother] = -1;
-
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=0;
+
// Fill common AliVParticle interface information
FillVarVParticle(particle, values);
// Fill AliAODMCParticle interface specific information
values[AliDielectronVarManager::kPdgCode] = particle->PdgCode();
+ Int_t trkLbl = particle->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailMother]=mc->CheckParticleSource(trkLbl, AliDielectronSignalMC::kDirect);
AliAODMCParticle *motherMC = mc->GetMCTrackMother(particle);
if (motherMC){
values[AliDielectronVarManager::kPdgCodeMother]=motherMC->PdgCode();
+ Int_t motherLbl = motherMC->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=mc->CheckParticleSource(motherLbl, AliDielectronSignalMC::kDirect);
+
motherMC=mc->GetMCTrackMother(motherMC); //grand mother
if (motherMC) values[AliDielectronVarManager::kPdgCodeGrandMother]=motherMC->PdgCode();;
}
values[AliDielectronVarManager::kPdgCode]=-1;
values[AliDielectronVarManager::kPdgCodeMother]=-1;
values[AliDielectronVarManager::kPdgCodeGrandMother]=-1;
-
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=0;
Double_t errPseudoProperTime2 = -1;
// Fill common AliVParticle interface information
values[AliDielectronVarManager::kIsJpsiPrimary] = mc->IsJpsiPrimary(pair);
values[AliDielectronVarManager::kHaveSameMother] = samemother ;
- // fill kPseudoProperTimeResolution
+ // fill kPseudoProperTimeResolution
values[AliDielectronVarManager::kPseudoProperTimeResolution] = -1e10;
// values[AliDielectronVarManager::kPseudoProperTimePull] = -1e10;
if(samemother && fgEvent) {
const AliMCEvent *mcevent = mc->GetMCEvent();
const AliVVertex* mcVtx = mcevent ? mcevent->GetPrimaryVertex() : 0x0;
if(motherMC && mcVtx) {
- const Double_t lxyMC = ( (motherMC->Xv() - mcVtx->GetX()) * motherMC->Px() +
+ Int_t motherLbl = motherMC->GetLabel();
+ values[AliDielectronVarManager::kHasCocktailMother]=mc->CheckParticleSource(motherLbl, AliDielectronSignalMC::kDirect);
+ const Double_t lxyMC = ( (motherMC->Xv() - mcVtx->GetX()) * motherMC->Px() +
(motherMC->Yv() - mcVtx->GetY()) * motherMC->Py() ) / motherMC->Pt();
const Double_t pseudoMC = lxyMC * (TDatabasePDG::Instance()->GetParticle(443)->Mass())/motherMC->Pt();
values[AliDielectronVarManager::kPseudoProperTimeResolution] = values[AliDielectronVarManager::kPseudoProperTime] - pseudoMC;
if (errPseudoProperTime2 > 0)
values[AliDielectronVarManager::kPseudoProperTimePull] = values[AliDielectronVarManager::kPseudoProperTimeResolution]/sqrt(errPseudoProperTime2);
- }
+ }
}
}
values[AliDielectronVarManager::kPdgCode] = -1;
values[AliDielectronVarManager::kPdgCodeMother] = -1;
values[AliDielectronVarManager::kPdgCodeGrandMother] = -1;
-
+ values[AliDielectronVarManager::kHasCocktailMother]=0;
+ values[AliDielectronVarManager::kHasCocktailGrandMother]=0;
// if ( fgEvent ) AliDielectronVarManager::Fill(fgEvent, values);
for (Int_t i=AliDielectronVarManager::kPairMax; i<AliDielectronVarManager::kNMaxValues; ++i)