AliMonitorHisto* fTrackDr0; // dr0 distribution of HLT tracks
AliMonitorHisto* fTrackEtaVsPhi; // phi vs eta for HLT tracks
AliMonitorHisto* fPtEtaVsPhi; // phi vs eta for HLT tracks
- AliMonitorHisto* fTrackZvsNHits;
- AliMonitorHisto* fTrackXYvsNHits;
+ AliMonitorHisto* fTrackZvsNHits; // z vs the number of hits per track
+ AliMonitorHisto* fTrackXYvsNHits; // xy vs the number of hits per track
ClassDef(AliMonitorHLT, 0) // creation and filling of monitor histograms for HLT
};
--- /dev/null
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// This class creates and fills monitor histograms for HLT Hough transform //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+
+#include "AliMonitorHLTHough.h"
+#include "AliMonitorHisto.h"
+#include "AliMonitorTrend.h"
+#include "AliTPCParam.h"
+#include <TFolder.h>
+#ifdef ALI_HLT
+#include <stdlib.h>
+#include <AliL3MemHandler.h>
+#include <AliL3TrackArray.h>
+#include <AliL3HoughTrack.h>
+#endif
+
+//_____________________________________________________________________________
+AliMonitorHLTHough::AliMonitorHLTHough(AliTPCParam* param)
+{
+// create a HLT monitor object with the given parameters
+
+ fParam = param;
+}
+
+//_____________________________________________________________________________
+AliMonitorHLTHough::AliMonitorHLTHough(const AliMonitorHLTHough& monitor) :
+ AliMonitor(monitor)
+{
+ Fatal("AliMonitorHLTHough", "copy constructor not implemented");
+}
+
+//_____________________________________________________________________________
+AliMonitorHLTHough& AliMonitorHLTHough::operator = (const AliMonitorHLTHough&
+ /*monitor*/)
+{
+ Fatal("operator =", "assignment operator not implemented");
+ return *this;
+}
+
+//_____________________________________________________________________________
+AliMonitorHLTHough::~AliMonitorHLTHough()
+{
+}
+
+
+//_____________________________________________________________________________
+void AliMonitorHLTHough::CreateHistos(TFolder* folder)
+{
+// create the HLT Hough transform monitor histograms
+
+ fFolder = folder->AddFolder("HLTHOUGH", "HLTHOUGH");
+
+ fNTracks = CreateTrend("NTracks", "number of tracks per event",
+ "N_{tracks}");
+
+ fTrackPt = CreateHisto1("TrackPt", "pt distribution of tracks",
+ 90, 0, 3, "p_{t} [GeV/c]", "#Delta N/N",
+ AliMonitorHisto::kNormNone);
+
+ fTrackEta = CreateHisto1("TrackEta", "eta distribution of tracks",
+ 100, -2, 2, "#eta", "#Delta N/N",
+ AliMonitorHisto::kNormEntries);
+
+ fTrackPhi = CreateHisto1("TrackPhi", "phi distribution of tracks",
+ 120, 0, 360, "#phi [#circ]", "#Delta N/N",
+ AliMonitorHisto::kNormEntries);
+
+ fTrackEtaVsPhi = CreateHisto2("TrackEtaVsPhi", "#phi vs #eta",
+ 20, -1, 1, 25, 0, 360,
+ "#eta", "#phi", "#Delta N/N",
+ AliMonitorHisto::kNormNone);
+
+ fPtEtaVsPhi = CreateHisto2("PtEtaVsPhi", "#phi vs #eta",
+ 20, -1, 1, 25, 0, 360,
+ "#eta", "#phi", "#Delta N/N",
+ AliMonitorHisto::kNormNone);
+
+}
+
+
+//_____________________________________________________________________________
+void AliMonitorHLTHough::FillHistos(AliRunLoader* /*runLoader*/,
+ AliRawReader* /*rawReader*/)
+{
+// fill the HLT Hough transform monitor histograms
+
+#ifndef ALI_HLT
+ Warning("FillHistos", "the code was compiled without HLT support");
+
+#else
+ AliL3MemHandler memHandler[36];
+ Int_t nHoughTracks = 0;
+ for (Int_t iSector = 0; iSector < fParam->GetNInnerSector(); iSector++) {
+ char fileName[256];
+ sprintf(fileName, "hlt/tracks_ho_%d.raw", iSector);
+ if (!memHandler[iSector].SetBinaryInput(fileName)) {
+ Warning("FillHistos", "could not open file hlt/tracks.raw");
+ return;
+ }
+ AliL3TrackArray* tracks = new AliL3TrackArray;
+ memHandler[iSector].Binary2TrackArray(tracks);
+
+ nHoughTracks += tracks->GetNTracks();
+ for (Int_t iTrack = 0; iTrack < tracks->GetNTracks(); iTrack++) {
+ AliL3HoughTrack *track = (AliL3HoughTrack*)tracks->GetCheckedTrack(iTrack);
+ if(!track) continue;
+
+ track->CalculateHelix();
+ track->Rotate(iSector);
+
+ fTrackPt->Fill(track->GetPt());
+ fTrackEta->Fill(track->GetPseudoRapidity());
+ fTrackPhi->Fill(track->GetPsi() * TMath::RadToDeg());
+ if(track->GetPt()>3.) {
+ fTrackEtaVsPhi->Fill(track->GetPseudoRapidity(),track->GetPsi() * TMath::RadToDeg());
+ fPtEtaVsPhi->Fill(track->GetPseudoRapidity(),track->GetPsi() * TMath::RadToDeg(),track->GetPt());
+ }
+ }
+ fNTracks->Fill(nHoughTracks);
+
+ delete tracks;
+ memHandler[iSector].CloseBinaryInput();
+ }
+#endif
+}
--- /dev/null
+#ifndef ALIMONITORHLTHOUGH_H
+#define ALIMONITORHLTHOUGH_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+#include "AliMonitor.h"
+
+class AliTPCParam;
+
+
+class AliMonitorHLTHough : public AliMonitor {
+public:
+ AliMonitorHLTHough(AliTPCParam* param);
+ AliMonitorHLTHough(const AliMonitorHLTHough& monitor);
+ AliMonitorHLTHough& operator = (const AliMonitorHLTHough& monitor);
+ virtual ~AliMonitorHLTHough();
+
+ virtual void CreateHistos(TFolder* folder);
+ virtual void FillHistos(AliRunLoader* runLoader,
+ AliRawReader* rawReader);
+
+private:
+ AliTPCParam* fParam; // TPC parameters
+
+ AliMonitorTrend* fNTracks; // number of HLT tracks per event
+ AliMonitorHisto* fTrackPt; // pt distribution of HLT tracks
+ AliMonitorHisto* fTrackEta; // eta distribution of HLT tracks
+ AliMonitorHisto* fTrackPhi; // phi distribution of HLT tracks
+ AliMonitorHisto* fTrackEtaVsPhi; // phi vs eta for HLT tracks
+ AliMonitorHisto* fPtEtaVsPhi; // phi vs eta for HLT tracks
+
+ ClassDef(AliMonitorHLTHough, 0) // creation and filling of monitor histograms for HLT Hough transform
+};
+
+
+#endif
+
+
+
+
+
+
+
+
+
//_____________________________________________________________________________
AliMonitorHisto& AliMonitorHisto::operator =(const AliMonitorHisto& histo)
{
-// assignment operatore
+// assignment operator
AliMonitorPlot::operator =(histo);
#include "AliITSclusterV2.h"
#include "AliITStrackV2.h"
#include "AliRunLoader.h"
+#include "AliRawReader.h"
#include <TFolder.h>
#include <TTree.h>
#include "AliMonitorITS.h"
#include "AliMonitorV0s.h"
#include "AliMonitorHLT.h"
+#include "AliMonitorHLTHough.h"
#include "AliRawReaderRoot.h"
#include "AliLoader.h"
#include "AliRun.h"
#ifdef ALI_HLT
#include <AliLevel3.h>
#include <AliL3Transform.h>
+#include <AliL3StandardIncludes.h>
+#include <AliL3HoughMaxFinder.h>
+#include <AliL3Hough.h>
#endif
ClassImp(AliMonitorProcess)
fMonitors.Add(new AliMonitorV0s);
#ifdef ALI_HLT
fMonitors.Add(new AliMonitorHLT(fTPCParam));
+ fMonitors.Add(new AliMonitorHLTHough(fTPCParam));
#endif
for (Int_t iMonitor = 0; iMonitor < fMonitors.GetEntriesFast(); iMonitor++) {
nEvents, fFileName.Data());
#ifdef ALI_HLT
CreateHLT(fFileName);
+ CreateHLTHough(fFileName);
#endif
// loop over the events
if (fStopping) break;
if (!ReconstructHLT(iEvent)) return kFALSE;
if (fStopping) break;
+ if (!ReconstructHLTHough(iEvent)) return kFALSE;
+ if (fStopping) break;
if (fDisplaySocket) fDisplaySocket->Send("new event");
fHLT->WriteFiles("./hlt/");
}
+
+//_____________________________________________________________________________
+void AliMonitorProcess::CreateHLTHough(const char* fileName)
+{
+
+// create the HLT Hough transform (L3Hough) object
+
+ if (fHLTHough) delete fHLTHough;
+
+ char name[256];
+ strcpy(name, fileName);
+
+ fHLTHough = new AliL3Hough();
+ fHLTHough->SetTransformerParams(64,64,0.1,30);
+// fHLTHough->Init("./", kFALSE, 20, kFALSE,0,name);
+ fHLTHough->SetAddHistograms();
+ fHLTHough->GetMaxFinder()->SetThreshold(55000); // or 14000 ?
+
+}
#endif
//_____________________________________________________________________________
#endif
}
+//_____________________________________________________________________________
+Bool_t AliMonitorProcess::ReconstructHLTHough(
+#ifdef ALI_HLT
+ Int_t iEvent
+#else
+ Int_t /* iEvent */
+#endif
+)
+{
+// run the HLT Hough transformer
+
+ SetStatus(kRecHLT);
+
+#ifndef ALI_HLT
+ Warning("ReconstructHLTHough", "the code was compiled without HLT support");
+ return kTRUE;
+
+#else
+ if (!fHLTHough) return kFALSE;
+
+ // fHLTHough->Process(0, 35);
+ // Loop over TPC sectors and process the data
+ for(Int_t i=0; i<=35; i++)
+ {
+ fHLTHough->ReadData(i,iEvent);
+ fHLTHough->Transform();
+ // if(fHLTHough->fAddHistograms)
+ fHLTHough->AddAllHistograms();
+ fHLTHough->FindTrackCandidates();
+ fHLTHough->WriteTracks(i,"./hlt");
+ }
+ return kTRUE;
+#endif
+}
//_____________________________________________________________________________
Bool_t AliMonitorProcess::WriteHistos()
class TTree;
#ifdef ALI_HLT
class AliLevel3;
+class AliL3Hough;
#endif
Bool_t ReconstructV0s();
#ifdef ALI_HLT
void CreateHLT(const char* fileName);
+ void CreateHLTHough(const char* fileName);
#endif
Bool_t ReconstructHLT(Int_t iEvent);
+ Bool_t ReconstructHLTHough(Int_t iEvent);
Bool_t WriteHistos();
void StartNewRun();
void CheckForConnections();
void BroadcastHistos();
- void SetStatus(EStatus);
+ void SetStatus(EStatus status);
static const Int_t fgkPort; // port number for client connections
TString fFileName; // physical file name
#ifdef ALI_HLT
AliLevel3* fHLT; // the HLT tracker
+ AliL3Hough* fHLTHough; // the HLT hough transformer
#endif
UInt_t fRunNumber; // current run number
#include "AliTPCclusterMI.h"
#include "AliTPCtrack.h"
#include "AliRunLoader.h"
+#include "AliRawReader.h"
#include <TFolder.h>
#include <TTree.h>
#pragma link C++ class AliMonitorITS+;
#pragma link C++ class AliMonitorV0s+;
#pragma link C++ class AliMonitorHLT+;
+#pragma link C++ class AliMonitorHLTHough+;
#pragma link C++ class AliMonitorProcess+;
#pragma link C++ class AliMonitorControl+;
#pragma link C++ class AliMonitorDialog+;
SRCS:= AliMonitorPlot.cxx AliMonitorHisto.cxx AliMonitorTrend.cxx \
AliMonitor.cxx \
AliMonitorTPC.cxx AliMonitorITS.cxx AliMonitorV0s.cxx \
- AliMonitorHLT.cxx \
+ AliMonitorHLT.cxx AliMonitorHLTHough.cxx \
AliMonitorDataTPC.cxx \
AliMonitorProcess.cxx AliMonitorControl.cxx \
AliMonitorDialog.cxx AliMonitorClient.cxx