AliHLTTriggerPhosMip.h \
AliHLTTriggerTrdClusterMultiplicity.h \
AliHLTTriggerBarrelGeomMultiplicity.h \
- AliHLTTriggerDetectorGeom.h
+ AliHLTTriggerDetectorGeom.h \
+ AliHLTTriggerDetectorGeomRectangle.h \
+ AliHLTTriggerDecisionParameters.h
# library sources
#include "AliHLTEventSummaryProducerComponent.h"
#include "AliHLTRunSummaryProducerComponent.h"
#include "AliHLTTriggerBarrelMultiplicity.h"
+#include "AliHLTTriggerBarrelGeomMultiplicity.h"
#include "AliHLTTriggerBarrelCosmic.h"
#include "AliHLTGlobalTriggerComponent.h"
#include "AliHLTTriggerPhosClusterEnergy.h"
if (!pHandler) return -EINVAL;
pHandler->AddComponent(new AliHLTGlobalTriggerComponent);
pHandler->AddComponent(new AliHLTTriggerBarrelMultiplicity);
+ pHandler->AddComponent(new AliHLTTriggerBarrelGeomMultiplicity);
pHandler->AddComponent(new AliHLTTriggerBarrelCosmic);
pHandler->AddComponent(new AliHLTTriggerPhosClusterEnergy);
pHandler->AddComponent(new AliHLTTriggerPhosMip);
#include "AliHLTTriggerBarrelGeomMultiplicity.h"
#include "AliHLTTriggerDetectorGeom.h"
+#include "AliHLTTriggerDecisionParameters.h"
#include "AliESDEvent.h"
#include "AliHLTTriggerDecision.h"
#include "AliHLTDomainEntry.h"
AliHLTTriggerBarrelGeomMultiplicity::AliHLTTriggerBarrelGeomMultiplicity()
: AliHLTTrigger()
, fSolenoidBz(0)
- , fMinTracks(0)
+ , fMinTracks(1)
, fDetectorArray(0)
{
// see header file for class documentation
// refer to README to build package
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ fDetectorArray = new TObjArray(1);
}
const char* AliHLTTriggerBarrelGeomMultiplicity::GetTriggerName() const
{
// see header file for class documentation
- const char* name = fTriggerName;
- if(name) return name;
+ // const char* name = fTriggerName;
+ // if(name) return name;
return "BarrelGeomMultiplicityTrigger";
}
}
if (numberOfTracks>=fMinTracks)
{
- description.Form("Event contains %d track(s) satisfying geometrical cut", numberOfTracks);
- SetDescription(description);
- TriggerEvent(fTriggerDecision);
+ SetDescription(fTriggerDecisionPars->GetDescription());
+ AliHLTReadoutList readout(fTriggerDecisionPars->GetReadoutListParameter());
+ AliHLTTriggerDecision decision(
+ true,
+ fTriggerDecisionPars->GetTriggerName().Data(),
+ AliHLTTriggerDomain(readout),
+ fTriggerDecisionPars->GetDescription()
+ );
+ TriggerEvent(&decision);
}
return iResult;
bool ret = track->Intersect(trackPoint, det->NormVector(), b);
- TVector3 trackPos(trackPoint);
-
- if(trackPos.Eta() >= det->EtaMin() &&
- trackPos.Eta() <= det->EtaMax() &&
- trackPos.Phi() >= det->PhiMin() &&
- trackPos.Phi() <= det->PhiMax())
- {
- return true;
- }
}
return false;
}
if (iResult>=0 && argc>0)
iResult=ConfigureFromArgumentString(argc, argv);
-
+ HLTWarning("TEST");
return iResult;
}
{
if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDecision"))
{
- fTriggerDecision = dynamic_cast<AliHLTTriggerDecision*>(pArr->At(i));
+ fTriggerDecisionPars = dynamic_cast<AliHLTTriggerDecisionParameters*>(pArr->At(i));
}
else if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDetectorGeom"))
{
fDetectorArray->AddLast(dynamic_cast<AliHLTTriggerDetectorGeom*>(pArr->At(i)));
nDetectorGeoms++;
- HLTInfo("received TObjArray of %d detector geometries", nDetectorGeoms);
+ HLTWarning("received TObjArray of %d detector geometries", nDetectorGeoms);
}
else
{
{
HLTInfo("configure from file \"%s\"", filename);
- TObjArray* pArr=dynamic_cast<TObjArray*>(geomfile->Get("GeomConfig"));
+ TObjArray* pArr=dynamic_cast<TObjArray*>(geomfile->Get("GeomConf"));
if (pArr)
{
for(int i = 0; i < pArr->GetEntries(); i++)
{
- if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDecision"))
+ if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDecisionParameters"))
{
- fTriggerDecision = dynamic_cast<AliHLTTriggerDecision*>(pArr->At(i));
+ fTriggerDecisionPars = dynamic_cast<AliHLTTriggerDecisionParameters*>(pArr->At(i));
}
- else if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDetectorGeom"))
+ else if(pArr->At(i)->InheritsFrom("AliHLTTriggerDetectorGeom"))
{
fDetectorArray->AddLast(dynamic_cast<AliHLTTriggerDetectorGeom*>(pArr->At(i)));
nDetectorGeoms++;
- HLTInfo("received TObjArray of %d detector geometries", nDetectorGeoms);
+ HLTWarning("received detector geometry of type %s", pArr->At(i)->ClassName());
}
else
{
- HLTWarning("Unknown object in configuration object");
+ HLTWarning("Unknown object of type %s in configuration object", pArr->At(i)->ClassName());
}
}
}
}
else
{
- HLTError("can not open file \"%s\"", filename);
+ HLTError("could not open file \"%s\"", filename);
nDetectorGeoms=-ENOENT;
}
}
+ HLTWarning("received TObjArray with %d detector geometries", nDetectorGeoms);
+
return nDetectorGeoms;
}
return 2;
}
- if (argument.CompareTo("-triggername")==0)
+ if (argument.CompareTo("-trgname")==0)
{
if (++i>=argc) return -EPROTO;
#include "AliHLTTrigger.h"
#include "TList.h"
+
+class AliHLTTriggerDecisionParameters;
+
/**
* @class AliHLTTriggerBarrelGeomMultiplicity
* HLT trigger component for charged particle multiplicity in the
// array of (sub-)detectors to trigger on
TObjArray *fDetectorArray; // !transient
- // Trigger decision
- AliHLTTriggerDecision *fTriggerDecision; //!transient
+ // Trigger decision parameters
+ AliHLTTriggerDecisionParameters *fTriggerDecisionPars; //!transient
// The trigger name
char *fTriggerName; //!transient
#include "AliHLTGlobalBarrelTrack.h"
#include "TObjArray.h"
#include "TObjString.h"
+#include "TVector3.h"
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTTriggerBarrelMultiplicity)
int ScanConfigurationArgument(int argc, const char** argv);
private:
+
/// inherited from AliHLTTrigger: calculate the trigger
virtual int DoTrigger();
--- /dev/null
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Oystein Djuvsland *
+//* 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. *
+//**************************************************************************
+
+#include "AliHLTTriggerDecisionParameters.h"
+AliHLTTriggerDecisionParameters::AliHLTTriggerDecisionParameters()
+{
+ // See header file for class documentation
+}
+
+AliHLTTriggerDecisionParameters::~AliHLTTriggerDecisionParameters()
+{
+ // See header file for class documentation
+}
--- /dev/null
+#ifndef ALIHLTTRIGGERDECISIONPARAMETERS_H
+#define ALIHLTTRIGGERDECISIONPARAMETERS_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 AliHLTTriggerDecisionParameters.h
+/// @author Oystein Djuvsland
+/// @date 2009-10-08
+/// @brief HLT class describing simple geometry of (sub-)detectors.
+/// Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "TObject.h"
+#include "TString.h"
+
+class AliHLTTriggerDecisionParameters : public TObject
+{
+public:
+
+ /** Default constructor */
+ AliHLTTriggerDecisionParameters();
+
+ /** Destructor */
+ virtual ~AliHLTTriggerDecisionParameters();
+
+ /** Get the trigger name */
+ void SetTriggerName(TString name) { fTriggerName = name; }
+
+ /** Get the readout list parameter */
+ void SetReadoutListParameter(UInt_t par) { fReadoutListParameter = par; }
+
+ /** Get the description */
+ void SetDescription(TString descr) { fDescription = descr; }
+
+ /** Get the trigger name */
+ TString GetTriggerName() { return fTriggerName; }
+
+ /** Get the readout list parameter */
+ UInt_t GetReadoutListParameter() { return fReadoutListParameter; }
+
+ /** Get the description */
+ TString GetDescription() { return fDescription; }
+
+
+
+private:
+
+ /** The trigger name */
+ TString fTriggerName;
+
+ /** Basically the argument to the AliHLTReadoutList constructor */
+ UInt_t fReadoutListParameter;
+
+ /** Description of the trigger */
+ TString fDescription;
+
+ ClassDef(AliHLTTriggerDecisionParameters, 1);
+};
+
+#endif
//* This file is property of and copyright by the ALICE HLT Project *
//* ALICE Experiment at CERN, All rights reserved. *
//* *
-//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
+//* Primary Authors: Oystein Djuvsland *
//* for The ALICE HLT Project. *
//* *
//* Permission to use, copy, modify and distribute this software and its *
out << "Eta Max: " << fEtaMax << std::endl;
out << "Phi Min: " << fPhiMin << std::endl;
out << "Phi Max: " << fPhiMax << std::endl;
- out << "Initial Point: {" << fInitalPoint[0] << ", " << fInitalPoint[1] << ", " << fInitalPoint[2] << std::endl;
- out << "Normal Vector: {" << fNormVector[0] << ", " << fNormVector[1] << ", " << fNormVector[2] << std::endl;
+ out << "Initial Point: {" << fInitalPoint[0] << ", " << fInitalPoint[1] << ", " << fInitalPoint[2] << "}" << std::endl;
+ out << "Normal Vector: {" << fNormVector[0] << ", " << fNormVector[1] << ", " << fNormVector[2] << "}" << std::endl;
}
+
void PrintDetectorGeom(std::ostream &out);
-private:
+ virtual Bool_t IsInDetector(Double_t point[3]) = 0;
+
+protected:
/** The minimum in eta */
Double_t fEtaMin; // The minimum in eta
/** The maximum in phi */
Double_t fPhiMax; // The maximum in phi
+
+ /** Name of the (sub-)detector */
+ TString fName; // Name of the (sub-)detector
+private:
/**
* The point which together with a normal vector
* defines the plane of the (sub-)detector
*/
Double_t fNormVector[3]; // Normal vector representing the plane
- /** Name of the (sub-)detector */
- TString fName; // Name of the (sub-)detector
ClassDef(AliHLTTriggerDetectorGeom, 1);
--- /dev/null
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Oystein Djuvsland *
+//* 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 AliHLTTriggerDetectorGeomRectangle.cxx
+/// @author Oystein Djuvsland
+/// @date 2009-10-08
+/// @brief HLT class describing simple rectangular geometry of (sub-)detectors.
+/// Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+
+// 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 "AliHLTTriggerDetectorGeomRectangle.h"
+#include "AliHLTTriggerDetectorGeom.h"
+#include "TVector3.h"
+
+
+AliHLTTriggerDetectorGeomRectangle::AliHLTTriggerDetectorGeomRectangle() : AliHLTTriggerDetectorGeom()
+{
+ // See header file for class documentation
+}
+
+AliHLTTriggerDetectorGeomRectangle::~AliHLTTriggerDetectorGeomRectangle()
+{
+ // See header file for class documentation
+}
+
+Bool_t AliHLTTriggerDetectorGeomRectangle::IsInDetector(Double_t point[3])
+{
+ // See header file for class documentation
+ TVector3 trackPos(point);
+
+ if(trackPos.Eta() >= fEtaMin &&
+ trackPos.Eta() <= fEtaMax &&
+ trackPos.Phi() >= fPhiMin &&
+ trackPos.Phi() <= fPhiMax)
+ {
+ return true;
+ }
+ return false;
+}
+
--- /dev/null
+#ifndef ALIHLTTRIGGERDETECTORGEOMRECTANGLE_H
+#define ALIHLTTRIGGERDETECTORGEOMRECTANGLE_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 AliHLTTriggerDetectorGeomRectangle.h
+/// @author Oystein Djuvsland
+/// @date 2009-10-08
+/// @brief HLT class describing simple rectangular geometry of (sub-)detectors.
+/// Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+
+/**
+ * @class AliHLTTriggerDetectorGeomRectangle
+ * HLT class describing simple rectangular geometry cuts of (sub-)detectors.
+ * Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+ *
+ * \ingroup alihlt_trigger
+ */
+
+#include "AliHLTTriggerDetectorGeom.h"
+
+
+class AliHLTTriggerDetectorGeomRectangle : public AliHLTTriggerDetectorGeom
+{
+public:
+
+ AliHLTTriggerDetectorGeomRectangle();
+ virtual ~AliHLTTriggerDetectorGeomRectangle();
+
+ /**
+ * Check if a point is in the detector geometry.
+ * @param point is the point in global coordinates (cm)
+ * @return true if the point is in the geometry
+ */
+ Bool_t IsInDetector(Double_t point[3]);
+
+ ClassDef(AliHLTTriggerDetectorGeomRectangle, 1);
+};
+
+#endif
#pragma link C++ class AliHLTGlobalTriggerConfig+;
#pragma link C++ class AliHLTGlobalTriggerComponent+;
#pragma link C++ class AliHLTTriggerBarrelMultiplicity+;
+#pragma link C++ class AliHLTTriggerBarrelGeomMultiplicity+;
#pragma link C++ class AliHLTTriggerBarrelCosmic+;
#pragma link C++ class AliHLTTriggerAgent+;
#pragma link C++ class AliHLTEventSummary+;
#pragma link C++ class AliHLTTriggerPhosClusterEnergy+;
#pragma link C++ class AliHLTTriggerPhosMip+;
#pragma link C++ class AliHLTTriggerTrdClusterMultiplicity+;
+#pragma link C++ class AliHLTTriggerDetectorGeom+;
+#pragma link C++ class AliHLTTriggerDetectorGeomRectangle+;
+#pragma link C++ class AliHLTTriggerDecisionParameters+;
#endif