Also updating ESD convertion to include MUON data.
const char* AliHLTMUONConstants::fgkDataCheckerComponentId = "MUONDataChecker";
const char* AliHLTMUONConstants::fgkClusterFinderId = "MUONClusterFinder";
const char* AliHLTMUONConstants::fgkRawDataHistogrammerId = "MUONRawDataHistogrammer";
+const char* AliHLTMUONConstants::fgkClusterHistogrammerId = "MUONClusterHistogrammer";
const char* AliHLTMUONConstants::fgkTriggerReconstructorCDBPath = "HLT/ConfigMUON/TriggerReconstructor";
const char* AliHLTMUONConstants::fgkHitReconstructorCDBPath = "HLT/ConfigMUON/HitReconstructor";
{
return fgkRawDataHistogrammerId;
}
+
+ static const char* ClusterHistogrammerId()
+ {
+ return fgkClusterHistogrammerId;
+ }
static const char* TriggerReconstructorCDBPath()
{
static const char* fgkDataCheckerComponentId; // Name of data checking component for debugging.
static const char* fgkClusterFinderId; // Name of cluster finder implementing offline algorithms.
static const char* fgkRawDataHistogrammerId; // Raw data histogrammer component name.
+ static const char* fgkClusterHistogrammerId; // Cluster data histogrammer component name.
// CDB path entries to configuration information.
static const char* fgkTriggerReconstructorCDBPath; // Path to CDB entry for the trigger reconstruction component.
#pragma link C++ class AliHLTMUONDataCheckerComponent+;
#pragma link C++ class AliHLTMUONClusterFinderComponent+;
#pragma link C++ class AliHLTMUONRawDataHistoComponent+;
+#pragma link C++ class AliHLTMUONClusterHistoComponent+;
#endif // __CINT__
lib_LTLIBRARIES = libAliHLTMUON.la
-LIBRARY_VERSION = '2:0:0'
+LIBRARY_VERSION = '3:0:0'
# library sources
# The source files are specified in libAliHLTMUON.pkg
#include "AliHLTMUONDataCheckerComponent.h"
#include "AliHLTMUONClusterFinderComponent.h"
#include "AliHLTMUONRawDataHistoComponent.h"
+#include "AliHLTMUONClusterHistoComponent.h"
#include "AliHLTOUTHandlerChain.h"
#include "AliRawReader.h"
#include "AliRunLoader.h"
pHandler->AddComponent(new AliHLTMUONDataCheckerComponent);
pHandler->AddComponent(new AliHLTMUONClusterFinderComponent);
pHandler->AddComponent(new AliHLTMUONRawDataHistoComponent);
+ pHandler->AddComponent(new AliHLTMUONClusterHistoComponent);
return 0;
}
#include "AliESDMuonTrack.h"
#include "AliESDMuonCluster.h"
#include "TClonesArray.h"
+#include "TList.h"
#include <cmath>
#include <cassert>
AliHLTMUONProcessor(),
fWarnForUnexpecedBlock(false),
fMakeMinimalESD(false),
- fAddCustomData(false)
+ fAddCustomData(false),
+ fMakeClonesArray(false),
+ fMakeESDDataBlock(true)
{
/// Default constructor.
}
fWarnForUnexpecedBlock = false;
fMakeMinimalESD = false;
+ fMakeClonesArray = false;
+ fMakeESDDataBlock = true;
for (int i = 0; i < argc; i++)
{
continue;
}
+ if (strcmp(argv[i], "-makeclonesarray") == 0)
+ {
+ fMakeClonesArray = true;
+ continue;
+ }
+
+ if (strcmp(argv[i], "-makeonlyclonesarray") == 0)
+ {
+ fMakeMinimalESD = true;
+ fMakeClonesArray = true;
+ fMakeESDDataBlock = false;
+ continue;
+ }
+
HLTError("Unknown option '%s'.", argv[i]);
return -EINVAL;
}
AliHLTComponentDataType AliHLTMUONESDMaker::GetOutputDataType()
+{
+ /// Inherited from AliHLTComponent. Returns kAliHLTMultipleDataType.
+ /// Refer to GetOutputDataTypes for all returned data types.
+
+ return kAliHLTMultipleDataType;
+}
+
+
+int AliHLTMUONESDMaker::GetOutputDataTypes(AliHLTComponentDataTypeList& list)
{
/// Inherited from AliHLTComponent.
- /// Returns the ESD object data type with MUON origin.
+ /// Returns the ESD object and kAliHLTDataTypeTObject data type with MUON origin.
- return AliHLTMUONConstants::ESDDataType();
+ list.push_back(AliHLTMUONConstants::ESDDataType());
+ list.push_back(kAliHLTDataTypeTObject | kAliHLTDataOriginMUON);
+ return list.size();
}
// tracks array if so requested.
if (fMakeMinimalESD)
{
- TClonesArray* muonTracks = new TClonesArray("AliESDMuonTrack",0);
+ TClonesArray* muonTracks = new TClonesArray("AliESDMuonTrack",2);
muonTracks->SetName("MuonTracks");
event.AddObject(muonTracks);
event.GetStdContent();
}
}
- PushBack(&event, AliHLTMUONConstants::ESDDataType(), specification);
-
+ if (fMakeClonesArray and event.GetList() != NULL)
+ {
+ PushBack(
+ event.GetList()->FindObject("MuonTracks"),
+ kAliHLTDataTypeTObject | kAliHLTDataOriginMUON,
+ specification
+ );
+ }
+ if (fMakeESDDataBlock)
+ {
+ PushBack(&event, AliHLTMUONConstants::ESDDataType(), specification);
+ }
return 0;
}
* \li -add_rootified_objects <br>
* If specified then the any rootified dHLT event data that is found is added to the
* ESD list of objects as a custom data object.<br>
+ * \li -makeclonesarray <br>
+ * This option will cause the component to generate a TClonesArray of MUON ESD tracks
+ * and send it as a kAliHLTDataTypeTObject data block type. <br>
+ * \li -makeonlyclonesarray <br>
+ * Same as the -makeclonesarray option, however the data block with the AliESDEvent
+ * object is not generated at all. <br>
* \li -warn_on_unexpected_block <br>
* If set, then warning messages are generated for any data block types that
* were not expected. (default is to generate only debug messages)<br>
virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
virtual AliHLTComponentDataType GetOutputDataType();
+ virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
virtual AliHLTComponent* Spawn();
bool fWarnForUnexpecedBlock; /// Flag indicating if we should log a warning if we got a block of an unexpected type.
bool fMakeMinimalESD; /// Flag to indicate if a minimal ESD object should be created.
bool fAddCustomData; /// Flag to turn on adding of all dHLT rootified objects to the ESD.
+ bool fMakeClonesArray; /// Flag indicating if a data block of TClonesArray with AliESDMuonTrack objects should be generated.
+ bool fMakeESDDataBlock; /// Flag indicating if the ESD data block should generated.
ClassDef(AliHLTMUONESDMaker, 0); // Component for converting dHLT reconstructed data into the ESD format.
};
const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkDetectorId = 0xA00;
-const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkDDLOffSet = 12;
-const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkNofDDL = 8;
+const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkDDLOffSet = 0;
+const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkNofDDL = 20;
const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkDDLHeaderSize = 8;
const AliHLTInt32_t AliHLTMUONHitReconstructor::fgkLutLine = 59648 + 1;
if (argc <= i+1)
{
- HLTError("The DDL number was not specified. Must be in the range [13..20].");
+ HLTError("The DDL number was not specified. Must be in the range [1..20].");
return -EINVAL;
}
HLTError("Cannot convert '%s' to DDL a number.", argv[i+1] );
return -EINVAL;
}
- if (num < 13 or 20 < num)
+ if (num < 1 or 20 < num)
{
- HLTError("The DDL number must be in the range [13..20].");
+ HLTError("The DDL number must be in the range [1..20].");
return -EINVAL;
}
- fDDL = num - 1; // convert to range [12..19]
+ fDDL = num - 1; // convert to range [0..19]
i++;
continue;
if ( argc <= i+1 )
{
- HLTError("DDL equipment ID number not specified. It must be in the range [2572..2579]" );
+ HLTError("DDL equipment ID number not specified. It must be in the range [2560..2579]" );
return -EINVAL;
}
return -EINVAL;
}
fDDL = AliHLTMUONUtils::EquipIdToDDLNumber(num); // Convert to DDL number in the range 0..21
- if (fDDL < 12 or 19 < fDDL)
+ if (fDDL < 0 or 19 < fDDL)
{
- HLTError("The DDL equipment ID number must be in the range [2572..2579].");
+ HLTError("The DDL equipment ID number must be in the range [2560..2579].");
return -EINVAL;
}
/// Generates a ASCII text file containing the lookup table (LUT) from
/// the CDB, which can be used for the hit reconstructor component later.
/// @param ddl Must be the DDL for which to generate the DDL,
- /// in the range [13..20].
+ /// in the range [0..19].
/// @param filename The name of the LUT file to generate.
/// @param cdbPath The CDB path to use.
/// @param run The run number to use for the CDB.
AliHLTMUONHitReconstructorComponent comp;
- if (ddl < 12 or 19 < ddl)
+ if (ddl < 0 or 19 < ddl)
{
- std::cerr << "ERROR: the DDL number must be in the range [12..19]." << std::endl;
+ std::cerr << "ERROR: the DDL number must be in the range [0..19]." << std::endl;
return false;
}
{
gSystem->Load("libAliHLTMUON.so");
- for (Int_t ddl = 12; ddl < 20; ddl++)
+ for (Int_t ddl = 0; ddl < 20; ddl++)
{
Char_t filename[64];
sprintf(filename, "Lut%d.dat", ddl+1);
if (checkData)
{
AliHLTConfiguration checker("checker", "MUONDataChecker", sources, "-warn_on_unexpected_block");
- sources = "checker";
+ sources = "checker"; // Only add the checker to the sources in this case since it will forward just the bad events.
}
if (useRootWriter)
--- /dev/null
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Author: Arshad Ahmad Masoodi <Arshad.Ahmad@cern.ch> *
+//* for The ALICE HLT Project. *
+//* *
+//* 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. *
+//**************************************************************************
+
+/** @file AliHLTMUONClusterHistoComponent.cxx
+ @author Arshad Ahmad <Arshad.Ahmad@cern.ch>
+ @date 27 Nov 2009
+ @brief Component for onlinehistograms
+*/
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+#include "AliHLTMUONClusterHistoComponent.h"
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
+#include "AliHLTDataTypes.h"
+#include "AliHLTMUONConstants.h"
+#include "AliHLTMUONClustersBlockStruct.h"
+#include "AliHLTMUONDataBlockReader.h"
+#include <TFile.h>
+#include <TString.h>
+#include "TObjString.h"
+#include "TObjArray.h"
+
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTMUONClusterHistoComponent);
+
+AliHLTMUONClusterHistoComponent::AliHLTMUONClusterHistoComponent() :
+ AliHLTMUONProcessor(),
+ fChargePerClusterBending(NULL),
+ fChargePerClusterNonBending(NULL),
+ fNumberOfClusters(NULL),
+ fPlotChargePerClusterBending(kTRUE),
+ fPlotChargePerClusterNonBending(kTRUE),
+ fPlotNClusters(kTRUE)
+{
+ // see header file for class documentation
+}
+
+AliHLTMUONClusterHistoComponent::~AliHLTMUONClusterHistoComponent()
+{
+ // see header file for class documentation
+
+ if (fChargePerClusterBending) delete fChargePerClusterBending;
+ if (fChargePerClusterNonBending) delete fChargePerClusterNonBending;
+ if (fNumberOfClusters) delete fNumberOfClusters;
+}
+
+// Public functions to implement AliHLTComponent's interface.
+// These functions are required for the registration process
+
+const char* AliHLTMUONClusterHistoComponent::GetComponentID()
+{
+ // see header file for class documentation
+
+ return AliHLTMUONConstants::ClusterHistogrammerId();
+// return "MUONClusterHistogrammer";
+
+}
+
+void AliHLTMUONClusterHistoComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
+{
+ // see header file for class documentation
+ list.clear();
+ list.push_back(AliHLTMUONConstants::ClusterBlockDataType() );
+ //list.push_back( AliHLTMUONConstants::RecHitsBlockDataType() );
+ //list.push_back( AliHLTMUONConstants::TriggerRecordsBlockDataType() );
+}
+
+AliHLTComponentDataType AliHLTMUONClusterHistoComponent::GetOutputDataType()
+{
+ // see header file for class documentation
+ return kAliHLTDataTypeHistogram;
+}
+
+
+int AliHLTMUONClusterHistoComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+
+{
+ // see header file for class documentation
+ tgtList.clear();
+ tgtList.push_back( AliHLTMUONConstants::HistogramDataType() );
+ return tgtList.size();
+}
+
+void AliHLTMUONClusterHistoComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
+{
+ // see header file for class documentation
+
+ // The total constant size is the size of the TH1F object, the space needed for
+ // the arrays of data points and finally we add 4k for any extra streamer meta data
+ // etc. added by ROOT.
+ constBase = sizeof(TH1F)*3 + sizeof(Double_t)*(400*2+101) + 4*1024*3;
+
+ // The multiplier can be zero since the histograms generated are a constant size
+ // independent of the input data size.
+ inputMultiplier = 0;
+}
+
+AliHLTComponent* AliHLTMUONClusterHistoComponent::Spawn()
+{
+ // see header file for class documentation
+ return new AliHLTMUONClusterHistoComponent;
+}
+
+int AliHLTMUONClusterHistoComponent::DoInit( int argc, const char** argv )
+{
+ // see header file for class documentation
+
+ fPlotChargePerClusterBending=kTRUE;
+ fPlotChargePerClusterNonBending=kTRUE;
+ fPlotNClusters=kTRUE;
+
+ if(fPlotChargePerClusterBending)
+ fChargePerClusterBending = new TH1F("fChargePerClusterBending","Total Charge of clusters ",400,0,4000);
+
+ if(fPlotChargePerClusterNonBending)
+ fChargePerClusterNonBending = new TH1F("fChargePerClusterNonBending","Total Charge of clusters ",400,0,4000);
+
+ if(fPlotNClusters)
+ fNumberOfClusters = new TH1F("fNumberOfClusters","Total Number of Clusters",101,0,100);
+
+ int iResult=0;
+ TString configuration="";
+ TString argument="";
+ for (int i=0; i<argc && iResult>=0; i++) {
+ argument=argv[i];
+ if (!configuration.IsNull()) configuration+=" ";
+ configuration+=argument;
+ }
+
+ if (!configuration.IsNull()) {
+ iResult=Configure(configuration.Data());
+ }
+
+ return iResult;
+}
+
+int AliHLTMUONClusterHistoComponent::DoDeinit()
+{
+ // see header file for class documentation
+ if(fChargePerClusterBending!=NULL) delete fChargePerClusterBending;
+ if(fChargePerClusterNonBending!=NULL) delete fChargePerClusterNonBending;
+ if(fNumberOfClusters!=NULL) delete fNumberOfClusters;
+ return 0;
+}
+
+int AliHLTMUONClusterHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
+ const AliHLTComponentBlockData* /*blocks*/,
+ AliHLTComponentTriggerData& /*trigData*/,
+ AliHLTUInt8_t* /*outputPtr*/,
+ AliHLTUInt32_t& size,
+ AliHLTComponentBlockDataList& /*outputBlocks*/)
+{
+ AliHLTUInt32_t specification = 0x0;
+
+ if ( GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR ) ) return 0;
+
+ for (const AliHLTComponentBlockData* block = GetFirstInputBlock(AliHLTMUONConstants::ClusterBlockDataType());
+ block != NULL;block = GetNextInputBlock()){
+
+ if (block->fDataType != AliHLTMUONConstants::ClusterBlockDataType()) continue;
+ specification |= block->fSpecification; // The specification bit pattern should indicate all the DDLs that contributed.
+
+ HLTDebug("Handling block: %u, with fDataType = '%s', fPtr = %p and fSize = %u bytes.",
+ i, DataType2Text(block->fDataType).c_str(), block->fPtr, block->fSize
+ );
+
+ AliHLTMUONClustersBlockReader clusterBlock(block->fPtr, block->fSize);
+ if (not BlockStructureOk(clusterBlock))
+ {
+ //FIXME: Need to inherit AliHLTMUONProcessor DoInit functionality properly for
+ // the following Dump feature to work properly. Like in AliHLTMUONRawDataHistoComponent.
+ //if (DumpDataOnError()) DumpEvent(evtData, blocks, trigData, outputPtr, size, outputBlocks);
+ continue;
+ }
+
+ const AliHLTMUONClusterStruct *cluster=clusterBlock.GetArray();
+ for (AliHLTUInt32_t i = 0; i < clusterBlock.Nentries(); ++i){
+
+ //commented for future use
+ //AliHLTInt32_t detelement=cluster->fDetElemId; // Detector ID number from AliRoot geometry
+
+ AliHLTUInt16_t nchannelsB=cluster->fNchannelsB; // Number of channels/pads in the cluster in bending plane.
+ AliHLTUInt16_t nchannelsNB=cluster->fNchannelsNB; // Number of channels/pads in the cluster in non-bending plane.
+
+
+ AliHLTFloat32_t BCharge= cluster->fChargeB; // Cluster charge in bending plane. Can be -1 if invalid or uncomputed.
+ AliHLTFloat32_t NBCharge= cluster->fChargeNB; // Cluster charge in bending plane. Can be -1 if invalid or uncomputed.
+
+ if(fPlotChargePerClusterBending)
+ fChargePerClusterBending->Fill(BCharge);
+ if(fPlotChargePerClusterNonBending)
+ fChargePerClusterNonBending->Fill(NBCharge);
+ cluster++;
+ } // forloop clusterBlock.Nentries
+ if(fPlotNClusters and clusterBlock.Nentries()>0)
+ fNumberOfClusters->Fill(clusterBlock.Nentries());
+
+ }//forloop clusterblock
+
+ if( fPlotChargePerClusterBending ) PushBack( fChargePerClusterBending, AliHLTMUONConstants::HistogramDataType(), specification);
+ if( fPlotChargePerClusterNonBending ) PushBack( fChargePerClusterBending, AliHLTMUONConstants::HistogramDataType(), specification);
+ if( fPlotNClusters ) PushBack( fNumberOfClusters, AliHLTMUONConstants::HistogramDataType(), specification);
+
+ return 0;
+}
+
+
+int AliHLTMUONClusterHistoComponent::Reconfigure(const char* cdbEntry, const char* chainId)
+{
+ // see header file for class documentation
+ int iResult=0;
+ const char* path="HLT/ConfigMUON/MUONHistoComponent";
+ const char* defaultNotify="";
+ if (cdbEntry) {
+ path=cdbEntry;
+ defaultNotify=" (default)";
+ }
+ if (path) {
+ HLTInfo("reconfigure from entry %s%s, chain id %s", path, defaultNotify,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
+ AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
+ if (pEntry) {
+ TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
+ if (pString) {
+ HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
+ iResult=Configure(pString->GetString().Data());
+ } else {
+ HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
+ }
+ } else {
+ HLTError("can not fetch object \"%s\" from CDB", path);
+ }
+ }
+
+ return iResult;
+}
+
+
+int AliHLTMUONClusterHistoComponent::Configure(const char* arguments)
+{
+
+ int iResult=0;
+ if (!arguments) return iResult;
+
+ TString allArgs=arguments;
+ TString argument;
+
+ TObjArray* pTokens=allArgs.Tokenize(" ");
+
+ if (pTokens) {
+ for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
+ argument=((TObjString*)pTokens->At(i))->GetString();
+ if (argument.IsNull()) continue;
+
+ }
+ delete pTokens;
+ }
+
+ return iResult;
+}
--- /dev/null
+#ifndef ALIHLTMUONCLUSTERHISTOCOMPONENT_H
+#define ALIHLTMUONCLUSTERHISTOCOMPONENT_H
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* See cxx source for full Copyright notice *
+
+/** @file AliHLTMUONClusterHistoComponent.h
+ @author Arshad Ahmad <Arshad.Ahmad@cern.ch>
+ @date 27 Nov 2009
+ @brief Component for ploting charge in clusters
+*/
+
+#include "TH1F.h"
+#include "AliHLTMUONProcessor.h"
+/**
+ * @class AliHLTMUONClusterHistoComponent
+ * Component for ploting charge in clusters
+ *
+ * Component ID: \b MUONQHisto <br>
+ * Library: \b libAliHLTMUON.so <br>
+ *
+ * Mandatory arguments: <br>
+ *
+ *
+ * Optional arguments: <br>
+ *
+ *
+ * @ingroup alihlt_dimuon_components
+ */
+
+class AliHLTMUONClusterHistoComponent : public AliHLTMUONProcessor
+{
+public:
+ /** default constructor */
+ AliHLTMUONClusterHistoComponent();
+ /** destructor */
+ virtual ~AliHLTMUONClusterHistoComponent();
+
+ // Public functions to implement AliHLTComponent's interface.
+ // These functions are required for the registration process
+
+ /** interface function, see AliHLTComponent for description */
+ const char* GetComponentID();
+ /** interface function, see AliHLTComponent for description */
+ void GetInputDataTypes(AliHLTComponentDataTypeList& list);
+ /** interface function, see AliHLTComponent for description */
+ AliHLTComponentDataType GetOutputDataType();
+ int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
+ /** interface function, see AliHLTComponent for description */
+ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+ /** interface function, see AliHLTComponent for description */
+ AliHLTComponent* Spawn();
+
+private:
+
+ // Protected functions to implement AliHLTComponent's interface.
+ // These functions provide initialization as well as the actual processing
+ // capabilities of the component.
+
+ /** interface function, see AliHLTComponent for description */
+ int DoInit( int argc, const char** argv );
+ /** interface function, see AliHLTComponent for description */
+ int DoDeinit();
+ /** interface function, see AliHLTComponent for description */
+ /* int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); */
+ int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, AliHLTComponentBlockDataList& outputBlocks);
+
+ int Reconfigure(const char* cdbEntry, const char* chainId);
+
+ using AliHLTProcessor::DoEvent;
+
+ /** copy constructor prohibited */
+ AliHLTMUONClusterHistoComponent(const AliHLTMUONClusterHistoComponent&);
+ /** assignment operator prohibited */
+ AliHLTMUONClusterHistoComponent& operator=(const AliHLTMUONClusterHistoComponent&);
+ /**
+ * Configure the component.
+ * Parse a string for the configuration arguments and set the component
+ * properties.
+ */
+ int Configure(const char* arguments);
+
+
+ TH1F * fChargePerClusterBending; //! transient
+ TH1F * fChargePerClusterNonBending; //! transient
+ TH1F * fNumberOfClusters; //! transient
+
+ Bool_t fPlotChargePerClusterBending; //! transient
+ Bool_t fPlotChargePerClusterNonBending; //! transient
+ Bool_t fPlotNClusters; //! transient
+
+ ClassDef(AliHLTMUONClusterHistoComponent, 0);
+
+};
+#endif //ALIHLTMUONCLUSTERHISTOCOMPONENT_H
#include "AliHLTCTPData.h"
#include "AliESDEvent.h"
#include "AliESDtrack.h"
+#include "AliESDMuonTrack.h"
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
#include "AliPID.h"
#include "TTree.h"
#include "TList.h"
+#include "TClonesArray.h"
#include "AliHLTESDCaloClusterMaker.h"
#include "AliHLTCaloClusterDataStruct.h"
#include "AliHLTCaloClusterReader.h"
list.push_back(kAliHLTDataTypeCaloCluster);
list.push_back(kAliHLTDataTypedEdx );
list.push_back(kAliHLTDataTypeESDVertex );
+ list.push_back(kAliHLTDataTypeESDObject);
+ list.push_back(kAliHLTDataTypeTObject);
}
AliHLTComponentDataType AliHLTGlobalEsdConverterComponent::GetOutputDataType()
HLTInfo("converted %d cluster(s) to AliESDCaloCluster and added to ESD", nClusters);
iAddedDataBlocks++;
}
-
-
- if (iAddedDataBlocks>0 && pTree) {
- pTree->Fill();
+
+ // Add tracks from MUON.
+ for (const TObject* obj = GetFirstInputObject(kAliHLTAnyDataType | kAliHLTDataOriginMUON);
+ obj != NULL;
+ obj = GetNextInputObject()
+ )
+ {
+ const TClonesArray* tracklist = NULL;
+ if (obj->IsA() == AliESDEvent::Class())
+ {
+ const AliESDEvent* event = static_cast<const AliESDEvent*>(obj);
+ HLTDebug("Received a MUON ESD with specification: 0x%X", GetSpecification(obj));
+ if (event->GetList() == NULL) continue;
+ tracklist = dynamic_cast<const TClonesArray*>(event->GetList()->FindObject("MuonTracks"));
+ if (tracklist == NULL) continue;
+ }
+ else if (obj->IsA() == TClonesArray::Class())
+ {
+ tracklist = static_cast<const TClonesArray*>(obj);
+ HLTDebug("Received a MUON TClonesArray of tracks with specification: 0x%X", GetSpecification(obj));
+ }
+ else
+ {
+ // Cannot handle this object type.
+ continue;
+ }
+ HLTDebug("Received %d MUON tracks.", tracklist->GetEntriesFast());
+ if (tracklist->GetEntriesFast() > 0)
+ {
+ const AliESDMuonTrack* track = dynamic_cast<const AliESDMuonTrack*>(tracklist->UncheckedAt(0));
+ if (track == NULL)
+ {
+ HLTError(Form("%s from MUON does not contain AliESDMuonTrack objects.", obj->ClassName()));
+ continue;
}
+ }
+ for (Int_t i = 0; i < tracklist->GetEntriesFast(); ++i)
+ {
+ const AliESDMuonTrack* track = static_cast<const AliESDMuonTrack*>(tracklist->UncheckedAt(i));
+ pESD->AddMuonTrack(track);
+ }
+ }
+
+ if (iAddedDataBlocks>0 && pTree) {
+ pTree->Fill();
+ }
if (iResult>=0) iResult=iAddedDataBlocks;
return iResult;
utils/AliHLTMUONEmptyEventFilterComponent.h \
utils/AliHLTMUONDataCheckerComponent.h \
utils/AliHLTMUONRawDataHistoComponent.h \
+ utils/AliHLTMUONClusterHistoComponent.h \
AliHLTMUONConstants.h \
AliHLTMUONProcessor.h \
AliHLTMUONRecHit.h \