AliPhysics  vAN-20150429 (ffa5c54)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliReducedJetEvent.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2015, 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 #include <TObjArray.h>
16 
17 #include "AliReducedJetInfo.h"
18 #include "AliReducedJetEvent.h"
19 
23 
24 namespace HighPtTracks {
25 
29 AliReducedJetEvent::AliReducedJetEvent():
30  TObject(),
31  fCrossSection(0),
32  fTrials(0),
33  fPtHard(0),
34  fReconstructedJets(NULL)
35 {
36 }
37 
46 AliReducedJetEvent::AliReducedJetEvent(double crosssection, int ntrials, double pthard) :
47  TObject(),
48  fCrossSection(crosssection),
49  fTrials(ntrials),
50  fPtHard(pthard),
51  fReconstructedJets(NULL)
52 {
53  fReconstructedJets = new TObjArray;
54  fReconstructedJets->SetOwner(true);
55 }
56 
64  TObject(ref),
65  fCrossSection(ref.fCrossSection),
66  fTrials(ref.fTrials),
67  fPtHard(ref.fPtHard),
68  fReconstructedJets(NULL)
69 {
70  fReconstructedJets = new TObjArray;
71  fReconstructedJets->SetOwner(true);
72 
73  AliReducedJetInfo *recjet(NULL);
74  TIter jetiter(ref.fReconstructedJets);
75  while((recjet = dynamic_cast<AliReducedJetInfo *>(jetiter()))){
76  fReconstructedJets->Add(new AliReducedJetInfo(*recjet));
77  }
78 }
79 
88  TObject::operator=(ref);
89  if(&ref != this){
91  fTrials = ref.fTrials;
92  fPtHard = ref.fPtHard;
93 
94  fReconstructedJets->Clear();
95  AliReducedJetInfo *recjet(NULL);
96  TIter jetiter(ref.fReconstructedJets);
97  while((recjet = dynamic_cast<AliReducedJetInfo *>(jetiter()))){
98  fReconstructedJets->Add(new AliReducedJetInfo(*recjet));
99  }
100  }
101  return *this;
102 }
103 
108  delete fReconstructedJets;
109 }
110 
118 }
119 
126  if(!fReconstructedJets) return 0;
127  return fReconstructedJets->GetEntries();
128 }
129 
137  if(!fReconstructedJets || ijet >= fReconstructedJets->GetEntries()) return NULL;
138  return dynamic_cast<AliReducedJetInfo *>(fReconstructedJets->At(ijet));
139 }
140 
141 } /* namespace HighPtTracks */
Definition of class AliReducedJetEvent, an event structure containing reduced jet information...
double fCrossSection
Event cross section.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
AliReducedJetInfo * GetReconstructedJet(int ijet) const
AliReducedJetEvent & operator=(const AliReducedJetEvent &)
Event structure containing reduced jet information.
TObjArray * fReconstructedJets
List of reconstructed jets at generator level.
Reduced information about a reconstructed jet.
double fPtHard
Generated of the hard interaction.
void AddReconstructedJet(AliReducedJetInfo *jet)
Definition of class AliReducedJetInfo, a structure for reduced information about a reconstructed jet...