AliHLTRunSummaryProducerComponent.h \
AliHLTTriggerSelectiveReadoutComponent.h \
AliHLTTriggerMonitoringComponent.h \
+ AliHLTTriggerCaloClusterEnergy.h \
AliHLTTriggerPhosClusterEnergy.h \
+ AliHLTTriggerEmcalClusterEnergy.h \
AliHLTTriggerPhosMip.h \
AliHLTTriggerTrdClusterMultiplicity.h \
AliHLTTriggerBarrelGeomMultiplicity.h \
#include "AliHLTTriggerBarrelCosmic.h"
#include "AliHLTGlobalTriggerComponent.h"
#include "AliHLTTriggerPhosClusterEnergy.h"
+#include "AliHLTTriggerEmcalClusterEnergy.h"
#include "AliHLTTriggerPhosMip.h"
#include "AliHLTTriggerTrdClusterMultiplicity.h"
#include "AliHLTTriggerGammaConversion.h"
pHandler->AddComponent(new AliHLTTriggerBarrelGeomMultiplicity);
pHandler->AddComponent(new AliHLTTriggerBarrelCosmic);
pHandler->AddComponent(new AliHLTTriggerPhosClusterEnergy);
+ pHandler->AddComponent(new AliHLTTriggerEmcalClusterEnergy);
pHandler->AddComponent(new AliHLTTriggerPhosMip);
pHandler->AddComponent(new AliHLTTriggerTrdClusterMultiplicity);
pHandler->AddComponent(new AliHLTTriggerGammaConversion);
--- /dev/null
+// $Id$
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Svein Lindal <svein.lindal@gmail.com> *
+//* 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 AliHLTTriggerCaloClusterEnergy.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @date 2009-08-17
+/// @brief BASE class for energy threshold trigger for Calorimeters
+///
+
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+
+#include "AliHLTTriggerCaloClusterEnergy.h"
+#include "AliESDEvent.h"
+#include "AliESDCaloCluster.h"
+#include "AliHLTTriggerDecision.h"
+#include "AliHLTDomainEntry.h"
+#include "AliHLTCaloClusterReader.h"
+#include "AliHLTCaloClusterDataStruct.h"
+#include "TRefArray.h"
+#include "TString.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTTriggerCaloClusterEnergy)
+
+AliHLTTriggerCaloClusterEnergy::AliHLTTriggerCaloClusterEnergy(TString detector) :
+ AliHLTTrigger(),
+ fEThreshold(0.0),
+ fClustersRefs(NULL),
+ fDetector(detector),
+ fClusterReader(NULL),
+ fgkOCDBEntry(""),
+ fgkInputDataType()
+{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlts
+
+ fClusterReader = new AliHLTCaloClusterReader();
+ fClustersRefs = new TRefArray();
+
+}
+
+//const char* AliHLTTriggerCaloClusterEnergy::fgkOCDBEntry="HLT/ConfigHLT/CaloClusterEnergyTrigger";
+
+AliHLTTriggerCaloClusterEnergy::~AliHLTTriggerCaloClusterEnergy() {
+ // see header file for class documentation
+}
+
+Int_t AliHLTTriggerCaloClusterEnergy::DoTrigger() {
+ // see header file for class documentation
+
+ Int_t iResult = 0;
+
+
+ if ( GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR ) )
+ return 0;
+
+ //Try the caloclusterstruct input
+
+
+ for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(fgkInputDataType); pBlock!=NULL; pBlock=GetNextInputBlock()) {
+ AliHLTCaloClusterHeaderStruct *caloClusterHeader = reinterpret_cast<AliHLTCaloClusterHeaderStruct*>(pBlock->fPtr);
+ fClusterReader->SetMemory(caloClusterHeader);
+
+ AliHLTCaloClusterDataStruct * caloClusterStruct;
+ while( (caloClusterStruct = fClusterReader->NextCluster()) != 0) {
+ if (TriggerOnCluster(caloClusterStruct)) {
+ return iResult;
+ }
+ }
+ }
+
+ //Try the ESD input
+ const TObject* obj = GetFirstInputObject(kAliHLTAllDataTypes, "AliESDEvent");
+ AliESDEvent* esd = dynamic_cast<AliESDEvent*>(const_cast<TObject*>(obj));
+
+ if (esd != NULL) {
+ esd->GetStdContent();
+
+ Int_t ncc = GetClustersFromEsd(esd, fClustersRefs);
+
+ for (Int_t i = 0; i < ncc ; i++) {
+
+ AliESDCaloCluster * cluster = static_cast<AliESDCaloCluster*>(fClustersRefs->At(i));
+ if(TriggerOnCluster(cluster)) {
+ return iResult;
+ }
+ }
+ }
+
+ // If we got to this point then we did not find any clusters with E > fEThreshold
+ // generate negative trigger decision
+ TString description;
+ description.Form("No %s clusters containing energy > %.02f GeV found.", fDetector.Data(), fEThreshold);
+ SetDescription(description.Data());
+ TriggerEvent(false);
+ return iResult;
+
+}
+
+
+template <class T>
+Bool_t AliHLTTriggerCaloClusterEnergy::TriggerOnCluster(T* cluster) {
+
+ if (cluster->E() > fEThreshold) {
+
+ //We have a cluster satisfying trigger criteria
+ TString description;
+ description.Form("Event contains at least one %s cluster with energy > %.02f GeV.", fDetector.Data(), fEThreshold);
+ SetDescription(description.Data());
+
+ // Enable the detectors for readout.
+ GetReadoutList().Enable( AliHLTReadoutList::kPHOS );
+
+ // Add the available HLT information for readout too.
+ GetTriggerDomain().Add(kAliHLTAnyDataTypeID, fDetector.Data());
+
+ //Set trigger decision
+ TriggerEvent(kTRUE);
+
+ return kTRUE;
+ }
+
+
+ return kFALSE;
+
+}
+
+
+
+
+int AliHLTTriggerCaloClusterEnergy::DoInit(int argc, const char** argv) {
+ // see header file for class documentation
+
+ // first configure the default
+ int iResult=ConfigureFromCDBTObjString(fgkOCDBEntry);
+
+ // configure from the command line parameters if specified
+ if (iResult>=0 && argc>0) {
+ iResult=ConfigureFromArgumentString(argc, argv);
+ HLTImportant("Trigger threshold set from argument string: %.02f GeV:", fEThreshold );
+ } else if ( iResult >=0 ) {
+ HLTImportant("Trigger threshold set from OCDB database entry: %.02f GeV:", fEThreshold );
+ }
+ return iResult;
+}
+
+int AliHLTTriggerCaloClusterEnergy::DoDeinit() {
+ // see header file for class documentation
+ return 0;
+}
+
+int AliHLTTriggerCaloClusterEnergy::Reconfigure(const char* cdbEntry, const char* /*chainId*/) {
+ // see header file for class documentation
+
+ // configure from the specified antry or the default one
+ const char* entry=cdbEntry;
+ if (!entry || entry[0]==0) entry=fgkOCDBEntry;
+
+ return ConfigureFromCDBTObjString(entry);
+}
+
+int AliHLTTriggerCaloClusterEnergy::ScanConfigurationArgument(int argc, const char** argv) {
+ // see header file for class documentation
+ if (argc<=0) return 0;
+ int i=0;
+ TString argument=argv[i];
+
+ // -maxpt
+ if (argument.CompareTo("-energy")==0) {
+ if (++i>=argc) return -EPROTO;
+ argument=argv[i];
+ fEThreshold=argument.Atof();
+ return 2;
+ }
+
+ // unknown argument
+ return -EINVAL;
+}
+
+void AliHLTTriggerCaloClusterEnergy::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier) {
+ // see header file for class documentation
+ constBase = sizeof(AliHLTTriggerDecision) + sizeof(AliHLTDomainEntry)*14;
+ inputMultiplier = 1;
+}
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id$
+#ifndef ALIHLTTRIGGERCALOCLUSTERENERGY_H
+#define ALIHLTTRIGGERCALOCLUSTERENERGY_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 AliHLTTriggerCaloClusterEnergy.h
+/// @author Svein Lindal
+/// @date 2009-08-17
+/// @brief HLT energy threshold trigger for PHOS
+
+/**
+ * @class AliHLTTriggerCaloClusterEnergy
+ * HLT trigger component for high energy clusters in PHOS
+ *
+ * Triggers on PHOS clusters containing energy > threshold value.
+ * Configurable through database entry or from command line using "-energy" option
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b CaloClusterEnergyTrigger <br>
+ * Library: \b libAliHLTTrigger.so <br>
+ * Input Data Types: kAliHLTDataTypeESDObject, kAliHLTDataTypeESDTree <br>
+ * Output Data Types: ::kAliHLTAnyDataType <br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -energy <i> e </i> <br>
+ * required energy of the cluster
+ *
+ * By default, configuration is loaded from OCDB, can be overridden by
+ * component arguments.
+ *
+ * <h2>Default CDB entries:</h2>
+ * HLT/ConfigHLT/CaloClusterEnergyTrigger: TObjString storing the arguments
+ *
+ * <h2>Performance:</h2>
+ *
+ *
+ * <h2>Memory consumption:</h2>
+ *
+ *
+ * <h2>Output size:</h2>
+ *
+ *
+ * \ingroup alihlt_trigger_components
+ */
+
+
+#include "AliHLTTrigger.h"
+class AliHLTCaloClusterReader;
+class TRefArray;
+class AliESDEvent;
+
+class AliHLTTriggerCaloClusterEnergy : public AliHLTTrigger
+{
+
+public:
+ AliHLTTriggerCaloClusterEnergy(TString detector);
+ ~AliHLTTriggerCaloClusterEnergy();
+
+ /// inherited from AliHLTTrigger: name of this trigger
+ virtual const char* GetTriggerName() const = 0;
+ /// inherited from AliHLTComponent: create an instance
+ virtual AliHLTComponent* Spawn() = 0;
+
+ protected:
+ /// inherited from AliHLTComponent: handle the initialization
+ int DoInit(int argc, const char** argv);
+
+ /// inherited from AliHLTComponent: handle cleanup
+ int DoDeinit();
+
+ /// inherited from AliHLTComponent: handle re-configuration event
+ int Reconfigure(const char* cdbEntry, const char* chainId);
+
+ /// inherited from AliHLTComponent, scan one argument and
+ /// its parameters
+ int ScanConfigurationArgument(int argc, const char** argv);
+
+ /// inherited from AliHLTComponent
+ // Get a ratio by how much the data volume is shrunken or enhanced.
+ virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
+
+protected :
+
+ ///Get the clusters from the esd
+ virtual Int_t GetClustersFromEsd( const AliESDEvent * esd, TRefArray * clustersRefs ) = 0;
+
+ /// inherited from AliHLTTrigger: calculate the trigger
+ Int_t DoTrigger();
+
+ ///Default constructor prohibited
+ AliHLTTriggerCaloClusterEnergy();
+
+ /// Copy constructor prohibited
+ AliHLTTriggerCaloClusterEnergy(const AliHLTTriggerCaloClusterEnergy & );
+
+ /// Assignment operator prohibited
+ AliHLTTriggerCaloClusterEnergy& operator=(const AliHLTTriggerCaloClusterEnergy &);
+
+ /// Check if cluster fullfills criteria and if so trigger
+ template <class T>
+ Bool_t TriggerOnCluster(T* cluster);
+
+ /// Threshold cluster energy to trigger on
+ Float_t fEThreshold;
+
+ ///array to hold esd clusters
+ TRefArray * fClustersRefs; //!transient
+
+ //The detector string (PHOS or EMCAL)
+ const TString fDetector;
+
+ ///Cluster data struct reader
+ AliHLTCaloClusterReader * fClusterReader; //!transient
+
+ /// the default configuration entry for this component
+ const char* fgkOCDBEntry; //!transient
+
+
+ AliHLTComponentDataType fgkInputDataType;
+
+
+ ClassDef(AliHLTTriggerCaloClusterEnergy, 0)
+};
+
+
+
+
+
+#endif //ALIHLTTRIGGERCALOCLUSTERENERGY_H
--- /dev/null
+// $Id$
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Svein Lindal <svein.lindal@gmail.com> *
+//* 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 AliHLTTriggerEmcalClusterEnergy.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @date 2009-08-17
+/// @brief HLT energy threshold trigger for EMCAL
+///
+
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+
+#include "AliHLTTriggerEmcalClusterEnergy.h"
+#include "AliESDEvent.h"
+#include "AliESDCaloCluster.h"
+#include "AliHLTTriggerDecision.h"
+#include "AliHLTDomainEntry.h"
+
+
+AliHLTTriggerEmcalClusterEnergy gEmcalClusterEnergyTrigger;
+
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTTriggerEmcalClusterEnergy)
+
+AliHLTTriggerEmcalClusterEnergy::AliHLTTriggerEmcalClusterEnergy() :
+AliHLTTriggerCaloClusterEnergy("EMCAL")
+{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlts
+
+ fgkOCDBEntry = "HLT/ConfigHLT/EmcalClusterEnergyTrigger";
+ fgkInputDataType = kAliHLTDataTypeCaloCluster | kAliHLTDataOriginEMCAL;
+}
+
+AliHLTTriggerEmcalClusterEnergy::~AliHLTTriggerEmcalClusterEnergy() {
+ // see header file for class documentation
+}
+
+const char* AliHLTTriggerEmcalClusterEnergy::GetTriggerName() const {
+ // see header file for class documentation
+ return "EmcalClusterEnergyTrigger";
+}
+
+AliHLTComponent* AliHLTTriggerEmcalClusterEnergy::Spawn() {
+ // see header file for class documentation
+ return new AliHLTTriggerEmcalClusterEnergy;
+}
+
+Int_t AliHLTTriggerEmcalClusterEnergy::GetClustersFromEsd( const AliESDEvent * esd, TRefArray * clustersRefs ){
+ return esd->GetEMCALClusters(clustersRefs);
+}
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id$
+#ifndef ALIHLTTRIGGEREMCALCLUSTERENERGY_H
+#define ALIHLTTRIGGEREMCALCLUSTERENERGY_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 AliHLTTriggerEmcalClusterEnergy.h
+/// @author Svein Lindal
+/// @date 2009-08-17
+/// @brief HLT energy threshold trigger for EMCAL
+
+#include "AliHLTTriggerCaloClusterEnergy.h"
+
+/**
+ * @class AliHLTTriggerEmcalClusterEnergy
+ * HLT trigger component for high energy clusters in EMCAL
+ *
+ * Triggers on EMCAL clusters containing energy > threshold value.
+ * Configurable through database entry or from command line using "-energy" option
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b EmcalClusterEnergyTrigger <br>
+ * Library: \b libAliHLTTrigger.so <br>
+ * Input Data Types: kAliHLTDataTypeESDObject, kAliHLTDataTypeESDTree <br>
+ * Output Data Types: ::kAliHLTAnyDataType <br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -energy <i> e </i> <br>
+ * required energy of the cluster
+ *
+ * By default, configuration is loaded from OCDB, can be overridden by
+ * component arguments.
+ *
+ * <h2>Default CDB entries:</h2>
+ * HLT/ConfigHLT/EmcalClusterEnergyTrigger: TObjString storing the arguments
+ *
+ * <h2>Performance:</h2>
+ *
+ *
+ * <h2>Memory consumption:</h2>
+ *
+ *
+ * <h2>Output size:</h2>
+ *
+ *
+ * \ingroup alihlt_trigger_components
+ */
+
+class AliHLTTriggerEmcalClusterEnergy : public AliHLTTriggerCaloClusterEnergy {
+
+public:
+ AliHLTTriggerEmcalClusterEnergy();
+ ~AliHLTTriggerEmcalClusterEnergy();
+
+
+ /// inherited from AliHLTTrigger: name of this trigger
+ const char* GetTriggerName() const;
+ /// inherited from AliHLTComponent: create an instance
+ AliHLTComponent* Spawn();
+
+
+private:
+
+ ///Inherited from AliHLTTriggerCaloClusterEnergy, get the correct set of ESD calo clusters
+ Int_t GetClustersFromEsd( const AliESDEvent * esd, TRefArray * clustersRefs );
+
+ ClassDef(AliHLTTriggerEmcalClusterEnergy, 0)
+};
+
+#endif
#pragma link C++ class AliHLTRunSummaryProducerComponent+;
#pragma link C++ class AliHLTTriggerSelectiveReadoutComponent+;
#pragma link C++ class AliHLTTriggerMonitoringComponent+;
+#pragma link C++ class AliHLTTriggerCaloClusterEnergy+;
#pragma link C++ class AliHLTTriggerPhosClusterEnergy+;
+#pragma link C++ class AliHLTTriggerEmcalClusterEnergy+;
#pragma link C++ class AliHLTTriggerPhosMip+;
#pragma link C++ class AliHLTTriggerTrdClusterMultiplicity+;
#pragma link C++ class AliHLTTriggerDetectorGeom+;
#include "AliHLTTriggerDecision.h"
#include "AliHLTDomainEntry.h"
+
+AliHLTTriggerPhosClusterEnergy gPhosClusterEnergyTrigger;
+
+
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTTriggerPhosClusterEnergy)
-AliHLTTriggerPhosClusterEnergy::AliHLTTriggerPhosClusterEnergy()
- : AliHLTTrigger()
- , fEThreshold(0.0)
+AliHLTTriggerPhosClusterEnergy::AliHLTTriggerPhosClusterEnergy() :
+AliHLTTriggerCaloClusterEnergy("PHOS")
{
// see header file for class documentation
// or
// refer to README to build package
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlts
-}
-const char* AliHLTTriggerPhosClusterEnergy::fgkOCDBEntry="HLT/ConfigHLT/PhosClusterEnergyTrigger";
+ fgkOCDBEntry = "HLT/ConfigHLT/PhosClusterEnergyTrigger";
+ fgkInputDataType = kAliHLTDataTypeCaloCluster | kAliHLTDataOriginPHOS;
+}
-AliHLTTriggerPhosClusterEnergy::~AliHLTTriggerPhosClusterEnergy()
-{
+AliHLTTriggerPhosClusterEnergy::~AliHLTTriggerPhosClusterEnergy() {
// see header file for class documentation
}
-const char* AliHLTTriggerPhosClusterEnergy::GetTriggerName() const
-{
+const char* AliHLTTriggerPhosClusterEnergy::GetTriggerName() const {
// see header file for class documentation
return "PhosClusterEnergyTrigger";
}
-AliHLTComponent* AliHLTTriggerPhosClusterEnergy::Spawn()
-{
+AliHLTComponent* AliHLTTriggerPhosClusterEnergy::Spawn() {
// see header file for class documentation
return new AliHLTTriggerPhosClusterEnergy;
}
-int AliHLTTriggerPhosClusterEnergy::DoTrigger()
-{
- // see header file for class documentation
-
- TString description;
-
- const TObject* obj = GetFirstInputObject(kAliHLTAllDataTypes, "AliESDEvent");
- AliESDEvent* esd = dynamic_cast<AliESDEvent*>(const_cast<TObject*>(obj));
-
- if (esd != NULL) {
- esd->GetStdContent();
-
- //Loop over Calorimeter clusters
- Int_t ncc = esd->GetNumberOfCaloClusters();
- for (Int_t i = 0; i < ncc ; i++) {
- AliESDCaloCluster * cluster = esd->GetCaloCluster(i);
-
- // Trigger condition: PHOS clusters with energy > fEThreshold
- if (cluster->IsPHOS() && cluster->E() > fEThreshold) {
- description.Form("Event contains at least one PHOS cluster with energy > %.02f GeV.", fEThreshold);
- SetDescription(description.Data());
-
- // Enable the detectors for readout.
- GetReadoutList().Enable( AliHLTReadoutList::kPHOS );
-
- // Add the available HLT information for readout too.
- GetTriggerDomain().Add(kAliHLTAnyDataTypeID, "PHOS");
-
- //Set trigger decision
- TriggerEvent(true);
-
- return 0;
- }
- }
- }
-
- // If we got to this point then we did not find any tracks with E > fEThreshold
- // generate negative trigger decision
- description.Form("No PHOS clusters containing energy > %.02f GeV found.", fEThreshold);
- SetDescription(description.Data());
- TriggerEvent(false);
- return 0;
-}
-
-int AliHLTTriggerPhosClusterEnergy::DoInit(int argc, const char** argv) {
- // see header file for class documentation
-
- // first configure the default
- int iResult=ConfigureFromCDBTObjString(fgkOCDBEntry);
-
- // configure from the command line parameters if specified
- if (iResult>=0 && argc>0) {
- iResult=ConfigureFromArgumentString(argc, argv);
- HLTImportant("Trigger threshold set from argument string: %.02f GeV:", fEThreshold );
- } else if ( iResult >=0 ) {
- HLTImportant("Trigger threshold set from OCDB database entry: %.02f GeV:", fEThreshold );
- }
- return iResult;
-}
-
-int AliHLTTriggerPhosClusterEnergy::DoDeinit()
-{
- // see header file for class documentation
- return 0;
-}
-
-int AliHLTTriggerPhosClusterEnergy::Reconfigure(const char* cdbEntry, const char* /*chainId*/)
-{
- // see header file for class documentation
-
- // configure from the specified antry or the default one
- const char* entry=cdbEntry;
- if (!entry || entry[0]==0) entry=fgkOCDBEntry;
-
- return ConfigureFromCDBTObjString(entry);
-}
-
-int AliHLTTriggerPhosClusterEnergy::ScanConfigurationArgument(int argc, const char** argv)
-{
- // see header file for class documentation
- if (argc<=0) return 0;
- int i=0;
- TString argument=argv[i];
-
- // -maxpt
- if (argument.CompareTo("-energy")==0) {
- if (++i>=argc) return -EPROTO;
- argument=argv[i];
- fEThreshold=argument.Atof();
- return 2;
- }
-
- // unknown argument
- return -EINVAL;
-}
-
-void AliHLTTriggerPhosClusterEnergy::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
-{
- // see header file for class documentation
- constBase = sizeof(AliHLTTriggerDecision) + sizeof(AliHLTDomainEntry)*14;
- inputMultiplier = 1;
+Int_t AliHLTTriggerPhosClusterEnergy::GetClustersFromEsd( const AliESDEvent * esd, TRefArray * clustersRefs ){
+ return esd->GetPHOSClusters(clustersRefs);
}
/// @date 2009-08-17
/// @brief HLT energy threshold trigger for PHOS
-#include "AliHLTTrigger.h"
-
-
-class AliESDtrack;
+#include "AliHLTTriggerCaloClusterEnergy.h"
/**
* @class AliHLTTriggerPhosClusterEnergy
* \ingroup alihlt_trigger_components
*/
-class AliHLTTriggerPhosClusterEnergy : public AliHLTTrigger
-{
+class AliHLTTriggerPhosClusterEnergy : public AliHLTTriggerCaloClusterEnergy {
+
public:
AliHLTTriggerPhosClusterEnergy();
~AliHLTTriggerPhosClusterEnergy();
/// inherited from AliHLTTrigger: name of this trigger
- virtual const char* GetTriggerName() const;
+ const char* GetTriggerName() const;
/// inherited from AliHLTComponent: create an instance
- virtual AliHLTComponent* Spawn();
-
- protected:
- /// inherited from AliHLTComponent: handle the initialization
- int DoInit(int argc, const char** argv);
-
- /// inherited from AliHLTComponent: handle cleanup
- int DoDeinit();
+ AliHLTComponent* Spawn();
- /// inherited from AliHLTComponent: handle re-configuration event
- int Reconfigure(const char* cdbEntry, const char* chainId);
-
- /// inherited from AliHLTComponent, scan one argument and
- /// its parameters
- int ScanConfigurationArgument(int argc, const char** argv);
-
- /// inherited from AliHLTComponent
- // Get a ratio by how much the data volume is shrunken or enhanced.
- virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
private:
- /// inherited from AliHLTTrigger: calculate the trigger
- virtual int DoTrigger();
-
- /// Threshold cluster energy to trigger on
- float fEThreshold;
-
- /// the default configuration entry for this component
- static const char* fgkOCDBEntry; //!transient
+ ///Inherited from AliHLTTriggerCaloClusterEnergy, get the correct set of ESD calo clusters
+ Int_t GetClustersFromEsd( const AliESDEvent * esd, TRefArray * clustersRefs );
ClassDef(AliHLTTriggerPhosClusterEnergy, 0)
};
Double_t et = gRandom->Rndm() * (maxPt - minPt) + minPt;
+ cout << et << endl;
+
cluster.SetE(et);
cluster.SetClusterType(AliESDCaloCluster::kPHOSCluster);
//cluster.SetClusterType(nuOfmTracks);
{
const char* filename = "PhosClusterEnergyTriggerTestOutput.root";
TFile file(filename, "READ");
- AliHLTTriggerDecision* decision1 = dynamic_cast<AliHLTTriggerDecision*>(file.Get("PhosClusterEnergyTrigger;1"));
- AliHLTTriggerDecision* decision2 = dynamic_cast<AliHLTTriggerDecision*>(file.Get("PhosClusterEnergyTrigger;2"));
+ AliHLTTriggerDecision* decision1 = dynamic_cast<AliHLTTriggerDecision*>(file.Get("PhosClusterEnergyTrigger;2"));
+ AliHLTTriggerDecision* decision2 = dynamic_cast<AliHLTTriggerDecision*>(file.Get("PhosClusterEnergyTrigger;3"));
if (decision1 == NULL)
{
cerr << "ERROR: 'PhosClusterEnergyTrigger;1' AliHLTTriggerDecision object not found in file " << filename << endl;
AliCDBManager * man = AliCDBManager::Instance();
man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
man->SetRun(0);
+ gSystem->Load("libAliHLTUtil.so");
+ gSystem->Load("libAliHLTMUON.so");
+ gSystem->Load("libAliHLTTRD.so");
gSystem->Load("libAliHLTTrigger.so");
CreateInput("PhosClusterEnergyTriggerTestInput1.root", -2, 0.1, 1.99);
CreateInput("PhosClusterEnergyTriggerTestInput2.root", 0, 2.1, 4.0);