<commit_before>/*
 * AliFemtoDreamAnalysis.cxx
 *
 *  Created on: 24 Nov 2017
 *      Author: bernhardhohlweger
 */
#include <vector>
#include "AliLog.h"
#include "AliFemtoDreamAnalysis.h"
#include "TClonesArray.h"
#include <iostream>
ClassImp(AliFemtoDreamAnalysis)
AliFemtoDreamAnalysis::AliFemtoDreamAnalysis()
:fMVPileUp(false)
,fEvtCutQA(false)
,fQA()
,fFemtoTrack()
,fFemtov0()
,fFemtoCasc()
,fEvent()
,fEvtCuts()
,fTrackCuts()
,fAntiTrackCuts()
,fv0Cuts()
,fAntiv0Cuts()
,fCascCuts()
,fAntiCascCuts()
,fPairCleaner()
,fControlSample()
,fTrackBufferSize(0)
,fGTI(0)
,fConfig(0)
,fPartColl(0)
{

}

AliFemtoDreamAnalysis::~AliFemtoDreamAnalysis() {
  if (fFemtoTrack) {
    delete fFemtoTrack;
  }
  if (fFemtov0) {
    delete fFemtov0;
  }
  if (fFemtoCasc) {
    delete fFemtoCasc;
  }
}

void AliFemtoDreamAnalysis::Init(bool isMonteCarlo,UInt_t trigger) {
  fFemtoTrack=new AliFemtoDreamTrack();
  fFemtoTrack->SetUseMCInfo(isMonteCarlo);

  fFemtov0=new AliFemtoDreamv0();
  fFemtov0->SetPDGCode(fv0Cuts->GetPDGv0());
  fFemtov0->SetUseMCInfo(isMonteCarlo);
  fFemtov0->SetPDGDaughterPos(fv0Cuts->GetPDGPosDaug());//order +sign doesnt play a role
  fFemtov0->GetPosDaughter()->SetUseMCInfo(isMonteCarlo);
  fFemtov0->SetPDGDaughterNeg(fv0Cuts->GetPDGNegDaug());//only used for MC Matching
  fFemtov0->GetNegDaughter()->SetUseMCInfo(isMonteCarlo);

  fFemtoCasc=new AliFemtoDreamCascade();
  fFemtoCasc->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->SetPDGCode(fCascCuts->GetPDGCodeCasc());
  fFemtoCasc->SetPDGDaugPos(fCascCuts->GetPDGCodePosDaug());
  fFemtoCasc->GetPosDaug()->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->SetPDGDaugNeg(fCascCuts->GetPDGCodeNegDaug());
  fFemtoCasc->GetNegDaug()->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->SetPDGDaugBach(fCascCuts->GetPDGCodeBach());
  fFemtoCasc->GetBach()->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->Setv0PDGCode(fCascCuts->GetPDGv0());
  fEvtCuts->InitQA();
  fTrackCuts->Init();
  fAntiTrackCuts->Init();
  fv0Cuts->Init();
  fAntiv0Cuts->Init();
  fCascCuts->Init();
  fAntiCascCuts->Init();
  fGTI=new AliAODTrack*[fTrackBufferSize];
  fEvent=new AliFemtoDreamEvent(fMVPileUp,fEvtCutQA,trigger);
  fEvent->SetMultiplicityEstimator(fConfig->GetMultiplicityEstimator());
  bool MinBooking=
      !((!fConfig->GetMinimalBookingME())||(!fConfig->GetMinimalBookingSample()));
  fPairCleaner=new AliFemtoDreamPairCleaner(4,4,MinBooking);

  if (!MinBooking) {
    fQA=new TList();
    fQA->SetOwner();<commit_msg>Fixes to the initialization and the posting of data<commit_after>/*
 * AliFemtoDreamAnalysis.cxx
 *
 *  Created on: 24 Nov 2017
 *      Author: bernhardhohlweger
 */
#include <vector>
#include "AliLog.h"
#include "AliFemtoDreamAnalysis.h"
#include "TClonesArray.h"
#include <iostream>
ClassImp(AliFemtoDreamAnalysis)
AliFemtoDreamAnalysis::AliFemtoDreamAnalysis()
:fMVPileUp(false)
,fEvtCutQA(false)
,fQA()
,fFemtoTrack()
,fFemtov0()
,fFemtoCasc()
,fEvent()
,fEvtCuts()
,fTrackCuts()
,fAntiTrackCuts()
,fv0Cuts()
,fAntiv0Cuts()
,fCascCuts()
,fAntiCascCuts()
,fPairCleaner()
,fControlSample()
,fTrackBufferSize(0)
,fGTI(0)
,fConfig(0)
,fPartColl(0)
{

}

AliFemtoDreamAnalysis::~AliFemtoDreamAnalysis() {
  if (fFemtoTrack) {
    delete fFemtoTrack;
  }
  if (fFemtov0) {
    delete fFemtov0;
  }
  if (fFemtoCasc) {
    delete fFemtoCasc;
  }
}

void AliFemtoDreamAnalysis::Init(bool isMonteCarlo,UInt_t trigger) {
  fFemtoTrack=new AliFemtoDreamTrack();
  fFemtoTrack->SetUseMCInfo(isMonteCarlo);

  fFemtov0=new AliFemtoDreamv0();
  fFemtov0->SetPDGCode(fv0Cuts->GetPDGv0());
  fFemtov0->SetUseMCInfo(isMonteCarlo);
  fFemtov0->SetPDGDaughterPos(fv0Cuts->GetPDGPosDaug());//order +sign doesnt play a role
  fFemtov0->GetPosDaughter()->SetUseMCInfo(isMonteCarlo);
  fFemtov0->SetPDGDaughterNeg(fv0Cuts->GetPDGNegDaug());//only used for MC Matching
  fFemtov0->GetNegDaughter()->SetUseMCInfo(isMonteCarlo);

  fFemtoCasc=new AliFemtoDreamCascade();
  fFemtoCasc->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->SetPDGCode(fCascCuts->GetPDGCodeCasc());
  fFemtoCasc->SetPDGDaugPos(fCascCuts->GetPDGCodePosDaug());
  fFemtoCasc->GetPosDaug()->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->SetPDGDaugNeg(fCascCuts->GetPDGCodeNegDaug());
  fFemtoCasc->GetNegDaug()->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->SetPDGDaugBach(fCascCuts->GetPDGCodeBach());
  fFemtoCasc->GetBach()->SetUseMCInfo(isMonteCarlo);
  fFemtoCasc->Setv0PDGCode(fCascCuts->GetPDGv0());
  fEvtCuts->InitQA();
  fTrackCuts->Init();
  fAntiTrackCuts->Init();
  fv0Cuts->Init();
  fAntiv0Cuts->Init();
  fCascCuts->Init();
  fAntiCascCuts->Init();
  fGTI=new AliAODTrack*[fTrackBufferSize];
  fEvent=new AliFemtoDreamEvent(fMVPileUp,fEvtCutQA,trigger);
  fEvent->SetMultiplicityEstimator(fConfig->GetMultiplicityEstimator());
  bool MinBooking=
      !((!fConfig->GetMinimalBookingME())||(!fConfig->GetMinimalBookingSample()));
  fPairCleaner=new AliFemtoDreamPairCleaner(4,4,MinBooking);

  if (MinBooking) {
    fQA=new TList();
    fQA->SetOwner();
{'fraction_non_alphanumeric': 0.14946690806678736, 'fraction_numerical': 0.013277006638503319, 'mean_word_length': 7.2454394693200666, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558340', 'n_tokens_mistral': 2266, 'n_tokens_neox': 2213, 'n_words': 229}