From 54da0d3491852f6e5f540b6869d161c356c16e9b Mon Sep 17 00:00:00 2001 From: kkanaki Date: Sun, 17 Oct 2010 14:57:28 +0000 Subject: [PATCH] - added information about track and event properties, e.g. vertex coordinates, track status, eta etc. --- HLT/global/AliHLTGlobalHistoComponent.cxx | 40 +++++++++++++++++++---- HLT/global/AliHLTGlobalHistoComponent.h | 11 +++++-- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/HLT/global/AliHLTGlobalHistoComponent.cxx b/HLT/global/AliHLTGlobalHistoComponent.cxx index 24ca0cef1e9..10264082116 100644 --- a/HLT/global/AliHLTGlobalHistoComponent.cxx +++ b/HLT/global/AliHLTGlobalHistoComponent.cxx @@ -37,6 +37,9 @@ AliHLTGlobalHistoComponent::AliHLTGlobalHistoComponent() : AliHLTTTreeProcessor() , fEvent(0) , fNofTracks(0) + , fVertexX(-99) + , fVertexY(-99) + , fVertexZ(-99) , fTrackVariables() { // see header file for class documentation @@ -70,21 +73,34 @@ TTree* AliHLTGlobalHistoComponent::CreateTree(int /*argc*/, const char** /*argv* "Track_pt " "Track_phi " "Track_eta " - // "Track_dcar " - // "Track_dcaz " + "Track_p " + "Track_theta " + "Track_Nclusters " + "Track_statusFlag " + "Track_charge " + //"Track_dca " + //"Track_dcar " + //"Track_dcaz " }; + int maxTrackCount=20000; // FIXME: make configurable + if ((iResult=fTrackVariables.Init(maxTrackCount, trackVariableNames))<0) { HLTError("failed to initialize internal structure for track properties"); } if (iResult>=0) { - pTree->Branch("event", &fEvent, "event/I"); + pTree->Branch("event", &fEvent, "event/I"); pTree->Branch("trackcount", &fNofTracks, "trackcount/I"); + pTree->Branch("vertexX", &fVertexX, "vertexX/F"); + pTree->Branch("vertexY", &fVertexY, "vertexY/F"); + pTree->Branch("vertexZ", &fVertexZ, "vertexZ/F"); + for (int i=0; iBranch(fTrackVariables.GetKey(i), pArray, specifier.Data()); } } else { @@ -116,14 +132,24 @@ int AliHLTGlobalHistoComponent::FillTree(TTree* pTree, const AliHLTComponentEven // fill track variables fNofTracks=esd->GetNumberOfTracks(); + fVertexX = esd->GetPrimaryVertexTracks()->GetX(); + fVertexY = esd->GetPrimaryVertexTracks()->GetY(); + fVertexZ = esd->GetPrimaryVertexTracks()->GetZ(); + for (int i=0; iGetTrack(i); if (!esdTrack) continue; - fTrackVariables.Fill("Track_pt", esdTrack->Pt()); - fTrackVariables.Fill("Track_phi", esdTrack->Phi()); - fTrackVariables.Fill("Track_eta", esdTrack->Theta()); - } + fTrackVariables.Fill("Track_pt" , esdTrack->Pt() ); + fTrackVariables.Fill("Track_phi" , esdTrack->Phi()*TMath::RadToDeg() ); + fTrackVariables.Fill("Track_eta" , esdTrack->Theta() ); + fTrackVariables.Fill("Track_p" , esdTrack->P() ); + fTrackVariables.Fill("Track_theta" , esdTrack->Theta()*TMath::RadToDeg() ); + fTrackVariables.Fill("Track_Nclusters" , esdTrack->GetTPCNcls() ); + fTrackVariables.Fill("Track_statusFlag", esdTrack->GetStatus() ); + fTrackVariables.Fill("Track_charge" , esdTrack->Charge() ); + + } HLTInfo("added parameters for %d tracks", fNofTracks); if (iResult<0) { diff --git a/HLT/global/AliHLTGlobalHistoComponent.h b/HLT/global/AliHLTGlobalHistoComponent.h index de187516f59..52dc4aa51e6 100644 --- a/HLT/global/AliHLTGlobalHistoComponent.h +++ b/HLT/global/AliHLTGlobalHistoComponent.h @@ -126,7 +126,7 @@ class AliHLTGlobalHistoComponent : public AliHLTTTreeProcessor AliHLTUInt32_t GetDataSpec() const {return 0;} int ResetVariables(); - + private: /// copy constructor prohibited AliHLTGlobalHistoComponent(const AliHLTGlobalHistoComponent&); @@ -137,9 +137,16 @@ private: int fEvent; //! /// track count, tree filling variable int fNofTracks; //! + /// x coordinate of vertex + float fVertexX; //! + /// y coordinate of vertex + float fVertexY; //! + /// z coordinate of vertex + float fVertexZ; //! + /// filling arrays for track parameters AliHLTGlobalHistoComponent::AliHLTGlobalHistoVariables fTrackVariables; //! - + ClassDef(AliHLTGlobalHistoComponent, 0) // HLT Global Histogram component }; #endif -- 2.43.0