Obsolete code removed.
[u/mrichter/AliRoot.git] / JETAN / AliJetReader.cxx
CommitLineData
99e5fe42 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
83a444b1 16//------------------------------------------------------------------------
99e5fe42 17// Jet reader base class
18// manages the reading of input for jet algorithms
b45b0c92 19// Authors: jgcn@mda.cinvestav.mx
20// magali.estienne@IReS.in2p3.fr
83a444b1 21//------------------------------------------------------------------------
99e5fe42 22
83a444b1 23// root
99e5fe42 24#include <TClonesArray.h>
ee7de0dd 25#include <TRefArray.h>
26#include "TTask.h"
83a444b1 27//AliRoot
99e5fe42 28#include "AliJetReader.h"
29#include "AliJetReaderHeader.h"
ee7de0dd 30#include "AliESDEvent.h"
31#include "AliHeader.h"
be6e5811 32#include "AliJetESDFillUnitArrayTracks.h"
33#include "AliJetESDFillUnitArrayEMCalDigits.h"
7aec0427 34#include "AliJetUnitArray.h"
35#include "AliJetHadronCorrectionv1.h"
99e5fe42 36
37ClassImp(AliJetReader)
38
39////////////////////////////////////////////////////////////////////////
8838ab7a 40
1b7d5d7e 41AliJetReader::AliJetReader():
ee7de0dd 42 // Constructor
43 fChain(0),
8838ab7a 44 fTree(0),
45 fMomentumArray(new TClonesArray("TLorentzVector",4000)),
1b7d5d7e 46 fArrayMC(0),
b45b0c92 47 fFillUnitArray(new TTask("fillUnitArray","Fill unit array jet finder")),
ee7de0dd 48 fESD(0),
1b7d5d7e 49 fReaderHeader(0),
8838ab7a 50 fAliHeader(0),
1b7d5d7e 51 fSignalFlag(0),
b45b0c92 52 fCutFlag(0),
ee7de0dd 53 fUnitArray(new TClonesArray("AliJetUnitArray",60000)),
ee7de0dd 54 fArrayInitialised(0),
be6e5811 55 fFillUAFromTracks(new AliJetESDFillUnitArrayTracks()),
56 fFillUAFromEMCalDigits(new AliJetESDFillUnitArrayEMCalDigits()),
9e4cc50d 57 fNumCandidate(0),
8838ab7a 58 fNumCandidateCut(0),
59 fHadronCorrector(0),
60 fHCorrection(0),
61 fECorrection(0),
62 fEFlag(kFALSE)
99e5fe42 63{
1b7d5d7e 64 // Default constructor
8011d399 65 fSignalFlag = TArrayI();
b45b0c92 66 fCutFlag = TArrayI();
99e5fe42 67}
68
69////////////////////////////////////////////////////////////////////////
70
71AliJetReader::~AliJetReader()
72{
73 // Destructor
8838ab7a 74 if (fMomentumArray) {
75 fMomentumArray->Delete();
76 delete fMomentumArray;
77 }
78
79 if (fUnitArray) {
80 fUnitArray->Delete();
81 delete fUnitArray;
82 }
83
8838ab7a 84 if (fFillUnitArray) {
8838ab7a 85 delete fFillUnitArray;
86 }
026b032e 87 if (fArrayMC) {
88 fArrayMC->Delete();
89 delete fArrayMC;
90 }
8838ab7a 91
99e5fe42 92}
93
94
95////////////////////////////////////////////////////////////////////////
96
97void AliJetReader::ClearArray()
99e5fe42 98{
99 if (fMomentumArray) fMomentumArray->Clear();
b45b0c92 100 if (fFillUnitArray) fFillUnitArray->Clear();
99e5fe42 101}