fDauNames(""),
fSign(2),
fCentralitySelection(kTRUE),
- fFakeSelection(0)
+ fFakeSelection(0),
+ fRejectIfNoQuark(kTRUE),
+ fUseMCVertex(kFALSE)
{
//
//Default ctor
fDauNames(""),
fSign(2),
fCentralitySelection(kTRUE),
- fFakeSelection(0)
+ fFakeSelection(0),
+ fRejectIfNoQuark(kTRUE),
+ fUseMCVertex(kFALSE)
{
//
// Constructor. Initialization of Inputs and Outputs
fDauNames(c.fDauNames),
fSign(c.fSign),
fCentralitySelection(c.fCentralitySelection),
- fFakeSelection(c.fFakeSelection)
+ fFakeSelection(c.fFakeSelection),
+ fRejectIfNoQuark(c.fRejectIfNoQuark),
+ fUseMCVertex(c.fUseMCVertex)
{
//
// Copy Constructor
PostData(1,fHistEventsProcessed) ;
PostData(2,fCFManager->GetParticleContainer()) ;
- PostData(3,fCorrelation) ;
-
+ PostData(3,fCorrelation) ;
if (fFillFromGenerated){
AliWarning("Flag to fill container with generated value ON ---> dca, d0pi, d0K, d0xd0, cosPointingAngle will be set as dummy!");
Double_t zPrimVertex = aodVtx ->GetZ();
Double_t zMCVertex = mcHeader->GetVtxZ();
-
+ if (TMath::Abs(zMCVertex) > fCuts->GetMaxVtxZ()){
+ AliDebug(3,Form("z coordinate of MC vertex = %f, it was required to be within [-%f, +%f], skipping event", zMCVertex, fCuts->GetMaxVtxZ(), fCuts->GetMaxVtxZ()));
+ delete[] containerInput;
+ delete[] containerInputMC;
+ return;
+ }
+
AliESDtrackCuts** trackCuts = new AliESDtrackCuts*[cfVtxHF->GetNProngs()];
if (fDecayChannel == 21){
// for the D*, setting the third element of the array of the track cuts to those for the soft pion
cfVtxHF->SetFillFromGenerated(fFillFromGenerated);
cfVtxHF->SetNVar(fNvar);
cfVtxHF->SetFakeSelection(fFakeSelection);
+ cfVtxHF->SetRejectCandidateIfNotFromQuark(fRejectIfNoQuark);
+
+ // switch-off the trigger class selection (doesn't work for MC)
+ fCuts->SetTriggerClass("");
+
+ // MC vertex, to be used, in case, for pp
+ if (fUseMCVertex) fCuts->SetUseMCVertex();
- if (fCentralitySelection)
+ if (fCentralitySelection){ // keep only the requested centrality
if(fCuts->IsEventSelectedInCentrality(aodEvent)!=0) {
delete[] containerInput;
delete[] containerInputMC;
delete [] trackCuts;
return;
}
+ } else { // keep all centralities
+ fCuts->SetMinCentrality(0.);
+ fCuts->SetMaxCentrality(100.);
+ }
+
Float_t centValue = fCuts->GetCentrality(aodEvent);
cfVtxHF->SetCentralityValue(centValue);
//slot #1
OpenFile(1);
fHistEventsProcessed = new TH1I("CFHFchist0","",1,0,1) ;
+
+ PostData(1,fHistEventsProcessed) ;
+ PostData(2,fCFManager->GetParticleContainer()) ;
+ PostData(3,fCorrelation) ;
+
}