* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.1 2002/01/08 09:59:34 morsch
-Readers for EMCAL primary particle input.
-
-*/
-
+/* $Id$ */
+//
+// Realisation of AliGenReader to be used with AliGenExtFile
+// It reads Pythia Jet events from a ntuple like event structure.
+// The event format is defined in Init()
+// NextEvent() is used to loop over events and NextParticle() to loop over particles.
+// Author: andreas.morsch@cern.ch
+//
#include <TFile.h>
-#include <TTree.h>
#include <TParticle.h>
+#include <TDatabasePDG.h>
+#include <TTree.h>
#include "AliGenReaderEcalJets.h"
-#include "AliMC.h"
+
ClassImp(AliGenReaderEcalJets)
-AliGenReaderEcalJets::AliGenReaderEcalJets()
+AliGenReaderEcalJets::AliGenReaderEcalJets():
+ fNcurrent(0),
+ fNparticle(0),
+ fNev(0),
+ fNpart(0),
+ fNjet(0),
+ fNsjet(0),
+ fNpjet(0),
+ fTreeNtuple(0)
{
// Default constructor
- fNcurrent = 0;
- fTreeNtuple = 0;
+ for (Int_t i = 0; i < 200; i++) {
+ if (i < 2) {
+ fX[i] = 0.;
+ fXtyp[i] = 0;
+ } else if (i < 10) {
+ fJet[i] = 0.;
+ fJeta[i] = 0.;
+ fJphi[i] = 0.;
+ fJset[i] = 0.;
+ fJseta[i] = 0.;
+ fJsphi[i] = 0.;
+ fJpet[i] = 0.;
+ fJpeta[i] = 0.;
+ fJpphi[i] = 0.;
+ } else {
+ fXpt[i] = 0.;
+ fXeta[i] = 0.;
+ fXphi[i] = 0.;
+ fXid[i] = 0;
+ }
+ }
+}
+
+ AliGenReaderEcalJets::AliGenReaderEcalJets(const AliGenReaderEcalJets &reader)
+ :AliGenReader(reader),
+ fNcurrent(0),
+ fNparticle(0),
+ fNev(0),
+ fNpart(0),
+ fNjet(0),
+ fNsjet(0),
+ fNpjet(0),
+ fTreeNtuple(0)
+{
+ for (Int_t i = 0; i < 200; i++) {
+ if (i < 2) {
+ fX[i] = 0.;
+ fXtyp[i] = 0;
+ } else if (i < 10) {
+ fJet[i] = 0.;
+ fJeta[i] = 0.;
+ fJphi[i] = 0.;
+ fJset[i] = 0.;
+ fJseta[i] = 0.;
+ fJsphi[i] = 0.;
+ fJpet[i] = 0.;
+ fJpeta[i] = 0.;
+ fJpphi[i] = 0.;
+ } else {
+ fXpt[i] = 0.;
+ fXeta[i] = 0.;
+ fXphi[i] = 0.;
+ fXid[i] = 0;
+ }
+ }
+
+ // Copy Constructor
+ reader.Copy(*this);
}
void AliGenReaderEcalJets::Init()
TParticle* AliGenReaderEcalJets::NextParticle()
{
- Float_t p[4];
// Read the next particle
+
+ Float_t p[4];
Int_t ipart = fXid[fNparticle];
Float_t pt = fXpt[fNparticle];
Float_t eta = fXeta[fNparticle];
AliGenReaderEcalJets& AliGenReaderEcalJets::operator=(const AliGenReaderEcalJets& rhs)
{
// Assignment operator
- return *this;
+ rhs.Copy(*this);
+ return (*this);
}
+void AliGenReaderEcalJets::Copy(TObject&) const
+{
+ //
+ // Copy
+ //
+ Fatal("Copy","Not implemented!\n");
+}
+
+