<commit_before>/*************************************************************************
 * Copyright(c) 1998-2011, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  * 
 **************************************************************************/

#include <iostream>
#include <TList.h>
#include <TString.h>
#include <TDatabasePDG.h>

#include <TObjArray.h>
#include <TRandom.h>
#include <TClonesArray.h>
#include <TGraph.h>
#include <TFile.h>
#include <TList.h>
#include <TNtuple.h>


#include "AliVertex.h"
#include "AliVVertex.h"
#include "AliESDVertex.h"
#include "AliVertexerTracks.h"
#include "AliAODEvent.h"
#include "AliAODHandler.h"
#include "AliAODTrack.h"
#include "AliAODMCParticle.h"
#include "AliExternalTrackParam.h"
#include "AliAODRecoDecayHF3Prong.h"
#include "AliVertexingHFUtils.h"
#include "AliAODRecoDecayHF2Prong.h"
#include "AliAnalysisManager.h"
#include "AliInputEventHandler.h"
#include "AliESDInputHandlerRP.h"
#include "AliAnalysisTaskSELbtoLcpi4.h"

using namespace std;

ClassImp(AliAnalysisTaskSELbtoLcpi4);
//
//  Analysis Task for Lb in Lc and pion
//

  AliAnalysisTaskSELbtoLcpi4::AliAnalysisTaskSELbtoLcpi4()
:AliAnalysisTaskSE(),
  fPIDResponse(0),
  fOutput(0),
  fHistNEvents(0),
  fHistNEventsCuts(0),
  fHistNEventsCutsLb(0),
  fRDCutsAnalysisLc(0),
  fRDCutsProductionLb(0),
  fListCuts(0),
  fBzkG(0.),
  fvtx1(0x0),
  fInvMassLbSign0(0),
  fInvMassLbSign1(0),
  fInvMassLbSign2(0),
  fInvMassLbSign3(0),
  fInvMassLbSign4(0),
  fInvMassLbSign5(0),
  fSelMC(0),
  fCountLc(0),
  fNtupleLambdabUPG(0),
  //fNtupleDiffD0rot(0)
  fFillNtupleSignal(kFALSE), 
  fFillNtupleBackgroundRotated(kFALSE),
  fFillNtupleBackgroundNonRotated(kFALSE),
  fCutsond0Lcdaughters(kFALSE),
  fIsPromptLc(kFALSE),
  fApplyFixesITS3AnalysisBit(kFALSE),
  fApplyFixesITS3AnalysiskAll(kFALSE),
  fApplyFixesITS3AnalysisHijing(kFALSE)
{
  //
  // Default constructor.
  //
  for(Int_t icut=0; icut<2; icut++) fCutD0Daughter[icut]=0.;
  for(Int_t icut=0; icut<7; icut++) fCutsPerPt[icut]=0.;
  fNRotations=13.;

}

AliAnalysisTaskSELbtoLcpi4::AliAnalysisTaskSELbtoLcpi4(const char *name,
    Bool_t fillNtuple,
    AliRDHFCutsLctopKpi *lccutsana,
    AliRDHFCutsLctopKpi *lccutsprod,
    Int_t ndebug)
:AliAnalysisTaskSE(name),
  fPIDResponse(0),
  fOutput(0),
  fHistNEvents(0),
  fHistNEventsCuts(0),
  fHistNEventsCutsLb(0),
  fRDCutsAnalysisLc(lccutsana),
  fRDCutsProductionLb(lccutsprod),
  fListCuts(0),
  fBzkG(0.),
  fvtx1(0x0),
  fInvMassLbSign0(0),
  fInvMassLbSign1(0),
  fInvMassLbSign2(0),
  fInvMassLbSign3(0),
  fInvMassLbSign4(0),
  fInvMassLbSign5(0),
  fSelMC(0),
  fCountLc(0),
  fNtupleLambdabUPG(0),
  //fNtupleDiffD0rot(0)
  fFillNtupleSignal(kFALSE), 
  fFillNtupleBackgroundRotated(kFALSE),
  fFillNtupleBackgroundNonRotated(kFALSE),
  fCutsond0Lcdaughters(kFALSE),
  fIsPromptLc(kFALSE),
  fApplyFixesITS3AnalysisBit(kFALSE),
  fApplyFixesITS3AnalysiskAll(kFALSE),
  fApplyFixesITS3AnalysisHijing(kFALSE)
{
  //SetPtBinLimit(fRDCutsAnalysisLc->GetNPtBins()+1,fRDCutsAnalysisLc->GetPtBinLimits());
    for(Int_t icut=0; icut<2; icut++) fCutD0Daughter[icut]=0.;
    for(Int_t icut=0; icut<7; icut++) fCutsPerPt[icut]=0.;
    fNRotations=13.;
  //
  // Constructor to be used to create the task.
  // The the URIs specify the resolution files to be used. 
  // They are expected to contain TGraphs with the resolutions
  // for the current and the upgraded ITS (see code for details).
  // One may also specify for how many tracks debug information
  // is written to the output.
  //
  DefineOutput(1,TList::Class());
  DefineOutput(2,TNtuple::Class());
  //DefineOutput(3,TNtuple::Class());
  //DefineOutput(4,TNtuple::Class());
  //DefineOutput(5,TNtuple::Class());
  //DefineOutput(6,TNtuple::Class());
  //DefineOutput(7,TNtuple::Class());


}

AliAnalysisTaskSELbtoLcpi4::~AliAnalysisTaskSELbtoLcpi4() {
  //
  // Destructor.
  //

  if (fPIDResponse) {
    delete  fPIDResponse;
  }


  if (fOutput) {
    delete fOutput;
    fOutput = 0;
  }
  if(fHistNEvents){
    delete fHistNEvents;
    fHistNEvents=0;
  }
  if(fHistNEventsCuts){
    delete fHistNEventsCuts;
    fHistNEventsCuts=0;
  }
  if(fHistNEventsCutsLb){
    delete fHistNEventsCutsLb;
    fHistNEventsCutsLb=0;
  }


  if(fRDCutsAnalysisLc){
    delete fRDCutsAnalysisLc;
    fRDCutsAnalysisLc = 0;
  }

  if(fRDCutsProductionLb){
    delete fRDCutsProductionLb;
    fRDCutsProductionLb = 0;
  }
  if (fListCuts) {
    delete fListCuts;
    fListCuts = 0;
  }
  if(fvtx1){
    delete fvtx1; 
    fvtx1 = 0x0;
  }


}
//-----------------------------------------------------
void AliAnalysisTaskSELbtoLcpi4::Init()
{
  // Initialization


  fListCuts=new TList();

  fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsAnalysisLc));
  fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsProductionLb));


  //PostData(7,fListCuts);
  return;
}
<commit_msg>deleting ntuple in destructor<commit_after>/*************************************************************************
 * Copyright(c) 1998-2011, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  * 
 **************************************************************************/

#include <iostream>
#include <TList.h>
#include <TString.h>
#include <TDatabasePDG.h>

#include <TObjArray.h>
#include <TRandom.h>
#include <TClonesArray.h>
#include <TGraph.h>
#include <TFile.h>
#include <TList.h>
#include <TNtuple.h>


#include "AliVertex.h"
#include "AliVVertex.h"
#include "AliESDVertex.h"
#include "AliVertexerTracks.h"
#include "AliAODEvent.h"
#include "AliAODHandler.h"
#include "AliAODTrack.h"
#include "AliAODMCParticle.h"
#include "AliExternalTrackParam.h"
#include "AliAODRecoDecayHF3Prong.h"
#include "AliVertexingHFUtils.h"
#include "AliAODRecoDecayHF2Prong.h"
#include "AliAnalysisManager.h"
#include "AliInputEventHandler.h"
#include "AliESDInputHandlerRP.h"
#include "AliAnalysisTaskSELbtoLcpi4.h"

using namespace std;

ClassImp(AliAnalysisTaskSELbtoLcpi4);
//
//  Analysis Task for Lb in Lc and pion
//

  AliAnalysisTaskSELbtoLcpi4::AliAnalysisTaskSELbtoLcpi4()
:AliAnalysisTaskSE(),
  fPIDResponse(0),
  fOutput(0),
  fHistNEvents(0),
  fHistNEventsCuts(0),
  fHistNEventsCutsLb(0),
  fRDCutsAnalysisLc(0),
  fRDCutsProductionLb(0),
  fListCuts(0),
  fBzkG(0.),
  fvtx1(0x0),
  fInvMassLbSign0(0),
  fInvMassLbSign1(0),
  fInvMassLbSign2(0),
  fInvMassLbSign3(0),
  fInvMassLbSign4(0),
  fInvMassLbSign5(0),
  fSelMC(0),
  fCountLc(0),
  fNtupleLambdabUPG(0),
  //fNtupleDiffD0rot(0)
  fFillNtupleSignal(kFALSE), 
  fFillNtupleBackgroundRotated(kFALSE),
  fFillNtupleBackgroundNonRotated(kFALSE),
  fCutsond0Lcdaughters(kFALSE),
  fIsPromptLc(kFALSE),
  fApplyFixesITS3AnalysisBit(kFALSE),
  fApplyFixesITS3AnalysiskAll(kFALSE),
  fApplyFixesITS3AnalysisHijing(kFALSE)
{
  //
  // Default constructor.
  //
  for(Int_t icut=0; icut<2; icut++) fCutD0Daughter[icut]=0.;
  for(Int_t icut=0; icut<7; icut++) fCutsPerPt[icut]=0.;
  fNRotations=13.;

}

AliAnalysisTaskSELbtoLcpi4::AliAnalysisTaskSELbtoLcpi4(const char *name,
    Bool_t fillNtuple,
    AliRDHFCutsLctopKpi *lccutsana,
    AliRDHFCutsLctopKpi *lccutsprod,
    Int_t ndebug)
:AliAnalysisTaskSE(name),
  fPIDResponse(0),
  fOutput(0),
  fHistNEvents(0),
  fHistNEventsCuts(0),
  fHistNEventsCutsLb(0),
  fRDCutsAnalysisLc(lccutsana),
  fRDCutsProductionLb(lccutsprod),
  fListCuts(0),
  fBzkG(0.),
  fvtx1(0x0),
  fInvMassLbSign0(0),
  fInvMassLbSign1(0),
  fInvMassLbSign2(0),
  fInvMassLbSign3(0),
  fInvMassLbSign4(0),
  fInvMassLbSign5(0),
  fSelMC(0),
  fCountLc(0),
  fNtupleLambdabUPG(0),
  //fNtupleDiffD0rot(0)
  fFillNtupleSignal(kFALSE), 
  fFillNtupleBackgroundRotated(kFALSE),
  fFillNtupleBackgroundNonRotated(kFALSE),
  fCutsond0Lcdaughters(kFALSE),
  fIsPromptLc(kFALSE),
  fApplyFixesITS3AnalysisBit(kFALSE),
  fApplyFixesITS3AnalysiskAll(kFALSE),
  fApplyFixesITS3AnalysisHijing(kFALSE)
{
  //SetPtBinLimit(fRDCutsAnalysisLc->GetNPtBins()+1,fRDCutsAnalysisLc->GetPtBinLimits());
    for(Int_t icut=0; icut<2; icut++) fCutD0Daughter[icut]=0.;
    for(Int_t icut=0; icut<7; icut++) fCutsPerPt[icut]=0.;
    fNRotations=13.;
  //
  // Constructor to be used to create the task.
  // The the URIs specify the resolution files to be used. 
  // They are expected to contain TGraphs with the resolutions
  // for the current and the upgraded ITS (see code for details).
  // One may also specify for how many tracks debug information
  // is written to the output.
  //
  DefineOutput(1,TList::Class());
  DefineOutput(2,TNtuple::Class());
  //DefineOutput(3,TNtuple::Class());
  //DefineOutput(4,TNtuple::Class());
  //DefineOutput(5,TNtuple::Class());
  //DefineOutput(6,TNtuple::Class());
  //DefineOutput(7,TNtuple::Class());


}

AliAnalysisTaskSELbtoLcpi4::~AliAnalysisTaskSELbtoLcpi4() {
  //
  // Destructor.
  //

  if (fPIDResponse) {
    delete  fPIDResponse;
  }
  if (fOutput) {
    delete fOutput;
    fOutput = 0;
  }
  if(fHistNEvents){
    delete fHistNEvents;
    fHistNEvents=0;
  }
  if(fHistNEventsCuts){
    delete fHistNEventsCuts;
    fHistNEventsCuts=0;
  }
  if(fHistNEventsCutsLb){
    delete fHistNEventsCutsLb;
    fHistNEventsCutsLb=0;
  }


  if(fRDCutsAnalysisLc){
    delete fRDCutsAnalysisLc;
    fRDCutsAnalysisLc = 0;
  }

  if(fRDCutsProductionLb){
    delete fRDCutsProductionLb;
    fRDCutsProductionLb = 0;
  }
  if (fListCuts) {
    delete fListCuts;
    fListCuts = 0;
  }
  if(fvtx1){
    delete fvtx1; 
    fvtx1 = 0x0;
  }
  if(fNtupleLambdabUPG){
    delete fNtupleLambdabUPG;
    fNtupleLambdabUPG=0;
  }

}
//-----------------------------------------------------
void AliAnalysisTaskSELbtoLcpi4::Init()
{
  // Initialization


  fListCuts=new TList();

  fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsAnalysisLc));
  fListCuts->Add(new AliRDHFCutsLctopKpi(*fRDCutsProductionLb));


  //PostData(7,fListCuts);
  return;
}

{'fraction_non_alphanumeric': 0.1473381545700096, 'fraction_numerical': 0.02134704190990677, 'mean_word_length': 3.810561609388097, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4820180', 'n_tokens_mistral': 4487, 'n_tokens_neox': 4269, 'n_words': 747}