AliHLTJETBase::~AliHLTJETBase() {
// see header file for class documentation
}
+
/*
+ * ---------------------------------------------------------------------------------
+ * Initialize static const
+ * ---------------------------------------------------------------------------------
+ */
+
+//##################################################################################
+const Char_t *AliHLTJETBase::fgkJetAlgorithmType[] = {
+ "Anti Kt",
+ "Kt",
+ "FFSC SquareCell",
+ "FFSC RadiusCell"
+};
+
+#if 0
+
//##################################################################################
Float_t AliHLTJETBase::GetDistance2( const Float_t eta1, const Float_t phi1,
const Float_t eta2, const Float_t phi2) {
return ( (eta1-eta2)*(eta1-eta2) ) + ( (phi1-phi2)*(phi1-phi2) );
}
-*/
-
-
-
-#if 0
-
//##################################################################################
void AliHLTJETBase::XYZtoRPhiEta( const Double_t *xyz, Double_t *rpe ) {
#include "AliHLTLogging.h"
#include "TObject.h"
-enum GridIndex_t { kIdxPrimary, kIdxOutter, kIdxEtaPrimary, kIdxPhiPrimary, kIdxPhiOutter };
-enum EtaPhiIndex_t { kIdxEta, kIdxPhi, kIdxPt };
-enum TrackType_t { kTrackMC, kTrackESD, kTrackAOD };
+/** Indices in grid position array */
+enum GridIndex_t {
+ kIdxPrimary, /**< 1D index for the main search area */
+ kIdxOutter, /**< 1D index for the outter search area */
+ kIdxEtaPrimary, /**< 2D eta index for the main search area */
+ kIdxPhiPrimary, /**< 2D phi index for the main search area */
+ kIdxPhiOutter /**< 2D phi index for the outter search area */
+};
-/**
-XXXX STILL TRUE???
- Different type of how to add tracks to a jet
- 0 : check for radius compared to every track
- in selected cell -- default
- 1 : check for radius compared to center
- of selected cell
- 2 : take whole cell
-*/
-enum FinderType_t { kSquareCellRegion, kRadiusCellRegion, kRadius, kSquareArea };
+/** Indices in array */
+enum EtaPhiIndex_t {
+ kIdxEta, /**< Eta */
+ kIdxPhi, /**< Phi */
+ kIdxPt /**< Pt */
+};
+
+/** Used track types */
+enum TrackType_t {
+ kTrackMC, /**< TParticle */
+ kTrackESD, /**< AliESDtrack */
+ kTrackAOD /**< AliAODtrack */
+};
/**
* @class AliHLTJETBase
/** Destructor */
~AliHLTJETBase();
- // static Float_t GetDistance2( const Float_t eta1, const Float_t phi1,
- // const Float_t eta2, const Float_t phi2);
+ /** Types of jet algorithms */
+ enum JetAlgorithmType_t {
+ kAntiKt, /**< FastJet implementation of the Anti kt */
+ kKt, /**< FastJet implementation of the kt */
+ kFFSCSquareCell, /**< Fast Fixed Seeded Cone, using a square cell */
+ kFFSCRadiusCell, /**< Fast Fixed Seeded Cone, using a radius cell */
+ kJetAlgorithmMax /**< Number of enum entries */
+ };
+
+ /** Array of types of the Jet Algorithms */
+ static const Char_t *fgkJetAlgorithmType[]; //! transient
+
///////////////////////////////////////////////////////////////////////////////////
#if 0
- */
- static Int_t GetCellIndex( const Double_t* aEtaPhi, Int_t* aGridIndex );
- static void XYZtoRPhiEta( const Double_t *xyz, Double_t *rpe );
+static Float_t GetDistance2( const Float_t eta1, const Float_t phi1,
+ const Float_t eta2, const Float_t phi2);
- static void XYZEtoRPhiEtaPt( const Double_t *xyze, Double_t *rpep );
- static void XYZEtoRPhiEtaPt( const Float_t *xyze, Double_t *rpep );
+static Int_t GetCellIndex( const Double_t* aEtaPhi, Int_t* aGridIndex );
- static void XYZEtoEPhiEtaPt( const Double_t *xyze, Double_t *epep );
- static void XYZEtoEPhiEtaPt( const Float_t *xyze, Double_t *epep );
+static void XYZtoRPhiEta( const Double_t *xyz, Double_t *rpe );
- static Double_t GetPtFromXYZ( const Double_t *pxpypz );
- static Double_t GetPtFromXYZ( const Float_t *pxpypz );
+static void XYZEtoRPhiEtaPt( const Double_t *xyze, Double_t *rpep );
+static void XYZEtoRPhiEtaPt( const Float_t *xyze, Double_t *rpep );
- static Double_t GetPhiFromXYZ( const Double_t *xyz );
- static Double_t GetPhiFromXYZ( const Float_t *xyz );
+static void XYZEtoEPhiEtaPt( const Double_t *xyze, Double_t *epep );
+static void XYZEtoEPhiEtaPt( const Float_t *xyze, Double_t *epep );
- static Double_t GetEtaFromXYZ( const Double_t *xyz );
- static Double_t GetEtaFromXYZ( const Float_t *xyz );
+static Double_t GetPtFromXYZ( const Double_t *pxpypz );
+static Double_t GetPtFromXYZ( const Float_t *pxpypz );
+static Double_t GetPhiFromXYZ( const Double_t *xyz );
+static Double_t GetPhiFromXYZ( const Float_t *xyz );
+static Double_t GetEtaFromXYZ( const Double_t *xyz );
+static Double_t GetEtaFromXYZ( const Float_t *xyz );
#endif
+++ /dev/null
-//-*- Mode: C++ -*-
-// $Id: $
-
-//**************************************************************************
-//* This file is property of and copyright by the ALICE HLT Project *
-//* ALICE Experiment at CERN, All rights reserved. *
-//* *
-//* Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
-//* 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 AliHLTJETFastJetComponent.cxx
- @author Jochen Thaeder <thaeder@kip.uni-heidelberg.de>
- @date
- @brief Component to run the FastJet jetfinder
-*/
-
-#if __GNUC__>= 3
-using namespace std;
-#endif
-
-#include <cstdlib>
-#include <cerrno>
-#include <sys/time.h>
-
-#include "AliHLTJETFastJetComponent.h"
-
-#include "TString.h"
-#include "TObjString.h"
-
-/** ROOT macro for the implementation of ROOT specific class methods */
-ClassImp(AliHLTJETFastJetComponent)
-
-/*
- * ---------------------------------------------------------------------------------
- * Constructor / Destructor
- * ---------------------------------------------------------------------------------
- */
-
-// #################################################################################
-AliHLTJETFastJetComponent::AliHLTJETFastJetComponent()
- :
- fJetFinder(NULL),
- fJetHeader(NULL),
- fJetReader(NULL),
- fJetReaderHeader(NULL),
- fJetTrackCuts(NULL) {
- // see header file for class documentation
- // or
- // refer to README to build package
- // or
- // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-}
-
-// #################################################################################
-AliHLTJETFastJetComponent::~AliHLTJETFastJetComponent() {
- // see header file for class documentation
-}
-
-/*
- * ---------------------------------------------------------------------------------
- * Public functions to implement AliHLTComponent's interface.
- * These functions are required for the registration process
- * ---------------------------------------------------------------------------------
- */
-
-// #################################################################################
-const Char_t* AliHLTJETFastJetComponent::GetComponentID() {
- // see header file for class documentation
- return "JETFastJetFinder";
-}
-
-// #################################################################################
-void AliHLTJETFastJetComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
- // see header file for class documentation
- list.clear();
- list.push_back( kAliHLTDataTypeMCObject|kAliHLTDataOriginOffline );
- list.push_back( kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT );
- list.push_back( kAliHLTDataTypeESDObject|kAliHLTDataOriginOffline );
- list.push_back( kAliHLTDataTypeESDObject|kAliHLTDataOriginHLT );
-}
-
-// #################################################################################
-AliHLTComponentDataType AliHLTJETFastJetComponent::GetOutputDataType() {
- // see header file for class documentation
- return (kAliHLTDataTypeESDObject| kAliHLTDataOriginHLT);
-}
-
-// #################################################################################
-void AliHLTJETFastJetComponent::GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier ) {
- // see header file for class documentation
-
- constBase = 0;
- inputMultiplier = 0.3;
-}
-
-// #################################################################################
-AliHLTComponent* AliHLTJETFastJetComponent::Spawn() {
- // see header file for class documentation
- return new AliHLTJETFastJetComponent();
-}
-
-/*
- * ---------------------------------------------------------------------------------
- * Protected functions to implement AliHLTComponent's interface.
- * These functions provide initialization as well as the actual processing
- * capabilities of the component.
- * ---------------------------------------------------------------------------------
- */
-
-// #################################################################################
-Int_t AliHLTJETFastJetComponent::DoInit( Int_t /*argc*/, const Char_t** /*argv*/ ) {
- // see header file for class documentation
-
-#if 0
-
- if ( fJetFinder || fJetHeader || fJetReader || fJetReader || fJetTrackCuts)
- return -EINPROGRESS;
-
- // -- Jet Track Cuts
- // -------------------------------------------
- if ( ! (fJetTrackCuts = new AliHLTJETTrackCuts()) ) {
- HLTError("Error initializing Track Cuts");
- return -EINPROGRESS;
- }
-
- // fJetTrackCuts->Set ...
-
- // -- Jet Reader Header
- // -------------------------------------------
- if ( ! (fJetReaderHeader = new AliHLTJETReaderHeader()) ) {
- HLTError("Error initializing Jet Reader Header");
- return -EINPROGRESS;
- }
-
- fJetReaderHeader->SetAnalysisCuts( dynamic_cast<AliAnalysisCuts*>(fJetTrackCuts) );
-
- // -- Jet Reader
- // -------------------------------------------
- if ( ! (fJetReader = new AliHLTJETReader()) ) {
- HLTError("Error initializing Jet Reader");
- return -EINPROGRESS;
- }
-
- fJetReader->SetReaderHeader(fJetReaderHeader);
-
- // -- Jet Header
- // -------------------------------------------
- if ( ! (fJetHeader = new AliFastJetHeader()) ) {
- HLTError("Error initializing Jet Header");
- return -EINPROGRESS;
- }
-
- fJetHeader->SetRparam(0.7);
-
- // -- Jet Finder
- // -------------------------------------------
- if ( ! (fJetFinder = new AliFastJetFinder()) ) {
- HLTError("Error initializing Jet Finder");
- return -EINPROGRESS;
- }
-
- fJetFinder->SetJetHeader(fJetHeader);
- fJetFinder->SetJetReader(fJetReader);
- fJetFinder->SetOutputFile("jets.root");
-
- // -- Initialize Jet Finder
- // -------------------------------------------
- fJetFinder->Init();
-#endif
- return 0;
-}
-
-// #################################################################################
-Int_t AliHLTJETFastJetComponent::DoDeinit() {
- // see header file for class documentation
- /*
- if ( fJetFinder )
- delete fJetFinder;
- fJetFinder = NULL;
-
- if ( fJetHeader )
- delete fJetHeader;
- fJetHeader = NULL;
-
- if ( fJetReader )
- delete fJetReader;
- fJetReader = NULL;
-
- if ( fJetReaderHeader )
- delete fJetReaderHeader;
- fJetReaderHeader = NULL;
-
- if ( fJetTrackCuts )
- delete fJetTrackCuts;
- fJetTrackCuts = NULL;
-
-
- */
- return 0;
-}
-
-// #################################################################################
-Int_t AliHLTJETFastJetComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/,
- AliHLTComponentTriggerData& /*trigData*/ ) {
- // see header file for class documentation
-
- Int_t iResult = 0;
-#if 0
- const TObject* iter = NULL;
-
- // -- Start-Of-Run
- // -----------------
- if ( GetFirstInputObject(kAliHLTDataTypeSOR) && !iResult ) {
- HLTInfo("On-line SOR Event");
- }
-
- // -- ADD MC Object -- Off-line
- // ------------------------------
- for ( iter=GetFirstInputObject(kAliHLTDataTypeMCObject|kAliHLTDataOriginOffline); iter != NULL && !iResult; iter=GetNextInputObject() ) {
- HLTInfo("Off-line MC Event");
- }
- // -- ADD MC Object -- On-line
- // ------------------------------
- for ( iter=GetFirstInputObject(kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT); iter != NULL && !iResult; iter=GetNextInputObject() ) {
- HLTInfo("On-line MC Event");
-
- // -- Set input event
- fJetReader->SetInputEvent( NULL, NULL, const_cast<TObject*>(iter) );
-
- // -- Process one event
- if ( ! (fJetFinder->ProcessEvent()) )
- iResult = -1;
- }
-
- // -- ADD ESD Object -- Off-line
- // -------------------------------
- for ( iter=GetFirstInputObject(kAliHLTDataTypeESDObject|kAliHLTDataOriginOffline); iter != NULL && !iResult; iter=GetNextInputObject() ) {
- HLTInfo("Off-line ESD Event");
- }
-
- // -- ADD ESD Object -- On-line
- // ------------------------------
- for ( iter=GetFirstInputObject(kAliHLTDataTypeESDObject|kAliHLTDataOriginHLT); iter != NULL && !iResult; iter=GetNextInputObject() ) {
- HLTInfo("On-line ESD Event");
- }
-
- // -- End-Of-Run
- // ---------------
- if ( GetFirstInputObject(kAliHLTDataTypeEOR) && !iResult ) {
- HLTInfo("On-line EOR Event");
-
- // -- Finish Event ?
- // fJetFinder->FinishRun();
- }
-
- // -- PushBack
- // -------------
-#endif
- return iResult;
-}
return bResult;
}
-
-
-#if 0
-/*
-Int_t AliHLTJetFinder::CleanJetCandidates(){
- // see header file for class documentation
-
- Int_t iResult = 0;
-
- fJets->SortJets();
-
- Int_t nIntitalJetCandidates = fJets->GetNJets();
-
- for ( Int_t iter = 0; iter < nIntitalJetCandidates; iter++ ) {
-
- if ( ! fJets->IsJet( iter ) )
- continue;
-
- AliHLTJetFinderJetCandidate* jet = fJets->GetJet( iter );
-
- for ( Int_t compareIter = 0; compareIter < iter ; compareIter++ ) {
-
- if ( ! fJets->IsJet( compareIter ) )
- continue;
-
- if ( ! fJets->IsJet( iter ) )
- break;
-
-
- AliHLTJetFinderJetCandidate* compareJet = fJets->GetJet( compareIter );
-
- Double_t distance2 = AliHLTJetDefinitions::GetDistance2( jet->GetEta(), jet->GetPhi(),
- compareJet->GetEta(), compareJet->GetPhi() );
-
- // -- check if Jet is close to another one
- if ( distance2 > ( fDistanceCutJet*fDistanceCutJet) )
- continue;
-
- // -- one has to go
- if ( jet->GetPt() >= compareJet->GetPt() )
- fJets->RemoveJet( compareIter );
-
- else {
- fJets->RemoveJet( iter );
- break;
- }
-
- } // for ( Int_t compareIter = 0; compareIter < iter ; compareIter++ ) {
-
- } // for ( Int_t iter = 0; iter < fNJetCandidates; iter++ ) {
-
- fJets->CompressJets();
-
- return iResult;
-}
-
-*/
-#endif
-
/** Set cut on min pt */
void SetMinEt( Float_t f ) { fEtMin = f; }
+ /*
+ * ---------------------------------------------------------------------------------
+ * Getter
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Get cut on min pt */
+ Float_t GetMinEt() { return fEtMin; }
+
///////////////////////////////////////////////////////////////////////////////////
private:
/** Minimum Et */
Float_t fEtMin; // see above
-#if 0
- /** Distance between to jets */
- Float_t fDistanceCut;
-#endif
-
ClassDef(AliHLTJETJetCuts, 1)
};
#include "TLorentzVector.h"
#include "TParticle.h"
#include "TParticlePDG.h"
+#include "TDatabasePDG.h"
#include "AliHLTJETReader.h"
AliJetReader(),
fESD(NULL),
fMC(NULL),
+ fHLTMC(NULL),
fAOD(NULL),
#ifdef HAVE_FASTJET
- fMomentumVector( new vector<fastjet::PseudoJet> ),
+ fMomentumVector(NULL),
#endif
fGrid(NULL),
fNJetCandidates(0),
iResult = -EINPROGRESS;
}
- // -- Initialize grid
- // --------------------
- if ( ! iResult ) {
-
- if ( fGrid )
- delete fGrid;
-
- if ( ! (fGrid = new AliHLTJETConeGrid()) ) {
- HLTError("Error instanciating grid.");
- iResult = -EINPROGRESS;
- }
- }
-
- if ( ! iResult ) {
- fGrid->SetEtaRange( readerHeader->GetFiducialEtaMin(),
- readerHeader->GetFiducialEtaMax(),
- readerHeader->GetGridEtaRange() );
-
- fGrid->SetPhiRange( readerHeader->GetFiducialPhiMin(),
- readerHeader->GetFiducialPhiMax(),
- readerHeader->GetGridPhiRange() );
-
- fGrid->SetBinning( readerHeader->GetGridEtaBinning(),
- readerHeader->GetGridEtaBinning() );
-
- fGrid->SetConeRadius( readerHeader->GetConeRadius() );
-
- iResult = fGrid->Initialize();
- }
-
- // -- Initialize jet candidates
- // ------------------------------
- if ( ! iResult ) {
- fJetCandidates = new TClonesArray("AliHLTJETConeJetCandidate", 30);
- if ( ! fJetCandidates) {
- HLTError("Error instanciating jet candidates.");
- iResult = -EINPROGRESS;
- }
+ // -- Initialize Algorithms
+ // --------------------------
+ if ( readerHeader->GetJetAlgorithm() >= AliHLTJETBase::kFFSCSquareCell )
+ iResult = InitializeFFSC();
+ else {
+#ifdef HAVE_FASTJET
+ iResult = InitializeFastjet();
+#else
+ HLTError("Error FastJet not present.");
+ iResult = -EINPROGRESS;
+#endif
}
- // -- Initialize cuts
- // --------------------
+ // -- Get ptr to cuts from reader
+ // --------------------------------
// -- Seed cuts
if ( ! iResult ) {
HLTError("Error getting ptr to seed cuts.");
iResult = -EINPROGRESS;
}
- else {
- HLTInfo(" -= SeedCuts =- " );
- }
}
// -- Track cuts
void AliHLTJETReader::ResetEvent() {
// see header file for class documentation
- // -- clear grid
- fGrid->Reset();
-
- // -- clear jet candidates
- fJetCandidates->Clear();
+ // -- Reset FFSC algorithms
+ // --------------------------
+ if ( GetReaderHeader()->GetJetAlgorithm() >= AliHLTJETBase::kFFSCSquareCell ) {
+ // -- clear grid
+ fGrid->Reset();
+
+ // -- clear jet candidates
+ fJetCandidates->Clear();
+
+ fNJetCandidates = 0;
+ }
- fNJetCandidates = 0;
+ // -- Reset for FastJet algorithms
+ // ---------------------------------
+ else {
+ // -- Clear input vector
+ if ( fMomentumVector )
+ fMomentumVector->clear();
+ }
return;
}
+/*
+ * ---------------------------------------------------------------------------------
+ * Setter
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+void AliHLTJETReader::SetInputEvent(const TObject* esd, const TObject* aod, const TObject* mc) {
+ // see header file for class documentation
+
+ // Needs "useMC" flag for running in analysis task only
+
+ AliHLTJETReaderHeader* readerHeader = GetReaderHeader();
+
+ // -- Fill ESD
+ if ( esd && !readerHeader->GetUseMC() )
+ fESD = dynamic_cast<AliESDEvent*> (const_cast<TObject*>(esd));
+
+ // -- Fill AOD
+ else if ( aod && !readerHeader->GetUseMC() )
+ fAOD = dynamic_cast<AliAODEvent*> (const_cast<TObject*>(aod));
+
+ // -- Fill MC
+ else if ( mc && readerHeader->GetUseMC() ) {
+
+ // -- if off-line MC event,
+ if ( !strcmp (mc->ClassName(),"AliMCEvent") )
+ fMC = dynamic_cast<AliMCEvent*> (const_cast<TObject*>(mc));
+ // -- if on-line MC event
+ else
+ fHLTMC = dynamic_cast<AliHLTMCEvent*> (const_cast<TObject*>(mc));
+ }
+
+ return;
+}
+
/*
* ---------------------------------------------------------------------------------
* Fastjet Reader functionality
*/
#ifdef HAVE_FASTJET
// #################################################################################
-Bool_t AliHLTJETReader::FillMomentumArrayFast() {
+Bool_t AliHLTJETReader::FillVector() {
// see header file for class documentation
Bool_t bResult = kFALSE;
if ( fESD )
- bResult = FillMomentumArrayFastESD();
+ bResult = FillVectorESD();
else if ( fMC )
- bResult = FillMomentumArrayFastMC();
+ bResult = FillVectorMC();
+ else if ( fHLTMC )
+ bResult = FillVectorHLTMC();
else if ( fAOD )
- bResult = FillMomentumArrayFastAOD();
+ bResult = FillVectorAOD();
return bResult;
}
// #################################################################################
-Bool_t AliHLTJETReader::FillMomentumArrayFastMC() {
+Bool_t AliHLTJETReader::FillVectorMC() {
// see header file for class documentation
+ Bool_t bResult = kTRUE;
+
if ( ! fMC ) {
HLTError( "No MC Event present!" );
return kFALSE;
}
+
+ // -- Reset Event
+ ResetEvent();
+
+ Int_t nTracks = 0;
+
+ AliStack* stack = fMC->Stack();
+
+ for (Int_t iterStack = 0; iterStack < stack->GetNtrack() && bResult; iterStack++) {
+
+ TParticle *particle = stack->Particle(iterStack);
+ if ( !particle) {
+ HLTError( "Error reading particle %i out of %i", iterStack, stack->GetNtrack() );
+ bResult = kFALSE;
+ continue;
+ }
+
+ // ------------------------------
+ // -- Basic cuts on MC particle --> To be done better XXX
+ // ------------------------------
+
+ // -- primary
+ if ( !(stack->IsPhysicalPrimary(iterStack)) )
+ continue;
+
+ // -- final state
+ if ( particle->GetNDaughters() != 0 )
+ continue;
+
+ // -- particle in DB
+ TParticlePDG * particlePDG = particle->GetPDG();
+ if ( ! particlePDG ) {
+ particlePDG = TDatabasePDG::Instance()->GetParticle( particle->GetPdgCode() );
+
+ if ( ! particlePDG ) {
+ HLTError("Particle %i not in PDG database", particle->GetPdgCode() );
+ bResult = kFALSE;
+ continue;
+ }
+ }
+
+ // ------------------------
+ // -- Standard track cuts
+ // ------------------------
+
+ // -- Apply track cuts
+ if ( ! fTrackCuts->IsSelected(particle) )
+ continue;
+
+ // -- Create PseudoJet object
+ fastjet::PseudoJet part( particle->Px(), particle->Py(),
+ particle->Pz(), particle->Energy() );
+
+ // -- label the particle into Fastjet algortihm
+ part.set_user_index( iterStack );
+
+ // -- Add to input_particles vector
+ fMomentumVector->push_back(part);
+
+ nTracks++;
+ } // for (Int_t iterStack = 0; iterStack < stack->GetNtrack() && !bResult; iterStack++) {
+
+ HLTDebug(" Number of selected tracks %d", nTracks);
+
+ return kTRUE;
+}
+
+// #################################################################################
+Bool_t AliHLTJETReader::FillVectorHLTMC() {
+ // see header file for class documentation
+
+ if ( ! fHLTMC ) {
+ HLTError( "No HLT MC Event present!" );
+ return kFALSE;
+ }
+
+ // -- Reset Event
+ ResetEvent();
- // -- Clear input vector
- if ( fMomentumVector )
- fMomentumVector->clear();
-
Int_t nTracks = 0;
TParticle* particle = NULL;
// -- Loop over particles
// ------------------------
- while ( (particle = fMC->NextParticle() ) ) {
+ while ( (particle = fHLTMC->NextParticle() ) ) {
- // -- Apply cuts
+ // -- Apply track cuts
if ( ! fTrackCuts->IsSelected(particle) )
continue;
particle->Pz(), particle->Energy() );
// -- label the particle into Fastjet algortihm
- part.set_user_index( fMC->GetIndex() );
+ part.set_user_index( fHLTMC->GetIndex() );
// -- Add to input_particles vector
fMomentumVector->push_back(part);
nTracks++;
- } // while ( (particle = fMC->NextParticle() ) ) {
+ } // while ( (particle = fHLTMC->NextParticle() ) ) {
- HLTInfo(" Number of selected tracks %d \n", nTracks);
+ HLTInfo(" Number of selected tracks %d", nTracks);
return kTRUE;
}
// #################################################################################
-Bool_t AliHLTJETReader::FillMomentumArrayFastESD() {
+Bool_t AliHLTJETReader::FillVectorESD() {
// see header file for class documentation
- return kTRUE;
+ Bool_t bResult = kTRUE;
+
+ if ( ! fESD ) {
+ HLTError( "No ESD Event present!" );
+ return kFALSE;
+ }
+
+ // -- Reset Event
+ ResetEvent();
+
+ Int_t nTracks = 0;
+
+ // -- Loop over particles
+ // ------------------------
+ for ( Int_t iter = 0; iter < fESD->GetNumberOfTracks() && bResult; iter++ ) {
+
+ AliESDtrack* esdTrack = fESD->GetTrack(iter);
+ if ( ! esdTrack ) {
+ HLTError("Could not read ESD track %d from %d", iter, fESD->GetNumberOfTracks() );
+ bResult = kFALSE;
+ continue;
+ }
+
+ // -- Apply track cuts
+ if ( ! fTrackCuts->IsSelected(esdTrack) )
+ continue;
+
+ // -- Create PseudoJet object
+ fastjet::PseudoJet part( esdTrack->Px(), esdTrack->Py(),
+ esdTrack->Pz(), esdTrack->E() );
+
+ // -- label the particle into Fastjet algortihm
+ part.set_user_index( iter );
+
+ // -- Add to input_particles vector
+ fMomentumVector->push_back(part);
+
+ nTracks++;
+
+ } // for ( Int_t iter = 0; iter < fESD->GetNumberOfTracks() && !iResult; iter++ ) {
+
+ HLTInfo(" Number of selected tracks %d", nTracks);
+
+
+ return bResult;
}
// #################################################################################
-Bool_t AliHLTJETReader::FillMomentumArrayFastAOD() {
+Bool_t AliHLTJETReader::FillVectorAOD() {
// see header file for class documentation
return kFALSE;
bResult = FillGridESD();
else if ( fMC )
bResult = FillGridMC();
+ else if ( fHLTMC )
+ bResult = FillGridHLTMC();
else if ( fAOD )
bResult = FillGridAOD();
-
+
return bResult;
}
Bool_t AliHLTJETReader::FillGridMC() {
// see header file for class documentation
+ Bool_t bResult = kTRUE;
+
if ( ! fMC ) {
HLTError( "No MC Event present!" );
return kFALSE;
}
+ // -- Reset Event
+ ResetEvent();
+
+ AliHLTJETReaderHeader* readerHeader = GetReaderHeader();
+
+ Int_t nTracks = 0;
+
+ AliStack* stack = fMC->Stack();
+
+ for (Int_t iterStack = 0; iterStack < stack->GetNtrack() && bResult; iterStack++) {
+
+ TParticle *particle = stack->Particle(iterStack);
+ if ( !particle) {
+ HLTError( "Error reading particle %i out of %i", iterStack, stack->GetNtrack() );
+ bResult = kFALSE;
+ continue;
+ }
+
+ // ------------------------------
+ // -- Basic cuts on MC particle --> To be done better XXX
+ // ------------------------------
+
+ // -- primary
+ if ( !(stack->IsPhysicalPrimary(iterStack)) )
+ continue;
+
+ // -- final state
+ if ( particle->GetNDaughters() != 0 )
+ continue;
+
+ // -- particle in DB
+ TParticlePDG * particlePDG = particle->GetPDG();
+ if ( ! particlePDG ) {
+ particlePDG = TDatabasePDG::Instance()->GetParticle( particle->GetPdgCode() );
+
+ if ( ! particlePDG ) {
+ HLTError("Particle %i not in PDG database", particle->GetPdgCode() );
+ bResult = kFALSE;
+ continue;
+ }
+ }
+
+ // ------------------------
+ // -- Standard track cuts
+ // ------------------------
+
+ // -- Apply track cuts
+ if ( ! fTrackCuts->IsSelected(particle) )
+ continue;
+
+ const Float_t aEtaPhi[] = { particle->Eta(), particle->Phi(), particle->Pt() };
+ Int_t aGridIdx[] = { -1, -1, -1, -1, -1 };
+
+ fGrid->FillTrack(particle, aEtaPhi, aGridIdx);
+
+ nTracks++;
+
+ // -- Apply seed cuts
+ if ( ! fSeedCuts->IsSelected(particle) )
+ continue;
+
+ // -- Add Seed
+ AddSeed(aEtaPhi, const_cast<const Int_t*> (aGridIdx), readerHeader->GetConeRadius());
+
+ } // for (Int_t iterStack = 0; iterStack < stack->GetNtrack() && !bResult; iterStack++) {
+
+ HLTInfo(" Number of selected tracks %d", nTracks);
+ HLTInfo(" Number of seeds %d", fNJetCandidates);
+
+ return kTRUE;
+}
+
+// #################################################################################
+Bool_t AliHLTJETReader::FillGridHLTMC() {
+ // see header file for class documentation
+
+ if ( ! fHLTMC ) {
+ HLTError( "No HLT MC Event present!" );
+ return kFALSE;
+ }
+
+ // -- Reset Event
+ ResetEvent();
+
AliHLTJETReaderHeader* readerHeader = GetReaderHeader();
Int_t nTracks = 0;
// -- Loop over particles
// ------------------------
- while ( ( particle = fMC->NextParticle() ) ) {
+ while ( ( particle = fHLTMC->NextParticle() ) ) {
+ // HLTError("=== nTracks %d ===",nTracks);
+
// -- Apply track cuts
if ( ! fTrackCuts->IsSelected(particle) )
continue;
const Float_t aEtaPhi[] = { particle->Eta(), particle->Phi(), particle->Pt() };
Int_t aGridIdx[] = { -1, -1, -1, -1, -1 };
+ // -- Fill grid
fGrid->FillTrack(particle, aEtaPhi, aGridIdx);
nTracks++;
AddSeed(aEtaPhi, const_cast<const Int_t*> (aGridIdx),
readerHeader->GetConeRadius());
- } // while ( (particle = fMC->NextParticle() ) ) {
+ } // while ( (particle = fHLTMC->NextParticle() ) ) {
- HLTDebug(" Number of selected tracks %d", nTracks);
- HLTDebug(" Number of seeds %d", fNJetCandidates);
+ HLTInfo(" Number of selected tracks %d", nTracks);
+ HLTInfo(" Number of seeds %d", fNJetCandidates);
return kTRUE;
}
return kFALSE;
}
+ // -- Reset Event
+ ResetEvent();
+
AliHLTJETReaderHeader* readerHeader = GetReaderHeader();
Int_t nTracks = 0;
AliESDtrack* esdTrack = fESD->GetTrack(iter);
if ( ! esdTrack ) {
- HLTError("Could not read ESD track %d from %d\n", iter, fESD->GetNumberOfTracks() );
+ HLTError("Could not read ESD track %d from %d", iter, fESD->GetNumberOfTracks() );
bResult = kFALSE;
continue;
}
Int_t aGridIdx[] = { -1, -1, -1, -1, -1 };
// -- Fill grid
- fGrid->FillTrack(esdTrack, aEtaPhi, aGridIdx);
+ fGrid->FillTrack(esdTrack, aEtaPhi, aGridIdx);
nTracks++;
} // for ( Int_t iter = 0; iter < fESD->GetNumberOfTracks() && !iResult; iter++ ) {
- HLTDebug(" Number of selected tracks %d", nTracks);
- HLTDebug(" Number of seeds %d", fNJetCandidates);
+ HLTInfo(" Number of selected tracks %d", nTracks);
+ HLTInfo(" Number of seeds %d", fNJetCandidates);
return bResult;
}
return kFALSE;
}
-/*
- * ---------------------------------------------------------------------------------
- * Setter
- * ---------------------------------------------------------------------------------
- */
-
-// #################################################################################
-void AliHLTJETReader::SetInputEvent(TObject* esd, TObject* aod, TObject* mc) {
- // see header file for class documentation
-
- if ( esd )
- fESD = dynamic_cast<AliESDEvent*> (esd);
- else if ( aod )
- fAOD = dynamic_cast<AliAODEvent*> (aod);
- else if ( mc )
- fMC = dynamic_cast<AliHLTMCEvent*> (mc);
-
- return;
-}
-
/*
* ---------------------------------------------------------------------------------
* Seeds
const Float_t coneRadius ) {
// see header file for class documentation
- Bool_t useWholeCell = kTRUE ; // XXXXXXXXXXXXXXXXx get reader header finder type balhh
- useWholeCell = kFALSE ;
- // -- Add track / particle
+ Bool_t useWholeCell = kTRUE;
+ if ( GetReaderHeader()->GetJetAlgorithm() == AliHLTJETBase::kFFSCRadiusCell )
+ useWholeCell = kFALSE ;
+
+ // -- Add track / particle
new( (*fJetCandidates) [fNJetCandidates] ) AliHLTJETConeJetCandidate( aEtaPhi,
aGridIdx,
coneRadius,
fNJetCandidates++;
HLTDebug("Added Seed Pt=%f, Eta=%f, Phi=%f", aEtaPhi[kIdxPt],
- aEtaPhi[kIdxEta], aEtaPhi[kIdxPhi] );
+ aEtaPhi[kIdxEta], aEtaPhi[kIdxPhi] );
return;
}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Initialize - private
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTJETReader::InitializeFFSC() {
+ // see header file for class documentation
+
+ Int_t iResult = 0;
+ AliHLTJETReaderHeader* readerHeader = GetReaderHeader();
+
+ // -- Initialize grid
+ // --------------------
+ if ( fGrid )
+ delete fGrid;
+
+ if ( ! (fGrid = new AliHLTJETConeGrid()) ) {
+ HLTError("Error instanciating grid.");
+ iResult = -EINPROGRESS;
+ }
+
+ if ( ! iResult ) {
+ fGrid->SetEtaRange( readerHeader->GetFiducialEtaMin(),
+ readerHeader->GetFiducialEtaMax(),
+ readerHeader->GetGridEtaRange() );
+
+ fGrid->SetPhiRange( readerHeader->GetFiducialPhiMin(),
+ readerHeader->GetFiducialPhiMax(),
+ readerHeader->GetGridPhiRange() );
+
+ fGrid->SetBinning( readerHeader->GetGridEtaBinning(),
+ readerHeader->GetGridEtaBinning() );
+
+ fGrid->SetConeRadius( readerHeader->GetConeRadius() );
+
+ iResult = fGrid->Initialize();
+ }
+
+ // -- Initialize jet candidates
+ // ------------------------------
+ if ( ! iResult ) {
+ fJetCandidates = new TClonesArray("AliHLTJETConeJetCandidate", 30);
+ if ( ! fJetCandidates) {
+ HLTError("Error instanciating jet candidates.");
+ iResult = -EINPROGRESS;
+ }
+ }
+
+ return iResult;
+}
+
+#ifdef HAVE_FASTJET
+// #################################################################################
+Int_t AliHLTJETReader::InitializeFastjet() {
+ // see header file for class documentation
+
+ Int_t iResult = 0;
+
+ // -- Initialize Vector
+ // ----------------------
+ if ( fMomentumVector )
+ delete fMomentumVector;
+
+ if ( ! (fMomentumVector = new vector<fastjet::PseudoJet>) ) {
+ HLTError("Error instanciating momentum vector.");
+ iResult = -EINPROGRESS;
+ }
+
+ return iResult;
+}
+#endif
#include "AliESDEvent.h"
#include "AliAODEvent.h"
-
#include "AliHLTLogging.h"
#include "AliHLTMCEvent.h"
/**
* @class AliHLTJETReader
- * Reader for jet finder
+ * This class is the reader class for the JetFinder in the HLT
+ * It implements the reading of ESDs and MCs. AOD reading is
+ * not yet implemented
+ * <br>
+ * Usage :<br>
+ * - Initilize() // Initializes the reader dependent of the algorithm
*
* @ingroup alihlt_jet
*/
* ---------------------------------------------------------------------------------
*/
-
- void SetTrackCuts( AliHLTJETTrackCuts * cuts) {fTrackCuts = cuts; }
-
- /** Initialize reader for cone jet finder
+ /** Initialize reader
* Calls AliHLTJETReaderHeader::Initialize
+ * and the private Initialize methods
* @return 0 on success, otherwise <0
*/
Int_t Initialize();
/** Reset the event */
void ResetEvent();
+ /*
+ * ---------------------------------------------------------------------------------
+ * Setter
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Set pointer to input event
+ * Needs "useMC" flag for running in analysis task only
+ * @param esd an AliESDEvent
+ * @param aod an AliAODEvent
+ * @param mc an AliHLTMCEvent
+ */
+ void SetInputEvent(const TObject* esd, const TObject* aod, const TObject* mc);
+
+ /** Set number of jet candates = seeds */
+ void SetNJetCandidates( Int_t i ) { fNJetCandidates = i; }
+
/*
* ---------------------------------------------------------------------------------
* Fastjet Reader functionality
/** Fill tracks in fastjet momemtum vector
* @return kTRUE on success, otherwise kFALSE
*/
- Bool_t FillMomentumArrayFast();
+ Bool_t FillVector();
/** Fill MC tracks in fastjet momemtum vector
* @return kTRUE on success, otherwise kFALSE
*/
- Bool_t FillMomentumArrayFastMC();
+ Bool_t FillVectorMC();
+
+ /** Fill HLT MC tracks in fastjet momemtum vector
+ * @return kTRUE on success, otherwise kFALSE
+ */
+ Bool_t FillVectorHLTMC();
/** Fill ESD tracks in fastjet momemtum vector
* @return kTRUE on success, otherwise kFALSE
*/
- Bool_t FillMomentumArrayFastESD();
+ Bool_t FillVectorESD();
/** Fill AOD tracks in fastjet momemtum vector
* @return kTRUE on success, otherwise kFALSE
*/
- Bool_t FillMomentumArrayFastAOD();
+ Bool_t FillVectorAOD();
#endif
/*
*/
Bool_t FillGridMC();
+ /** Fill HLT MC tracks in momentum array
+ * @return kTRUE on success, otherwise kFALSE
+ */
+ Bool_t FillGridHLTMC();
+
/** Fill ESD tracks in momentum array
* @return kTRUE on success, otherwise kFALSE
*/
*/
Bool_t FillGridAOD();
- /*
- * ---------------------------------------------------------------------------------
- * Setter
- * ---------------------------------------------------------------------------------
- */
-
- /** Set pointer to input event
- * @param esd an AliESDEvent
- * @param aod an AliAODEvent
- * @param mc an AliHLTMCEvent
- */
- void SetInputEvent(TObject* esd, TObject* aod, TObject* mc);
-
- /** Set number of jet candates = seeds */
- void SetNJetCandidates( Int_t i ) { fNJetCandidates = i; }
-
/*
* ---------------------------------------------------------------------------------
* Getter
/** Get Ptr to AliHLTJETReaderHeader
* @return ptr to AliHLTJETReaderHeader
*/
- AliHLTJETReaderHeader* GetReaderHeader() { return dynamic_cast<AliHLTJETReaderHeader*>(fReaderHeader);}
+ AliHLTJETReaderHeader* GetReaderHeader() { return dynamic_cast<AliHLTJETReaderHeader*>(fReaderHeader);}
#ifdef HAVE_FASTJET
/** Get Ptr to input vector of Fastjet
* @return ptr to input vector of Fastjet
*/
- vector<fastjet::PseudoJet>* GetMomentumVectorFast() { return fMomentumVector; }
+ vector<fastjet::PseudoJet>* GetVector() { return fMomentumVector; }
#endif
/** Get Ptr to grid of cone finder
* @return ptr to grid of cone finder
*/
- AliHLTJETConeGrid* GetGrid() { return fGrid; }
-
+ AliHLTJETConeGrid* GetGrid() { return fGrid; }
+
/** Get number of jet candates = seeds */
- Int_t GetNJetCandidates() { return fNJetCandidates; }
+ Int_t GetNJetCandidates() { return fNJetCandidates; }
/** Get ptr to jet candiates = seeds for cone finder */
- TClonesArray* GetJetCandidates() { return fJetCandidates; }
+ TClonesArray* GetJetCandidates() { return fJetCandidates; }
/*
* ---------------------------------------------------------------------------------
/** assignment operator prohibited */
AliHLTJETReader& operator= (const AliHLTJETReader&);
+ /*
+ * ---------------------------------------------------------------------------------
+ * Initialize - private
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Initialize reader for the FFSC cone jet finder
+ * @return 0 on success, otherwise <0
+ */
+ Int_t InitializeFFSC();
+
+#ifdef HAVE_FASTJET
+ /** Initialize reader for the fastjet jet finders
+ * @return 0 on success, otherwise <0
+ */
+ Int_t InitializeFastjet();
+#endif
+
/*
* ---------------------------------------------------------------------------------
* Members - private
* ---------------------------------------------------------------------------------
*/
+ // -- Input
+ // ----------
+
/** ESD event */
AliESDEvent *fESD; //! transient
- /** MC event */
- AliHLTMCEvent *fMC; //! transient
+ /** off-line MC event */
+ AliMCEvent *fMC; //! transient
+
+ /** on-line MC event */
+ AliHLTMCEvent *fHLTMC; //! transient
/** AOD event */
AliAODEvent *fAOD; //! transient
+ // -- Particle structures
+ // ------------------------
+
#ifdef HAVE_FASTJET
/** Vector of fastjet momemtum entries */
vector<fastjet::PseudoJet> *fMomentumVector; //! transient
/** Grid for cone finder */
AliHLTJETConeGrid *fGrid; //! transient
+ // -- Output
+ // -----------
+
/** Number of jet candates = seeds */
Int_t fNJetCandidates; // see above
/** Jet candiates = seeds for cone finder */
TClonesArray *fJetCandidates; //! transient
+ // -- Cuts
+ // ---------
+
/** Ptr to seed cuts */
AliHLTJETConeSeedCuts *fSeedCuts; //! transient
fGridPhiBinning(0.0),
fGridEtaRange(0.0),
fGridPhiRange(0.0),
- fConeRadius(0.0) {
+ fAlgorithm(AliHLTJETBase::kFFSCSquareCell),
+ fConeRadius(0.0),
+ fUseMC(kFALSE) {
// see header file for class documentation
// or
// refer to README to build package
HLTInfo(" Grid phi binning %f", fGridPhiBinning );
HLTInfo(" Grid eta range %f", fGridEtaRange );
HLTInfo(" Grid phi range %f", fGridPhiRange );
+ HLTInfo(" Algorithm %s", AliHLTJETBase::fgkJetAlgorithmType[fAlgorithm] );
+
+ if (fUseMC) { HLTInfo(" Use Kinematics TRUE"); }
+ else { HLTInfo( " Use Kinematics FALSE"); }
if ( ! fTrackCuts ) {
HLTError("No track cuts set in reader header");
HLTInfo(" -= TrackCuts =- " );
}
+ if ( ! fSeedCuts ) {
+ HLTError("No seed cuts set in reader header");
+ iResult = -EINPROGRESS;
+ }
+ else {
+ fSeedCuts->SetEtaRange( fFiducialEtaMin+fConeRadius,
+ fFiducialEtaMax-fConeRadius );
+ fSeedCuts->SetPhiRange( fFiducialPhiMin, fFiducialPhiMax );
+ HLTInfo(" -= SeedCuts =- " );
+ }
+
return iResult;
}
* ---------------------------------------------------------------------------------
*/
- /** Initialize reader haeder for cone jet finder
+ /** Initialize reader header for cone jet finder
* @return 0 on success, otherwise <0
*/
Int_t Initialize();
/** Set grid binning in phi */
void SetGridPhiBinning( Float_t f ) { fGridPhiBinning = f; }
+ /** Set algorithm type */
+ void SetJetAlgorithm( AliHLTJETBase::JetAlgorithmType_t a ) { fAlgorithm = a; }
+
+ /** Set Usage of Kinematics */
+ void SetUseMC( Bool_t b ) { fUseMC = b; }
+
/*
* ---------------------------------------------------------------------------------
* Getter
/** Get cone radius */
Float_t GetConeRadius() { return fConeRadius; }
+ /** Get algorithm type */
+ AliHLTJETBase::JetAlgorithmType_t GetJetAlgorithm() { return fAlgorithm; }
+
+ /** Get Usage of Kinematics */
+ Bool_t GetUseMC() { return fUseMC; }
+
///////////////////////////////////////////////////////////////////////////////////
private:
*/
Float_t fGridPhiRange; // see above
- // -- cone members
+ // -- Algorithm members
+
+ /** Algorithm */
+ AliHLTJETBase::JetAlgorithmType_t fAlgorithm; // see above
/** Cone radius */
Float_t fConeRadius; // see above
+
+ /** Use MC Data -- only neede for off-line*/
+ Bool_t fUseMC; // see above
ClassDef(AliHLTJETReaderHeader, 1)
// see header file for class documentation
Bool_t bResult = kTRUE;
-
+
if ( ! strcmp(obj->ClassName(),"TParticle") )
bResult = IsSelected( dynamic_cast<TParticle*> (obj));
else if ( ! strcmp(obj->ClassName(),"AliESDtrack") )
if ( ( esdTrack->Eta() < fEtaMin ) || ( esdTrack->Eta() > fEtaMax ) )
bResult = kFALSE;
- cout << esdTrack->Phi() << endl;
-
// -- cut on phi acceptance
if ( ( esdTrack->Phi() < fPhiMin ) || ( esdTrack->Phi() > fPhiMax ) )
bResult = kFALSE;
void AliHLTJETConeFinder::Reset() {
// see header file for class documentation
- // -- Reset reader
- (dynamic_cast<AliHLTJETReader*> (fReader))->ResetEvent();
-
// -- Reset output container
if (fJets)
fJets->Reset();
return;
}
-
/*
* ---------------------------------------------------------------------------------
* Process
}
// #################################################################################
-Bool_t AliHLTJETConeFinder::ProcessConeEvent() {
+Bool_t AliHLTJETConeFinder::ProcessHLTEvent() {
// see header file for class documentation
+ // -- Reset
+ Reset();
+
// -- Find Leading
if ( FindConeLeading() ) {
HLTError("Error finding leading.");
// -- Pick up jet canidates
TClonesArray* jetCandidates = reader->GetJetCandidates();
-
+
// -- Check for more than 1 jet candidate
if ( reader->GetNJetCandidates() > 1 ) {
// -- Resize the seed TClonesArray
jetCandidates->Compress();
-
+
return 0;
}
} // for ( Int_t iter = 0; iter < reader->GetNJetCandidates(); iter++ ) {
- HLTDebug( "Added %d jets", fJets->GetNAODJets());
+ // xxx HLTDebug( "Added %d jets", fJets->GetNAODJets());
+ HLTInfo( "Added %d jets", fJets->GetNAODJets());
return iResult;
}
* <pre>jetFinder->Init();</pre>
* * Set the input event via the reader
* <pre>jetReader->SetInputEvent( ... )</pre>
- * * Process one event
+ * * Process one event (contains reset per event)
* <pre>jetFinder->ProcessEvent();</pre>
- *
+ *
* <b>Usage in on-line</b><br>
* * Initialization phase :
* <pre>jetFinder->Initialize();</pre>
- * * Reset
- <pre>jetFinder->Reset();</pre>
* * Set the input event via the reader
* <pre>jetReader->SetInputEvent( ... )</pre>
- * * Process one event
- * <pre>jetReader->FillGridXXX();</pre>
- * Where XXX is has to be replaced by MC, ESD or AOD, depending
- * on the input object
- * <pre>jetFinder->ProcessConeEvent();</pre>
+ * * Process one event
+ * * Fill grid (contains reset per event)
+ * <pre>jetReader->FillGridXXX();</pre>
+ * Where XXX is has to be replaced by MC, ESD or AOD,
+ * depending, on the input object
+ * * Process one event (contains reset per event)
+ * <pre>jetFinder->ProcessConeEvent();</pre>
*
* @ingroup alihlt_jet_cone
*/
/** Process one event
* @return kTRUE on success, kFALSE on failure
*/
- Bool_t ProcessConeEvent();
-
- /** Find jets in one event
- * ONLY for use in off-line ... it inherits from a virtual void ?!?!
- */
- void FindJets() { FindConeJets(); }
+ Bool_t ProcessHLTEvent();
///////////////////////////////////////////////////////////////////////////////////
/** Grid for cone finder */
AliHLTJETConeGrid *fGrid; //! transient
+ /** Container of AliAODJets */
AliHLTJets *fJets; //! transient
ClassDef(AliHLTJETConeFinder, 1)
void SetJetCuts( AliHLTJETJetCuts* cuts ) { fJetCuts = cuts; }
/** Set flag to use only leading seed */
- void SetUseLeading( Bool_t b ) { fUseLeading = b; }
+ void SetUseLeading( Bool_t b ) { fUseLeading = b; }
/*
* ---------------------------------------------------------------------------------
/** Get flag to use only leading seed
* @return if kTRUE, only leading seed is used
*/
- Bool_t GetUseLeading() { return fUseLeading; }
+ Bool_t GetUseLeading() { return fUseLeading; }
///////////////////////////////////////////////////////////////////////////////////
/** if kTRUE, only leading seed is used */
Bool_t fUseLeading; // see above
- /*
- Int_t fgFinderType;
- */
-
ClassDef(AliHLTJETConeHeader, 1)
};
#include "TString.h"
#include "TObjString.h"
-#include "AliAODJet.h"
-
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTJETConeJetComponent)
// -- Defaults
// ---------------------------------------------------------------------
+ TString comment = "HLT Fast Fixed Seeded Cone finder ";
+
+ AliHLTJETBase::JetAlgorithmType_t algorithm = AliHLTJETBase::kFFSCSquareCell;
+ Bool_t leading = kFALSE;
Float_t coneRadius = 0.4;
Float_t trackCutMinPt = 1.0;
Float_t seedCutMinPt = 5.0;
// -- Get Arguments
// ---------------------------------------------------------------------
- TString comment;
-
Int_t iResult = 0;
Int_t bMissingParam=0;
if (argument.IsNull())
continue;
+ // -- algorithm
+ if ( !argument.CompareTo("-algorithm") ) {
+ if ((bMissingParam=(++iter>=argc))) break;
+
+ TString parameter(argv[iter]);
+ parameter.Remove(TString::kLeading, ' ');
+
+ if ( !parameter.CompareTo("FSCSquareCell") ) {
+ algorithm = AliHLTJETBase::kFFSCSquareCell;
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else if ( !parameter.CompareTo("FSCRadiusCell") ) {
+ algorithm = AliHLTJETBase::kFFSCRadiusCell;
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else {
+ HLTError("Wrong parameter %s for argument %s.", parameter.Data(), argument.Data());
+ iResult=-EINVAL;
+ }
+ }
+
+ // -- leading
+ else if ( !argument.CompareTo("-leading") ) {
+ if ((bMissingParam=(++iter>=argc))) break;
+
+ TString parameter(argv[iter]);
+ parameter.Remove(TString::kLeading, ' ');
+
+ if ( !parameter.CompareTo("0") ) {
+ leading = kFALSE;
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else if ( !parameter.CompareTo("1") ) {
+ leading = kTRUE;
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else {
+ HLTError("Wrong parameter %s for argument %s.", parameter.Data(), argument.Data());
+ iResult=-EINVAL;
+ }
+ }
+
// -- coneRadius
- if ( !argument.CompareTo("-coneRadius") ) {
+ else if ( !argument.CompareTo("-coneRadius") ) {
if ((bMissingParam=(++iter>=argc))) break;
TString parameter(argv[iter]);
if (iResult)
return iResult;
-
// ---------------------------------------------------------------------
// -- Jet Track Cuts
// ---------------------------------------------------------------------
return -EINPROGRESS;
}
- // Set pt cut
fSeedCuts->SetMinPt( seedCutMinPt );
- // Set Eta min/max and Phi min/max
- fSeedCuts->SetEtaRange( (-0.9+coneRadius), (0.9-coneRadius) );
- fSeedCuts->SetPhiRange( 0.0, TMath::TwoPi() );
-
// ---------------------------------------------------------------------
// -- Jet Jet Cuts
// ---------------------------------------------------------------------
return -EINPROGRESS;
}
- // Set pt cut
fJetCuts->SetMinEt( jetCutMinEt );
// ---------------------------------------------------------------------
HLTError("Error instantiating jet reader header");
return -EINPROGRESS;
}
+
+ // Set Algorithm
+ fJetReaderHeader->SetJetAlgorithm( algorithm );
// Set prt to track cuts
fJetReaderHeader->SetTrackCuts( fTrackCuts );
return -EINPROGRESS;
}
- // Set reader header
fJetReader->SetReaderHeader(fJetReaderHeader);
// ---------------------------------------------------------------------
HLTError("Error instantiating cone jet header");
return -EINPROGRESS;
}
+
fJetHeader->SetJetCuts(fJetCuts);
- fJetHeader->SetUseLeading(kTRUE);
+ fJetHeader->SetUseLeading(leading);
// ---------------------------------------------------------------------
// -- Jet Finder
for ( iter=GetFirstInputObject(kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT);
iter != NULL && !iResult; iter=GetNextInputObject() ) {
- // -- Reset
- fJetFinder->Reset();
-
+ // -- Set automatic MC usage, --> needed in off-line
+ fJetReaderHeader->SetUseMC(kTRUE);
+
// -- Set input event
fJetReader->SetInputEvent( NULL, NULL, const_cast<TObject*>(iter) );
// -- Fill grid with MC
- if ( ! fJetReader->FillGridMC() ) {
+ if ( ! fJetReader->FillGridHLTMC() ) {
HLTError("Error filling grid.");
iResult = -EINPROGRESS;
}
// -- Find jets
if ( !iResult) {
- if ( ! fJetFinder->ProcessConeEvent() ) {
+ if ( ! fJetFinder->ProcessHLTEvent() ) {
HLTError("Error processing cone event.");
iResult = -EINPROGRESS;
}
for ( iter=GetFirstInputObject(kAliHLTDataTypeESDObject|kAliHLTDataOriginOffline);
iter != NULL && !iResult; iter=GetNextInputObject() ) {
- // -- Reset
- fJetFinder->Reset();
+ // -- Set automatic MC usage, --> needed in off-line
+ fJetReaderHeader->SetUseMC(kFALSE);
// -- Set input event
fJetReader->SetInputEvent( const_cast<TObject*>(iter), NULL, NULL );
// -- Find jets
if ( !iResult) {
- if ( ! fJetFinder->ProcessConeEvent() ) {
+ if ( ! fJetFinder->ProcessHLTEvent() ) {
HLTError("Error processing cone event.");
iResult = -EINPROGRESS;
}
for ( iter=GetFirstInputObject(kAliHLTDataTypeESDObject|kAliHLTDataOriginHLT);
iter != NULL && !iResult; iter=GetNextInputObject() ) {
+ // -- Set automatic MC usage, --> needed in off-line
+ fJetReaderHeader->SetUseMC(kFALSE);
+
// -- Set input event
fJetReader->SetInputEvent( const_cast<TObject*>(iter), NULL, NULL );
- // -- Reset
- fJetFinder->Reset();
-
// -- Fill grid with ESD
if ( ! fJetReader->FillGridESD() ) {
HLTError("Error filling grid.");
// -- Find jets
if ( !iResult) {
- if ( ! fJetFinder->ProcessConeEvent() ) {
+ if ( ! fJetFinder->ProcessHLTEvent() ) {
HLTError("Error processing cone event.");
iResult = -EINPROGRESS;
}
*
* <h2>Optional arguments:</h2>
* <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -algorithm <i> JetAlgorithm to be run </u><br>
+ * - Possible values : FSCSquareCell, FFSCRadiusCell <br>
+ * - Default : FSCSquareCell <br>
+ *
+ * \li -leading <i> use leading seed only </u><br>
+ * - Possible values : 0, 1 <br>
+ * - Default : 0 <br>
+ *
* \li -coneRadius <i> Cone radius for cone finder </i> <br>
* - Default : 0.4 <br>
*
/** Ptr to jet container holding AliAODJets */
AliHLTJets *fJets; //!transient
- ClassDef(AliHLTJETConeJetComponent, 0)
+ ClassDef(AliHLTJETConeJetComponent, 1)
};
#endif
if ( ( esdTrack->Eta() < fEtaMin ) || ( esdTrack->Eta() > fEtaMax ) )
bResult = kFALSE;
- cout << esdTrack->Phi() << endl;
-
// -- cut on phi acceptance
if ( ( esdTrack->Phi() < fPhiMin ) || ( esdTrack->Phi() > fPhiMax ) )
bResult = kFALSE;
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: $
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
+//* 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 AliHLTJETFastJetComponent.cxx
+ @author Jochen Thaeder <thaeder@kip.uni-heidelberg.de>
+ @date
+ @brief Component to run the FastJet jetfinder
+*/
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+#include <cstdlib>
+#include <cerrno>
+#include <sys/time.h>
+
+#include "AliHLTJETFastJetComponent.h"
+
+#include "TString.h"
+#include "TObjString.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTJETFastJetComponent)
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+AliHLTJETFastJetComponent::AliHLTJETFastJetComponent()
+ :
+ fJetFinder(NULL),
+ fJetHeader(NULL),
+ fJetReader(NULL),
+ fJetReaderHeader(NULL),
+ fTrackCuts(NULL),
+ fJetCuts(NULL),
+ fJets(NULL) {
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+// #################################################################################
+AliHLTJETFastJetComponent::~AliHLTJETFastJetComponent() {
+ // see header file for class documentation
+
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Public functions to implement AliHLTComponent's interface.
+ * These functions are required for the registration process
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+const Char_t* AliHLTJETFastJetComponent::GetComponentID() {
+ // see header file for class documentation
+ return "JETFastJetFinder";
+}
+
+// #################################################################################
+void AliHLTJETFastJetComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
+ // see header file for class documentation
+ list.clear();
+ list.push_back( kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT );
+ list.push_back( kAliHLTDataTypeESDObject|kAliHLTDataOriginOffline );
+ list.push_back( kAliHLTDataTypeESDObject|kAliHLTDataOriginHLT );
+}
+
+// #################################################################################
+AliHLTComponentDataType AliHLTJETFastJetComponent::GetOutputDataType() {
+ // see header file for class documentation
+ return (kAliHLTDataTypeJet|kAliHLTDataOriginHLT);
+}
+
+// #################################################################################
+void AliHLTJETFastJetComponent::GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier ) {
+ // see header file for class documentation
+
+ constBase = 1000;
+ inputMultiplier = 0.3;
+}
+
+// #################################################################################
+AliHLTComponent* AliHLTJETFastJetComponent::Spawn() {
+ // see header file for class documentation
+ return new AliHLTJETFastJetComponent();
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Protected functions to implement AliHLTComponent's interface.
+ * These functions provide initialization as well as the actual processing
+ * capabilities of the component.
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTJETFastJetComponent::DoInit( Int_t argc, const Char_t** argv ) {
+ // see header file for class documentation
+
+ if ( fJetFinder || fJetHeader || fJetReader || fJetReaderHeader ||
+ fTrackCuts || fJetCuts || fJets )
+ return -EINPROGRESS;
+
+ // ---------------------------------------------------------------------
+ // -- Defaults
+ // ---------------------------------------------------------------------
+
+ TString comment = "HLT FastJet interface";
+
+ AliHLTJETBase::JetAlgorithmType_t algorithm = AliHLTJETBase::kKt;
+ Float_t coneRadius = 0.4;
+ Float_t trackCutMinPt = 1.0;
+ Float_t jetCutMinEt = 15.0;
+
+ // ---------------------------------------------------------------------
+ // -- Get Arguments
+ // ---------------------------------------------------------------------
+
+ Int_t iResult = 0;
+ Int_t bMissingParam=0;
+
+ TString argument="";
+
+ // -- Loop over all arguments
+ for ( Int_t iter = 0; iter<argc && iResult>=0; iter++) {
+ argument=argv[iter];
+
+ if (argument.IsNull())
+ continue;
+
+ // -- algorithm
+ if ( !argument.CompareTo("-algorithm") ) {
+ if ((bMissingParam=(++iter>=argc))) break;
+
+ TString parameter(argv[iter]);
+ parameter.Remove(TString::kLeading, ' ');
+
+ if ( !parameter.CompareTo("Kt") ) {
+ algorithm = AliHLTJETBase::kKt;
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else if ( !parameter.CompareTo("AntiKt") ) {
+ algorithm = AliHLTJETBase::kAntiKt;
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else {
+ HLTError("Wrong parameter %s for argument %s.", parameter.Data(), argument.Data());
+ iResult=-EINVAL;
+ }
+ }
+
+ // -- coneRadius
+ else if ( !argument.CompareTo("-coneRadius") ) {
+ if ((bMissingParam=(++iter>=argc))) break;
+
+ TString parameter(argv[iter]);
+ parameter.Remove(TString::kLeading, ' ');
+
+ if ( parameter.IsFloat() ) {
+ coneRadius = parameter.Atof();
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else {
+ HLTError("Wrong parameter %s for argument %s.", parameter.Data(), argument.Data());
+ iResult=-EINVAL;
+ }
+ }
+
+ // -- trackCutMinPt
+ else if ( !argument.CompareTo("-trackCutMinPt") ) {
+ if ((bMissingParam=(++iter>=argc))) break;
+
+ TString parameter(argv[iter]);
+ parameter.Remove(TString::kLeading, ' ');
+
+ if ( parameter.IsFloat() ) {
+ trackCutMinPt = parameter.Atof();
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else {
+ HLTError("Wrong parameter %s for argument %s.", parameter.Data(), argument.Data());
+ iResult=-EINVAL;
+ }
+ }
+
+ // -- jetCutMinEt
+ else if ( !argument.CompareTo("-jetCutMinEt") ) {
+ if ((bMissingParam=(++iter>=argc))) break;
+
+ TString parameter(argv[iter]);
+ parameter.Remove(TString::kLeading, ' ');
+
+ if ( parameter.IsFloat() ) {
+ jetCutMinEt = parameter.Atof();
+ comment += argument;
+ comment += " ";
+ comment += parameter;
+ comment += ' ';
+ }
+ else {
+ HLTError("Wrong parameter %s for argument %s.", parameter.Data(), argument.Data());
+ iResult=-EINVAL;
+ }
+ }
+
+ // -- Argument not known
+ else {
+ HLTError("Unknown argument %s.", argument.Data());
+ iResult = -EINVAL;
+ }
+ } // for ( Int iter = 0; iter<argc && iResult>=0; iter++) {
+
+ // -- Check if parameter is missing
+ if ( bMissingParam ) {
+ HLTError("Missing parameter for argument %s.", argument.Data());
+ iResult=-EINVAL;
+ }
+
+ if (iResult)
+ return iResult;
+
+ // ---------------------------------------------------------------------
+ // -- Jet Track Cuts
+ // ---------------------------------------------------------------------
+ if ( ! (fTrackCuts = new AliHLTJETTrackCuts()) ) {
+ HLTError("Error instantiating track cuts");
+ return -EINPROGRESS;
+ }
+
+ fTrackCuts->SetChargedOnly( kTRUE );
+ fTrackCuts->SetMinPt( trackCutMinPt );
+
+ // ---------------------------------------------------------------------
+ // -- Jet Jet Cuts
+ // ---------------------------------------------------------------------
+ if ( ! (fJetCuts = new AliHLTJETJetCuts()) ) {
+ HLTError("Error instantiating jet cuts");
+ return -EINPROGRESS;
+ }
+
+ fJetCuts->SetMinEt( jetCutMinEt );
+
+ // ---------------------------------------------------------------------
+ // -- Jet Reader Header
+ // ---------------------------------------------------------------------
+ if ( ! (fJetReaderHeader = new AliHLTJETReaderHeader()) ) {
+ HLTError("Error instantiating jet reader header");
+ return -EINPROGRESS;
+ }
+
+ // Set Algorithm
+ fJetReaderHeader->SetJetAlgorithm( algorithm );
+
+ // Set prt to track cuts
+ fJetReaderHeader->SetTrackCuts( fTrackCuts );
+
+ // Set Eta min/max and Phi min/max
+ fJetReaderHeader->SetFiducialEta( -0.9, 0.9) ;
+ fJetReaderHeader->SetFiducialPhi( 0.0, TMath::TwoPi() ) ;
+
+ // Set cone radius
+ fJetReaderHeader->SetConeRadius(coneRadius);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Reader
+ // ---------------------------------------------------------------------
+ if ( ! (fJetReader = new AliHLTJETReader()) ) {
+ HLTError("Error instantiating jet reader");
+ return -EINPROGRESS;
+ }
+
+ fJetReader->SetReaderHeader(fJetReaderHeader);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Container
+ // ---------------------------------------------------------------------
+ if ( ! (fJets = new AliHLTJets()) ) {
+ HLTError("Error instantiating jet container");
+ return -EINPROGRESS;
+ }
+
+ fJets->SetComment(comment);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Header
+ // ---------------------------------------------------------------------
+ if ( ! (fJetHeader = new AliHLTJETFastJetHeader()) ) {
+ HLTError("Error instantiating fastjet header");
+ return -EINPROGRESS;
+ }
+
+ fJetHeader->SetReaderHeader(fJetReaderHeader);
+ fJetHeader->SetJetCuts(fJetCuts);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Finder
+ // ---------------------------------------------------------------------
+ if ( ! (fJetFinder = new AliHLTJETFastJetFinder()) ) {
+ HLTError("Error instantiating fastjet finder");
+ return -EINPROGRESS;
+ }
+
+ fJetFinder->SetJetHeader(fJetHeader);
+ fJetFinder->SetJetReader(fJetReader);
+ fJetFinder->SetOutputJets(fJets);
+
+ // ---------------------------------------------------------------------
+ // -- Initialize Jet Finder
+ // ---------------------------------------------------------------------
+ if ( (fJetFinder->Initialize()) ) {
+ HLTError("Error initializing fastjet finder");
+ return -EINPROGRESS;
+ }
+
+ return 0;
+}
+
+// #################################################################################
+Int_t AliHLTJETFastJetComponent::DoDeinit() {
+ // see header file for class documentation
+
+ if ( fJetFinder )
+ delete fJetFinder;
+ fJetFinder = NULL;
+
+ if ( fJetHeader )
+ delete fJetHeader;
+ fJetHeader = NULL;
+
+ if ( fJetReader )
+ delete fJetReader;
+ fJetReader = NULL;
+
+ if ( fJetReaderHeader )
+ delete fJetReaderHeader;
+ fJetReaderHeader = NULL;
+
+ if ( fJetCuts )
+ delete fJetCuts;
+ fJetCuts = NULL;
+
+ if ( fJets )
+ delete fJets;
+ fJets = NULL;
+
+ return 0;
+}
+
+// #################################################################################
+Int_t AliHLTJETFastJetComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/,
+ AliHLTComponentTriggerData& /*trigData*/ ) {
+ // see header file for class documentation
+
+ Int_t iResult = 0;
+
+ const TObject* iter = NULL;
+
+ // -- Start-Of-Run
+ // -----------------
+ if ( GetFirstInputObject(kAliHLTDataTypeSOR) && !iResult ) {
+ HLTInfo("On-line SOR Event");
+ }
+
+ // -- ADD MC Object -- On-line
+ // ------------------------------
+ for ( iter=GetFirstInputObject(kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT);
+ iter != NULL && !iResult; iter=GetNextInputObject() ) {
+
+ // -- Set automatic MC usage, --> needed in off-line
+ fJetReaderHeader->SetUseMC(kTRUE);
+
+ // -- Set input event
+ fJetReader->SetInputEvent( NULL, NULL, const_cast<TObject*>(iter) );
+
+ // -- Fill vector with MC
+ if ( ! fJetReader->FillVectorHLTMC() ) {
+ HLTError("Error filling vector.");
+ iResult = -EINPROGRESS;
+ }
+
+ // -- Find jets
+ if ( !iResult) {
+ if ( ! fJetFinder->ProcessHLTEvent() ) {
+ HLTError("Error processing fastjet event.");
+ iResult = -EINPROGRESS;
+ }
+ }
+
+ // -- PushBack
+ if ( !iResult) {
+ PushBack(fJets, kAliHLTDataTypeJet|kAliHLTDataOriginHLT, GetSpecification());
+ }
+ }
+
+ // -- ADD ESD Object -- Off-line
+ // -------------------------------
+ for ( iter=GetFirstInputObject(kAliHLTDataTypeESDObject|kAliHLTDataOriginOffline);
+ iter != NULL && !iResult; iter=GetNextInputObject() ) {
+
+ // -- Set automatic MC usage, --> needed in off-line
+ fJetReaderHeader->SetUseMC(kFALSE);
+
+ // -- Set input event
+ fJetReader->SetInputEvent( const_cast<TObject*>(iter), NULL, NULL );
+
+ // -- Fill vector with ESD
+ if ( ! fJetReader->FillVectorESD() ) {
+ HLTError("Error filling vector.");
+ iResult = -1;
+ }
+
+ // -- Find jets
+ if ( !iResult) {
+ if ( ! fJetFinder->ProcessHLTEvent() ) {
+ HLTError("Error processing fastjet event.");
+ iResult = -EINPROGRESS;
+ }
+ }
+
+ // -- PushBack
+ if ( !iResult) {
+ PushBack(fJets, kAliHLTDataTypeJet|kAliHLTDataOriginHLT, GetSpecification());
+ }
+ }
+
+ // -- ADD ESD Object -- On-line
+ // ------------------------------
+ for ( iter=GetFirstInputObject(kAliHLTDataTypeESDObject|kAliHLTDataOriginHLT);
+ iter != NULL && !iResult; iter=GetNextInputObject() ) {
+
+ // -- Set automatic MC usage, --> needed in off-line
+ fJetReaderHeader->SetUseMC(kFALSE);
+
+ // -- Set input event
+ fJetReader->SetInputEvent( const_cast<TObject*>(iter), NULL, NULL );
+
+ // -- Fill vector with ESD
+ if ( ! fJetReader->FillVectorESD() ) {
+ HLTError("Error filling vector.");
+ iResult = -1;
+ }
+
+ // -- Find jets
+ if ( !iResult) {
+ if ( ! fJetFinder->ProcessHLTEvent() ) {
+ HLTError("Error processing fastjet event.");
+ iResult = -EINPROGRESS;
+ }
+ }
+
+ // -- PushBack
+ if ( !iResult) {
+ PushBack(fJets, kAliHLTDataTypeJet|kAliHLTDataOriginHLT, GetSpecification());
+ }
+ }
+
+ return iResult;
+}
#include "AliHLTProcessor.h"
-#include "AliFastJetFinder.h"
-#include "AliFastJetHeader.h"
-
#include "AliHLTJETReader.h"
#include "AliHLTJETReaderHeader.h"
#include "AliHLTJETTrackCuts.h"
+#include "AliHLTJETJetCuts.h"
+
+#include "AliHLTJETFastJetFinder.h"
+#include "AliHLTJETFastJetHeader.h"
/**
* @class AliHLTJETFastJetComponent
* Component to run the FastJet jetfinder
*
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b JETFaseJetFinder <br>
+ * Library: \b libAliHLTJET.so <br>
+ * Input Data Types: <br>
+ * - kAliHLTDataTypeMCObject|kAliHLTDataOriginHLT --> class AliHLTMCEvent<br>
+ * - kAliHLTDataTypeESDObject|kAliHLTDataOriginOffline --> class AliHLTESDEvent <br>
+ * - kAliHLTDataTypeESDObject|kAliHLTDataOriginHLT --> class AliHLTESDEvent<br>
+ * Output Data Types: <br>
+ * - kAliHLTDataTypeJet|kAliHLTDataOriginHLT --> class AliHLTJets<br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * There are no mandatrory arguments <br>
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -algorithm <i> JetAlgorithm to be run </u><br>
+ * - Possible values : Kt, AntiKt <br>
+ * - Default : Kt <br>
+ *
+ * \li -coneRadius <i> Cone radius for cone finder </i> <br>
+ * - Default : 0.4 <br>
+ *
+ * \li -trackCutMinPt <i> min pt for cut on tracks, in GeV/c </i> <br>
+ * - Default : 1.0 <br>
+ *
+ * \li -jetCutMinPt <i> min Et for cut on found jets, in GeV/c </i> <br>
+ * - Default : 15.0 <br>
+ *
* @ingroup alihlt_jet
+ * @ingroup alihlt_jet_fastjet
*/
class AliHLTJETFastJetComponent : public AliHLTProcessor {
* ---------------------------------------------------------------------------------
*/
- /** pointer to the jet finder object */
- AliFastJetFinder *fJetFinder; //!transient
-
- /** Ptr to the jet finder header */
- AliFastJetHeader *fJetHeader; //!transient
-
+ /** Ptr to the jet finder */
+ AliHLTJETFastJetFinder *fJetFinder; //!transient
+
+ /** Ptr to the jet finder header */
+ AliHLTJETFastJetHeader *fJetHeader; //!transient
+
/** Ptr to jet reader */
AliHLTJETReader *fJetReader; //!transient
-
+
/** Ptr to jet reader header */
AliHLTJETReaderHeader *fJetReaderHeader; //!transient
/** Ptr to track cuts */
- AliHLTJETTrackCuts *fJetTrackCuts; //!transient
-
- ClassDef(AliHLTJETFastJetComponent, 0)
+ AliHLTJETTrackCuts *fTrackCuts; //!transient
+
+ /** Ptr to jet cuts */
+ AliHLTJETJetCuts *fJetCuts; //!transient
+
+ /** Ptr to jet container holding AliAODJets */
+ AliHLTJets *fJets;
+
+ ClassDef(AliHLTJETFastJetComponent, 1)
};
#endif
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: AliHLTJETFastJetFinder.cxx $
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
+ * 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 AliHLTJETFastJetFinder.cxx
+ @author Jochen Thaeder
+ @date
+ @brief FastJet finder interface
+*/
+
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#if __GNUC__ >= 3
+using namespace std;
+#endif
+
+//#include "fastjet/AreaDefinition.hh"
+//#include "fastjet/JetDefinition.hh"
+// get info on how fastjet was configured
+//#include "fastjet/config.h"
+
+//#include <TLorentzVector.h>
+//#include <TArrayF.h>
+//#include <TClonesArray.h>
+
+//#include "AliAODJet.h"
+
+#include "AliHLTJETReader.h"
+#include "AliHLTJETJetCuts.h"
+
+#include "AliHLTJETFastJetFinder.h"
+#include "AliHLTJETFastJetHeader.h"
+
+//#include<sstream> // needed for internal io
+//#include<vector>
+//#include <cmath>
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTJETFastJetFinder)
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+AliHLTJETFastJetFinder::AliHLTJETFastJetFinder()
+ :
+ AliJetFinder(),
+ fInputVector(NULL),
+ fJets(NULL) {
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+}
+
+// #################################################################################
+AliHLTJETFastJetFinder::~AliHLTJETFastJetFinder() {
+ // see header file for class documentation
+
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Initialize
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTJETFastJetFinder::Initialize() {
+ // see header file for class documentation
+
+ Int_t iResult = 0;
+
+ if ( !fHeader || !fReader ) {
+ HLTError("No header or reader set!");
+ return -EINPROGRESS;
+ }
+
+ // -- Initialize Reader
+ AliHLTJETReader *reader = dynamic_cast<AliHLTJETReader*> (fReader);
+
+ iResult = reader->Initialize();
+ if ( iResult ) {
+ HLTError( "Initializing Reader failed!");
+ return iResult;
+ }
+
+ // -- Initialize Header
+ AliHLTJETFastJetHeader *header = dynamic_cast<AliHLTJETFastJetHeader*> (fHeader);
+
+ iResult = header->Initialize();
+ if ( iResult ) {
+ HLTError( "Initializing Header failed!");
+ return iResult;
+ }
+
+ // -- Set ptr to vector
+ fInputVector = reader->GetVector();
+ if ( ! fInputVector ) {
+ HLTError( "Getting ptr to vector failed!");
+ return -EINPROGRESS;
+ }
+
+ // -- Check ptr to output container
+ if ( !fJets ) {
+ HLTError( "Ptr to output container not set!");
+ return -EINPROGRESS;
+ }
+
+ return iResult;
+}
+
+// #################################################################################
+void AliHLTJETFastJetFinder::Reset() {
+ // see header file for class documentation
+
+ // -- Reset output container
+ if (fJets)
+ fJets->Reset();
+
+ return;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Process
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Bool_t AliHLTJETFastJetFinder::ProcessEvent() {
+ // see header file for class documentation
+
+ // -- Pick up jet reader
+ AliHLTJETReader *reader = dynamic_cast<AliHLTJETReader*> (fReader);
+
+ // -- Reset
+ Reset();
+
+ // -- Fill Vector
+ if ( !reader->FillVector() ){
+ HLTError("Error filling vector.");
+ return kFALSE;
+ }
+
+ // -- Find Jets, fill jets and apply jet cuts
+ if ( FindFastJets() ) {
+ HLTError("Error finding jets.");
+ return kFALSE;
+ }
+
+ return kTRUE;
+}
+
+// #################################################################################
+Bool_t AliHLTJETFastJetFinder::ProcessHLTEvent() {
+ // see header file for class documentation
+
+ // -- Reset
+ Reset();
+
+ // -- Find Jets, fill jets and apply jet cuts
+ if ( FindFastJets() ) {
+ HLTError("Error finding jets.");
+ return kFALSE;
+ }
+
+ return kTRUE;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Helper
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+void AliHLTJETFastJetFinder::PrintJets( vector<fastjet::PseudoJet> &jets,
+ fastjet::ClusterSequenceArea &clust_seq ) {
+ // see header file for class documentation
+
+ // -- pick up fastjet header
+ AliHLTJETFastJetHeader *header = dynamic_cast<AliHLTJETFastJetHeader*> (fHeader);
+
+ // -- print header info
+ TString comment = header->GetComment();
+ comment += TString(clust_seq.strategy_string());
+
+ HLTInfo( "--------------------------------------------------------" );
+ HLTInfo( "%s", comment.Data() );
+ HLTInfo( "--------------------------------------------------------" );
+
+ header->PrintParameters();
+
+ // -- print found jets
+ HLTInfo( "Number of unclustered particles: %i", clust_seq.unclustered_particles().size() );
+
+ HLTInfo( "Printing inclusive sub jets with pt > %f GeV", header->GetPtMin() );
+ HLTInfo( "-------------------------------------------------------" );
+ HLTInfo( " ijet rap phi Pt area +- err" );
+
+ for ( UInt_t jetIter = 0; jetIter < jets.size(); jetIter++ ) {
+
+ Double_t area = clust_seq.area(jets[jetIter]);
+ Double_t area_error = clust_seq.area_error(jets[jetIter]);
+
+ HLTInfo( "%5u %9.5f %8.5f %10.3f %8.3f +- %6.3f",
+ jetIter,jets[jetIter].rap(),jets[jetIter].phi(),jets[jetIter].perp(), area, area_error );
+
+ } // for ( Int_t jetIter = 0; jetIter < jets.size(); jetIter++ ) {
+
+ return;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Process - private
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTJETFastJetFinder::FindFastJets() {
+ // see header file for class documentation
+
+ // -- pick up fastjet header
+ AliHLTJETFastJetHeader *header = dynamic_cast<AliHLTJETFastJetHeader*> (fHeader);
+
+ // -- Run the jet clustering with the jet definition from the header
+ fastjet::ClusterSequenceArea clust_seq( (*fInputVector),
+ (*header->GetJetDefinition()),
+ (*header->GetAreaDefinition()) );
+
+ // -- Extract the inclusive jets with pt > ptmin, sorted by pt
+ vector<fastjet::PseudoJet> inclusive_jets = clust_seq.inclusive_jets(header->GetPtMin());
+
+ // -- Subtract background
+ vector<fastjet::PseudoJet> sub_jets = clust_seq.subtracted_jets((*header->GetRangeDefinition()),
+ header->GetPtMin());
+
+ // -- Sort jets into increasing pt
+ vector<fastjet::PseudoJet> jets = sorted_by_pt(sub_jets);
+
+ // -- Fill jets in output container
+ // -----------------------------------
+
+ // -- Get jet cuts
+ AliHLTJETJetCuts* jetCuts = header->GetJetCuts();
+
+ // -- Loop over jet candidates
+ for ( UInt_t jetIter = 0; jetIter < jets.size(); jetIter++ ) {
+
+ // -- Fill AOD jets
+ AliAODJet aodjet (jets[jetIter].px(), jets[jetIter].py(),
+ jets[jetIter].pz(), jets[jetIter].E());
+
+ // -- Apply jet cuts
+ if ( ! jetCuts->IsSelected(&aodjet) )
+ continue;
+
+ fJets->AddJet(&aodjet);
+
+ } // for ( Int_t jetIter = 0; jetIter < jets.size(); jetIter++ ) {
+
+#if 0
+ // -- Print found jets
+ PrintJets( jets, clust_seq );
+#endif
+
+ return 0;
+}
+
--- /dev/null
+//-*- Mode: C++ -*-
+
+// $Id: AliHLTJETFastJetFinder.h $
+
+#ifndef ALIHLTJETFASTJETFINDER_H
+#define ALIHLTJETFASTJETFINDER_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 AliHLTJETFastJetFinder.h
+ @author Jochen Thaeder
+ @date
+ @brief FastJet finder interface
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "fastjet/PseudoJet.hh"
+#include "fastjet/ClusterSequenceArea.hh"
+
+#include "AliJetFinder.h"
+
+#include "AliHLTJets.h"
+#include "AliHLTLogging.h"
+
+#include "AliHLTJETBase.h"
+
+/**
+ * @class AliHLTJETFastJetFinder
+ * FastJet Interface for the fasjet package ( v.2.4.1 )
+ *
+ * <b>Usage in off-line</b><br>
+ * * Initialization phase :
+ * <pre>jetFinder->Init();</pre>
+ * * Set the input event via the reader
+ * <pre>jetReader->SetInputEvent( ... )</pre>
+ * * Process one event (contains reset per event)
+ * <pre>jetFinder->ProcessEvent();</pre>
+ *
+ * <b>Usage in on-line</b><br>
+ * * Initialization phase :
+ * <pre>jetFinder->Initialize();</pre>
+ * * Set the input event via the reader
+ * <pre>jetReader->SetInputEvent( ... )</pre>
+ * * Process one event
+ * * Fill input vector (contains reset per event)
+ * <pre>jetReader->FillVectorXXX();</pre>
+ * Where XXX is has to be replaced by MC, ESD or AOD,
+ * depending, on the input object
+ * * Process one event (contains reset per event)
+ * <pre>jetFinder->ProcessHLTEvent();</pre>
+ *
+ * @ingroup alihlt_jet_fastjet
+ */
+
+class AliHLTJETFastJetFinder : public AliJetFinder, public AliHLTLogging {
+
+ public:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** standard constructor */
+ AliHLTJETFastJetFinder();
+
+ /** destructor */
+ virtual ~AliHLTJETFastJetFinder();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Initialize
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Initialize the jet finder and the search grid
+ * ONLY for use in off-line ... it inherits from a virtual void ?!?!
+ */
+ void Init() { Initialize(); }
+
+ /** Initialize the jet finder and the search grid
+ * @return 0 on success, < 0 on failure
+ */
+ Int_t Initialize();
+
+ /** Reset for next event */
+ void Reset();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Setter
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Set ptr to output container */
+ void SetOutputJets( AliHLTJets* jets ) { fJets = jets; }
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Process
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Process one event
+ * ONLY for use in off-line ... it inherits from a virtual Bool_t
+ * @return kTRUE on success, kFALSE on failure
+ */
+ Bool_t ProcessEvent();
+
+ /** Process one event
+ * @return kTRUE on success, kFALSE on failure
+ */
+ Bool_t ProcessHLTEvent();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Helper
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Print found jets */
+ void PrintJets(vector<fastjet::PseudoJet> &jets, fastjet::ClusterSequenceArea &clust_seq);
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+private:
+
+ /** copy constructor prohibited */
+ AliHLTJETFastJetFinder (const AliHLTJETFastJetFinder&);
+
+ /** assignment operator prohibited */
+ AliHLTJETFastJetFinder& operator= (const AliHLTJETFastJetFinder&);
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Process - private
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Find jets, fill jets and apply jet cuts in one event
+ * @return 0 on success, < 0 on failure
+ */
+ Int_t FindFastJets();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Members - private
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Input vector for fastJet */
+ vector<fastjet::PseudoJet> *fInputVector; //! transient
+
+ /** Container of AliAODJets */
+ AliHLTJets *fJets; //! transient
+
+ ClassDef(AliHLTJETFastJetFinder,1)
+};
+
+#endif
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: AliHLTJETFastJetHeader.cxx $
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
+ * 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 AliHLTJETFastJetHeader.cxx
+ @author Jochen Thaeder
+ @date
+ @brief Header of the FastJet finder interface
+*/
+
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#if __GNUC__ >= 3
+using namespace std;
+#endif
+
+#include "AliHLTJETJetCuts.h"
+
+#include "AliHLTJETReaderHeader.h"
+#include "AliHLTJETFastJetHeader.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTJETFastJetHeader)
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+AliHLTJETFastJetHeader::AliHLTJETFastJetHeader()
+ :
+ AliJetHeader("AliHLTJETFastJetHeader"),
+ fAlgorithm(fastjet::kt_algorithm),
+ fStrategy(fastjet::Best),
+ fRecombScheme(fastjet::BIpt_scheme),
+ fGhostArea(0.05),
+ fActiveAreaRepeats(1),
+ fAreaType(fastjet::active_area),
+ fPtMin(5.),
+ fJetDefinition(NULL),
+ fGhostedAreaSpec(NULL),
+ fAreaDefinition(NULL),
+ fRangeDefinition(NULL),
+ fReaderHeader(NULL) {
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+ // SetRapRange(rapmin, rapmax);
+}
+
+// #################################################################################
+AliHLTJETFastJetHeader::~AliHLTJETFastJetHeader() {
+ // see header file for class documentation
+
+ if ( fJetDefinition )
+ delete fJetDefinition;
+ fJetDefinition = NULL;
+
+ if ( fGhostedAreaSpec)
+ delete fGhostedAreaSpec;
+ fGhostedAreaSpec = NULL;
+
+ if ( fAreaDefinition )
+ delete fAreaDefinition;
+ fAreaDefinition = NULL;
+
+ if ( fRangeDefinition )
+ delete fRangeDefinition;
+ fRangeDefinition = NULL;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Initialize
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTJETFastJetHeader::Initialize() {
+ // see header file for class documentation
+
+ HLTInfo(" -= AliHLTJETFastJetHeader =- " );
+
+ Int_t iResult = 0;
+
+ AliHLTJETReaderHeader* readerHeader = dynamic_cast<AliHLTJETReaderHeader*>(fReaderHeader);
+
+ if ( !fJetCuts ) {
+ HLTError("No HLT jet cuts set!");
+ return -1;
+ }
+
+ // -- Set min pt
+ fPtMin = fJetCuts->GetMinEt();
+
+ // -- Set Algorithm
+ AliHLTJETBase::JetAlgorithmType_t GetJetAlgorithm();
+
+ if ( readerHeader->GetJetAlgorithm() == AliHLTJETBase::kKt )
+ fAlgorithm = fastjet::kt_algorithm;
+ else if ( readerHeader->GetJetAlgorithm() == AliHLTJETBase::kAntiKt )
+ fAlgorithm = fastjet::antikt_algorithm;
+ else {
+ HLTError("No algorithm found!");
+ return -1;
+ }
+
+ // -- Create an object that represents your choice of jet algorithm,
+ // and the associated parameters
+ if ( fJetDefinition )
+ delete fJetDefinition;
+ fJetDefinition = new fastjet::JetDefinition(fAlgorithm, readerHeader->GetConeRadius(),
+ fRecombScheme, fStrategy);
+
+ // -- Create the object that holds info about ghosts
+ if ( fGhostedAreaSpec )
+ delete fGhostedAreaSpec;
+ fGhostedAreaSpec = new fastjet::GhostedAreaSpec(readerHeader->GetFiducialEtaMax(),
+ fActiveAreaRepeats, fGhostArea);
+
+ // -- Create area definition
+ if ( fAreaDefinition )
+ delete fAreaDefinition;
+ // xxx fAreaDefinition = new fastjet::AreaDefinition(fAreaType, fGhostedAreaSpec);
+ fAreaDefinition = new fastjet::AreaDefinition(fAreaType, (*fGhostedAreaSpec) );
+
+ // -- Set the rapididty, phi range within which to study the background
+ if ( fRangeDefinition )
+ delete fRangeDefinition;
+ fRangeDefinition = new fastjet::RangeDefinition( readerHeader->GetFiducialEtaMin()+readerHeader->GetConeRadius(),
+ readerHeader->GetFiducialEtaMax()-readerHeader->GetConeRadius(),
+ readerHeader->GetFiducialPhiMin(),
+ readerHeader->GetFiducialPhiMax() );
+
+ // -- Check initialization
+ if ( !fJetDefinition || !fGhostedAreaSpec ||
+ !fAreaDefinition || !fRangeDefinition ) {
+ HLTError("Initializing FastJet failed!");
+ iResult = kFALSE;
+ }
+
+ // -- Create comment
+ if ( !iResult ) {
+ fComment = "Running FastJet algorithm with the following setup.";
+ fComment+= "\n-Jet definition:\n ";
+ fComment+= TString(fJetDefinition->description());
+ fComment+= ". \n-Area definition:\n ";
+ fComment+= TString(fAreaDefinition->description());
+ fComment+= ". \n-Strategy adopted by FastJet:\n ";
+ }
+
+ return iResult;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Helper
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+void AliHLTJETFastJetHeader::PrintParameters() const {
+ // see header file for class documentation
+
+ HLTInfo( "FastJet algorithm parameters:" );
+
+ HLTInfo( "-- Jet Definition --- " );
+#if 0
+ HLTInfo( "R %f ",fRparam );
+ HLTInfo( "Jet Algorithm %s", fAlgorithm );
+ HLTInfo( "Strategy " << fStrategy );
+ HLTInfo( "Recombination Scheme " << fRecombScheme );
+
+ HLTInfo( "-- Ghosted Area Spec parameters --- " );
+ HLTInfo( "Ghost Eta Max " << fGhostEtaMax );
+ HLTInfo( "Ghost Area " << fGhostArea );
+ HLTInfo( "Active Area Repeats " << fActiveAreaRepeats );
+
+ HLTInfo( "-- Area Definition parameters --- " );
+ HLTInfo( "Area Type " << fAreaType );
+
+ HLTInfo( "-- Cluster Sequence Area parameters --- " );
+ HLTInfo( "pt min " << fPtMin );
+
+ HLTInfo( "-- Range Definition parameters --- " );
+ HLTInfo( " bkg rapidity range from " << fRapMin << " to " << fRapMax );
+ HLTInfo( " bkg phi range from " << fPhiMin << " to " << fPhiMax );
+#endif
+}
--- /dev/null
+//-*- Mode: C++ -*-
+
+// $Id: AliHLTJETFastJetHeader.h $
+
+#ifndef ALIHLTJETFASTJETHEADER_H
+#define ALIHLTJETFASTJETHEADER_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 AliHLTJETFastJetHeader.h
+ @author Jochen Thaeder
+ @date
+ @brief Header of the FastJet finder interface
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+//#include "fastjet/PseudoJet.hh"
+
+#include "fastjet/ClusterSequenceArea.hh"
+#include "fastjet/AreaDefinition.hh"
+#include "fastjet/JetDefinition.hh"
+
+#include "AliJetHeader.h"
+#include "AliJetReaderHeader.h"
+#include "AliHLTLogging.h"
+
+#include "AliHLTJETBase.h"
+
+/**
+ * @class AliHLTJETFastJetHeader
+ * FastJet Interface for the fasjet package ( v.2.4.1 )
+ *
+ *
+ * @ingroup alihlt_jet_fastjet
+ */
+
+class AliHLTJETFastJetHeader : public AliJetHeader, public AliHLTLogging {
+
+ public:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** standard constructor */
+ AliHLTJETFastJetHeader();
+
+ /** destructor */
+ virtual ~AliHLTJETFastJetHeader();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Initialize
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Initialize the jet header
+ * @return 0 on success, < 0 on failure
+ */
+ Int_t Initialize();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Setter
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Set Reader Header
+ * @param rh ptr to Analysis Cuts
+ */
+ void SetReaderHeader(AliJetReaderHeader* rh ) { fReaderHeader = rh; }
+
+ /** Set Analysis Cuts
+ * @param cuts ptr to AliHLTJETJetCuts
+ */
+ void SetJetCuts( AliHLTJETJetCuts* cuts ) { fJetCuts = cuts; }
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Getter
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Get Min Pt for jets */
+ Double_t GetPtMin() const {return fPtMin;}
+
+ /** Get Analysis Cuts
+ * @return ptr to AliHLTJETJetCuts
+ */
+ AliHLTJETJetCuts* GetJetCuts() { return fJetCuts; }
+
+ // -- FastJet Getters
+ // --------------------
+
+ /** Get jet definition */
+ fastjet::JetDefinition* GetJetDefinition() {return fJetDefinition;}
+
+ /** Get area definition */
+ fastjet::AreaDefinition* GetAreaDefinition() {return fAreaDefinition;}
+
+ /** Get range definition */
+ fastjet::RangeDefinition* GetRangeDefinition() {return fRangeDefinition;}
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Getter
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** Print fastjet parameters */
+ void PrintParameters() const;
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+private:
+
+ /** copy constructor prohibited */
+ AliHLTJETFastJetHeader (const AliHLTJETFastJetHeader&);
+
+ /** assignment operator prohibited */
+ AliHLTJETFastJetHeader& operator= (const AliHLTJETFastJetHeader&);
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Members - private
+ * ---------------------------------------------------------------------------------
+ */
+
+ // -- fastjet::JetDefinition parameters
+ // --------------------------------------
+
+ /** Jet Algorithm
+ * Default : fastjet::kt_algorithm
+ */
+ fastjet::JetAlgorithm fAlgorithm; // see above
+
+ /** Finding strategy
+ * Default : fastjet::Best
+ */
+ fastjet::Strategy fStrategy; // see above
+
+ /** Recombination scheme
+ * Default : fastjet::BIpt_scheme;
+ */
+ fastjet::RecombinationScheme fRecombScheme; // see above
+
+ // -- fastjet::GhostedAreaSpec parameters
+ // ----------------------------------------
+
+ /** Ghost area */
+ Double_t fGhostArea; // see above
+
+ /** Ghost area - active repeats */
+ Int_t fActiveAreaRepeats; // see above
+
+ // -- fastjet::AreaDefinition parameters
+ // ---------------------------------------
+
+ /** Area Definition */
+ fastjet::AreaType fAreaType; // see above
+
+ // -- fastjet::ClusterSequenceArea options parameters
+ // ----------------------------------------------------
+
+ /** Jet pt > ptmin */
+ Double_t fPtMin; // see above
+
+ // -- fastjet classes
+ // --------------------
+
+ /** Jet definition */
+ fastjet::JetDefinition *fJetDefinition; //! transient
+
+ /** Ghost definition */
+ fastjet::GhostedAreaSpec *fGhostedAreaSpec; //! transient
+
+ /** Area definition */
+ fastjet::AreaDefinition *fAreaDefinition; //! transient
+
+ /** Range definition */
+ fastjet::RangeDefinition *fRangeDefinition; //! transient
+
+ // -- Ptr to classes
+ // -------------------
+
+ /** Ptr to jet reader header */
+ AliJetReaderHeader *fReaderHeader; //! transient
+
+ /** Cuts on jet selection */
+ AliHLTJETJetCuts *fJetCuts; //! transient
+
+
+ ClassDef(AliHLTJETFastJetHeader,1)
+};
+
+#endif
"kPyJetJet", "kPyGammaJetPHOS"
};
+// ----------------------------------------------------------------------------
+// -- Jet Parameter
+// ----------------------------------------------------------------------------
+
+Float_t aConeRadius[] = { 0.4, 0.7 };
+Float_t aCutPtSeed[] = { 4.0, 7.0, 10.0 };
+Float_t aCutEtJet[] = { 4.0, 7.0, 10.0, 15.0 };
+
// ----------------------------------------------------------------------------
/** HLTJetReconstruction test macro
* @param nEvents Number of events which should be processed
*/
-void HLTJetReconstruction(Int_t nEvents=1, Int_t idx=0, Bool_t generate=kFALSE, PprRun_t runType = kPythia6Jets104_125 ) {
+void HLTJetReconstruction(Int_t nEvents=1, Bool_t generate=kFALSE, PprRun_t runType = kPythia6Jets104_125 ) {
TString writerInput;
TString analysisInput;
// - - //
// ----------------------------//
- Float_t aConeRadius[] = { 0.4, 0.7 };
- Float_t aCutPtSeed[] = { 4.0, 7.0, 10.0 };
- Float_t aCutEtJet[] = { 4.0, 7.0, 10.0, 15.0 };
-
- Float_t coneRadius = 0.7;
- Float_t cutPtSeed = 4.0;
- Float_t cutEtJet = 7.0;
+ Float_t coneRadius = aConeRadius[0];
+ Float_t cutPtSeed = aCutPtSeed[0];
+ Float_t cutEtJet = aCutEtJet[1];
Int_t seed = 12345;
// - - //
// ----------------------------//
- // ------------------------------------------
- // -- The ESDMCEventPublisher
- // ------------------------------------------
if ( ! generate ) {
-
+ // ------------------------------------------
+ // -- The ESDMCEventPublisher
+ // ------------------------------------------
TString publisherId("ESDMCEventPublisher");
+ // ------------------------------------------
- TString publisherArg( Form("-entrytype MCFAST -dataspec 0x0000001F -datapath /home/jthaeder/jet/data/HEAD_2009-03-17/FastGen/kPythia6Jets104_125_14TeV/JET-ETA=-0.2,0.2_JET-ET=50,1000_R=0.4_10ev") );
-
+ TString publisherArg( Form("-entrytype MCFAST -dataspec 0x0000001F -datapath /home/jthaeder/jet/data/HEAD_2009-10-26/FastGen/kPythia6Jets125_150_14TeV/JET-ETA=-0.2,0.2_JET-ET=50,1000_R=0.4_200ev") );
AliHLTConfiguration ESDMCEventPublisher(publisherId.Data(), "ESDMCEventPublisher", NULL, publisherArg.Data() );
if (!analysisInput.IsNull()) analysisInput+=" ";
jetInput += publisherId;
}
- // ------------------------------------------
- // -- The MCGenerator
- // ------------------------------------------
else {
-
+ // ------------------------------------------
+ // -- The MCGenerator
+ // ------------------------------------------
TString generatorId( Form("MCGenerator_%s", pprRunName[runType]) );
+ // ------------------------------------------
TString generatorArg( Form("-seed %d -nevents %d -runtype %d -coneRadius %.1f -jetCutMinEt %.1f",
seed, nEvents, runType, coneRadius, cutEtJet));
// ------------------------------------------
// -- ConeJetFinder
// ------------------------------------------
-
TString jetId("JETConeJet");
+ // ------------------------------------------
- TString jetArg( Form("-coneRadius %.1f -trackCutMinPt 0.0 -seedCutMinPt %.1f -jetCutMinEt %.1f",
+ TString jetArg( Form("-algorithm FSCSquareCell -leading 1 -coneRadius %.1f -trackCutMinPt 0.0 -seedCutMinPt %.1f -jetCutMinEt %.1f",
coneRadius, cutPtSeed, cutEtJet) );
AliHLTConfiguration jetCone(jetId.Data(), "JETConeJetFinder", jetInput.Data(), jetArg.Data());
// ------------------------------------------
// -- Jet Analysis
// ------------------------------------------
-
TString analysisId("JETAnalysis");
+ // ------------------------------------------
+
TString analysisArg("");
AliHLTConfiguration jetAnalysis(analysisId.Data(), "JETAnalysis", analysisInput.Data(), analysisArg.Data() );
#/bin/bash
-
-N_EVENTS=100
-
if [ ! -d ./analysis ] ; then
mkdir analysis
fi
rm ${ROOTFILES}
fi
-
-aliroot -b -l -q 'HLTJetReconstruction.C(10,0,kTRUE)' 2>&1 | tee log.log
+aliroot -b -l -q 'HLTJetReconstruction.C(20,kTRUE)' 2>&1 | tee ChainLog.log
ROOTFILES=`find . -maxdepth 1 -name "*.root" `
rm ${ROOTFILES}
fi
-aliroot -l 'readJets.C("./analysis/EOR_analyze_10_kPythia6Jets104_125.root")'
-
+aliroot -l 'readJets.C("./analysis/EOR_analyze_20_kPythia6Jets104_125.root")'
#valgrind --error-limit=no --leak-check=full --show-reachable=yes aliroot -b -l -q 'HLTJetReconstruction.C(10)'
--- /dev/null
+#/bin/bash
+
+if [ ! -d ./analysis ] ; then
+ mkdir analysis
+fi
+
+ROOTFILES=`find . -maxdepth 1 -name "*.root" `
+
+if [ -n "${ROOTFILES}" ] ; then
+ rm ${ROOTFILES}
+fi
+
+aliroot -b -l -q './tasks/JetAnalysisManagerHLT.C' 2>&1 | tee TaskLog.log
+
+ROOTFILES=`find . -maxdepth 1 -name "*.root" `
+
+#if [ -n "${ROOTFILES}" ] ; then
+# rm ${ROOTFILES}
+#fi
+
+#aliroot -l 'readJets.C("./analysis/EOR_analyze_100_kPythia6Jets104_125.root")'
+
+
+#valgrind --error-limit=no --leak-check=full --show-reachable=yes aliroot -b -l -q 'HLTJetReconstruction.C(10)'
--- /dev/null
+/** ---------------------------------------------------------------------
+ * @file ConfigJetAnalysisHLT.C
+ * @author Jochen Thaeder <thaeder@kip.uni-heidelberg.de>
+ * @brief Run HLT cone finder in analysis framework, on ESDs
+ *
+ * ---------------------------------------------------------------------
+ */
+
+AliJetFinder* ConfigJetAnalysis() {
+
+ printf("ConfigJetAnalysis() -- HLT \n");
+
+ // ---------------------------------------------------------------------
+ // -- Defaults
+ // ---------------------------------------------------------------------
+
+ TString comment = "HLT Fast Fixed Seeded Cone finder on ESD";
+ AliHLTJETBase::JetAlgorithmType_t algorithm = AliHLTJETBase::kFFSCSquareCell;
+
+ Bool_t leading = kFALSE;
+ Float_t coneRadius = 0.4;
+ Float_t trackCutMinPt = 1.0;
+ Float_t seedCutMinPt = 5.0;
+ Float_t jetCutMinEt = 15.0;
+ Bool_t useMC = kFALSE;
+
+ // -- Jet Track Cuts
+ // ---------------------------------------------------------------------
+ AliHLTJETTrackCuts *trackCuts = new AliHLTJETTrackCuts();
+ trackCuts->SetChargedOnly( kTRUE );
+ trackCuts->SetMinPt( trackCutMinPt );
+
+ // -- Jet Seed Cuts
+ // ---------------------------------------------------------------------
+ AliHLTJETConeSeedCuts *seedCuts = new AliHLTJETConeSeedCuts();
+ seedCuts->SetMinPt( seedCutMinPt );
+
+ // -- Jet Jet Cuts
+ // ---------------------------------------------------------------------
+ AliHLTJETJetCuts *jetCuts = new AliHLTJETJetCuts();
+ jetCuts->SetMinEt( jetCutMinEt );
+
+ // -- Jet Reader Header
+ // ---------------------------------------------------------------------
+ AliHLTJETReaderHeader *jetReaderHeader = new AliHLTJETReaderHeader();
+
+ // Set Algorithm
+ jetReaderHeader->SetJetAlgorithm(algorithm);
+
+ // Set prt to track cuts
+ jetReaderHeader->SetTrackCuts( trackCuts );
+ jetReaderHeader->SetSeedCuts( seedCuts );
+
+ // Set Eta min/max and Phi min/max
+ jetReaderHeader->SetFiducialEta( -0.9, 0.9) ;
+ jetReaderHeader->SetFiducialPhi( 0.0, TMath::TwoPi() ) ;
+
+ // Set grid binning
+ jetReaderHeader->SetGridEtaBinning( 0.05 );
+ jetReaderHeader->SetGridPhiBinning( 0.05 );
+
+ // Set cone radius
+ jetReaderHeader->SetConeRadius(coneRadius);
+
+ // Use Kinematics
+ jetReaderHeader->SetUseMC(useMC);
+
+ // -- Jet Reader
+ // ---------------------------------------------------------------------
+ AliHLTJETReader *jetReader = new AliHLTJETReader();
+ jetReader->SetReaderHeader(jetReaderHeader);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Container
+ // ---------------------------------------------------------------------
+ AliHLTJets *jets = new AliHLTJets();
+ jets->SetComment(comment);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Header
+ // ---------------------------------------------------------------------
+ AliHLTJETConeHeader *jetHeader = new AliHLTJETConeHeader();
+ jetHeader->SetJetCuts(jetCuts);
+ jetHeader->SetUseLeading(leading);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Finder
+ // ---------------------------------------------------------------------
+ AliHLTJETConeFinder *jetFinder = new AliHLTJETConeFinder();
+ jetFinder->SetJetHeader(jetHeader);
+ jetFinder->SetJetReader(jetReader);
+ jetFinder->SetOutputJets(jets);
+
+ return jetFinder;
+}
--- /dev/null
+/** ---------------------------------------------------------------------
+ * @file ConfigJetAnalysisHLTMC.C
+ * @author Jochen Thaeder <thaeder@kip.uni-heidelberg.de>
+ * @brief Run HLT cone finder in analysis framework, on Kinematics
+ *
+ * ---------------------------------------------------------------------
+ */
+
+AliJetFinder* ConfigJetAnalysis() {
+
+ printf("ConfigJetAnalysis() -- HLT \n");
+
+ // ---------------------------------------------------------------------
+ // -- Defaults
+ // ---------------------------------------------------------------------
+
+ TString comment = "HLT Fast Fixed Seeded Cone finder on MC";
+ AliHLTJETBase::JetAlgorithmType_t algorithm = AliHLTJETBase::kFFSCSquareCell;
+
+ Bool_t leading = kFALSE;
+ Float_t coneRadius = 0.4;
+ Float_t trackCutMinPt = 1.0;
+ Float_t seedCutMinPt = 5.0;
+ Float_t jetCutMinEt = 15.0;
+ Bool_t useMC = kTRUE;
+
+ // -- Jet Track Cuts
+ // ---------------------------------------------------------------------
+ AliHLTJETTrackCuts *trackCuts = new AliHLTJETTrackCuts();
+ trackCuts->SetChargedOnly( kTRUE );
+ trackCuts->SetMinPt( trackCutMinPt );
+
+ // -- Jet Seed Cuts
+ // ---------------------------------------------------------------------
+ AliHLTJETConeSeedCuts *seedCuts = new AliHLTJETConeSeedCuts();
+ seedCuts->SetMinPt( seedCutMinPt );
+
+ // -- Jet Jet Cuts
+ // ---------------------------------------------------------------------
+ AliHLTJETJetCuts *jetCuts = new AliHLTJETJetCuts();
+ jetCuts->SetMinEt( jetCutMinEt );
+
+ // -- Jet Reader Header
+ // ---------------------------------------------------------------------
+ AliHLTJETReaderHeader *jetReaderHeader = new AliHLTJETReaderHeader();
+
+ // Set Algorithm
+ jetReaderHeader->SetJetAlgorithm(algorithm);
+
+ // Set prt to track cuts
+ jetReaderHeader->SetTrackCuts( trackCuts );
+ jetReaderHeader->SetSeedCuts( seedCuts );
+
+ // Set Eta min/max and Phi min/max
+ jetReaderHeader->SetFiducialEta( -0.9, 0.9) ;
+ jetReaderHeader->SetFiducialPhi( 0.0, TMath::TwoPi() ) ;
+
+ // Set grid binning
+ jetReaderHeader->SetGridEtaBinning( 0.05 );
+ jetReaderHeader->SetGridPhiBinning( 0.05 );
+
+ // Set cone radius
+ jetReaderHeader->SetConeRadius(coneRadius);
+
+ // Use Kinematics
+ jetReaderHeader->SetUseMC(useMC);
+
+ // -- Jet Reader
+ // ---------------------------------------------------------------------
+ AliHLTJETReader *jetReader = new AliHLTJETReader();
+ jetReader->SetReaderHeader(jetReaderHeader);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Container
+ // ---------------------------------------------------------------------
+ AliHLTJets *jets = new AliHLTJets();
+ jets->SetComment(comment);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Header
+ // ---------------------------------------------------------------------
+ AliHLTJETConeHeader *jetHeader = new AliHLTJETConeHeader();
+ jetHeader->SetJetCuts(jetCuts);
+ jetHeader->SetUseLeading(leading);
+
+ // ---------------------------------------------------------------------
+ // -- Jet Finder
+ // ---------------------------------------------------------------------
+ AliHLTJETConeFinder *jetFinder = new AliHLTJETConeFinder();
+ jetFinder->SetJetHeader(jetHeader);
+ jetFinder->SetJetReader(jetReader);
+ jetFinder->SetOutputJets(jets);
+
+ return jetFinder;
+}
--- /dev/null
+void JetAnalysisManagerHLT() {
+
+ if ( getenv("FASTJET") ) {
+ gSystem->Load("libCGAL.so");
+ gSystem->Load("libfastjet.so");
+ gSystem->Load("libSISConePlugin.so");
+ }
+
+ gSystem->Load("libTree.so");
+ gSystem->Load("libPhysics.so");
+ gSystem->Load("libGeom.so");
+ gSystem->Load("libVMC.so");
+ gSystem->Load("libANALYSIS.so");
+ gSystem->Load("libSTEERBase.so");
+ gSystem->Load("libAOD.so");
+ gSystem->Load("libESD.so");
+ gSystem->Load("libANALYSISalice.so");
+ gSystem->Load("libJETAN.so");
+
+ gSystem->Load("libHLTbase.so");
+ gSystem->Load("libAliHLTUtil.so");
+ gSystem->Load("libAliHLTJET.so");
+
+ // --------------------------------------------------------------------------------
+
+ if (gApplication) gApplication->InitializeGraphics();
+
+ // --------------------------------------------------------------------------------
+ //
+ // Create the chain
+ //
+ // --------------------------------------------------------------------------------
+
+ gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
+ TChain* chain = new TChain("esdTree");
+
+ chain->Add("~/jet/data/HEAD_2009-06-04/kPythia6Jets104_125_14TeV/JET-ETA=-0.2,0.2_JET-ET=10,1000_R=0.7_100ev/AliESDs.root");
+ //chain->Add("~/jet/data/HEAD_2009-06-04/kPythia6Jets104_125_14TeV/JET-ETA=-0.2,0.2_JET-ET=10,1000_R=0.7_1ev/AliESDs.root");
+
+ // --------------------------------------------------------------------------------
+ //
+ // Create the analysis manager
+ //
+ // --------------------------------------------------------------------------------
+
+ // Input
+ AliESDInputHandler* inpHandler = new AliESDInputHandler();
+
+ // Output
+ AliAODHandler* aodHandler = new AliAODHandler();
+ aodHandler->SetOutputFileName("aod.root");
+
+ // MC Truth
+ AliMCEventHandler* mcHandler = new AliMCEventHandler();
+
+ AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
+ mgr->SetInputEventHandler (inpHandler);
+ mgr->SetOutputEventHandler (aodHandler);
+ mgr->SetMCtruthEventHandler(mcHandler);
+ mgr->SetDebugLevel(0);
+
+ // --------------------------------------------------------------------------------
+ //
+ // Set Configfiles
+ //
+ // --------------------------------------------------------------------------------
+
+ // -- HLT FFSC
+ AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysisHLT");
+ jetana->SetConfigFile("./tasks/ConfigJetAnalysisHLT.C");
+ jetana->SetNonStdBranch("jetsHLT");
+ jetana->SetDebugLevel(10);
+ mgr->AddTask(jetana);
+
+ // -- HLT FFSC - MC
+ AliAnalysisTaskJets *jetanaMC = new AliAnalysisTaskJets("JetAnalysisHLTMC");
+ jetanaMC->SetConfigFile("./tasks/ConfigJetAnalysisHLTMC.C");
+ jetanaMC->SetNonStdBranch("jetsHLTMC");
+ jetanaMC->SetDebugLevel(0);
+ mgr->AddTask(jetanaMC);
+
+ // --------------------------------------------------------------------------------
+ //
+ // Create containers for input/output
+ //
+ // --------------------------------------------------------------------------------
+
+ AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
+ AliAnalysisDataContainer *coutput1 = mgr->GetCommonOutputContainer();
+ AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(), AliAnalysisManager::kOutputContainer, "histos.root");
+ AliAnalysisDataContainer *coutputMC2 = mgr->CreateContainer("histosMC", TList::Class(), AliAnalysisManager::kOutputContainer, "histosMC.root");
+
+ mgr->ConnectInput (jetana, 0, cinput1 );
+ mgr->ConnectOutput (jetana, 0, coutput1 );
+ mgr->ConnectOutput (jetana, 1, coutput2 );
+
+ mgr->ConnectInput (jetanaMC, 0, cinput1 );
+ mgr->ConnectOutput (jetanaMC, 0, coutput1 );
+ mgr->ConnectOutput (jetanaMC, 1, coutputMC2 );
+
+ // --------------------------------------------------------------------------------
+ //
+ // Run the analysis
+ //
+ // --------------------------------------------------------------------------------
+
+ mgr->InitAnalysis();
+ mgr->PrintStatus();
+ mgr->StartAnalysis("local",chain);
+}
--- /dev/null
+void JetAnalysisManagerHLTKine()
+{
+ gSystem->Load("libCGAL.so");
+ gSystem->Load("${FASTJET}/lib/libfastjet.so");
+
+ gSystem->Load("libTree.so");
+ gSystem->Load("libPhysics.so");
+ gSystem->Load("libGeom.so");
+ gSystem->Load("libVMC.so");
+ gSystem->Load("libANALYSIS.so");
+ gSystem->Load("libSTEERBase.so");
+ gSystem->Load("libAOD.so");
+ gSystem->Load("libESD.so");
+ gSystem->Load("libANALYSISalice.so");
+ gSystem->Load("libJETAN.so");
+
+ //
+ if (gApplication) gApplication->InitializeGraphics();
+ // Create the chain
+ //
+
+ gROOT->LoadMacro("${ALICE_ROOT}/PWG0/CreateESDChain.C");
+ TChain* chain = new TChain("TE");
+ chain->Add("/home/jthaeder/jet/data/HEAD_2009-03-17/FastGen/kPythia6Jets104_125_14TeV/JET-ETA=-0.2,0.2_JET-ET=50,1000_R=0.4_10ev/galice.root");
+
+ ///////////////////////////////////////////////////////////////////////////////////
+ // Create the analysis manager
+ //
+ // Output
+ AliAODHandler* aodHandler = new AliAODHandler();
+ aodHandler->SetOutputFileName("aod.root");
+ // MC Truth
+ AliMCEventHandler* mcHandler = new AliMCEventHandler();
+ mcHandler->SetReadTR(kFALSE);
+
+ AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
+ mgr->SetOutputEventHandler (aodHandler);
+ mgr->SetMCtruthEventHandler(mcHandler);
+ mgr->SetDebugLevel(10);
+
+ AliAnalysisTaskKineFilter *kinefilter = new AliAnalysisTaskKineFilter("Kine Filter");
+ mgr->AddTask(kinefilter);
+
+
+ AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
+ //jetana->SetConfigFile("ConfigJetAnalysisFastjetMC.C");
+ jetana->SetConfigFile("${ALICE_ROOT}/HLT/JET/macros/tasks/ConfigJetAnalysisHLTMC.C");
+ jetana->SetDebugLevel(10);
+ mgr->AddTask(jetana);
+
+ //
+ // Create containers for input/output
+ AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(),
+ AliAnalysisManager::kInputContainer);
+
+ AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
+ AliAnalysisManager::kOutputContainer, "default");
+
+ AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
+ AliAnalysisManager::kOutputContainer, "histos.root");
+
+ mgr->ConnectInput (kinefilter, 0, cinput1 );
+ mgr->ConnectOutput (kinefilter, 0, coutput1 );
+
+ mgr->ConnectInput (jetana, 0, cinput1 );
+ mgr->ConnectOutput (jetana, 0, coutput1 );
+ mgr->ConnectOutput (jetana, 1, coutput2 );
+
+ //
+ // Run the analysis
+ //
+
+ mgr->InitAnalysis();
+ mgr->PrintStatus();
+ mgr->StartAnalysis("local",chain);
+}
analysis/AliHLTJETAnalysisMerge.h \
analysis/AliHLTJETAnalysisComponent.h
-CLASS_HDRS_FJ := AliHLTJETFastJetComponent.h
+CLASS_HDRS_FJ := fastjet/AliHLTJETFastJetHeader.h \
+ fastjet/AliHLTJETFastJetFinder.h \
+ fastjet/AliHLTJETFastJetComponent.h
###############################################################################
HLT/BASE/util \
HLT/JET \
HLT/JET/cone \
+ HLT/JET/fastjet \
HLT/JET/analysis \
ANALYSIS \
JETAN \