From f3a97c866d5f75fb6b19bdd06138b13855734669 Mon Sep 17 00:00:00 2001 From: hristov Date: Thu, 14 Jul 2005 10:07:36 +0000 Subject: [PATCH] New event tag classes (P.Christakoglou) --- STEER/AliDetectorTag.cxx | 70 ++++++++ STEER/AliDetectorTag.h | 76 ++++++++ STEER/AliEventTag.cxx | 194 ++++++++++++++++++++ STEER/AliEventTag.h | 266 +++++++++++++++++++++++++++ STEER/AliLHCTag.cxx | 40 +++++ STEER/AliLHCTag.h | 44 +++++ STEER/AliReconstruction.cxx | 91 +++++++++- STEER/AliReconstruction.h | 13 ++ STEER/AliRunTag.cxx | 88 +++++++++ STEER/AliRunTag.h | 97 ++++++++++ STEER/AliTag.cxx | 269 ++++++++++++++++++++++++++++ STEER/AliTag.h | 345 ++++++++++++++++++++++++++++++++++++ STEER/ESDLinkDef.h | 3 + STEER/STEERLinkDef.h | 7 + STEER/libSTEER.pkg | 1 + 15 files changed, 1603 insertions(+), 1 deletion(-) create mode 100644 STEER/AliDetectorTag.cxx create mode 100644 STEER/AliDetectorTag.h create mode 100644 STEER/AliEventTag.cxx create mode 100644 STEER/AliEventTag.h create mode 100644 STEER/AliLHCTag.cxx create mode 100644 STEER/AliLHCTag.h create mode 100644 STEER/AliRunTag.cxx create mode 100644 STEER/AliRunTag.h create mode 100644 STEER/AliTag.cxx create mode 100644 STEER/AliTag.h diff --git a/STEER/AliDetectorTag.cxx b/STEER/AliDetectorTag.cxx new file mode 100644 index 00000000000..fd748dd0e6e --- /dev/null +++ b/STEER/AliDetectorTag.cxx @@ -0,0 +1,70 @@ +/************************************************************************** + * 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$ */ + +//----------------------------------------------------------------- +// Implementation of the DetectorTag class +// This is the class to deal with the tags in the detector level +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//----------------------------------------------------------------- + +#include "AliDetectorTag.h" + +ClassImp(AliDetectorTag) + +//______________________________________________________________________________ +AliDetectorTag::AliDetectorTag() +{ + fITS = 0; + fTPC = 0; + fTRD = 0; + fTOF = 0; + fHMPID = 0; + fPHOS = 0; + fZDC = 0; + fMUON = 0; + fABSORBER = 0; + fPMD = 0; + fRICH = 0; + fEMCAL = 0; + fVZERO = 0; + fTZERO = 0; +} + +//______________________________________________________________________________ +AliDetectorTag::AliDetectorTag(AliDetectorTag *DetTag) +{ + // DetectorTag copy constructor + SetITS(DetTag->GetITS()); + SetTPC(DetTag->GetTPC()); + SetTRD(DetTag->GetTRD()); + SetTOF(DetTag->GetTOF()); + SetHMPID(DetTag->GetHMPID()); + SetPHOS(DetTag->GetPHOS()); + SetZDC(DetTag->GetZDC()); + SetMUON(DetTag->GetMUON()); + SetABSORBER(DetTag->GetABSORBER()); + SetPMD(DetTag->GetPMD()); + SetRICH(DetTag->GetRICH()); + SetEMCAL(DetTag->GetEMCAL()); + SetVZERO(DetTag->GetVZERO()); + SetTZERO(DetTag->GetTZERO()); +} + +//______________________________________________________________________________ +AliDetectorTag::~AliDetectorTag() +{ +} diff --git a/STEER/AliDetectorTag.h b/STEER/AliDetectorTag.h new file mode 100644 index 00000000000..ecfea369ab3 --- /dev/null +++ b/STEER/AliDetectorTag.h @@ -0,0 +1,76 @@ +#ifndef ALIDETECTORTAG_H +#define ALIDETECTORTAG_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + + +/* $Id$ */ + +//------------------------------------------------------------------------- +// Class AliDetectorTag +// This is the class to deal with the tags for the detector level +// +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//------------------------------------------------------------------------- + +#include "TObject.h" +#include "TClonesArray.h" +//______________________________________________________________________________ +class AliDetectorTag : public TObject +{ + private: + Bool_t fITS; //ITS active = 1 + Bool_t fTPC; //TPC active = 1 + Bool_t fTRD; //TRD active = 1 + Bool_t fTOF; //TOF active = 1 + Bool_t fHMPID; //HMPID active = 1 + Bool_t fPHOS; //PHOS active = 1 + Bool_t fZDC; //ZDC active = 1 + Bool_t fMUON; //MUON active = 1 + Bool_t fABSORBER; //ABSORBER active = 1 + Bool_t fPMD; //PMD active = 1 + Bool_t fRICH; //RICH active = 1 + Bool_t fEMCAL; //EMCAL active = 1 + Bool_t fVZERO; //VZERO active = 1 + Bool_t fTZERO; //TZERO active = 1 + + public: + AliDetectorTag(); + AliDetectorTag(AliDetectorTag *t); + virtual ~AliDetectorTag(); + + void SetITS(Int_t n) {fITS = n;} + void SetTPC(Int_t n) {fTPC = n;} + void SetTRD(Int_t n) {fTRD = n;} + void SetTOF(Int_t n) {fTOF = n;} + void SetHMPID(Int_t n) {fHMPID = n;} + void SetPHOS(Int_t n) {fPHOS = n;} + void SetZDC(Int_t n) {fZDC = n;} + void SetMUON(Int_t n) {fMUON = n;} + void SetABSORBER(Int_t n) {fABSORBER = n;} + void SetPMD(Int_t n) {fPMD = n;} + void SetRICH(Int_t n) {fRICH = n;} + void SetEMCAL(Int_t n) {fEMCAL = n;} + void SetVZERO(Int_t n) {fVZERO = n;} + void SetTZERO(Int_t n) {fTZERO = n;} + + Bool_t GetITS() {return fITS;} + Bool_t GetTPC() {return fTPC;} + Bool_t GetTRD() {return fTRD;} + Bool_t GetTOF() {return fTOF;} + Bool_t GetHMPID() {return fHMPID;} + Bool_t GetPHOS() {return fPHOS;} + Bool_t GetZDC() {return fZDC;} + Bool_t GetMUON() {return fMUON;} + Bool_t GetABSORBER() {return fABSORBER;} + Bool_t GetPMD() {return fPMD;} + Bool_t GetRICH() {return fRICH;} + Bool_t GetEMCAL() {return fEMCAL;} + Bool_t GetVZERO() {return fVZERO;} + Bool_t GetTZERO() {return fTZERO;} + + ClassDef(AliDetectorTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + +#endif diff --git a/STEER/AliEventTag.cxx b/STEER/AliEventTag.cxx new file mode 100644 index 00000000000..8f845db02ac --- /dev/null +++ b/STEER/AliEventTag.cxx @@ -0,0 +1,194 @@ +/************************************************************************** + * 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$ */ + +//----------------------------------------------------------------- +// Implementation of the EventTag class +// This is the class to deal with the tags in the event level +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//----------------------------------------------------------------- + +#include "AliEventTag.h" + +ClassImp(AliEventTag) + +//______________________________________________________________________________ +AliEventTag::AliEventTag() +{ + fAliceEventId = 0; + fGUID = 0; + + fNumberOfParticipants = -10; + fImpactParameter = -10.0; + + fPrimaryVertexX = -100.0; + fPrimaryVertexY = -100.0; + fPrimaryVertexZ = -100.0; + + fPrimaryVertexFlag = -1; + fPrimaryVertexZError = -100.0; + + fTriggerInfo = -10; + + fZDCNeutronEnergy = -10.0; + fZDCProtonEnergy = -10.0; + fZDCEMEnergy = -10.0; + + fT0VertexZ = -10.0; + + fNumberOfTracks = -10; + fNumberOfPositiveTracks = -10; + fNumberOfNegativeTracks = -10; + fNumberOfNeutralTracks = -10; + + fNumberOfV0s = -10; + fNumberOfCascades = -10; + fNumberOfKinks = -10; + + fNumberOfPMDTracks = -10; + fNumberOfPHOSTracks = -10; + fNumberOfEMCALTracks = -10; + fNumberOfFMDTracks = -10; + + fNumberOfJetCandidates = -10; + fNumberOfHardPhotonsCandidates = -10; + + fMaxJetEnergy = -100.0; + fMaxNeutralEnergy = -100.0; + fNumberOfChargedAbovePtRange = -10; + fNumberOfMuonsAbovePtRange = -10; + fNumberOfElectronsAbovePtRange = -10; + + fNumberOfElectrons = -10; + fNumberOfMuons = -10; + fNumberOfPions = -10; + fNumberOfKaons = -10; + fNumberOfProtons = -10; + fNumberOfLambdas = -10; + + fNumberOfPhotons = -10; + fNumberOfPi0s = -10; + fNumberOfNeutrons = -10; + fNumberOfKaon0s = -10; + + fNumberOfJPsiCandidates = -10; + fNumberOfPsiPrimeCandidates = -10; + fNumberOfUpsilonCandidates = -10; + fNumberOfUpsilonPrimeCandidates = -10; + fNumberOfUpsilonDoublePrimeCandidates = -10; + fNumberOfCharmParticleCandidates = -10; + fNumberOfBeautyParticleCandidates = -10; + + fTotalP = -10.0; + fMeanPt = -10.0; + fMaxPt = -10.0; + + fTotalNeutralP = -10.0; + fMeanNeutralPt = -10.0; + fMaxNeutralPt = -10.0; + + fEventPlaneAngle = -10.0; + fHBTRadii = -10.0; + +} + + +//______________________________________________________________________________ +AliEventTag::AliEventTag(AliEventTag *EvTag) +{ + // EventTag copy constructor + SetEventId(EvTag->GetEventId()); + SetGUID(EvTag->GetGUID()); + + SetNumOfParticipants(EvTag->GetNumOfParticipants()); + SetImpactParameter(EvTag->GetImpactParameter()); + + SetVertexX(EvTag->GetVertexX()); + SetVertexY(EvTag->GetVertexY()); + SetVertexZ(EvTag->GetVertexZ()); + + SetVertexFlag(EvTag->GetVertexFlag()); + SetVertexZError(EvTag->GetVertexZError()); + + SetTrigger(EvTag->GetTrigger()); + + SetZDCNeutronEnergy(EvTag->GetZDCNeutronEnergy()); + SetZDCProtonEnergy(EvTag->GetZDCProtonEnergy()); + SetZDCEMEnergy(EvTag->GetZDCEMEnergy()); + + SetT0VertexZ(EvTag->GetT0VertexZ()); + + SetNumOfTracks(EvTag->GetNumOfTracks()); + SetNumOfPosTracks(EvTag->GetNumOfPosTracks()); + SetNumOfNegTracks(EvTag->GetNumOfNegTracks()); + SetNumOfNeutrTracks(EvTag->GetNumOfNeutrTracks()); + + SetNumOfV0s(EvTag->GetNumOfV0s()); + SetNumOfCascades(EvTag->GetNumOfCascades()); + SetNumOfKinks(EvTag->GetNumOfKinks()); + + SetNumOfPMDTracks(EvTag->GetNumOfPMDTracks()); + SetNumOfPHOSTracks(EvTag->GetNumOfPHOSTracks()); + SetNumOfEMCALTracks(EvTag->GetNumOfEMCALTracks()); + SetNumOfFMDTracks(EvTag->GetNumOfFMDTracks()); + + SetNumOfJetCandidates(EvTag->GetNumOfJetCandidates()); + SetNumOfHardPhotonsCandidates(EvTag->GetNumOfHardPhotonsCandidates()); + + SetMaxJetEnergy(EvTag->GetMaxJetEnergy()); + SetMaxNeutralEnergy(EvTag->GetMaxNeutralEnergy()); + SetNumOfChargedAbovePtRange(EvTag->GetNumOfChargedAbovePtRange()); + SetNumOfMuonsAbovePtRange(EvTag->GetNumOfMuonsAbovePtRange()); + SetNumOfElectronsAbovePtRange(EvTag->GetNumOfElectronsAbovePtRange()); + + + + SetNumOfJPsiCandidates(EvTag->GetNumOfJPsiCandidates()); + SetNumOfPsiPrimeCandidates(EvTag->GetNumOfPsiPrimeCandidates()); + SetNumOfUpsilonCandidates(EvTag->GetNumOfUpsilonCandidates()); + SetNumOfUpsilonPrimeCandidates(EvTag->GetNumOfUpsilonPrimeCandidates()); + SetNumOfUpsilonDoublePrimeCandidates(EvTag->GetNumOfUpsilonDoublePrimeCandidates()); + SetNumOfCharmCandidates(EvTag->GetNumOfCharmCandidates()); + SetNumOfBeautyCandidates(EvTag->GetNumOfBeautyCandidates()); + + SetNumOfElectrons(EvTag->GetNumOfElectrons()); + SetNumOfMuons(EvTag->GetNumOfMuons()); + SetNumOfPions(EvTag->GetNumOfPions()); + SetNumOfKaons(EvTag->GetNumOfKaons()); + SetNumOfProtons(EvTag->GetNumOfProtons()); + SetNumOfLambdas(EvTag->GetNumOfLambdas()); + + + SetNumOfPhotons(EvTag->GetNumOfPhotons()); + SetNumOfPi0s(EvTag->GetNumOfPi0s()); + SetNumOfNeutrons(EvTag->GetNumOfNeutrons()); + SetNumOfKaon0s(EvTag->GetNumOfKaon0s()); + + SetTotalMomentum(EvTag->GetTotalMomentum()); + SetMeanPt(EvTag->GetMeanPt()); + SetMaxPt(EvTag->GetMaxPt()); + + SetNeutralTotalMomentum(EvTag->GetNeutralTotalMomentum()); + SetNeutralMeanPt(EvTag->GetNeutralMeanPt()); + SetNeutralMaxPt(EvTag->GetNeutralMaxPt()); + + SetEventPlaneAngle(EvTag->GetEventPlaneAngle()); + SetHBTRadii(EvTag->GetHBTRadii()); +} +//______________________________________________________________________________ +AliEventTag::~AliEventTag() +{ +} diff --git a/STEER/AliEventTag.h b/STEER/AliEventTag.h new file mode 100644 index 00000000000..0015a5d8c0b --- /dev/null +++ b/STEER/AliEventTag.h @@ -0,0 +1,266 @@ +#ifndef ALIEVENTTAG_H +#define ALIEVENTTAG_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + + +/* $Id$ */ + +//------------------------------------------------------------------------- +// Class AliEventTag +// This is the class to deal with the tags for the event level +// +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//------------------------------------------------------------------------- + +#include "TObject.h" +#include "TClonesArray.h" + +//______________________________________________________________________________ +class AliEventTag : public TObject +{ + private: + Int_t fAliceEventId; //The event id + Int_t fGUID; //The unique identifier of the file + Int_t fNumberOfParticipants; //Number of participants + Float_t fImpactParameter; //The impact parameter + + Int_t fPrimaryVertexFlag; //Primary vertex flag: 0->not found, 1->found + + Float_t fPrimaryVertexX; //Primary vertex - X coordinate + Float_t fPrimaryVertexY; //Primary vertex - Y coordinate + Float_t fPrimaryVertexZ; //Primary vertex - Z coordinate + + Float_t fPrimaryVertexZError; //Primary vertex - Z coordinate - error + + Int_t fTriggerInfo; //Information from trigger + Float_t fZDCNeutronEnergy; //ZDC info - neutron + Float_t fZDCProtonEnergy; //ZDC info - proton + Float_t fZDCEMEnergy; //ZDC info - em + Float_t fT0VertexZ; //T0 info + Int_t fNumberOfTracks; //Multiplicity + Int_t fNumberOfPositiveTracks; //Multiplicity of positive tracks + Int_t fNumberOfNegativeTracks; //Multiplicity of negative tracks + Int_t fNumberOfNeutralTracks; //Multiplicity of neutral tracks + Int_t fNumberOfV0s; //Number of V0s + Int_t fNumberOfCascades; //Number of cascades + Int_t fNumberOfKinks; //Number of kinks + Int_t fNumberOfPMDTracks; //PMD tracks + Int_t fNumberOfPHOSTracks; //PHOS tracks + Int_t fNumberOfEMCALTracks; //EMCAL tracks + Int_t fNumberOfFMDTracks; //FMD tracks + Int_t fNumberOfJetCandidates; //Jet candidates + + Float_t fMaxJetEnergy; //jet energy info + + Int_t fNumberOfHardPhotonsCandidates; //Hard photons candidates + + Float_t fMaxNeutralEnergy; //neutral energy info + Int_t fNumberOfChargedAbovePtRange; + Int_t fNumberOfMuonsAbovePtRange; + Int_t fNumberOfElectronsAbovePtRange; + + + + Int_t fNumberOfElectrons; //Number of electrons + Int_t fNumberOfMuons; //Number of muons + Int_t fNumberOfPions; //Number of pions + Int_t fNumberOfKaons; //Number of kaons + Int_t fNumberOfProtons; //Number of protons + Int_t fNumberOfLambdas; //Number of lambdas + + Int_t fNumberOfPhotons; + Int_t fNumberOfPi0s; + Int_t fNumberOfNeutrons; + Int_t fNumberOfKaon0s; + + + Int_t fNumberOfJPsiCandidates; //JPsi candidates + Int_t fNumberOfPsiPrimeCandidates; //Psi prime candidates + Int_t fNumberOfUpsilonCandidates; //Upsilon candidates + Int_t fNumberOfUpsilonPrimeCandidates; //Upsilon prime candidates + Int_t fNumberOfUpsilonDoublePrimeCandidates; + Int_t fNumberOfCharmParticleCandidates; + Int_t fNumberOfBeautyParticleCandidates; + + Float_t fTotalP; //Sum of the momentum per event + Float_t fMeanPt; //Mean Pt per event + Float_t fMaxPt; //Max Pt for each event + + Float_t fTotalNeutralP; //Sum of the momentum per event for neutral + Float_t fMeanNeutralPt; //Mean Pt per event for neutral + Float_t fMaxNeutralPt; //Max Pt for each event for neutral + + Float_t fEventPlaneAngle; //event plane info + Float_t fHBTRadii; //HBT info + + public: + AliEventTag(); + AliEventTag(AliEventTag *t); + virtual ~AliEventTag(); + + void SetEventId(Int_t Pid) {fAliceEventId = Pid;} + void SetGUID(Int_t Pid) {fGUID = Pid;} + + void SetNumOfParticipants(Int_t P) {fNumberOfParticipants = P;} + void SetImpactParameter(Float_t Pimpact) {fImpactParameter = Pimpact;} + + void SetVertexX(Float_t Pvx) {fPrimaryVertexX = Pvx;} + void SetVertexY(Float_t Pvy) {fPrimaryVertexY = Pvy;} + void SetVertexZ(Float_t Pvz) {fPrimaryVertexZ = Pvz;} + + void SetVertexFlag(Int_t i) {fPrimaryVertexFlag = i;} + void SetVertexZError(Float_t f) { fPrimaryVertexZError = f;} + + void SetTrigger(Int_t Ptr) {fTriggerInfo = Ptr;} + + void SetZDCNeutronEnergy(Float_t Pen) {fZDCNeutronEnergy = Pen;} + void SetZDCProtonEnergy(Float_t Pen) {fZDCProtonEnergy = Pen;} + void SetZDCEMEnergy(Float_t Pen) {fZDCEMEnergy = Pen;} + + void SetT0VertexZ(Float_t Pvz) {fT0VertexZ = Pvz;} + + void SetNumOfTracks(Int_t Ptr) {fNumberOfTracks = Ptr;} + void SetNumOfPosTracks(Int_t Ptr) {fNumberOfPositiveTracks = Ptr;} + void SetNumOfNegTracks(Int_t Ptr) {fNumberOfNegativeTracks = Ptr;} + void SetNumOfNeutrTracks(Int_t Ptr) {fNumberOfNeutralTracks = Ptr;} + + void SetNumOfV0s(Int_t Ptr) {fNumberOfV0s = Ptr;} + void SetNumOfCascades(Int_t Ptr) {fNumberOfCascades = Ptr;} + void SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;} + + void SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;} + void SetNumOfPHOSTracks(Int_t Ptr) {fNumberOfPHOSTracks = Ptr;} + void SetNumOfEMCALTracks(Int_t Ptr) {fNumberOfEMCALTracks = Ptr;} + void SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;} + + void SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;} + void SetNumOfHardPhotonsCandidates(Int_t Ptr) {fNumberOfHardPhotonsCandidates = Ptr;} + + + void SetMaxJetEnergy(Float_t f) {fMaxJetEnergy = f;} + void SetMaxNeutralEnergy(Float_t f) {fMaxNeutralEnergy = f;} + void SetNumOfChargedAbovePtRange(Int_t i) {fNumberOfChargedAbovePtRange = i;} + void SetNumOfMuonsAbovePtRange(Int_t i) {fNumberOfMuonsAbovePtRange = i;} + void SetNumOfElectronsAbovePtRange(Int_t i) {fNumberOfElectronsAbovePtRange = i;} + + void SetNumOfJPsiCandidates(Int_t Ptr) {fNumberOfJPsiCandidates = Ptr;} + void SetNumOfPsiPrimeCandidates(Int_t Ptr) {fNumberOfPsiPrimeCandidates = Ptr;} + void SetNumOfUpsilonCandidates(Int_t Ptr) {fNumberOfUpsilonCandidates = Ptr;} + void SetNumOfUpsilonPrimeCandidates(Int_t Ptr) {fNumberOfUpsilonPrimeCandidates = Ptr;} + void SetNumOfUpsilonDoublePrimeCandidates(Int_t Ptr) {fNumberOfUpsilonDoublePrimeCandidates = Ptr;} + void SetNumOfCharmCandidates(Int_t Ptr) {fNumberOfCharmParticleCandidates = Ptr;} + void SetNumOfBeautyCandidates(Int_t Ptr) {fNumberOfBeautyParticleCandidates = Ptr;} + + void SetNumOfElectrons(Int_t Ptr) {fNumberOfElectrons = Ptr;} + void SetNumOfMuons(Int_t Ptr) {fNumberOfMuons = Ptr;} + void SetNumOfPions(Int_t Ptr) {fNumberOfPions = Ptr;} + void SetNumOfKaons(Int_t Ptr) {fNumberOfKaons = Ptr;} + void SetNumOfProtons(Int_t Ptr) {fNumberOfProtons = Ptr;} + void SetNumOfLambdas(Int_t Ptr) {fNumberOfLambdas = Ptr;} + + + void SetNumOfPhotons(Int_t Ptr) {fNumberOfPhotons = Ptr;} + void SetNumOfPi0s(Int_t Ptr) {fNumberOfPi0s = Ptr;} + void SetNumOfNeutrons(Int_t Ptr) {fNumberOfNeutrons = Ptr;} + void SetNumOfKaon0s(Int_t Ptr) {fNumberOfKaon0s = Ptr;} + + void SetTotalMomentum(Float_t P) {fTotalP = P;} + void SetMeanPt(Float_t Pt) {fMeanPt = Pt;} + void SetMaxPt(Float_t Pt) {fMaxPt = Pt;} + + void SetNeutralTotalMomentum(Float_t f) {fTotalNeutralP = f;} + void SetNeutralMeanPt(Float_t f) {fMeanNeutralPt = f;} + void SetNeutralMaxPt(Float_t f) {fMaxNeutralPt = f;} + + void SetEventPlaneAngle(Float_t f) {fEventPlaneAngle = f;} + void SetHBTRadii(Float_t f) {fHBTRadii = f;} + + + + Int_t GetEventId() {return fAliceEventId;} + Int_t GetGUID() {return fGUID;} + + Int_t GetNumOfParticipants() {return fNumberOfParticipants;} + Float_t GetImpactParameter() {return fImpactParameter;} + + Float_t GetVertexX() {return fPrimaryVertexX;} + Float_t GetVertexY() {return fPrimaryVertexY;} + Float_t GetVertexZ() {return fPrimaryVertexZ;} + + Int_t GetVertexFlag() {return fPrimaryVertexFlag;} + Float_t GetVertexZError() {return fPrimaryVertexZError;} + + + + Int_t GetTrigger() {return fTriggerInfo;} + + Float_t GetZDCNeutronEnergy() {return fZDCNeutronEnergy;} + Float_t GetZDCProtonEnergy() {return fZDCProtonEnergy;} + Float_t GetZDCEMEnergy() {return fZDCEMEnergy;} + + Float_t GetT0VertexZ() {return fT0VertexZ;} + + Int_t GetNumOfTracks() {return fNumberOfTracks;} + Int_t GetNumOfPosTracks() {return fNumberOfPositiveTracks;} + Int_t GetNumOfNegTracks() {return fNumberOfNegativeTracks;} + Int_t GetNumOfNeutrTracks() {return fNumberOfNeutralTracks;} + + Int_t GetNumOfV0s() {return fNumberOfV0s;} + Int_t GetNumOfCascades() {return fNumberOfCascades;} + Int_t GetNumOfKinks() {return fNumberOfKinks;} + + Int_t GetNumOfPMDTracks() {return fNumberOfPMDTracks;} + Int_t GetNumOfPHOSTracks() {return fNumberOfPHOSTracks;} + Int_t GetNumOfEMCALTracks() {return fNumberOfEMCALTracks;} + Int_t GetNumOfFMDTracks() {return fNumberOfFMDTracks;} + + Int_t GetNumOfJetCandidates() {return fNumberOfJetCandidates;} + Int_t GetNumOfHardPhotonsCandidates() {return fNumberOfHardPhotonsCandidates;} + + Float_t GetMaxJetEnergy() {return fMaxJetEnergy;} + Float_t GetMaxNeutralEnergy() {return fMaxNeutralEnergy;} + Int_t GetNumOfChargedAbovePtRange() {return fNumberOfChargedAbovePtRange;} + Int_t GetNumOfMuonsAbovePtRange() {return fNumberOfMuonsAbovePtRange;} + Int_t GetNumOfElectronsAbovePtRange() {return fNumberOfElectronsAbovePtRange;} + + + Int_t GetNumOfJPsiCandidates() {return fNumberOfJPsiCandidates;} + Int_t GetNumOfPsiPrimeCandidates() {return fNumberOfPsiPrimeCandidates;} + Int_t GetNumOfUpsilonCandidates() {return fNumberOfUpsilonCandidates;} + Int_t GetNumOfUpsilonPrimeCandidates() {return fNumberOfUpsilonPrimeCandidates;} + Int_t GetNumOfUpsilonDoublePrimeCandidates() {return fNumberOfUpsilonDoublePrimeCandidates;} + Int_t GetNumOfCharmCandidates() {return fNumberOfCharmParticleCandidates;} + Int_t GetNumOfBeautyCandidates() {return fNumberOfBeautyParticleCandidates;} + + Int_t GetNumOfElectrons() {return fNumberOfElectrons;} + Int_t GetNumOfMuons() {return fNumberOfMuons;} + Int_t GetNumOfPions() {return fNumberOfPions;} + Int_t GetNumOfKaons() {return fNumberOfKaons;} + Int_t GetNumOfProtons() {return fNumberOfProtons;} + Int_t GetNumOfLambdas() {return fNumberOfLambdas;} + + + Int_t GetNumOfPhotons() {return fNumberOfPhotons;} + Int_t GetNumOfPi0s() {return fNumberOfPi0s;} + Int_t GetNumOfNeutrons() {return fNumberOfNeutrons;} + Int_t GetNumOfKaon0s() {return fNumberOfKaon0s;} + + + Float_t GetTotalMomentum() {return fTotalP;} + Float_t GetMeanPt() {return fMeanPt;} + Float_t GetMaxPt() {return fMaxPt;} + + Float_t GetNeutralTotalMomentum() {return fTotalNeutralP;} + Float_t GetNeutralMeanPt() {return fMeanNeutralPt;} + Float_t GetNeutralMaxPt() {return fMaxNeutralPt;} + + Float_t GetEventPlaneAngle() {return fEventPlaneAngle;} + Float_t GetHBTRadii() {return fHBTRadii;} + + ClassDef(AliEventTag,1) //(ClassName, ClassVersion) + }; +//______________________________________________________________________________ + + +#endif diff --git a/STEER/AliLHCTag.cxx b/STEER/AliLHCTag.cxx new file mode 100644 index 00000000000..4275e374aa7 --- /dev/null +++ b/STEER/AliLHCTag.cxx @@ -0,0 +1,40 @@ +/************************************************************************** + * 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$ */ + +//----------------------------------------------------------------- +// Implementation of the LHCTag class +// This is the class to deal with the tags in the LHC level +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//----------------------------------------------------------------- + +#include +#include + +#include "AliLHCTag.h" + +ClassImp(AliLHCTag) + +//______________________________________________________________________________ +AliLHCTag::AliLHCTag() +{ + fLHCLuminosity = -1.0; +} + +//______________________________________________________________________________ +AliLHCTag::~AliLHCTag() +{ +} diff --git a/STEER/AliLHCTag.h b/STEER/AliLHCTag.h new file mode 100644 index 00000000000..5f82f634059 --- /dev/null +++ b/STEER/AliLHCTag.h @@ -0,0 +1,44 @@ +#ifndef ALILHCTAG_H +#define ALILHCTAG_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + + +/* $Id$ */ + +//------------------------------------------------------------------------- +// Class AliLHCTag +// This is the class to deal with the tags for the LHC level +// +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//------------------------------------------------------------------------- + +#include +#include + +#include "TObject.h" +#include "TClonesArray.h" + +//______________________________________________________________________________ +class AliLHCTag : public TObject +{ + private: + Char_t fLHCState[50]; //LHC run conditions - comments + Float_t fLHCLuminosity; //the value of the luminosity + + public: + AliLHCTag(); + virtual ~AliLHCTag(); + + void SetLHCState(char *type) {strcpy(fLHCState,type);} + void SetLuminosity(Float_t lumin) {fLHCLuminosity = lumin;} + void SetLHCTag(Float_t lumin, char *type) {fLHCLuminosity = lumin; strcpy(fLHCState,type); } + + char *GetLHCState() {return fLHCState;} + Float_t GetLuminosity() {return fLHCLuminosity;} + + ClassDef(AliLHCTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + +#endif diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index 0a5bac7004f..ee0a83670c4 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -130,6 +130,15 @@ #include "AliESDpid.h" #include "AliMagF.h" + + +#include "AliRunTag.h" +#include "AliLHCTag.h" +#include "AliDetectorTag.h" +#include "AliEventTag.h" + + + ClassImp(AliReconstruction) @@ -413,7 +422,8 @@ Bool_t AliReconstruction::Run(const char* input, // write HLT ESD hlttree->Fill(); - if (fCheckPointLevel > 0) WriteESD(esd, "final"); + if (fCheckPointLevel > 0) WriteESD(esd, "final"); + delete esd; delete hltesd; esd = NULL; hltesd = NULL; } @@ -421,6 +431,10 @@ Bool_t AliReconstruction::Run(const char* input, file->cd(); tree->Write(); hlttree->Write(); + + // Create tags for the events in the ESD tree (the ESD tree is always present) + // In case of empty events the tags will contain dummy values + CreateTag(file); CleanUp(file, fileOld); return kTRUE; @@ -1117,6 +1131,7 @@ Bool_t AliReconstruction::ReadESD(AliESD*& esd, const char* recStep) const esd->GetRunNumber(), esd->GetEventNumber(), recStep); if (gSystem->AccessPathName(fileName)) return kFALSE; + AliInfo(Form("reading ESD from file %s", fileName)); AliDebug(1, Form("reading ESD from file %s", fileName)); TFile* file = TFile::Open(fileName); if (!file || !file->IsOpen()) { @@ -1153,3 +1168,77 @@ void AliReconstruction::WriteESD(AliESD* esd, const char* recStep) const } delete file; } + + + + +//_____________________________________________________________________________ +void AliReconstruction::CreateTag(TFile* file) +{ + AliRunTag *tag = new AliRunTag(); + AliDetectorTag *detTag = new AliDetectorTag(); + AliEventTag *evTag = new AliEventTag(); + TTree ttag("T","A Tree with event tags"); + TBranch * btag = ttag.Branch("AliTAG", "AliRunTag", &tag); + btag->SetCompressionLevel(9); + + AliInfo(Form("Creating the tags.......")); + + if (!file || !file->IsOpen()) { + AliError(Form("opening failed")); + delete file; + return ; + } + + TTree *t = (TTree*) file->Get("esdTree"); + TBranch * b = t->GetBranch("ESD"); + AliESD *esd = 0; + b->SetAddress(&esd); + + tag->SetRunId(esd->GetRunNumber()); + + Int_t firstEvent = 0,lastEvent = 0; + Int_t i_NumberOfEvents = b->GetEntries(); + for (Int_t i_EventNumber = 0; i_EventNumber < i_NumberOfEvents; i_EventNumber++) + { + b->GetEntry(i_EventNumber); + // Int_t i_NumberOfTracks = esd->GetNumberOfTracks(); + const AliESDVertex * VertexIn = esd->GetVertex(); + + evTag->SetEventId(i_EventNumber+1); + + evTag->SetVertexX(VertexIn->GetXv()); + evTag->SetVertexY(VertexIn->GetYv()); + evTag->SetVertexZ(VertexIn->GetZv()); + + evTag->SetNumOfTracks(esd->GetNumberOfTracks()); + evTag->SetNumOfV0s(esd->GetNumberOfV0s()); + evTag->SetNumOfCascades(esd->GetNumberOfCascades()); + + evTag->SetNumOfPHOSTracks(esd->GetNumberOfPHOSParticles()); + evTag->SetNumOfEMCALTracks(esd->GetNumberOfEMCALParticles()); + evTag->SetNumOfMuons(esd->GetNumberOfMuonTracks()); + + tag->AddEventTag(evTag); + } + lastEvent = i_NumberOfEvents; + + ttag.Fill(); + tag->Clear(); + + char fileName[256]; + sprintf(fileName, "Run%d.Event%d_%d.ESD.tag.root", + tag->GetRunId(),firstEvent,lastEvent ); + AliInfo(Form("writing tags to file %s", fileName)); + AliDebug(1, Form("writing tags to file %s", fileName)); + + TFile* ftag = TFile::Open(fileName, "recreate"); + ftag->cd(); + ttag.Write(); + ftag->Close(); + file->cd(); + delete tag; + delete detTag; + delete evTag; +} + diff --git a/STEER/AliReconstruction.h b/STEER/AliReconstruction.h index 29543293289..ba2f126aed8 100644 --- a/STEER/AliReconstruction.h +++ b/STEER/AliReconstruction.h @@ -30,6 +30,11 @@ class AliVertexer; class AliESD; class TFile; +class AliRunTag; +class AliLHCTag; +class AliDetectorTag; +class AliEventTag; + class AliReconstruction: public TNamed { public: @@ -90,6 +95,14 @@ private: Bool_t ReadESD(AliESD*& esd, const char* recStep) const; void WriteESD(AliESD* esd, const char* recStep) const; + + //===========================================// + void CreateTag(TFile* file); + //==========================================// + + + + TString fRunLocalReconstruction; // run the local reconstruction for these detectors Bool_t fUniformField; // uniform field tracking flag Bool_t fRunVertexFinder; // run the vertex finder diff --git a/STEER/AliRunTag.cxx b/STEER/AliRunTag.cxx new file mode 100644 index 00000000000..2ef15b677de --- /dev/null +++ b/STEER/AliRunTag.cxx @@ -0,0 +1,88 @@ +/************************************************************************** + * 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$ */ + +//----------------------------------------------------------------- +// Implementation of the RunTag class +// This is the class to deal with the tags in the run level +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//----------------------------------------------------------------- + +#include +#include + +#include "AliRunTag.h" +#include "AliLHCTag.h" +#include "AliDetectorTag.h" +#include "AliEventTag.h" + +ClassImp(AliRunTag) + +TClonesArray *AliRunTag::fgEvents = 0; +TClonesArray *AliRunTag::fgDetectors = 0; + +//______________________________________________________________________________ +AliRunTag::AliRunTag() +{ + if (!fgEvents) fgEvents = new TClonesArray("AliEventTag", 1000); + fEventTag = fgEvents; + fNumEvents = 0; + + if (!fgDetectors) fgDetectors = new TClonesArray("AliDetectorTag", 1000); + fDetectorTag = fgDetectors; + fNumDetectors = 0; + + fAliceMagneticField = 0.0; + fAliceRunStartTime = 0; + fAliceRunStopTime = 0; + fAliceReconstructionVersion = 0; + fAliceRunQuality = 0; + fAliceBeamEnergy = 0.0; + fAliceCalibrationVersion = 0; + fAliceDataType = 0; +} + +//______________________________________________________________________________ +AliRunTag::~AliRunTag() +{ +} + +//______________________________________________________________________________ +void AliRunTag::SetLHCTag(Float_t lumin, char *type) +{ + fLHCTag.SetLHCTag(lumin,type); +} + +//______________________________________________________________________________ +void AliRunTag::SetDetectorTag(AliDetectorTag *DetTag) +{ + TClonesArray &detectors = *fDetectorTag; + new(detectors[fNumDetectors++]) AliDetectorTag(DetTag); +} + +//______________________________________________________________________________ +void AliRunTag::AddEventTag(AliEventTag *EvTag) +{ + TClonesArray &events = *fEventTag; + new(events[fNumEvents++]) AliEventTag(EvTag); +} + +//______________________________________________________________________________ +void AliRunTag::Clear(const char *) +{ + fNumEvents = 0; + fNumDetectors = 0; +} diff --git a/STEER/AliRunTag.h b/STEER/AliRunTag.h new file mode 100644 index 00000000000..5f7ec07a312 --- /dev/null +++ b/STEER/AliRunTag.h @@ -0,0 +1,97 @@ +#ifndef ALIRUNTAG_H +#define ALIRUNTAG_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + + +/* $Id$ */ + +//------------------------------------------------------------------------- +// Class AliRunTag +// This is the class to deal with the tags for the run level +// +// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch +//------------------------------------------------------------------------- + +#include +#include + +#include "TObject.h" +#include "TClonesArray.h" + +#include "AliEventTag.h" +#include "AliLHCTag.h" +#include "AliDetectorTag.h" + + +//______________________________________________________________________________ +class AliRunTag : public TObject +{ + private: + Int_t fAliceRunId; //the run id + Float_t fAliceMagneticField; //value of the magnetic field + Int_t fAliceRunStartTime; //run start date + Int_t fAliceRunStopTime; //run stop date + Int_t fAliceReconstructionVersion; //reco version + Bool_t fAliceRunQuality; //validation script + Float_t fAliceBeamEnergy; //beam energy cm + Char_t fAliceBeamType[5]; //run type (pp, AA, pA) + Int_t fAliceCalibrationVersion; //calibration version + + Int_t fAliceDataType; //0: simulation -- 1: data + + Int_t fNumEvents; //number of events per file + Int_t fNumDetectors; //number of detector configs per file + TClonesArray *fEventTag; //array with all event tags + TClonesArray *fDetectorTag; //array with all the detector tags + + AliLHCTag fLHCTag; + + static TClonesArray *fgEvents; + static TClonesArray *fgDetectors; + + public: + AliRunTag(); + virtual ~AliRunTag(); + + void SetRunId(Int_t Pid) {fAliceRunId = Pid;} + void SetMagneticField(Float_t Pmag) {fAliceMagneticField = Pmag;} + void SetRunStartTime(Int_t Pt0) {fAliceRunStartTime = Pt0;} + void SetRunStopTime(Int_t Pt1) {fAliceRunStopTime = Pt1;} + void SetRecoVersion(Int_t Pn) {fAliceReconstructionVersion = Pn;} + void SetRunQuality(Int_t Pn) {fAliceRunQuality = Pn;} + void SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE;} + void SetBeamType(char *Ptype) {strcpy(fAliceBeamType,Ptype);} + void SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn;} + + void SetDataType(Int_t i) {fAliceDataType = i;} + + void SetNEvents(Int_t Pn) { fNumEvents = Pn; } + + void SetLHCTag(Float_t Plumin, char *type); + void SetDetectorTag(AliDetectorTag *t); + void AddEventTag(AliEventTag *t); + void Clear(const char * opt = ""); + + + Int_t GetRunId() {return fAliceRunId;} + Float_t GetMagneticField() {return fAliceMagneticField;} + Int_t GetRunStartTime() {return fAliceRunStartTime;} + Int_t GetRunStopTime() {return fAliceRunStopTime;} + Int_t GetRecoVersion() {return fAliceReconstructionVersion;} + Int_t GetRunQuality() {return fAliceRunQuality;} + Float_t GetBeamEnergy() {return fAliceBeamEnergy;} + char *GetBeamType() {return fAliceBeamType;} + Int_t GetCalibVersion() {return fAliceCalibrationVersion;} + + Int_t GetDataType() {return fAliceDataType;} + + Int_t GetNEvents() const {return fNumEvents;} + + AliLHCTag *GetLHCTag() { return &fLHCTag; } + + ClassDef(AliRunTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + +#endif diff --git a/STEER/AliTag.cxx b/STEER/AliTag.cxx new file mode 100644 index 00000000000..3fc34ea05b4 --- /dev/null +++ b/STEER/AliTag.cxx @@ -0,0 +1,269 @@ +#include +#include + +#include "AliTag.h" + +ClassImp(AliRunTag) +ClassImp(AliLHCTag) +ClassImp(AliDetectorTag) +ClassImp(AliEventTag) + +TClonesArray *AliRunTag::fgEvents = 0; +TClonesArray *AliRunTag::fgDetectors = 0; + +//______________________________________________________________________________ +AliRunTag::AliRunTag() +{ + if (!fgEvents) fgEvents = new TClonesArray("AliEventTag", 1000); + fEventTag = fgEvents; + fNumEvents = 0; + + if (!fgDetectors) fgDetectors = new TClonesArray("AliDetectorTag", 1000); + fDetectorTag = fgDetectors; + fNumDetectors = 0; + + fAliceMagneticField = 0.0; + fAliceRunStartTime = 0; + fAliceRunStopTime = 0; + fAliceReconstructionVersion = 0; + fAliceRunQuality = 0; + fAliceBeamEnergy = 0.0; + fAliceCalibrationVersion = 0; +} + +//______________________________________________________________________________ +AliRunTag::~AliRunTag() +{ +} + +//______________________________________________________________________________ +void AliRunTag::SetLHCTag(Float_t lumin, char *type) +{ + fLHCTag.SetLHCTag(lumin,type); +} + +//______________________________________________________________________________ +void AliRunTag::SetDetectorTag(AliDetectorTag *DetTag) +{ + TClonesArray &detectors = *fDetectorTag; + new(detectors[fNumDetectors++]) AliDetectorTag(DetTag); +} + +//______________________________________________________________________________ +void AliRunTag::AddEventTag(AliEventTag *EvTag) +{ + TClonesArray &events = *fEventTag; + new(events[fNumEvents++]) AliEventTag(EvTag); +} + +//______________________________________________________________________________ +void AliRunTag::Clear() +{ + fNumEvents = 0; + fNumDetectors = 0; +} + + +//______________________________________________________________________________ +//______________________________________________________________________________ +AliLHCTag::AliLHCTag() +{ + fLHCLuminosity = -1.0; +} + +//______________________________________________________________________________ +AliLHCTag::~AliLHCTag() +{ +} + +//______________________________________________________________________________ +//______________________________________________________________________________ +AliDetectorTag::AliDetectorTag() +{ + fITS = 0; + fTPC = 0; + fTRD = 0; + fTOF = 0; + fHMPID = 0; + fPHOS = 0; + fZDC = 0; + fMUON = 0; + fABSORBER = 0; + fPMD = 0; + fRICH = 0; + fEMCAL = 0; + fVZERO = 0; + fTZERO = 0; +} + +//______________________________________________________________________________ +AliDetectorTag::AliDetectorTag(AliDetectorTag *DetTag) +{ + // DetectorTag copy constructor + CopyTag(DetTag); +} + +//______________________________________________________________________________ +AliDetectorTag::~AliDetectorTag() +{ +} + +//______________________________________________________________________________ +void AliDetectorTag::CopyTag(AliDetectorTag *DetTag) +{ + SetITS(DetTag->GetITS()); + SetTPC(DetTag->GetTPC()); + SetTRD(DetTag->GetTRD()); + SetTOF(DetTag->GetTOF()); + SetHMPID(DetTag->GetHMPID()); + SetPHOS(DetTag->GetPHOS()); + SetZDC(DetTag->GetZDC()); + SetMUON(DetTag->GetMUON()); + SetABSORBER(DetTag->GetABSORBER()); + SetPMD(DetTag->GetPMD()); + SetRICH(DetTag->GetRICH()); + SetEMCAL(DetTag->GetEMCAL()); + SetVZERO(DetTag->GetVZERO()); + SetTZERO(DetTag->GetTZERO()); +} + + +//______________________________________________________________________________ +//______________________________________________________________________________ +AliEventTag::AliEventTag() +{ + fAliceEventId = 0; + fGUID = 0; + + fNumberOfParticipants = -10; + fImpactParameter = -10.0; + + fPrimaryVertexX = -100.0; + fPrimaryVertexY = -100.0; + fPrimaryVertexZ = -100.0; + + fTriggerInfo = -10; + + fZDCNeutronEnergy = -10.0; + fZDCProtonEnergy = -10.0; + fZDCEMEnergy = -10.0; + + fT0VertexZ = -10.0; + + fNumberOfTracks = -10; + fNumberOfPositiveTracks = -10; + fNumberOfNegativeTracks = -10; + fNumberOfNeutralTracks = -10; + + fNumberOfV0s = -10; + fNumberOfCascades = -10; + fNumberOfKinks = -10; + + fNumberOfPMDTracks = -10; + fNumberOfPHOSTracks = -10; + fNumberOfEMCALTracks = -10; + fNumberOfFMDTracks = -10; + + fNumberOfJetCandidates = -10; + fNumberOfHardPhotonsCandidates = -10; + + fNumberOfElectrons = -10; + fNumberOfMuons = -10; + fNumberOfPions = -10; + fNumberOfKaons = -10; + fNumberOfProtons = -10; + fNumberOfLambdas = -10; + + fNumberOfJPsiCandidates = -10; + fNumberOfPsiPrimeCandidates = -10; + fNumberOfUpsilonCandidates = -10; + fNumberOfUpsilonPrimeCandidates = -10; + fNumberOfUpsilonDoublePrimeCandidates = -10; + fNumberOfCharmParticleCandidates = -10; + fNumberOfBeautyParticleCandidates = -10; + + fK0PeakPosition = -10.0; + fK0PeakWidth = -10.0; + + fTotalP = -10.0; + fMeanPt = -10.0; + fMaxPt = -10.0; + + fFlowV1 = -10.0; + fFlowV2 = -10.0; +} + + +//______________________________________________________________________________ +AliEventTag::AliEventTag(AliEventTag *EvTag) +{ + // EventTag copy constructor + CopyTag(EvTag); +} +//______________________________________________________________________________ +AliEventTag::~AliEventTag() +{ +} + +//______________________________________________________________________________ +void AliEventTag::CopyTag(AliEventTag *EvTag) +{ + SetEventId(EvTag->GetEventId()); + SetGUID(EvTag->GetGUID()); + + SetNumOfParticipants(EvTag->GetNumOfParticipants()); + SetImpactParameter(EvTag->GetImpactParameter()); + + SetVertexX(EvTag->GetVertexX()); + SetVertexY(EvTag->GetVertexY()); + SetVertexZ(EvTag->GetVertexZ()); + + SetTrigger(EvTag->GetTrigger()); + + SetZDCNeutronEnergy(EvTag->GetZDCNeutronEnergy()); + SetZDCProtonEnergy(EvTag->GetZDCProtonEnergy()); + SetZDCEMEnergy(EvTag->GetZDCEMEnergy()); + + SetT0VertexZ(EvTag->GetT0VertexZ()); + + SetNumOfTracks(EvTag->GetNumOfTracks()); + SetNumOfPosTracks(EvTag->GetNumOfPosTracks()); + SetNumOfNegTracks(EvTag->GetNumOfNegTracks()); + SetNumOfNeutrTracks(EvTag->GetNumOfNeutrTracks()); + + SetNumOfV0s(EvTag->GetNumOfV0s()); + SetNumOfCascades(EvTag->GetNumOfCascades()); + SetNumOfKinks(EvTag->GetNumOfKinks()); + + SetNumOfPMDTracks(EvTag->GetNumOfPMDTracks()); + SetNumOfPHOSTracks(EvTag->GetNumOfPHOSTracks()); + SetNumOfEMCALTracks(EvTag->GetNumOfEMCALTracks()); + SetNumOfFMDTracks(EvTag->GetNumOfFMDTracks()); + + SetNumOfJetCandidates(EvTag->GetNumOfJetCandidates()); + SetNumOfHardPhotonsCandidates(EvTag->GetNumOfHardPhotonsCandidates()); + SetNumOfJPsiCandidates(EvTag->GetNumOfJPsiCandidates()); + SetNumOfPsiPrimeCandidates(EvTag->GetNumOfPsiPrimeCandidates()); + SetNumOfUpsilonCandidates(EvTag->GetNumOfUpsilonCandidates()); + SetNumOfUpsilonPrimeCandidates(EvTag->GetNumOfUpsilonPrimeCandidates()); + SetNumOfUpsilonDoublePrimeCandidates(EvTag->GetNumOfUpsilonDoublePrimeCandidates()); + SetNumOfCharmCandidates(EvTag->GetNumOfCharmCandidates()); + SetNumOfBeautyCandidates(EvTag->GetNumOfBeautyCandidates()); + + SetNumOfElectrons(EvTag->GetNumOfElectrons()); + SetNumOfMuons(EvTag->GetNumOfMuons()); + SetNumOfPions(EvTag->GetNumOfPions()); + SetNumOfKaons(EvTag->GetNumOfKaons()); + SetNumOfProtons(EvTag->GetNumOfProtons()); + SetNumOfLambdas(EvTag->GetNumOfLambdas()); + + SetK0Peak(EvTag->GetK0Peak()); + SetK0Width(EvTag->GetK0Width()); + + SetTotalMomentum(EvTag->GetTotalMomentum()); + SetMeanPt(EvTag->GetMeanPt()); + SetMaxPt(EvTag->GetMaxPt()); + + SetFlowV1(EvTag->GetFlowV1()); + SetFlowV2(EvTag->GetFlowV2()); +} diff --git a/STEER/AliTag.h b/STEER/AliTag.h new file mode 100644 index 00000000000..7519aa42dc4 --- /dev/null +++ b/STEER/AliTag.h @@ -0,0 +1,345 @@ +#ifndef ALITAG +#define ALITAG + +#include +#include + +#include "TObject.h" +#include "TClonesArray.h" + +//______________________________________________________________________________ +class AliEventTag : public TObject +{ + + private: + Int_t fAliceEventId; //The event id + Int_t fGUID; //The unique identifier of the file + Int_t fNumberOfParticipants; //Number of participants + Float_t fImpactParameter; //The impact parameter + Float_t fPrimaryVertexX; //Primary vertex - X coordinate + Float_t fPrimaryVertexY; //Primary vertex - Y coordinate + Float_t fPrimaryVertexZ; //Primary vertex - Z coordinate + Int_t fTriggerInfo; //Information from trigger + Float_t fZDCNeutronEnergy; //ZDC info - neutron + Float_t fZDCProtonEnergy; //ZDC info - proton + Float_t fZDCEMEnergy; //ZDC info - em + Float_t fT0VertexZ; //T0 info + Int_t fNumberOfTracks; //Multiplicity + Int_t fNumberOfPositiveTracks; //Multiplicity of positive tracks + Int_t fNumberOfNegativeTracks; //Multiplicity of negative tracks + Int_t fNumberOfNeutralTracks; //Multiplicity of neutral tracks + Int_t fNumberOfV0s; //Number of V0s + Int_t fNumberOfCascades; //Number of cascades + Int_t fNumberOfKinks; //Number of kinks + Int_t fNumberOfPMDTracks; //PMD tracks + Int_t fNumberOfPHOSTracks; //PHOS tracks + Int_t fNumberOfEMCALTracks; //EMCAL tracks + Int_t fNumberOfFMDTracks; //FMD tracks + Int_t fNumberOfJetCandidates; //Jet candidates + Int_t fNumberOfHardPhotonsCandidates; //Hard photons candidates + Int_t fNumberOfElectrons; //Number of electrons + Int_t fNumberOfMuons; //Number of muons + Int_t fNumberOfPions; //Number of pions + Int_t fNumberOfKaons; //Number of kaons + Int_t fNumberOfProtons; //Number of protons + Int_t fNumberOfLambdas; //Number of lambdas + Int_t fNumberOfJPsiCandidates; //JPsi candidates + Int_t fNumberOfPsiPrimeCandidates; //Psi prime candidates + Int_t fNumberOfUpsilonCandidates; //Upsilon candidates + Int_t fNumberOfUpsilonPrimeCandidates; //Upsilon prime candidates + Int_t fNumberOfUpsilonDoublePrimeCandidates; + Int_t fNumberOfCharmParticleCandidates; + Int_t fNumberOfBeautyParticleCandidates; + Float_t fK0PeakPosition; + Float_t fK0PeakWidth; + Float_t fTotalP; + Float_t fMeanPt; + Float_t fMaxPt; + Float_t fFlowV1; + Float_t fFlowV2; + + virtual void CopyTag(AliEventTag *EvTag); + + public: + AliEventTag(); + AliEventTag(AliEventTag *t); + virtual ~AliEventTag(); + + void SetEventId(Int_t Pid) {fAliceEventId = Pid;} + void SetGUID(Int_t Pid) {fGUID = Pid;} + + void SetNumOfParticipants(Int_t P) {fNumberOfParticipants = P;} + void SetImpactParameter(Float_t Pimpact) {fImpactParameter = Pimpact;} + + void SetVertexX(Float_t Pvx) {fPrimaryVertexX = Pvx;} + void SetVertexY(Float_t Pvy) {fPrimaryVertexY = Pvy;} + void SetVertexZ(Float_t Pvz) {fPrimaryVertexZ = Pvz;} + + void SetTrigger(Int_t Ptr) {fTriggerInfo = Ptr;} + + void SetZDCNeutronEnergy(Float_t Pen) {fZDCNeutronEnergy = Pen;} + void SetZDCProtonEnergy(Float_t Pen) {fZDCProtonEnergy = Pen;} + void SetZDCEMEnergy(Float_t Pen) {fZDCEMEnergy = Pen;} + + void SetT0VertexZ(Float_t Pvz) {fT0VertexZ = Pvz;} + + void SetNumOfTracks(Int_t Ptr) {fNumberOfTracks = Ptr;} + void SetNumOfPosTracks(Int_t Ptr) {fNumberOfPositiveTracks = Ptr;} + void SetNumOfNegTracks(Int_t Ptr) {fNumberOfNegativeTracks = Ptr;} + void SetNumOfNeutrTracks(Int_t Ptr) {fNumberOfNeutralTracks = Ptr;} + + void SetNumOfV0s(Int_t Ptr) {fNumberOfV0s = Ptr;} + void SetNumOfCascades(Int_t Ptr) {fNumberOfCascades = Ptr;} + void SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;} + + void SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;} + void SetNumOfPHOSTracks(Int_t Ptr) {fNumberOfPHOSTracks = Ptr;} + void SetNumOfEMCALTracks(Int_t Ptr) {fNumberOfEMCALTracks = Ptr;} + void SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;} + + void SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;} + void SetNumOfHardPhotonsCandidates(Int_t Ptr) {fNumberOfHardPhotonsCandidates = Ptr;} + void SetNumOfJPsiCandidates(Int_t Ptr) {fNumberOfJPsiCandidates = Ptr;} + void SetNumOfPsiPrimeCandidates(Int_t Ptr) {fNumberOfPsiPrimeCandidates = Ptr;} + void SetNumOfUpsilonCandidates(Int_t Ptr) {fNumberOfUpsilonCandidates = Ptr;} + void SetNumOfUpsilonPrimeCandidates(Int_t Ptr) {fNumberOfUpsilonPrimeCandidates = Ptr;} + void SetNumOfUpsilonDoublePrimeCandidates(Int_t Ptr) {fNumberOfUpsilonDoublePrimeCandidates = Ptr;} + void SetNumOfCharmCandidates(Int_t Ptr) {fNumberOfCharmParticleCandidates = Ptr;} + void SetNumOfBeautyCandidates(Int_t Ptr) {fNumberOfBeautyParticleCandidates = Ptr;} + + void SetNumOfElectrons(Int_t Ptr) {fNumberOfElectrons = Ptr;} + void SetNumOfMuons(Int_t Ptr) {fNumberOfMuons = Ptr;} + void SetNumOfPions(Int_t Ptr) {fNumberOfPions = Ptr;} + void SetNumOfKaons(Int_t Ptr) {fNumberOfKaons = Ptr;} + void SetNumOfProtons(Int_t Ptr) {fNumberOfProtons = Ptr;} + void SetNumOfLambdas(Int_t Ptr) {fNumberOfLambdas = Ptr;} + + void SetK0Peak(Float_t Ppeak) {fK0PeakPosition = Ppeak;} + void SetK0Width(Float_t Pw) {fK0PeakWidth = Pw;} + + void SetTotalMomentum(Float_t P) {fTotalP = P;} + void SetMeanPt(Float_t Pt) {fMeanPt = Pt;} + void SetMaxPt(Float_t Pt) {fMaxPt = Pt;} + + void SetFlowV1(Float_t Pv1) {fFlowV1 = Pv1;} + void SetFlowV2(Float_t Pv2) {fFlowV2 = Pv2;} + + + + + Int_t GetEventId() {return fAliceEventId;} + Int_t GetGUID() {return fGUID;} + + Int_t GetNumOfParticipants() {return fNumberOfParticipants;} + Float_t GetImpactParameter() {return fImpactParameter;} + + Float_t GetVertexX() {return fPrimaryVertexX;} + Float_t GetVertexY() {return fPrimaryVertexY;} + Float_t GetVertexZ() {return fPrimaryVertexZ;} + + Int_t GetTrigger() {return fTriggerInfo;} + + Float_t GetZDCNeutronEnergy() {return fZDCNeutronEnergy;} + Float_t GetZDCProtonEnergy() {return fZDCProtonEnergy;} + Float_t GetZDCEMEnergy() {return fZDCEMEnergy;} + + Float_t GetT0VertexZ() {return fT0VertexZ;} + + Int_t GetNumOfTracks() {return fNumberOfTracks;} + Int_t GetNumOfPosTracks() {return fNumberOfPositiveTracks;} + Int_t GetNumOfNegTracks() {return fNumberOfNegativeTracks;} + Int_t GetNumOfNeutrTracks() {return fNumberOfNeutralTracks;} + + Int_t GetNumOfV0s() {return fNumberOfV0s;} + Int_t GetNumOfCascades() {return fNumberOfCascades;} + Int_t GetNumOfKinks() {return fNumberOfKinks;} + + Int_t GetNumOfPMDTracks() {return fNumberOfPMDTracks;} + Int_t GetNumOfPHOSTracks() {return fNumberOfPHOSTracks;} + Int_t GetNumOfEMCALTracks() {return fNumberOfEMCALTracks;} + Int_t GetNumOfFMDTracks() {return fNumberOfFMDTracks;} + + Int_t GetNumOfJetCandidates() {return fNumberOfJetCandidates;} + Int_t GetNumOfHardPhotonsCandidates() {return fNumberOfHardPhotonsCandidates;} + Int_t GetNumOfJPsiCandidates() {return fNumberOfJPsiCandidates;} + Int_t GetNumOfPsiPrimeCandidates() {return fNumberOfPsiPrimeCandidates;} + Int_t GetNumOfUpsilonCandidates() {return fNumberOfUpsilonCandidates;} + Int_t GetNumOfUpsilonPrimeCandidates() {return fNumberOfUpsilonPrimeCandidates;} + Int_t GetNumOfUpsilonDoublePrimeCandidates() {return fNumberOfUpsilonDoublePrimeCandidates;} + Int_t GetNumOfCharmCandidates() {return fNumberOfCharmParticleCandidates;} + Int_t GetNumOfBeautyCandidates() {return fNumberOfBeautyParticleCandidates;} + + Int_t GetNumOfElectrons() {return fNumberOfElectrons;} + Int_t GetNumOfMuons() {return fNumberOfMuons;} + Int_t GetNumOfPions() {return fNumberOfPions;} + Int_t GetNumOfKaons() {return fNumberOfKaons;} + Int_t GetNumOfProtons() {return fNumberOfProtons;} + Int_t GetNumOfLambdas() {return fNumberOfLambdas;} + + Float_t GetK0Peak() {return fK0PeakPosition;} + Float_t GetK0Width() {return fK0PeakWidth;} + + Float_t GetTotalMomentum() {return fTotalP;} + Float_t GetMeanPt() {return fMeanPt;} + Float_t GetMaxPt() {return fMaxPt;} + + Float_t GetFlowV1() {return fFlowV1;} + Float_t GetFlowV2() {return fFlowV2;} + + ClassDef(AliEventTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + + +//______________________________________________________________________________ +class AliLHCTag : public TObject +{ + + private: + Char_t fLHCState[50]; //LHC run conditions + Float_t fLHCLuminosity; //the value of the luminosity + + public: + AliLHCTag(); + virtual ~AliLHCTag(); + + void SetLHCState(char *type) {strcpy(fLHCState,type);} + void SetLuminosity(Float_t lumin) {fLHCLuminosity = lumin;} + void SetLHCTag(Float_t lumin, char *type) {fLHCLuminosity = lumin; strcpy(fLHCState,type); } + + char *GetLHCState() {return fLHCState;} + Float_t GetLuminosity() {return fLHCLuminosity;} + + ClassDef(AliLHCTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + + +//______________________________________________________________________________ +class AliDetectorTag : public TObject +{ + + private: + Bool_t fITS; //ITS active = 1 + Bool_t fTPC; //TPC active = 1 + Bool_t fTRD; + Bool_t fTOF; + Bool_t fHMPID; + Bool_t fPHOS; + Bool_t fZDC; + Bool_t fMUON; + Bool_t fABSORBER; + Bool_t fPMD; + Bool_t fRICH; + Bool_t fEMCAL; + Bool_t fVZERO; + Bool_t fTZERO; + + virtual void CopyTag(AliDetectorTag *DetTag); + + public: + AliDetectorTag(); + AliDetectorTag(AliDetectorTag *t); + virtual ~AliDetectorTag(); + + void SetITS(Int_t n) {fITS = n;} + void SetTPC(Int_t n) {fTPC = n;} + void SetTRD(Int_t n) {fTRD = n;} + void SetTOF(Int_t n) {fTOF = n;} + void SetHMPID(Int_t n) {fHMPID = n;} + void SetPHOS(Int_t n) {fPHOS = n;} + void SetZDC(Int_t n) {fZDC = n;} + void SetMUON(Int_t n) {fMUON = n;} + void SetABSORBER(Int_t n) {fABSORBER = n;} + void SetPMD(Int_t n) {fPMD = n;} + void SetRICH(Int_t n) {fRICH = n;} + void SetEMCAL(Int_t n) {fEMCAL = n;} + void SetVZERO(Int_t n) {fVZERO = n;} + void SetTZERO(Int_t n) {fTZERO = n;} + + Bool_t GetITS() {return fITS;} + Bool_t GetTPC() {return fTPC;} + Bool_t GetTRD() {return fTRD;} + Bool_t GetTOF() {return fTOF;} + Bool_t GetHMPID() {return fHMPID;} + Bool_t GetPHOS() {return fPHOS;} + Bool_t GetZDC() {return fZDC;} + Bool_t GetMUON() {return fMUON;} + Bool_t GetABSORBER() {return fABSORBER;} + Bool_t GetPMD() {return fPMD;} + Bool_t GetRICH() {return fRICH;} + Bool_t GetEMCAL() {return fEMCAL;} + Bool_t GetVZERO() {return fVZERO;} + Bool_t GetTZERO() {return fTZERO;} + + ClassDef(AliDetectorTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + + +//______________________________________________________________________________ +class AliRunTag : public TObject +{ + + private: + Int_t fAliceRunId; //the run id + Float_t fAliceMagneticField; //value of the magnetic field + Int_t fAliceRunStartTime; //run start date + Int_t fAliceRunStopTime; //run stop date + Int_t fAliceReconstructionVersion; //reco version + Bool_t fAliceRunQuality; //validation script + Float_t fAliceBeamEnergy; //beam energy cm + Char_t fAliceBeamType[5]; //run type (pp, AA, pA) + Int_t fAliceCalibrationVersion; //calibration version + + Int_t fNumEvents; //number of events per file + Int_t fNumDetectors; //number of detector configs per file + TClonesArray *fEventTag; //array with all event tags + TClonesArray *fDetectorTag; //array with all the detector tags + + AliLHCTag fLHCTag; + + static TClonesArray *fgEvents; + static TClonesArray *fgDetectors; + + public: + AliRunTag(); + virtual ~AliRunTag(); + + void SetRunId(Int_t Pid) {fAliceRunId = Pid;} + void SetMagneticField(Float_t Pmag) {fAliceMagneticField = Pmag;} + void SetRunStartTime(Int_t Pt0) {fAliceRunStartTime = Pt0;} + void SetRunStopTime(Int_t Pt1) {fAliceRunStopTime = Pt1;} + void SetRecoVersion(Int_t Pn) {fAliceReconstructionVersion = Pn;} + void SetRunQuality(Int_t Pn) {fAliceRunQuality = Pn;} + void SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE;} + void SetBeamType(char *Ptype) {strcpy(fAliceBeamType,Ptype);} + void SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn;} + + void SetNEvents(Int_t Pn) { fNumEvents = Pn; } + + void SetLHCTag(Float_t Plumin, char *type); + void SetDetectorTag(AliDetectorTag *t); + void AddEventTag(AliEventTag *t); + void Clear(); + + + Int_t GetRunId() {return fAliceRunId;} + Float_t GetMagneticField() {return fAliceMagneticField;} + Int_t GetRunStartTime() {return fAliceRunStartTime;} + Int_t GetRunStopTime() {return fAliceRunStopTime;} + Int_t GetRecoVersion() {return fAliceReconstructionVersion;} + Int_t GetRunQuality() {return fAliceRunQuality;} + Float_t GetBeamEnergy() {return fAliceBeamEnergy;} + char *GetBeamType() {return fAliceBeamType;} + Int_t GetCalibVersion() {return fAliceCalibrationVersion;} + + Int_t GetNEvents() const {return fNumEvents;} + + AliLHCTag *GetLHCTag() { return &fLHCTag; } + + ClassDef(AliRunTag,1) //(ClassName, ClassVersion) +}; +//______________________________________________________________________________ + +#endif diff --git a/STEER/ESDLinkDef.h b/STEER/ESDLinkDef.h index 9718b11cdb8..660467e2eb7 100644 --- a/STEER/ESDLinkDef.h +++ b/STEER/ESDLinkDef.h @@ -29,6 +29,9 @@ #pragma link C++ class AliTrackParam+; #pragma link C++ class AliLog+; #pragma link C++ class AliPID+; + + + #endif diff --git a/STEER/STEERLinkDef.h b/STEER/STEERLinkDef.h index 362c29eed80..e63dea22b67 100644 --- a/STEER/STEERLinkDef.h +++ b/STEER/STEERLinkDef.h @@ -81,6 +81,13 @@ #pragma link C++ class AliCDBLocal; #pragma link C++ class AliDetectorEventHeader+; +#pragma link C++ class AliRunTag+; +#pragma link C++ class AliLHCTag+; +#pragma link C++ class AliDetectorTag+; +#pragma link C++ class AliEventTag+; + + + #pragma link C++ class TTreeDataElement+; #pragma link C++ class TTreeStream+; #pragma link C++ class TTreeSRedirector+; diff --git a/STEER/libSTEER.pkg b/STEER/libSTEER.pkg index 17d7f981ced..1594cdba33b 100644 --- a/STEER/libSTEER.pkg +++ b/STEER/libSTEER.pkg @@ -19,6 +19,7 @@ AliTrackMap.cxx AliTrackMapper.cxx AliCollisionGeometry.cxx \ AliMemoryWatcher.cxx \ AliVertexer.cxx \ AliMC.cxx AliSimulation.cxx AliReconstruction.cxx AliVertexGenFile.cxx \ +AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx \ AliCDBMetaData.cxx AliCDBEntry.cxx AliCDBStorage.cxx AliCDBDump.cxx \ AliCDBLocal.cxx\ AliReconstructor.cxx AliCDBMetaDataSelect.cxx \ -- 2.43.0