added readin of hybrid aod tracks
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 26 Jun 2011 11:00:53 +0000 (11:00 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 26 Jun 2011 11:00:53 +0000 (11:00 +0000)
JETAN/AliAnalysisTaskJetCluster.cxx
JETAN/AliAnalysisTaskJetCluster.h

index 469f8a8..69d8f26 100644 (file)
@@ -84,15 +84,17 @@ AliAnalysisTaskJetCluster::~AliAnalysisTaskJetCluster(){
   delete fAODJetBackgroundOut;
 }
 
-AliAnalysisTaskJetCluster::AliAnalysisTaskJetCluster(): AliAnalysisTaskSE(),
+AliAnalysisTaskJetCluster::AliAnalysisTaskJetCluster(): 
+  AliAnalysisTaskSE(),
   fAOD(0x0),
   fAODExtension(0x0),
   fRef(new TRefArray),
   fUseAODTrackInput(kFALSE),
   fUseAODMCInput(kFALSE),
   fUseBackgroundCalc(kFALSE),
-  fEventSelection(kFALSE),                                                     
+  fEventSelection(kFALSE),     
   fFilterMask(0),
+  fFilterType(0),
   fTrackTypeRec(kTrackUndef),
   fTrackTypeGen(kTrackUndef),  
   fNSkipLeadingRan(0),
@@ -204,6 +206,7 @@ AliAnalysisTaskJetCluster::AliAnalysisTaskJetCluster(const char* name):
   fUseBackgroundCalc(kFALSE),
   fEventSelection(kFALSE),                                                     
   fFilterMask(0),
+  fFilterType(0),
   fTrackTypeRec(kTrackUndef),
   fTrackTypeGen(kTrackUndef),
   fNSkipLeadingRan(0),
@@ -1354,7 +1357,11 @@ Int_t  AliAnalysisTaskJetCluster::GetListOfTracks(TList *list,Int_t type){
       }
       for(int it = 0;it < aod->GetNumberOfTracks();++it){
        AliAODTrack *tr = aod->GetTrack(it);
-       if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask))){
+       Bool_t bGood = false;
+       if(fFilterType == 0)bGood = true;
+       else if(fFilterType == 1)bGood = tr->IsHybridITSTPC();
+       else if(fFilterType == 2)bGood = tr->IsHybridTPC();
+       if((fFilterMask>0)&&((!tr->TestFilterBit(fFilterMask)||(!bGood)))){
          if(fDebug>10)Printf("%s:%d Not matching filter %d/%d %d/%d",(char*)__FILE__,__LINE__,it,aod->GetNumberOfTracks(),fFilterMask,tr->GetFilterMap());     
          continue;
        }
@@ -1387,7 +1394,11 @@ Int_t  AliAnalysisTaskJetCluster::GetListOfTracks(TList *list,Int_t type){
 
        AliAODTrack *trackAOD = dynamic_cast<AliAODTrack*> (track);
        if(!trackAOD)continue;
-        if((fFilterMask>0)&&!(trackAOD->TestFilterBit(fFilterMask))) continue;
+       Bool_t bGood = false;
+       if(fFilterType == 0)bGood = true;
+       else if(fFilterType == 1)bGood = trackAOD->IsHybridITSTPC();
+       else if(fFilterType == 2)bGood = trackAOD->IsHybridTPC();
+       if((fFilterMask>0)&&((!trackAOD->TestFilterBit(fFilterMask)||(!bGood))))continue;
         if(TMath::Abs(trackAOD->Eta())>fTrackEtaWindow) continue;
        if(trackAOD->Pt()<fTrackPtCut) continue;
        list->Add(trackAOD);
index 98eafd5..f11c0ac 100644 (file)
@@ -60,7 +60,8 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
     virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
     virtual void SetTrackPtCut(Float_t x){fTrackPtCut = x;}
     virtual void SetCentralityCut(Float_t xLo,Float_t xUp){fCentCutLo = xLo; fCentCutUp = xUp;}
-    virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
+    virtual void SetFilterMask(UInt_t i,Int_t iType = 0){fFilterMask = i;
+      fFilterType = iType;}
     virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}    
     virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;}    
     virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
@@ -122,6 +123,7 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
     Bool_t        fUseBackgroundCalc;     // switches on background calculations
     Bool_t        fEventSelection;        // use the event selection of this task, otherwise analyse all
     UInt_t        fFilterMask;            // filter bit for slecected tracks
+    UInt_t        fFilterType;            // filter type 0 = all, 1 = ITSTPC, 2 = TPC
     Int_t         fTrackTypeRec;          // type of tracks used for FF 
     Int_t         fTrackTypeGen;          // type of tracks used for FF 
     Int_t         fNSkipLeadingRan;       // number of leading tracks to be skipped in the randomized event
@@ -233,7 +235,7 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
     TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
    
 
-    ClassDef(AliAnalysisTaskJetCluster, 17) 
+    ClassDef(AliAnalysisTaskJetCluster, 18) 
 };
  
 #endif