//* 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 *
, fSolenoidBz(0)
, fMinTracks(1)
, fDetectorArray(0)
+ , fTriggerDecisionPars(0)
+ , fTriggerName(0)
+ , fOCDBEntry(0)
{
// see header file for class documentation
// or
// try the ESD as input
const TObject* obj = GetFirstInputObject(kAliHLTAllDataTypes, "AliESDEvent");
- AliESDEvent* esd = dynamic_cast<AliESDEvent*>(const_cast<TObject*>(obj));
+n AliESDEvent* esd = dynamic_cast<AliESDEvent*>(const_cast<TObject*>(obj));
TString description;
if (esd != NULL)
{
numberOfTracks=0;
esd->GetStdContent();
-
+
for (Int_t i = 0; i < esd->GetNumberOfTracks(); i++)
{
if (CheckCondition(esd->GetTrack(i), esd->GetMagneticField())) numberOfTracks++;
}
}
}
+
if (numberOfTracks>=fMinTracks)
{
-
SetDescription(fTriggerDecisionPars->GetDescription());
AliHLTReadoutList readout(fTriggerDecisionPars->GetReadoutListParameter());
AliHLTTriggerDecision decision(
for(Int_t i = 0; i < fDetectorArray->GetEntries(); i++)
{
AliHLTTriggerDetectorGeom *det = static_cast<AliHLTTriggerDetectorGeom*>(fDetectorArray->At(i));
+
Double_t trackPoint[3];
-
+ Double_t normVector[3];
+
det->GetInitialPoint(trackPoint);
-
- bool ret = track->Intersect(trackPoint, det->NormVector(), b);
+ det->GetNormVector(normVector);
+ bool ret = track->Intersect(trackPoint, normVector, b);
+
+ if(ret)
+ {
+ if(det->IsInDetector(trackPoint)) return true;
+ }
}
return false;
}
if (iResult>=0 && argc>0)
iResult=ConfigureFromArgumentString(argc, argv);
- HLTWarning("TEST");
return iResult;
}
for(int i = 0; i < pArr->GetEntries(); i++)
{
- if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDecision"))
+ if(!strcmp(pArr->At(i)->ClassName(), "AliHLTTriggerDecisionParameters"))
{
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++;
- HLTWarning("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());
}
}
}
if(geomfile)
{
-
HLTInfo("configure from file \"%s\"", filename);
TObjArray* pArr=dynamic_cast<TObjArray*>(geomfile->Get("GeomConf"));
if (pArr)
return 2;
}
- if (argument.CompareTo("-trgname")==0)
+ if (argument.CompareTo("-triggername")==0)
{
if (++i>=argc) return -EPROTO;
/// a geometrical selection of the central barrel.
#include "AliHLTTrigger.h"
-#include "TList.h"
class AliHLTTriggerDecisionParameters;
* HLT trigger component for charged particle multiplicity in the
* central barrel.
*
- * Triggers on charged particle number in a certain pt range.
+ * Triggers on charged particle number in a certain geometrical acceptance
*
* <h2>General properties:</h2>
*
*
* <h2>Mandatory arguments:</h2>
* <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -triggername <i> n </i> <br>
+ * specifies which configuration object to use for the trigger
*
* <h2>Optional arguments:</h2>
* <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -geomfile <i> n </i> <br>
+ * specifies root file containing configuration objects
*
* <h2>Configuration:</h2>
* <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
* component arguments.
*
* <h2>Default CDB entries:</h2>
- * HLT/ConfigHLT/BarrelGeomMultiplicityTrigger: TList storing the detector geometries
+ * HLT/ConfigHLT/BarrelGeomMultiplicityTrigger/<triggername>: TObjArray storing the
+ * geometries and readout parameters.
* HLT/ConfigHLT/Solenoidbz: TObjString -solenoidBz field
*
* <h2>Performance:</h2>
// The trigger name
char *fTriggerName; //!transient
- /// the default configuration entry for this component
+ // the default configuration entry for this component
char* fOCDBEntry; //!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)
/** Get the description */
TString GetDescription() { return fDescription; }
-
-
private:
/** The trigger name */
/// @author Oystein Djuvsland
/// @date 2009-10-08
/// @brief HLT class describing simple geometry of (sub-)detectors.
-/// Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+/// Used for the AliHLTTriggerBarrelGeomMultiplicity class
// see header file for class documentation
// or
#include "AliHLTTriggerDetectorGeom.h"
#include <ostream>
+
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTTriggerDetectorGeom)
-AliHLTTriggerDetectorGeom::AliHLTTriggerDetectorGeom()
+AliHLTTriggerDetectorGeom::AliHLTTriggerDetectorGeom()
: TObject(),
fEtaMin(0),
fEtaMax(0),
void AliHLTTriggerDetectorGeom::GetInitialPoint(Double_t *point)
{
+ // See header file for class documentation
for(int i = 0; i < 3; i++)
{
point[i] = fInitalPoint[i];
}
}
+void AliHLTTriggerDetectorGeom::GetNormVector(Double_t *vec)
+{
+ // See header file for class documentation
+ for(int i = 0; i < 3; i++)
+ {
+ vec[i] = fNormVector[i];
+ }
+}
+
void AliHLTTriggerDetectorGeom::PrintDetectorGeom(std::ostream &out)
{
+ // See header file for class documentation
+
out << "Name: " << fName << std::endl;
out << "Eta Min: " << fEtaMin << std::endl;
out << "Eta Max: " << fEtaMax << std::endl;
/// @brief HLT class describing simple geometry of (sub-)detectors.
/// Used for the AliHLTTriggerBarrelGeomMultiplicity classes
-#include "TObject.h"
#include "TString.h"
#include <ostream>
+#include "TObject.h"
/**
* @class AliHLTTriggerDetectorGeom
* HLT class describing simple geometry cuts of (sub-)detectors.
- * Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+ * Used for the AliHLTTriggerBarrelGeomMultiplicity class
*
* \ingroup alihlt_trigger
*/
*/
void SetDetName(TString &name) { fName = name; } // Set name
+ /**
+ * Get the minimum in eta (should be moved...)
+ */
Double_t EtaMin() { return fEtaMin; }
+
+ /**
+ * Get the maximum in eta (should be moved...)
+ */
Double_t EtaMax() { return fEtaMax; }
+
+ /**
+ * Get the minimum in phi (should be moved...)
+ */
Double_t PhiMin() { return fPhiMin; }
+
+ /**
+ * Get the maximum in phi (should be moved...)
+ */
Double_t PhiMax() { return fPhiMax; }
+ /**
+ * Get the initial point
+ */
void GetInitialPoint(Double_t *point);
- Double_t* NormVector() { return fNormVector; }
+
+ /**
+ * Get the normal vector
+ */
+ void GetNormVector(Double_t *vec);
+ /**
+ * Get the detector name
+ */
TString DetName() { return fName; }
+ /**
+ * Print the geometry
+ */
void PrintDetectorGeom(std::ostream &out);
+ /**
+ * Abstract method to check if a point is in the
+ * acceptance of the geometry
+ */
virtual Bool_t IsInDetector(Double_t point[3]) = 0;
protected:
#include "AliHLTTriggerDetectorGeomRectangle.h"
#include "AliHLTTriggerDetectorGeom.h"
#include "TVector3.h"
+#include "TMath.h"
AliHLTTriggerDetectorGeomRectangle::AliHLTTriggerDetectorGeomRectangle() : AliHLTTriggerDetectorGeom()
// See header file for class documentation
TVector3 trackPos(point);
+
+ Double_t phi = 0;
+
+ if(trackPos.Phi() < 0) phi = trackPos.Phi() + 2*TMath::Pi();
+ else phi = trackPos.Phi();
+
if(trackPos.Eta() >= fEtaMin &&
trackPos.Eta() <= fEtaMax &&
- trackPos.Phi() >= fPhiMin &&
- trackPos.Phi() <= fPhiMax)
+ phi >= fPhiMin &&
+ phi <= fPhiMax)
{
+ // printf("Checking point: Eta: %f Phi: %f against cuts EtaMin: %f EtaMax: %f PhiMin: %f PhiMax: %f - true\n", trackPos.Eta(), phi, fEtaMin, fEtaMax, fPhiMin, fPhiMax);
return true;
}
+
+ // printf("Checking point: Eta: %f Phi: %f against cuts EtaMin: %f EtaMax: %f PhiMin: %f PhiMax: %f - false\n", trackPos.Eta(), phi, fEtaMin, fEtaMax, fPhiMin, fPhiMax);
+
return false;
}
/// @brief HLT class describing simple rectangular geometry of (sub-)detectors.
/// Used for the AliHLTTriggerBarrelGeomMultiplicity classes
+#include "AliHLTTriggerDetectorGeom.h"
+
+
/**
* @class AliHLTTriggerDetectorGeomRectangle
* HLT class describing simple rectangular geometry cuts of (sub-)detectors.
* \ingroup alihlt_trigger
*/
-#include "AliHLTTriggerDetectorGeom.h"
-
-
class AliHLTTriggerDetectorGeomRectangle : public AliHLTTriggerDetectorGeom
{
public:
+ /** Default constructor */
AliHLTTriggerDetectorGeomRectangle();
+
+ /** Default destructor */
virtual ~AliHLTTriggerDetectorGeomRectangle();
/**