From 2ca8bd8ba809cb5c2ceef16b8dfd0ab59751b4a2 Mon Sep 17 00:00:00 2001 From: morsch Date: Tue, 14 Aug 2007 15:31:50 +0000 Subject: [PATCH] Classes moved to STEERBase. --- STEER/AliGenCocktailEventHeader.cxx | 66 ++++++++++++++ STEER/AliGenCocktailEventHeader.h | 27 ++++++ STEER/AliGenHijingEventHeader.cxx | 42 +++++++++ STEER/AliGenHijingEventHeader.h | 47 ++++++++++ STEER/AliGenPythiaEventHeader.cxx | 135 ++++++++++++++++++++++++++++ STEER/AliGenPythiaEventHeader.h | 55 ++++++++++++ STEER/STEERBaseLinkDef.h | 4 + STEER/STEERLinkDef.h | 1 - STEER/libSTEER.pkg | 2 +- STEER/libSTEERBase.pkg | 2 + 10 files changed, 379 insertions(+), 2 deletions(-) create mode 100644 STEER/AliGenCocktailEventHeader.cxx create mode 100644 STEER/AliGenCocktailEventHeader.h create mode 100644 STEER/AliGenHijingEventHeader.cxx create mode 100644 STEER/AliGenHijingEventHeader.h create mode 100644 STEER/AliGenPythiaEventHeader.cxx create mode 100644 STEER/AliGenPythiaEventHeader.h diff --git a/STEER/AliGenCocktailEventHeader.cxx b/STEER/AliGenCocktailEventHeader.cxx new file mode 100644 index 00000000000..dc2db6a660a --- /dev/null +++ b/STEER/AliGenCocktailEventHeader.cxx @@ -0,0 +1,66 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + +/* $Id$ */ + +#include "AliGenCocktailEventHeader.h" +#include "AliGenEventHeader.h" +#include + +ClassImp(AliGenCocktailEventHeader) + + +AliGenCocktailEventHeader::AliGenCocktailEventHeader(): + fHeaders(0) +{ +// Default Constructor +} + +AliGenCocktailEventHeader::AliGenCocktailEventHeader(const char* name):AliGenEventHeader(name), + fHeaders(0) +{ +// Constructor +} + +AliGenCocktailEventHeader::AliGenCocktailEventHeader(const AliGenCocktailEventHeader &header): + AliGenEventHeader(header), + fHeaders(0) +{ +// Copy Constructor + header.Copy(*this); +} + +AliGenCocktailEventHeader::~AliGenCocktailEventHeader() +{ +// Constructor + if (fHeaders) { + fHeaders->Clear(); + delete fHeaders; + } +} + +void AliGenCocktailEventHeader::AddHeader(AliGenEventHeader* header) +{ +// Add a header to the list + if (!fHeaders) fHeaders = new TList(); + fHeaders->Add(header); +} + +AliGenCocktailEventHeader& AliGenCocktailEventHeader::operator=(const AliGenCocktailEventHeader& rhs) +{ +// Assignment operator + rhs.Copy(*this); + return (*this); +} diff --git a/STEER/AliGenCocktailEventHeader.h b/STEER/AliGenCocktailEventHeader.h new file mode 100644 index 00000000000..bd5f58b1894 --- /dev/null +++ b/STEER/AliGenCocktailEventHeader.h @@ -0,0 +1,27 @@ +#ifndef ALIGENCOCKTAILEVENTHEADER_H +#define ALIGENCOCKTAILEVENTHEADER_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include "AliGenEventHeader.h" + + +class AliGenCocktailEventHeader : public AliGenEventHeader +{ + public: + AliGenCocktailEventHeader(); + AliGenCocktailEventHeader(const char* name); + AliGenCocktailEventHeader(const AliGenCocktailEventHeader &header); + virtual ~AliGenCocktailEventHeader(); + virtual void AddHeader(AliGenEventHeader* header); + virtual TList* GetHeaders() {return fHeaders;} + AliGenCocktailEventHeader & operator=(const AliGenCocktailEventHeader & rhs); +protected: + TList *fHeaders; // List of Headers + ClassDef(AliGenCocktailEventHeader,1) // Event header for Cocktail event +}; + +#endif diff --git a/STEER/AliGenHijingEventHeader.cxx b/STEER/AliGenHijingEventHeader.cxx new file mode 100644 index 00000000000..48735130599 --- /dev/null +++ b/STEER/AliGenHijingEventHeader.cxx @@ -0,0 +1,42 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + +/* $Id$ */ + +#include "AliGenHijingEventHeader.h" +ClassImp(AliGenHijingEventHeader) + +AliGenHijingEventHeader::AliGenHijingEventHeader(): + fTotalEnergy(0.), + fTrials(0), + fJet1(0., 0., 0., 0.), + fJet2(0., 0., 0., 0.), + fJetFsr1(0., 0., 0., 0.), + fJetFsr2(0., 0., 0., 0.) +{ + // Constructor +} + +AliGenHijingEventHeader::AliGenHijingEventHeader(const char* name): + AliGenEventHeader(name), + fTotalEnergy(0.), + fTrials(0), + fJet1(0., 0., 0., 0.), + fJet2(0., 0., 0., 0.), + fJetFsr1(0., 0., 0., 0.), + fJetFsr2(0., 0., 0., 0.) +{ + // Copy Constructor +} diff --git a/STEER/AliGenHijingEventHeader.h b/STEER/AliGenHijingEventHeader.h new file mode 100644 index 00000000000..9db87db9bb2 --- /dev/null +++ b/STEER/AliGenHijingEventHeader.h @@ -0,0 +1,47 @@ +#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 + +#include "AliGenEventHeader.h" +#include "AliCollisionGeometry.h" + +class AliGenHijingEventHeader : public AliGenEventHeader, public AliCollisionGeometry +{ + public: + AliGenHijingEventHeader(const char* name); + AliGenHijingEventHeader(); + virtual ~AliGenHijingEventHeader() {} + // Getters + Float_t TotalEnergy() {return fTotalEnergy;} + Int_t Trials() {return fTrials;} + + + // Setters + void SetTotalEnergy(Float_t energy) {fTotalEnergy=energy;} + void SetJets(TLorentzVector* jet1, TLorentzVector* jet2, + TLorentzVector* jet3, TLorentzVector* jet4) + {fJet1 = *jet1; fJet2 = *jet2; fJetFsr1 = *jet3; fJetFsr2 = *jet4;} + void GetJets(TLorentzVector& jet1, TLorentzVector& jet2, + TLorentzVector& jet3, TLorentzVector& jet4) + {jet1 = fJet1; jet2 = fJet2; jet3 = fJetFsr1; jet4 = fJetFsr2;} + void SetTrials(Int_t trials) {fTrials = trials;} + +protected: + Float_t fTotalEnergy; // Total energy of produced particles + Int_t fTrials; // Number of trials to fulfill trigger condition + + TLorentzVector fJet1; // 4-Momentum-Vector of first triggered jet + TLorentzVector fJet2; // 4-Momentum-Vector of second triggered jet + TLorentzVector fJetFsr1; // 4-Momentum-Vector of first triggered jet + TLorentzVector fJetFsr2; // 4-Momentum-Vector of second triggered jet + + ClassDef(AliGenHijingEventHeader,5) // Event header for hijing event +}; + +#endif diff --git a/STEER/AliGenPythiaEventHeader.cxx b/STEER/AliGenPythiaEventHeader.cxx new file mode 100644 index 00000000000..a203bfbc5cb --- /dev/null +++ b/STEER/AliGenPythiaEventHeader.cxx @@ -0,0 +1,135 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + +/* $Id$ */ + +#include "AliGenPythiaEventHeader.h" +ClassImp(AliGenPythiaEventHeader) + + +AliGenPythiaEventHeader::AliGenPythiaEventHeader(): + fProcessType(0), + fTrials(0), + fNJets(0), + fNUQJets(0), + fXJet(-1.), + fYJet(-1.), + fPtHard(0.) +{ +// Default Constructor + for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.; +} + +AliGenPythiaEventHeader::AliGenPythiaEventHeader(const char* name): + AliGenEventHeader(name), + fProcessType(0), + fTrials(0), + fNJets(0), + fNUQJets(0), + fXJet(-1.), + fYJet(-1.), + fPtHard(0.) +{ +// Constructor + for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.; +} + +void AliGenPythiaEventHeader::AddJet(Float_t px, Float_t py, Float_t pz, Float_t e) +{ +// +// Add a jet +// + if (fNJets < 10) { + fJets[0][fNJets] = px; + fJets[1][fNJets] = py; + fJets[2][fNJets] = pz; + fJets[3][fNJets] = e; + fNJets++; + } else { + printf("\nWarning: More than 10 jets triggered !!\n"); + } +} + +void AliGenPythiaEventHeader::AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e) +{ +// +// Add a jet +// + if (fNUQJets < 10) { + fUQJets[0][fNUQJets] = px; + fUQJets[1][fNUQJets] = py; + fUQJets[2][fNUQJets] = pz; + fUQJets[3][fNUQJets] = e; + fNUQJets++; + } else { + printf("\nWarning: More than 10 jets triggered !!\n"); + } +} + +void AliGenPythiaEventHeader::SetZQuench(Double_t z[4]) +{ + // + // Set quenching fraction + // + for (Int_t i = 0; i < 4; i++) fZquench[i] = z[i]; +} + +void AliGenPythiaEventHeader::GetZQuench(Double_t z[4]) +{ + // + // Get quenching fraction + // + for (Int_t i = 0; i < 4; i++) z[i] = fZquench[i]; +} + +void AliGenPythiaEventHeader::TriggerJet(Int_t i, Float_t p[4]) +{ +// +// Give back jet #i +// + if (i >= fNJets) { + printf("\nWarning: TriggerJet, index out of Range!!\n"); + } else { + p[0] = fJets[0][i]; + p[1] = fJets[1][i]; + p[2] = fJets[2][i]; + p[3] = fJets[3][i]; + } +} + +void AliGenPythiaEventHeader::UQJet(Int_t i, Float_t p[4]) +{ +// +// Give back jet #i +// + if (i >= fNUQJets) { + printf("\nWarning: Unquenched Jets, index out of Range!!\n"); + } else { + p[0] = fUQJets[0][i]; + p[1] = fUQJets[1][i]; + p[2] = fUQJets[2][i]; + p[3] = fUQJets[3][i]; + } +} + +void AliGenPythiaEventHeader::SetXYJet(Double_t x, Double_t y) +{ + +// +// Add jet production point +// + fXJet = x; + fYJet = y; +} diff --git a/STEER/AliGenPythiaEventHeader.h b/STEER/AliGenPythiaEventHeader.h new file mode 100644 index 00000000000..ad2b130ddd9 --- /dev/null +++ b/STEER/AliGenPythiaEventHeader.h @@ -0,0 +1,55 @@ +#ifndef ALIGENPYTHIAEVENTHEADER_H +#define ALIGENPYTHIAEVENTHEADER_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include "AliGenEventHeader.h" + + +class AliGenPythiaEventHeader : public AliGenEventHeader +{ + public: + AliGenPythiaEventHeader(); + AliGenPythiaEventHeader(const char* name); + virtual ~AliGenPythiaEventHeader() {} + // Getters + Int_t ProcessType() {return fProcessType;} + // Setters + void SetProcessType(Int_t type) {fProcessType = type;} + Int_t Trials() {return fTrials;} + void SetTrials(Int_t trials) {fTrials = trials;} + void AddJet(Float_t px, Float_t py, Float_t pz, Float_t e); + void AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e); + Int_t NTriggerJets() {return fNJets;} + Int_t NUQTriggerJets() {return fNUQJets;} + void TriggerJet(Int_t i, Float_t p[4]); + void UQJet(Int_t i, Float_t p[4]); + Double_t GetXJet() {return fXJet;} + Double_t GetYJet() {return fYJet;} + void SetXYJet(Double_t x, Double_t y); + void SetZQuench(Double_t z[4]); + void GetZQuench(Double_t z[4]); + void SetPtHard(Float_t pthard) {fPtHard = pthard;} + Float_t GetPtHard() {return fPtHard;} + + +protected: + Int_t fProcessType; // PYTHIA process id for this event + Int_t fTrials; // Number of trials to fulfill trigger condition + Int_t fNJets; // Number of triggered jets + Int_t fNUQJets; // Number of unquenched + Double_t fXJet; // Jet production point (x) + Double_t fYJet; // Jet production point (y) + Float_t fJets[4][10]; // Trigger jets + Float_t fUQJets[4][10]; // Unquenched trigger jets + Double_t fZquench[4]; // Quenching fraction + Float_t fPtHard; // pT hard + ClassDef(AliGenPythiaEventHeader,4) // Event header for Pythia event +}; + + + +#endif diff --git a/STEER/STEERBaseLinkDef.h b/STEER/STEERBaseLinkDef.h index f8e9f1a3b76..1d701cf9a62 100644 --- a/STEER/STEERBaseLinkDef.h +++ b/STEER/STEERBaseLinkDef.h @@ -33,6 +33,10 @@ #pragma link C++ class AliHeader+; #pragma link C++ class AliGenEventHeader+; #pragma link C++ class AliDetectorEventHeader+; +#pragma link C++ class AliGenCocktailEventHeader+; +#pragma link C++ class AliGenPythiaEventHeader+; +#pragma link C++ class AliGenHijingEventHeader+; +#pragma link C++ class AliCollisionGeometry+; #pragma link C++ class AliStack+; #pragma link C++ class AliMCEventHandler+; diff --git a/STEER/STEERLinkDef.h b/STEER/STEERLinkDef.h index 13a4e7190d9..2aea8960a14 100644 --- a/STEER/STEERLinkDef.h +++ b/STEER/STEERLinkDef.h @@ -65,7 +65,6 @@ #pragma link C++ class AliReconstructor+; #pragma link C++ class AliTrackMap+; #pragma link C++ class AliTrackMapper+; -#pragma link C++ class AliCollisionGeometry+; #pragma link C++ class AliMemoryWatcher+; #pragma link C++ class AliMC+; #pragma link C++ class AliSimulation+; diff --git a/STEER/libSTEER.pkg b/STEER/libSTEER.pkg index 558fc6fe1f9..9c50703393f 100644 --- a/STEER/libSTEER.pkg +++ b/STEER/libSTEER.pkg @@ -15,7 +15,7 @@ AliRunDigitizer.cxx AliDigitizer.cxx AliStream.cxx \ AliMergeCombi.cxx AliMagFMaps.cxx AliFieldMap.cxx \ AliMagFCheb.cxx AliCheb3D.cxx \ AliGausCorr.cxx \ -AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx \ +AliTrackMap.cxx AliTrackMapper.cxx \ AliMemoryWatcher.cxx \ AliVertexer.cxx \ AliV0vertexer.cxx AliCascadeVertexer.cxx\ diff --git a/STEER/libSTEERBase.pkg b/STEER/libSTEERBase.pkg index e13e2e7d7f6..5e13b884cfa 100644 --- a/STEER/libSTEERBase.pkg +++ b/STEER/libSTEERBase.pkg @@ -8,6 +8,8 @@ SRCS = AliVParticle.cxx \ AliLHCTagCuts.cxx AliDetectorTagCuts.cxx \ AliTagCreator.cxx \ AliHeader.cxx AliGenEventHeader.cxx AliDetectorEventHeader.cxx \ + AliGenPythiaEventHeader.cxx AliGenCocktailEventHeader.cxx \ + AliGenHijingEventHeader.cxx AliCollisionGeometry.cxx \ AliStack.cxx AliMCEventHandler.cxx \ AliTrackReference.cxx -- 2.43.0