From 56a104379c5745628e31238c645b168bcc125484 Mon Sep 17 00:00:00 2001 From: morsch Date: Thu, 15 Jun 2000 15:47:48 +0000 Subject: [PATCH] Proposal for an event header class for generated events. --- EVGEN/AliGenEventHeader.cxx | 34 +++++++++++++++++++++ EVGEN/AliGenEventHeader.h | 41 ++++++++++++++++++++++++++ EVGEN/AliGenHijingEventHeader.cxx | 23 +++++++++++++++ EVGEN/AliGenHijingEventHeader.h | 49 +++++++++++++++++++++++++++++++ EVGEN/EVGENLinkDef.h | 4 +-- EVGEN/Makefile | 4 +-- 6 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 EVGEN/AliGenEventHeader.cxx create mode 100644 EVGEN/AliGenEventHeader.h create mode 100644 EVGEN/AliGenHijingEventHeader.cxx create mode 100644 EVGEN/AliGenHijingEventHeader.h diff --git a/EVGEN/AliGenEventHeader.cxx b/EVGEN/AliGenEventHeader.cxx new file mode 100644 index 00000000000..63d6fc01aad --- /dev/null +++ b/EVGEN/AliGenEventHeader.cxx @@ -0,0 +1,34 @@ +/************************************************************************** + * Copyright(c) 1998-1999, 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. * + **************************************************************************/ + +/* +$Log$ +*/ + +#include "AliGenEventHeader.h" +ClassImp(AliGenEventHeader) + + +//_____________________________________________________________________________ +AliGenEventHeader::AliGenEventHeader(const char * name) + :TNamed(name, "Event Header") +{ +// Constructor +// fDate=new TDatime; + fRunNumber=-1; + fEventNumber=-1; + fNProduced=-1; + fImpactParameter=-1.; +} diff --git a/EVGEN/AliGenEventHeader.h b/EVGEN/AliGenEventHeader.h new file mode 100644 index 00000000000..08db86478fc --- /dev/null +++ b/EVGEN/AliGenEventHeader.h @@ -0,0 +1,41 @@ +#ifndef ALIGENEVENTHEADER_H +#define ALIGENEVENTHEADER_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include +#include + +class AliGenEventHeader : public TNamed +{ + public: + + AliGenEventHeader(const char* name="Undefined"); + virtual ~AliGenEventHeader() {} + // Getters + virtual TDatime Date() {return fDate;} + virtual Int_t RunNumber() {return fRunNumber;} + virtual Int_t EventNumber() {return fEventNumber;} + virtual Int_t NProduced() {return fNProduced;} + virtual Float_t ImpactParameter() {return fImpactParameter;} + // Setters + virtual void SetDate(TDatime date) {fDate=date;} + virtual void SetRunNumber(Int_t run) {fRunNumber=run;} + virtual void SetEventNumber(Int_t event) {fEventNumber=event;} + virtual void SetNProduced(Int_t nprod) {fNProduced=nprod;} + virtual void SetImpactParameter(Float_t b) {fImpactParameter=b;} + +protected: + TDatime fDate; // Date + Int_t fRunNumber; // Run Number + Int_t fEventNumber; // Event Number + Int_t fNProduced; // Number stable or undecayed particles + Float_t fImpactParameter; // Impact Parameter + + ClassDef(AliGenEventHeader,1) // Event header for primary event +}; + +#endif diff --git a/EVGEN/AliGenHijingEventHeader.cxx b/EVGEN/AliGenHijingEventHeader.cxx new file mode 100644 index 00000000000..ece52f09c91 --- /dev/null +++ b/EVGEN/AliGenHijingEventHeader.cxx @@ -0,0 +1,23 @@ +/************************************************************************** + * Copyright(c) 1998-1999, 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. * + **************************************************************************/ + +/* +$Log$ +*/ + +#include "AliGenHijingEventHeader.h" +ClassImp(AliGenHijingEventHeader) + + diff --git a/EVGEN/AliGenHijingEventHeader.h b/EVGEN/AliGenHijingEventHeader.h new file mode 100644 index 00000000000..b5d46e9ec6a --- /dev/null +++ b/EVGEN/AliGenHijingEventHeader.h @@ -0,0 +1,49 @@ +#ifndef ALIGENHIJINGEVENTHEADER_H +#define ALIGENHIJINGEVENTHEADER_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include "AliGenEventHeader.h" + + +class AliGenHijingEventHeader : public AliGenEventHeader +{ + public: + + AliGenHijingEventHeader(const char* name){;} + virtual ~AliGenHijingEventHeader() {} + // Getters + Float_t TotalEnergy() {return fTotalEnergy;} + Int_t HardScatters() {return fNHardScatters;} + Int_t ProjectileParticipants() {return fNProjectileParticipants;} + Int_t TargetParticipants() {return fNTargetParticipants;} + Int_t NN() {return fNNColl;} + Int_t NNw() {return fNNwColl;} + Int_t NwN() {return fNwNColl;} + Int_t NwNw() {return fNwNwColl;} + // Setters + void SetTotalEnergy(Float_t energy) {fTotalEnergy=energy;} + void SetHardScatters(Int_t n) {fNHardScatters=n;} + void SetParticipants(Int_t np, Int_t nt) + {fNProjectileParticipants=np, fNTargetParticipants=nt;} + void SetCollisions(Int_t nn, Int_t nnw, Int_t nwn, Int_t nwnw) + {fNNColl=nn, fNNwColl=nnw, fNwNColl=nwn, fNwNwColl=nwnw;} + +protected: + Float_t fTotalEnergy; // Total energy of produced particles + Int_t fNHardScatters; // Number of hard scatterings + Int_t fNProjectileParticipants; // Number of projectiles participants + Int_t fNTargetParticipants; // Number of target participants + Int_t fNNColl; // Number of N-N collisions + Int_t fNNwColl; // Number of N-Nwounded collisions + Int_t fNwNColl; // Number of Nwounded-N collisons + Int_t fNwNwColl; // Number of Nwounded-Nwounded collisions + + + ClassDef(AliGenHijingEventHeader,1) // Event header for hijing event +}; + +#endif diff --git a/EVGEN/EVGENLinkDef.h b/EVGEN/EVGENLinkDef.h index 3d02aea3940..ef2bc4302a1 100644 --- a/EVGEN/EVGENLinkDef.h +++ b/EVGEN/EVGENLinkDef.h @@ -31,8 +31,8 @@ #pragma link C++ class AliDimuCombinator; #pragma link C++ class AliGenPHOSlib; #pragma link C++ class AliGenGSIlib; -//#pragma link C++ class AliGenEventHeader; -//#pragma link C++ class AliGenHijingEventHeader; +#pragma link C++ class AliGenEventHeader; +#pragma link C++ class AliGenHijingEventHeader; #pragma link C++ class AliGenHijing; #endif diff --git a/EVGEN/Makefile b/EVGEN/Makefile index a0ec81cc1c6..edac991ba8b 100644 --- a/EVGEN/Makefile +++ b/EVGEN/Makefile @@ -16,8 +16,8 @@ SRCS = AliGenHIJINGpara.cxx AliGenBox.cxx AliGenFixed.cxx \ AliGenExtFile.cxx AliGenScan.cxx AliGenPHOSlib.cxx \ AliGenDoubleScan.cxx AliGenCocktailEntry.cxx \ AliGenGSIlib.cxx \ - AliGenHijing.cxx -# AliGenEventHeader.cxx AliGenHijingEventHeader.cxx \ + AliGenHijing.cxx \ + AliGenEventHeader.cxx AliGenHijingEventHeader.cxx # C++ Headers HDRS = $(SRCS:.cxx=.h) EVGENLinkDef.h -- 2.31.1