fKeepingOnlyPYTHIABkg(kFALSE),
fHistoMCLcK0SpGen(0x0),
fHistoMCLcK0SpGenAcc(0x0),
- fHistoMCLcK0SpGenLimAcc(0x0)
+ fHistoMCLcK0SpGenLimAcc(0x0),
+ fTriggerMask(0)
{
//
// Default ctor
fKeepingOnlyPYTHIABkg(kFALSE),
fHistoMCLcK0SpGen(0x0),
fHistoMCLcK0SpGenAcc(0x0),
- fHistoMCLcK0SpGenLimAcc(0x0)
-
+ fHistoMCLcK0SpGenLimAcc(0x0),
+ fTriggerMask(0)
{
//
// Constructor. Initialization of Inputs and Outputs
// a query. It always runs on the client, it can be used to present
// the results graphically or save the results to file.
- //AliInfo("Terminate","");
+ AliInfo("Terminate");
AliAnalysisTaskSE::Terminate();
fOutput = dynamic_cast<TList*> (GetOutputData(1));
}
- AliDebug(2, Form("At MC level, %f Lc --> K0S + p were found", fHistoMCLcK0SpGen->GetEntries()));
- AliDebug(2, Form("At MC level, %f Lc --> K0S + p were found in the acceptance", fHistoMCLcK0SpGenAcc->GetEntries()));
-
+ //AliDebug(2, Form("At MC level, %f Lc --> K0S + p were found", fHistoMCLcK0SpGen->GetEntries()));
+ //AliDebug(2, Form("At MC level, %f Lc --> K0S + p were found in the acceptance", fHistoMCLcK0SpGenAcc->GetEntries()));
+ //AliDebug(2, Form("At Reco level, %lld Lc --> K0S + p were found", fVariablesTreeSgn->GetEntries()));
+ if(fHistoMCLcK0SpGen) {
+ AliInfo(Form("At MC level, %f Lc --> K0S + p were found", fHistoMCLcK0SpGen->GetEntries()));
+ } else {
+ AliInfo("fHistoMCLcK0SpGen not available");
+ }
+ if(fHistoMCLcK0SpGenAcc) {
+ AliInfo(Form("At MC level, %f Lc --> K0S + p were found in the acceptance", fHistoMCLcK0SpGenAcc->GetEntries()));
+ } else {
+ AliInfo("fHistoMCLcK0SpGenAcc not available");
+ }
+ if(fVariablesTreeSgn) {
+ AliInfo(Form("At Reco level, %lld Lc --> K0S + p were found", fVariablesTreeSgn->GetEntries()));
+ } else {
+ AliInfo("fVariablesTreeSgn not available");
+ }
+
fOutputKF = dynamic_cast<TList*> (GetOutputData(6));
if (!fOutputKF) {
AliError("fOutputKF not available");
if ( !fUseMCInfo && fIspA) {
fAnalCuts->SetTriggerClass("");
- fAnalCuts->SetTriggerMask(AliVEvent::kINT7);
+ fAnalCuts->SetTriggerMask(fTriggerMask);
}
-
+
+ Int_t runnumber = aodEvent->GetRunNumber();
+ if (aodEvent->GetTriggerMask() == 0 && (runnumber >= 195344 && runnumber <= 195677)){
+ AliDebug(3,"Event rejected because of null trigger mask");
+ return;
+ }
+
fCounter->StoreEvent(aodEvent,fAnalCuts,fUseMCInfo);
-
+
// mc analysis
TClonesArray *mcArray = 0;
AliAODMCHeader *mcHeader=0;
AliError("AliAnalysisTaskSELc2V0bachelorTMVA::UserExec: MC header branch not found!\n");
return;
}
+
+ Double_t zMCVertex = mcHeader->GetVtxZ();
+ if (TMath::Abs(zMCVertex) > fAnalCuts->GetMaxVtxZ()){
+ AliDebug(3,Form("z coordinate of MC vertex = %f, it was required to be within [-%f, +%f], skipping event", zMCVertex, fAnalCuts->GetMaxVtxZ(), fAnalCuts->GetMaxVtxZ()));
+ AliInfo(Form("z coordinate of MC vertex = %f, it was required to be within [-%f, +%f], skipping event", zMCVertex, fAnalCuts->GetMaxVtxZ(), fAnalCuts->GetMaxVtxZ()));
+ return;
+ }
+
//Printf("Filling MC histo");
FillMCHisto(mcArray);
}
-
+
// AOD primary vertex
fVtx1 = (AliAODVertex*)aodEvent->GetPrimaryVertex();
if (!fVtx1) return;
AliAODMCParticle* mcPart = dynamic_cast<AliAODMCParticle*>(mcArray->At(iPart));
if (!mcPart){
AliError("Failed casting particle from MC array!, Skipping particle");
- AliInfo("Failed casting particle from MC array!, Skipping particle");
continue;
}
Int_t pdg = mcPart->GetPdgCode();
AliAODMCParticle* partK0S = dynamic_cast<AliAODMCParticle*>(mcArray->At(labelK0daugh));
if(!partK0S){
AliError("Error while casting particle! returning a NULL array");
- AliInfo("Error while casting particle! returning a NULL array");
continue;
}
else { // So far: Lc --> K0 + p, K0 with 1 daughter that we can access
if (fAnalCuts->IsInFiducialAcceptance(mcPart->Pt(), mcPart->Y())) {
AliDebug(2, Form("----> Filling histo with pt = %f", mcPart->Pt()));
if(TMath::Abs(mcPart->Y()) < 0.5) fHistoMCLcK0SpGenLimAcc->Fill(mcPart->Pt());
+ //AliInfo(Form("\nparticle = %d, Filling MC Gen histo\n", iPart));
fHistoMCLcK0SpGen->Fill(mcPart->Pt());
if(!(TMath::Abs(bachelorMC->Eta()) > 0.9 || bachelorMC->Pt() < 0.1 ||
TMath::Abs(daughK0S0->Eta()) > 0.9 || daughK0S0->Pt() < 0.1 ||
}
}
- FillLc2pK0Sspectrum(lcK0spr, isLc, nSelectedAnal, cutsAnal, mcArray);
+ FillLc2pK0Sspectrum(lcK0spr, isLc, nSelectedAnal, cutsAnal, mcArray, iLctopK0s);
}
Int_t isLc,
Int_t &nSelectedAnal,
AliRDHFCutsLctoV0 *cutsAnal,
- TClonesArray *mcArray){
+ TClonesArray *mcArray, Int_t iLctopK0s){
//
// Fill histos for Lc -> K0S+proton
//
Int_t isInV0window = (((cutsAnal->IsSelectedSingleCut(part, AliRDHFCuts::kCandidate, 2)) & (AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr)); // cut on V0 invMass
if (isInV0window == 0) {
- AliDebug(2, "No: The candidate has NOT passed the mass cuts!");
- if (isLc) Printf("SIGNAL candidate rejected");
+ AliDebug(2, "No: The candidate has NOT passed the V0 window cuts!");
+ if (isLc) Printf("SIGNAL candidate rejected: V0 window cuts");
return;
}
else AliDebug(2, "Yes: The candidate has passed the mass cuts!");
if (!isInCascadeWindow) {
AliDebug(2, "No: The candidate has NOT passed the cascade window cuts!");
- if (isLc) Printf("SIGNAL candidate rejected");
+ if (isLc) Printf("SIGNAL candidate rejected: cascade window cuts");
return;
}
else AliDebug(2, "Yes: The candidate has passed the cascade window cuts!");
Bool_t isCandidateSelectedCuts = (((cutsAnal->IsSelected(part, AliRDHFCuts::kCandidate)) & (AliRDHFCutsLctoV0::kLcToK0Spr)) == (AliRDHFCutsLctoV0::kLcToK0Spr)); // kinematic/topological cuts
+ AliDebug(2, Form("recoAnalysisCuts = %d", cutsAnal->IsSelected(part, AliRDHFCuts::kCandidate) & (AliRDHFCutsLctoV0::kLcToK0Spr)));
if (!isCandidateSelectedCuts){
AliDebug(2, "No: Analysis cuts kCandidate level NOT passed");
if (isLc) Printf("SIGNAL candidate rejected");
if (fUseMCInfo) {
if (isLc){
- AliDebug(2, "Filling Sgn");
+ AliDebug(2, Form("Reco particle %d --> Filling Sgn", iLctopK0s));
fVariablesTreeSgn->Fill();
fHistoCodesSgn->Fill(bachCode, k0SCode);
}