Skip to content

Commit

Permalink
New analysis tag v5-04-51-AN
Browse files Browse the repository at this point in the history
  • Loading branch information
morsch committed Apr 25, 2013
2 parents b6a61e5 + 1018cdb commit 1689db1
Show file tree
Hide file tree
Showing 32 changed files with 835 additions and 291 deletions.
160 changes: 134 additions & 26 deletions ANALYSIS/AliCentralitySelectionTask.cxx

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion ANALYSIS/AliCentralitySelectionTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
Float_t fCentCND; // percentile centrality from candle
Float_t fCentZNA; // percentile centrality from ZNA
Float_t fCentZNC; // percentile centrality from ZNC
Float_t fCentZPA; // percentile centrality from ZPA
Float_t fCentZPC; // percentile centrality from ZPC
Float_t fCentNPA; // percentile centrality from Npart (MC)
Float_t fCentV0MvsFMD; // percentile centrality from V0 vs FMD
Float_t fCentTKLvsV0M; // percentile centrality from tracklets vs V0
Expand All @@ -138,6 +140,8 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
Float_t fCentCNDtrue; // percentile centrality from true (sim) tracks (candle condition)
Float_t fCentZNAtrue; // percentile centrality from true (sim) ZNA
Float_t fCentZNCtrue; // percentile centrality from true (sim) ZNC
Float_t fCentZPAtrue; // percentile centrality from true (sim) ZPA
Float_t fCentZPCtrue; // percentile centrality from true (sim) ZPC


TH1F *fHtempV0M; // histogram with centrality vs multiplicity using V0
Expand All @@ -154,6 +158,8 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH1F *fHtempCND; // histogram with centrality vs multiplicity using candle
TH1F *fHtempZNA; // histogram with centrality vs multiplicity using ZNA
TH1F *fHtempZNC; // histogram with centrality vs multiplicity using ZNC
TH1F *fHtempZPA; // histogram with centrality vs multiplicity using ZPA
TH1F *fHtempZPC; // histogram with centrality vs multiplicity using ZPC
TH1F *fHtempV0MvsFMD; // histogram with centrality vs multiplicity using V0 vs FMD
TH1F *fHtempTKLvsV0M; // histogram with centrality vs multiplicity using tracklets vs V0
TH2F *fHtempZEMvsZDC; // histogram with centrality vs multiplicity using ZEM vs ZDC
Expand All @@ -173,6 +179,8 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH1F *fHtempCNDtrue; // histogram with centrality true (sim) vs multiplicity using candle
TH1F *fHtempZNAtrue; // histogram with centrality true (sim) vs multiplicity using ZNA
TH1F *fHtempZNCtrue; // histogram with centrality true (sim) vs multiplicity using ZNC
TH1F *fHtempZPAtrue; // histogram with centrality true (sim) vs multiplicity using ZPA
TH1F *fHtempZPCtrue; // histogram with centrality true (sim) vs multiplicity using ZPC

TList *fOutputList; // output list

Expand Down Expand Up @@ -214,6 +222,8 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH1F *fHOutCentNPA ; //control histogram for centrality
TH1F *fHOutCentZNA ; //control histogram for centrality
TH1F *fHOutCentZNC ; //control histogram for centrality
TH1F *fHOutCentZPA ; //control histogram for centrality
TH1F *fHOutCentZPC ; //control histogram for centrality
TH1F *fHOutCentV0MvsFMD; //control histogram for centrality
TH1F *fHOutCentTKLvsV0M; //control histogram for centrality
TH1F *fHOutCentZEMvsZDC; //control histogram for centrality
Expand All @@ -238,6 +248,7 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH2F *fHOutCentZNAvsCentTRK; //control histogram for centrality
TH2F *fHOutCentZNAvsCentCND; //control histogram for centrality
TH2F *fHOutCentZNAvsCentCL1; //control histogram for centrality
TH2F *fHOutCentZNAvsCentZPA; //control histogram for centrality

TH2F *fHOutMultV0AC; //control histogram for multiplicity
TH1F *fHOutMultV0M ; //control histogram for multiplicity
Expand All @@ -260,6 +271,8 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH1F *fHOutMultNPA ; //control histogram for multiplicity
TH1F *fHOutMultZNA ; //control histogram for multiplicity
TH1F *fHOutMultZNC ; //control histogram for multiplicity
TH1F *fHOutMultZPA ; //control histogram for multiplicity
TH1F *fHOutMultZPC ; //control histogram for multiplicity

TH2F *fHOutMultV0MvsZDN; //control histogram for multiplicity
TH2F *fHOutMultZEMvsZDN; //control histogram for multiplicity
Expand All @@ -273,6 +286,7 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH2F *fHOutMultV0OvsCL1; //control histogram for multiplicity
TH2F *fHOutMultV0OvsTRK; //control histogram for multiplicity
TH2F *fHOutMultCL1vsTKL; //control histogram for multiplicity
TH2F *fHOutMultZNAvsZPA; //control histogram for multiplicity

TH1F *fHOutCentV0Mqual1 ; //control histogram for centrality quality 1
TH1F *fHOutCentTRKqual1 ; //control histogram for centrality quality 1
Expand All @@ -292,7 +306,7 @@ class AliCentralitySelectionTask : public AliAnalysisTaskSE {
TH1F *fHOutVertex ; //control histogram for vertex SPD
TH1F *fHOutVertexT0 ; //control histogram for vertex T0

ClassDef(AliCentralitySelectionTask, 26);
ClassDef(AliCentralitySelectionTask, 28);
};

#endif
Expand Down
2 changes: 1 addition & 1 deletion EVGEN/AliGenMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void AliGenMC::Boost()
Double_t gamma = 1./TMath::Sqrt((1.-beta)*(1.+beta));
Double_t gb = gamma * beta;

printf("\n Boosting particles to lab frame %f %f %f", fDyBoost, beta, gamma);
// printf("\n Boosting particles to lab frame %f %f %f", fDyBoost, beta, gamma);

Int_t i;
Int_t np = fParticles.GetEntriesFast();
Expand Down
33 changes: 20 additions & 13 deletions HLT/TPCLib/comp/AliHLTTPCDataCompressionComponent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ClassImp(AliHLTTPCDataCompressionComponent)

AliHLTTPCDataCompressionComponent::AliHLTTPCDataCompressionComponent()
: AliHLTProcessor()
, fMode(0)
, fDeflaterMode(0)
, fMode(kCompressionModeNone)
, fDeflaterMode(kDeflaterModeNone)
, fVerificationMode(0)
, fMaxDeltaPad(AliHLTTPCDefinitions::GetMaxClusterDeltaPad())
, fMaxDeltaTime(AliHLTTPCDefinitions::GetMaxClusterDeltaTime())
Expand Down Expand Up @@ -139,9 +139,9 @@ void AliHLTTPCDataCompressionComponent::GetOCDBObjectDescription(TMap* const tar

targetMap->Add(new TObjString("HLT/ConfigTPC/TPCDataCompressor"),
new TObjString("component arguments"));
if (fDeflaterMode==2) {
if (fDeflaterMode==kDeflaterModeHuffman) {
targetMap->Add(new TObjString("HLT/ConfigTPC/TPCDataCompressorHuffmanTables"),
new TObjString("huffman tables for deflater mode 2"));
new TObjString("huffman tables for deflater mode 'huffman'"));
}
}

Expand Down Expand Up @@ -192,7 +192,8 @@ int AliHLTTPCDataCompressionComponent::DoEvent( const AliHLTComponentEventData&
}

// transformed clusters
if (fMode==10) { // FIXME: condition to be adjusted
// the transformed clusters have not been used yet
if (false) { // FIXME: condition to be adjusted
for (pDesc=GetFirstInputBlock(AliHLTTPCDefinitions::fgkClustersDataType);
pDesc!=NULL; pDesc=GetNextInputBlock()) {
if (GetBenchmarkInstance()) {
Expand All @@ -219,7 +220,7 @@ int AliHLTTPCDataCompressionComponent::DoEvent( const AliHLTComponentEventData&
vector<int> trackindexmap; // stores index for every track id

// track data input
if (fMode==2 || fMode==4) {
if (fMode==kCompressionModeV1TrackModel || fMode==kCompressionModeV2TrackModel) {
for (pDesc=GetFirstInputBlock(kAliHLTDataTypeTrack|kAliHLTDataOriginTPC);
pDesc!=NULL; pDesc=GetNextInputBlock()) {
if (GetBenchmarkInstance()) {
Expand Down Expand Up @@ -491,7 +492,7 @@ int AliHLTTPCDataCompressionComponent::DoEvent( const AliHLTComponentEventData&

if (GetBenchmarkInstance() && allClusters>0) {
GetBenchmarkInstance()->Stop(0);
if (fDeflaterMode!=3) {
if (fDeflaterMode!=kDeflaterModeHuffmanTrainer) {
HLTBenchmark("%s - compression factor %.2f", GetBenchmarkInstance()->GetStatistics(), compressionFactor);
} else {
HLTBenchmark("%s", GetBenchmarkInstance()->GetStatistics());
Expand Down Expand Up @@ -773,9 +774,15 @@ int AliHLTTPCDataCompressionComponent::DoInit( int argc, const char** argv )
return iResult;

//Stage 3: command line arguments.
int mode=fMode; // just a backup for the info message below
int deflaterMode=fDeflaterMode;
if (argc && (iResult = ConfigureFromArgumentString(argc, argv)) < 0)
return iResult;

if (mode!=fMode || deflaterMode!=fDeflaterMode) {
HLTInfo("configured from command line: mode %d, deflater mode %d", fMode, fDeflaterMode);
}

std::auto_ptr<AliHLTComponentBenchmark> benchmark(new AliHLTComponentBenchmark);
if (benchmark.get()) {
benchmark->SetTimer(0,"total");
Expand All @@ -789,11 +796,11 @@ int AliHLTTPCDataCompressionComponent::DoInit( int argc, const char** argv )
}

unsigned spacePointContainerMode=0;
if (fMode==2 || fMode==4) {
if (fMode==kCompressionModeV1TrackModel || fMode==kCompressionModeV2TrackModel) {
// initialize map data for cluster access in the track association loop
spacePointContainerMode|=AliHLTTPCHWCFSpacePointContainer::kModeCreateMap;
}
if (fMode==3 || fMode==4) {
if (fMode==kCompressionModeV2 || fMode==kCompressionModeV2TrackModel) {
// optimized storage format: differential pad and time storage
spacePointContainerMode|=AliHLTTPCHWCFSpacePointContainer::kModeDifferentialPadTime;
}
Expand Down Expand Up @@ -859,9 +866,9 @@ int AliHLTTPCDataCompressionComponent::InitDeflater(int mode)
{
/// init the data deflater
int iResult=0;
if (mode==2 || mode==3) {
if (mode==kDeflaterModeHuffman || mode==kDeflaterModeHuffmanTrainer) {
// huffman deflater
std::auto_ptr<AliHLTDataDeflaterHuffman> deflater(new AliHLTDataDeflaterHuffman(mode==3));
std::auto_ptr<AliHLTDataDeflaterHuffman> deflater(new AliHLTDataDeflaterHuffman(mode==kDeflaterModeHuffmanTrainer));
if (!deflater.get()) return -ENOMEM;

if (!deflater->IsTrainingMode()) {
Expand Down Expand Up @@ -906,7 +913,7 @@ int AliHLTTPCDataCompressionComponent::InitDeflater(int mode)
fpDataDeflater=deflater.release();
return 0;
}
if (mode==1) {
if (mode==kDeflaterModeSimple) {
std::auto_ptr<AliHLTDataDeflaterSimple> deflater(new AliHLTDataDeflaterSimple);
if (!deflater.get()) return -ENOMEM;

Expand Down Expand Up @@ -972,7 +979,7 @@ int AliHLTTPCDataCompressionComponent::DoDeinit()
filename.ReplaceAll(".root", "-deflater.root");
fpDataDeflater->SaveAs(filename);
}
if (fDeflaterMode==3) {
if (fDeflaterMode==kDeflaterModeHuffmanTrainer) {
if (fTrainingTableOutput.IsNull()) {
fTrainingTableOutput=GetComponentID();
fTrainingTableOutput+="-huffman.root";
Expand Down
17 changes: 17 additions & 0 deletions HLT/TPCLib/comp/AliHLTTPCDataCompressionComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,23 @@ class AliHLTTPCDataCompressionComponent : public AliHLTProcessor {
/// destructor
~AliHLTTPCDataCompressionComponent();

enum {
kCompressionModeNone=0,
kCompressionModeV1,
kCompressionModeV1TrackModel,
kCompressionModeV2,
kCompressionModeV2TrackModel,
kNofCompressionModes
};

enum {
kDeflaterModeNone=0,
kDeflaterModeSimple,
kDeflaterModeHuffman,
kDeflaterModeHuffmanTrainer,
kNofDeflaterModes
};

/// inherited from AliHLTComponent: id of the component
virtual const char* GetComponentID();

Expand Down
143 changes: 143 additions & 0 deletions HLT/TPCLib/macros/run-compression.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
// $Id$
//
// @file run-compression.C
// @brief Define and run custom chains for the TPC data compression
// @author [email protected]
//
// The macro can be used to either define chains to be run in the
// AliRoot reconstruction or to run a chain standalone. Some of the
// configurations can only be run embedded into AliRoot reconstruction
// in order to couple to the input.
// 1) AliRoot reconstruction examples, just use the macro in front of
// the reconstruction macro, e.g.
// aliroot -b -q -l runmonitor.C(2) $ALICE_ROOT/HLT/exa/recraw-local.C'("raw.root", "local://OCDB", 0, 5, "HLT", "loglevel=0x7c chains=compressor-input-writer")'
//
// 2) standalone chains can be used if all input files are available
// on disk and the configuration file for the publisher is existing
// aliroot -b -q -l runmonitor.C'(2, 2, 1, "writer", "compressor compressor-publisher", 167808, "local://OCDB")'
//
// Chains:
// 'hltout-cluster-writer' writes clusters for every event in directory
// hltout-compressed-cluster and a publisher configuration
// file hltout-compressed-cluster.txt
//
// 'tpc-raw-writer' writes TPC raw DDL files per event in directory tpc-raw
// and a publisher configuration file tpc-raw.txt
//
// 'compressor-input-writer' writes input to compression component (clusters
// from HWCF and reconstructed tracks) to directory compressor-input
// and publisher configuration file compressor-input.txt
//
// 'compressor' the compressor component is configured to write a
// statistics file HLT.TPCDataCompression-histograms*.root
//
// 'huffmantrainer' huffman table trainer
//
// 'writer' cluster monitor component, requires to define input, e.g
// "compressor compressor-publisher"
// "compressed-cluster-publisher"
// "monitor-publisher"
// "hltout-publisher"
// "TPC-hwcfdata TPC-compression" (note: defined by AliHLTTPCAgent)
const int defaultMode=0;
const int defaultDeflaterMode=2;
const char* defaultMonitorInput="compressor compressor-publisher";
const char* defaultCDBUri="local://OCDB";
void run_compression(int mode=defaultMode, int deflaterMode=defaultDeflaterMode, int events=1,
const char* chain=NULL,
const char* monitorInput=defaultMonitorInput,
int runno=-1,
const char* cdbURI=defaultCDBUri)
{
// setup the OCDB access
// required to load the GRP entry in order to initialize the magnetic field
if (runno>=0) {
AliCDBManager::Instance()->SetDefaultStorage(cdbURI);
AliCDBManager::Instance()->SetRun(runno);
AliGRPManager grpman;
grpman.ReadGRPEntry();
grpman.SetMagField();
}

// init the HLT system
AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();

///////////////////////////////////////////////////////////////////////////////////////////
//
// list of configurations
//
///////////////////////////////////////////////////////////////////////////////////////////

// handling of compressed clusters from HLTOUT
// 'hltout-cluster-writer' writes clusters for every event in directory hltout-compressed-cluster
// and a publisher configuration file hltout-compressed-cluster.txt
// 'compressed-cluster-publisher' publishes according to list hltout-compressed-cluster.txt
AliHLTConfiguration hltoutpublisher("hltout-publisher", "AliHLTOUTPublisher", "", "-datatype 'REMCLSCM' 'TPC '");
AliHLTConfiguration hltoutclusterwriter("hltout-cluster-writer", "FileWriter", "hltout-publisher", "-directory hltout-compressed-cluster -subdir -specfmt=_0x%08x -blocknofmt= -publisher-conf hltout-compressed-cluster.txt");
AliHLTConfiguration hltoutclusterpublisher("compressed-cluster-publisher", "FilePublisher", "", "-datafilelist hltout-compressed-cluster.txt");

// processing of TPC raw data
// 'tpc-raw-writer' writes TPC raw DDL files per event in directory tpc-raw and a publisher
// configuration file tpc-raw.txt
// 'compressor-input-writer' writes input to compression component (clusters from HWCF and reconstructed tracks)
// to directory compressor-input and publisher configuration file compressor-input.txt
// 'compressor-publisher' publishes files according to configuration file
AliHLTConfiguration tpcrawwriter("tpc-raw-writer", "FileWriter","TPC-raw-data", "-directory tpc-raw -subdir -specfmt=_0x%08x -blocknofmt= -publisher-conf tpc-raw.txt");
AliHLTConfiguration emulatorhwclust1writer("compressor-input-writer", "FileWriter","TPC-hwcfdata TPC-globalmerger", "-directory compressor-input -subdir -specfmt=_0x%08x -blocknofmt= -publisher-conf compressor-input.txt");
AliHLTConfiguration compressorpublisher("compressor-publisher", "FilePublisher", "", "-datafilelist compressor-input.txt");

// compressor configuration
// input from file list created by 'compressor-input-writer'
TString compressorArgument;
if (mode>0) compressorArgument+=Form(" -mode %d", mode); // take default from configuration object if mode==0
if (deflaterMode>0) compressorArgument+=Form(" -deflater-mode %d", deflaterMode); // take default from configuration object if deflaterMode==0
compressorArgument+=Form(" -histogram-file HLT.TPCDataCompression-histograms-mode%d-%s.root -cluster-verification 0", mode, (deflaterMode==2?"huffman":"simple"));
AliHLTConfiguration compressor("compressor", "TPCDataCompressor", "compressor-publisher", compressorArgument.Data());

// huffman trainer configuration
// input from file list created by 'compressor-input-writer'
TString trainerArgument;
trainerArgument.Form("-deflater-mode 3 -mode %d", mode);
AliHLTConfiguration trainer("huffmantrainer", "TPCDataCompressor", "compressor-publisher", trainerArgument.Data());

// writer component for the compressor output
AliHLTConfiguration compressoroutputwriter("compressor-output-writer", "FileWriter","compressor", "-directory compressor-output -subdir -specfmt=_0x%08x -blocknofmt= -publisher-conf compressor-output.txt");
AliHLTConfiguration compressoroutputpublisher("compressor-data", "FilePublisher","", "-datafilelist compressor-output.txt");

// specifc configuration to publish some data blocks for the
// monitoring component
AliHLTConfiguration monitorpublisher("monitor-publisher", "FilePublisher", "", "-datafilelist monitor-input.txt");

// the monitoring ccomponent setup
TString writerArguments(Form("-concatenate-events -overwrite -datafile HLT.TPCcluster-compression-mode%d-histograms.root",mode));
AliHLTConfiguration monitor("monitor", "TPCDataCompressorMonitor", monitorInput, "");
AliHLTConfiguration writer("writer", "ROOTFileWriter", "monitor", writerArguments);

if (chain) {
pHLT->ScanOptions("loglevel=0x7c");
pHLT->BuildTaskList(chain);
pHLT->Run(events);
}
}

// an abbreviated version setting default deflaterMode to 2
void run_compression(int mode, int events,
const char* chain,
const char* monitorInput=defaultMonitorInput,
int runno=-1,
const char* cdbURI=defaultCDBUri)
{
run_compression(mode, defaultDeflaterMode, events, chain, monitorInput, runno, cdbURI);
}

// an abbreviated version setting default deflaterMode to 2 and
// omitting monitorInput
// example:
// aliroot -b -q -l runmonitor.C'(1, 5, "compressor", "", 167808)'
void run_compression(int mode, int events,
const char* chain,
int runno,
const char* cdbURI=defaultCDBUri)
{
run_compression(mode, defaultDeflaterMode, events, chain, defaultMonitorInput, runno, cdbURI);
}
6 changes: 4 additions & 2 deletions HLT/exa/EnableHLTInGRP.C
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
*
* @return true if the macro completed successfully and false otherwise.
*/
bool EnableHLTInGRP(Int_t runNumber, const char* grpPath = "local://./")
bool EnableHLTInGRP(Int_t runNumber,
const char* cdbURI = "local://$ALICE_ROOT/OCDB",
const char* grpPath = "local://./")
{
AliCDBManager* cdb = AliCDBManager::Instance();
cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
cdb->SetDefaultStorage(cdbURI);
cdb->SetSpecificStorage("GRP/GRP/Data", grpPath);
cdb->SetRun(runNumber);
AliCDBEntry* entry = (AliCDBEntry*)cdb->Get("GRP/GRP/Data")->Clone();
Expand Down
Loading

0 comments on commit 1689db1

Please sign in to comment.