]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/JET/AliHLTJETJetCuts.cxx
correcting placement of 'using' statements (Thorsten)
[u/mrichter/AliRoot.git] / HLT / JET / AliHLTJETJetCuts.cxx
index b76ea38db3069f3afb41e55caf5422ffb9922877..c1519922cfc9cfdad347fd85d1d6f6965ee0c388 100644 (file)
 // or
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
 
-#if __GNUC__ >= 3
-using namespace std;
-#endif
-
 #include "AliHLTJETJetCuts.h"
 
+using namespace std;
+
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTJETJetCuts)
 
@@ -74,10 +72,10 @@ Bool_t AliHLTJETJetCuts::IsSelected( TObject *obj ) {
 
   Bool_t bResult = kTRUE;
 
-  if ( ! strcmp(obj->ClassName(),"AliHLTJETConeJetCandidate") )
-    bResult = IsSelected( dynamic_cast<AliHLTJETConeJetCandidate*> (obj));
-  else if ( ! strcmp(obj->ClassName(),"AliAODJet") )
-    bResult = IsSelected( dynamic_cast<AliAODJet*> (obj));
+  if ( obj->IsA() == AliHLTJETConeJetCandidate::Class() )
+    bResult = IsSelected( static_cast<AliHLTJETConeJetCandidate*> (obj));
+  else if ( obj->IsA() == AliAODJet::Class() )
+    bResult = IsSelected( static_cast<AliAODJet*> (obj));
   else {
     HLTError("Unknown object type %s", obj->ClassName() );
     bResult = kFALSE;
@@ -113,62 +111,3 @@ Bool_t AliHLTJETJetCuts::IsSelected( AliAODJet* jet ) {
 
   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
-