updates for train running (M. Verweij, L. Cunqueiro)
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Jul 2012 13:57:36 +0000 (13:57 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Jul 2012 13:57:36 +0000 (13:57 +0000)
PWGJE/AliAnalysisTaskJetCore.cxx
PWGJE/AliAnalysisTaskJetCore.h
PWGJE/AliAnalysisTaskJetSpectrum2.cxx
PWGJE/AliAnalysisTaskJetSpectrum2.h
PWGJE/macros/AddTaskJetSpectrum2.C

index fa2ddad..52ee625 100644 (file)
@@ -45,6 +45,7 @@
 #include "AliAnalysisHelperJetTasks.h"
 #include "AliInputEventHandler.h"
 #include "AliAODJetEventBackground.h"
+#include "AliAODMCParticle.h"
 #include "AliAnalysisTaskFastEmbedding.h"
 #include "AliAODEvent.h"
 #include "AliAODHandler.h"
@@ -84,8 +85,9 @@ fFlagEtaBkg(0),
 fFlagJetHadron(0),
 fFlagRandom(0),
 fFlagOnlyRecoil(0),
+fTrackTypeRec(kTrackUndef),
 fRPAngle(0),
-fNRPBins(3),
+fNRPBins(100),
 fJetEtaMin(-.5),
 fJetEtaMax(.5),
 fNevents(0),
@@ -115,7 +117,6 @@ fh2JetCoreMethod1C60(0x0),
 fh2JetCoreMethod2C60(0x0),
 fh3JetTrackC3060(0x0),
 fh3JetTrackC20(0x0),
-fh3JetTrackC4080(0x0), 
 fh2AngStructpt1C10(0x0),
 fh2AngStructpt2C10(0x0),
 fh2AngStructpt3C10(0x0),
@@ -137,7 +138,8 @@ fh2Ntriggers2(0x0),
 fh3JetDensity(0x0),
 fh3JetDensityA4(0x0),
 fh2RPJets(0x0),
-fh3spectriggeredC4080(0x0),
+fh2RPT(0x0),
+fh3spectriggeredC20RP(0x0),
 fh3spectriggeredC20(0x0),
 fh3spectriggeredC3060(0x0)
 
@@ -194,8 +196,9 @@ fFlagEtaBkg(0),
 fFlagJetHadron(0),
 fFlagRandom(0),
 fFlagOnlyRecoil(0),
+fTrackTypeRec(kTrackUndef),
 fRPAngle(0),
-fNRPBins(3),
+fNRPBins(100),
 fJetEtaMin(-.5),
 fJetEtaMax(.5),
 fNevents(0),
@@ -225,7 +228,6 @@ fh2JetCoreMethod1C60(0x0),
 fh2JetCoreMethod2C60(0x0),
 fh3JetTrackC3060(0x0),
 fh3JetTrackC20(0x0),
-fh3JetTrackC4080(0x0), 
 fh2AngStructpt1C10(0x0),
 fh2AngStructpt2C10(0x0),
 fh2AngStructpt3C10(0x0),
@@ -247,7 +249,8 @@ fh2Ntriggers2(0x0),
 fh3JetDensity(0x0),
 fh3JetDensityA4(0x0),
 fh2RPJets(0x0),
-fh3spectriggeredC4080(0x0),
+fh2RPT(0x0),
+fh3spectriggeredC20RP(0x0),
 fh3spectriggeredC20(0x0),
 fh3spectriggeredC3060(0x0)
 
@@ -361,9 +364,8 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects()
     fh2JetCoreMethod1C60 = new TH2F("JetCoreMethod1C60","",150, 0., 150.,100, 0., 1.5);
     fh2JetCoreMethod2C60 = new TH2F("JetCoreMethod2C60","",150, 0., 150.,100, 0., 1.5);}
 
-    fh3JetTrackC3060=new TH3F("JetTrackC3060","",50,0,50,150,0.,150.,34,0,3.4);
-    fh3JetTrackC20=new TH3F("JetTrackC20","",50,0,50,150,0.,150.,34,0,3.4);
-    fh3JetTrackC4080=new TH3F("JetTrackC4080","",50,0,50,150,0.,150.,34,0,3.4);
+    fh3JetTrackC3060=new TH3F("JetTrackC3060","",50,0,50,150,0.,150.,35,-0.5,3.5);
+    fh3JetTrackC20=new TH3F("JetTrackC20","",50,0,50,150,0.,150.,35,-0.5,3.5);
     if(fAngStructCloseTracks>0){
     fh2AngStructpt1C10 = new TH2F("Ang struct pt1 C10","",15,0.,1.5,150,0.,10.);
     fh2AngStructpt2C10 = new TH2F("Ang struct pt2 C10","",15,0.,1.5,150,0.,10.);
@@ -385,12 +387,13 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects()
    
 
     fh2Ntriggers=new TH2F("# of triggers","",10,0.,100.,50,0.,50.);
-    fh2Ntriggers2=new TH2F("# of triggers2","",100,0.,4000.,50,0.,50.);
+    fh2Ntriggers2=new TH2F("# of triggers2","",50,0.,50.,50,0.,50.);
 
     fh3JetDensity=new TH3F("Jet density vs mutliplicity A>0.4","",100,0.,4000.,100,0.,5.,10,0.,50.);
     fh3JetDensityA4=new TH3F("Jet density vs multiplicity A>0.4","",100,0.,4000.,100,0.,5.,10,0.,50.);
-    fh2RPJets=new TH2F("RPJet","",3,0.,3.,150,0.,150.); 
-    fh3spectriggeredC4080 = new TH3F("Triggered spectrumC4080","",100,0.,1.,140,-80.,200.,10,0.,50.);
+    fh2RPJets=new TH2F("RPJet","",fNRPBins,0.,3.15,150,0.,150.);
+    fh2RPT=new TH2F("RPTrigger","",fNRPBins,0.,3.15,150,0.,150.); 
+    fh3spectriggeredC20RP = new TH3F("Triggered spectrumC20RP","",3,0.,3.,140,-80.,200.,10,0.,50.);
     fh3spectriggeredC20 = new TH3F("Triggered spectrumC20","",100,0.,1.,140,-80.,200.,10,0.,50.);
     fh3spectriggeredC3060 = new TH3F("Triggered spectrumC3060","",100,0.,1.,140,-80.,200.,10,0.,50.);
 
@@ -417,7 +420,7 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects()
       
       fOutputList->Add(fh3JetTrackC3060);
       fOutputList->Add(fh3JetTrackC20);
-      fOutputList->Add(fh3JetTrackC4080); 
+     
             
      
 
@@ -449,7 +452,8 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects()
         fOutputList->Add(fh3JetDensity);
         fOutputList->Add(fh3JetDensityA4);
         fOutputList->Add(fh2RPJets);
-       fOutputList->Add(fh3spectriggeredC4080);
+        fOutputList->Add(fh2RPT);
+      
        fOutputList->Add(fh3spectriggeredC20); 
        fOutputList->Add(fh3spectriggeredC3060);   
 
@@ -620,10 +624,7 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *)
      for (Int_t iJetType = 0; iJetType < 2; iJetType++) {
       fListJets[iJetType]->Clear();
       if (!aodJets[iJetType]) continue;
-
       if(fDebug) Printf("%s: %d jets",fJetBranchName[iJetType].Data(),aodJets[iJetType]->GetEntriesFast());
-      
-   
       for (Int_t iJet = 0; iJet < aodJets[iJetType]->GetEntriesFast(); iJet++) {
          AliAODJet *jet = dynamic_cast<AliAODJet*>((*aodJets[iJetType])[iJet]);
          if (jet) fListJets[iJetType]->Add(jet);
@@ -647,14 +648,14 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *)
    Int_t trigBBTrack=-1;
    Int_t trigInTrack=-1;
    fRPAngle = aod->GetHeader()->GetEventplane();     
-
-  
    AliVParticle *partback = (AliVParticle*)ParticleList.At(nT);     
    if(!partback){  
    PostData(1, fOutputList);
    return;}
+
    fh2Ntriggers->Fill(centValue,partback->Pt());
-   fh2Ntriggers2->Fill(ParticleList.GetEntries(),partback->Pt());
+   Int_t phiBinT = GetPhiBin(partback->Phi()-fRPAngle);
+   if(centValue<20.) fh2RPT->Fill(phiBinT,partback->Pt()); 
 
    Double_t accep=2.*TMath::Pi()*1.8;
    Int_t injet4=0;
@@ -676,16 +677,14 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *)
            if(fFlagEtaBkg==1){
           Double_t etadif= partback->Eta()-etabig;
            if(TMath::Abs(etadif)<=0.5){             
-           if(centValue>40. && centValue<80.) fh3JetTrackC4080->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));
+          
            if(centValue<20.) fh3JetTrackC20->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));
            if(centValue>30. && centValue<60.) fh3JetTrackC3060->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));}}
            if(fFlagEtaBkg==0){
-           if(centValue>40. && centValue<80.) fh3JetTrackC4080->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));
            if(centValue<20.) fh3JetTrackC20->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));
            if(centValue>30. && centValue<60.) fh3JetTrackC3060->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));}
 
 
-
            if(fFlagJetHadron==0){
            if(fFlagPhiBkg!=0) if((TMath::Abs(dphi)<TMath::Pi()/2.-0.1)||(TMath::Abs(dphi)>TMath::Pi()/2.+0.1)) continue;
            if(fFlagPhiBkg==0) if(TMath::Abs(dphi)<TMath::Pi()-0.6) continue;}
@@ -694,11 +693,12 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *)
 
 
                    if(centValue<20.) fh2RPJets->Fill(phiBin, ptcorr);
+                   if(centValue<20.) fh2RPT->Fill(phiBinT,phiBin);
                    Double_t dismin=100.;
                    Double_t ptmax=-10.; 
                    Int_t index1=-1;
                    Int_t index2=-1;
-           if(centValue>40. && centValue<80.)  fh3spectriggeredC4080->Fill(jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt());
+           if(centValue<20.)  fh3spectriggeredC20RP->Fill(phiBin,ptcorr,partback->Pt());
            if(centValue<20.)  fh3spectriggeredC20->Fill(jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt());
            if(centValue>30. && centValue<60.)  fh3spectriggeredC3060->Fill(jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt());
 
@@ -767,13 +767,13 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *)
                  if(centValue>60) fh2JetCoreMethod2C60->Fill(ptcorr,jetmethod2->Pt()/ptbig); }}  
        
                   
-         if(fDoEventMixing==0 && fFlagOnlyRecoil==0){
+        
         for(int it = 0;it<ParticleList.GetEntries();++it){
          AliVParticle *part = (AliVParticle*)ParticleList.At(it);
                  Double_t deltaR = jetbig->DeltaR(part);
           Double_t deltaEta = etabig-part->Eta();
-         
+          if(centValue<20.) fh2Ntriggers2->Fill(partback->Pt(),part->Pt());
+          if(fDoEventMixing==0 && fFlagOnlyRecoil==0){ 
           Double_t deltaPhi=phibig-part->Phi();
           if(deltaPhi<-0.5*TMath::Pi()) deltaPhi+=2.*TMath::Pi();
           if(deltaPhi>3./2.*TMath::Pi()) deltaPhi-=2.*TMath::Pi();
@@ -782,8 +782,11 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *)
           if(fFlagJetHadron!=0) pTcont=leadtrackb->Pt(); 
           Double_t jetEntries[8] = {centValue,ptcorr,part->Pt(),deltaR,deltaEta,deltaPhi,pTcont,partback->Pt()};  
            fhnDeltaR->Fill(jetEntries);}
+
+
+}
+        
         
-        }
           //end of track loop, we only do it if EM is switched off
          
 
@@ -966,13 +969,17 @@ void AliAnalysisTaskJetCore::Terminate(const Option_t *)
 
 Int_t  AliAnalysisTaskJetCore::GetListOfTracks(TList *list){
 
-     Int_t iCount = 0;
-     AliAODEvent *aod = 0;
+      Int_t iCount = 0;
+      AliAODEvent *aod = 0;
+
      if(!fESD)aod = fAODIn;
      else aod = fAODOut;   
-     Int_t index=-1;
+      Int_t index=-1;
      Double_t ptmax=-10;
-    for(int it = 0;it < aod->GetNumberOfTracks();++it){
+
+
+    
+     for(int it = 0;it < aod->GetNumberOfTracks();++it){
       AliAODTrack *tr = aod->GetTrack(it);
       if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
       if(TMath::Abs(tr->Eta())>0.9)continue;
@@ -982,10 +989,24 @@ Int_t  AliAnalysisTaskJetCore::GetListOfTracks(TList *list){
       if(tr->Pt()>ptmax){ ptmax=tr->Pt();
       index=iCount-1;}
       
-    }
+     }
   
    
-  return index;
+    // else if (type == kTrackAODMCCharged) {
+    // TClonesArray *tca = dynamic_cast<TClonesArray*>(aod->FindListObject(AliAODMCParticle::StdBranchName()));
+    // if(!tca)return iCount;
+    // for(int it = 0;it < tca->GetEntriesFast();++it){
+    //   AliAODMCParticle *part = dynamic_cast<AliAODMCParticle*>(tca->At(it));
+    //   if(!part)continue;
+    //   if(part->Pt()<0.15)continue;
+    //   if(!part->IsPhysicalPrimary())continue;
+    //   if(part->Charge()==0)continue;
+    //   if(TMath::Abs(part->Eta())>0.9)continue;
+    //   list->Add(part);
+    //   iCount++;
+    //   if(part->Pt()>ptmax){ ptmax=part->Pt();
+    //         index=iCount-1;}}}
+      return index;
  
 }
 
index 761e5a5..1fed314 100644 (file)
@@ -81,7 +81,9 @@ public:
    virtual void     SetFlagEtaBkg(Int_t yesno){fFlagEtaBkg=yesno;}
    virtual void     SetFlagJetHadron(Int_t yesno){fFlagJetHadron=yesno;}
    virtual void     SetFlagRandom(Int_t yesno){fFlagRandom=yesno;}
-   virtual void     SetFlagOnlyRecoil(Int_t yesno){fFlagRandom=yesno;}
+   virtual void     SetFlagOnlyRecoil(Int_t yesno){fFlagOnlyRecoil=yesno;}
+   virtual void     SetNRPBins(Int_t bins){fNRPBins=bins;}
+   virtual void     SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
    virtual void     SetJetEtaMin(Float_t eta) { fJetEtaMin = eta; }
    virtual void     SetJetEtaMax(Float_t eta) { fJetEtaMax = eta; }
    virtual void     SetJetPtMin(Float_t pt) { fJetPtMin = pt; }
@@ -91,7 +93,7 @@ public:
    virtual void     SetFillEvent(Bool_t b) { fbEvent = b; }
    virtual void     SetKeepJets(Bool_t b = kTRUE) { fKeepJets = b; }
    virtual void     SetNonStdFile(char* c){fNonStdFile = c;} 
-
+    enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
 
 private:
    // ESD/AOD events
@@ -99,7 +101,7 @@ private:
    AliAODEvent *fAODIn;    //! AOD event for AOD input tracks
     AliAODEvent *fAODOut;    //! AOD event 
     AliAODExtension  *fAODExtension; //! where we take the jets from can be input or output AOD
-   Int_t   GetListOfTracks(TList *list);
+    Int_t   GetListOfTracks(TList *list);
    Int_t   GetHardestTrackBackToJet(AliAODJet *jet);
    Int_t   GetListOfTracksCloseToJet(TList *list,AliAODJet *jet);
    // jets to compare
@@ -131,6 +133,7 @@ private:
    Int_t   fFlagJetHadron;
    Int_t   fFlagRandom;
    Int_t   fFlagOnlyRecoil;
+   Int_t   fTrackTypeRec;
    Int_t   fRPAngle;
    Int_t   fNRPBins;
    Float_t fJetEtaMin;        // lower bound on eta for found jets
@@ -168,7 +171,6 @@ private:
    TH2F      *fh2JetCoreMethod2C60;          //Energy fraction in the core C60 method 2
      TH3F*      fh3JetTrackC3060;           //C3060 pt2
      TH3F*      fh3JetTrackC20;             //C10 pt2
-     TH3F*      fh3JetTrackC4080;           //C4080
      TH2F*      fh2AngStructpt1C10;         //Average 
      TH2F*      fh2AngStructpt2C10;         //C10 pt2
      TH2F*      fh2AngStructpt3C10;         //C10 pt3
@@ -190,8 +192,9 @@ private:
      TH2F*      fh2Ntriggers2;             //centrality bias of triggers 
      TH3F*      fh3JetDensity;             //jet density
      TH3F*      fh3JetDensityA4;           //jet density
-     TH2F*      fh2RPJets;                  //reaction plane from tracks
-     TH3F*      fh3spectriggeredC4080;         //triggered spectra
+     TH2F*      fh2RPJets;                  //reaction plane Jets
+     TH2F*      fh2RPT;                     //reaction plane TT 
+     TH3F*      fh3spectriggeredC20RP;       //spec wrt RP
      TH3F*      fh3spectriggeredC20;           //triggered spectra
      TH3F*      fh3spectriggeredC3060;         //triggered spectra
 
index 589e4fb..d5c624d 100644 (file)
@@ -100,6 +100,8 @@ AliAnalysisTaskJetSpectrum2::AliAnalysisTaskJetSpectrum2():
   fNTrigger(0),
   fTriggerBit(0x0),
   fNAcceptance(0),
+  fNBinsLeadingTrackPt(10),
+  fNBinsMult(20),
   fAnalysisType(0),
   fTrackTypeRec(kTrackUndef),
   fTrackTypeGen(kTrackUndef),
@@ -205,6 +207,8 @@ AliAnalysisTaskJetSpectrum2::AliAnalysisTaskJetSpectrum2(const char* name):
   fNTrigger(0),
   fTriggerBit(0x0),
   fNAcceptance(0),
+  fNBinsLeadingTrackPt(10),
+  fNBinsMult(20),
   fAnalysisType(0),
   fTrackTypeRec(kTrackUndef),
   fTrackTypeGen(kTrackUndef),
@@ -510,7 +514,7 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
     const Int_t nBinsSparse1 = 9;
     const Int_t nBinsLeadingTrackPt = 10;
     const Int_t nBinsArea = 10;
-    Int_t nBins1[nBinsSparse1] = {     kMaxJets+1,120, 10,  20,    fNRPBins, nBinsArea,fNTrigger,nBinsLeadingTrackPt,fNAcceptance+1};
+    Int_t nBins1[nBinsSparse1] = {     kMaxJets+1,120, 10,  fNBinsMult,    fNRPBins, nBinsArea,fNTrigger,fNBinsLeadingTrackPt,fNAcceptance+1};
     if(cJetBranch.Contains("RandomCone")){
       nBins1[1] = 600;
       nBins1[5] = 1;
@@ -523,7 +527,7 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
 
     fhnJetPt[ij] = new THnSparseF(Form("fhnJetPt%s",cAdd.Data()),";jet number;p_{T,jet};cent;# tracks;RP;area;trigger;leading track p_{T};acceptance bin",nBinsSparse1,nBins1,xmin1,xmax1);
     fhnJetPt[ij]->SetBinEdges(5,binArrayArea);
-    fhnJetPt[ij]->SetBinEdges(7,binArrayLeadingTrackPt);
+    if(fNBinsLeadingTrackPt>1) fhnJetPt[ij]->SetBinEdges(7,binArrayLeadingTrackPt);
     fHistList->Add(fhnJetPt[ij]);
 
 
@@ -552,9 +556,10 @@ void AliAnalysisTaskJetSpectrum2::UserCreateOutputObjects()
     
     // Bins:track number  pTtrack, cent, mult, RP.   total bins = 224 k
     const Int_t nBinsSparse3 = 6;
-    const Int_t nBins3[nBinsSparse3] = {       2,    100,     10,   1,    fNRPBins,fNTrigger};
+    const Int_t nRPBinsSparse3 = 3;
+    const Int_t nBins3[nBinsSparse3] = {       2,    100,     10,   1,    nRPBinsSparse3,fNTrigger};
     const Double_t xmin3[nBinsSparse3]  = { -0.5,      0,   0,      0,        -0.5,-0.5};
-    const Double_t xmax3[nBinsSparse3]  = { 1.5,     200, 100,   4000,fNRPBins-0.5,fNTrigger-0.5};  
+    const Double_t xmax3[nBinsSparse3]  = { 1.5,     200, 100,   4000,nRPBinsSparse3-0.5,fNTrigger-0.5};  
     
       // change the binning ot the pT axis:
     Double_t *xPt3 = new Double_t[nBins3[1]+1];
index 362d24e..589e789 100644 (file)
@@ -64,6 +64,8 @@ class AliAnalysisTaskJetSpectrum2 : public AliAnalysisTaskSE
     virtual void SetNMatchJets(Short_t f){fNMatchJets = f;}
     virtual void SetMinJetPt(Float_t f){fMinJetPt = f;}
     virtual void SetNRPBins(Short_t i){fNRPBins = i;} 
+    virtual void SetNMultBins(Short_t i) {fNBinsMult=i;}
+    virtual void SetNPtLeadingBins(Short_t i) {fNBinsLeadingTrackPt=i;}
     virtual void SetFlagJetType(Int_t iType,Int_t iF){fFlagJetType[iType] = iF;}
     virtual void SetMinTrackPt(Float_t f){fMinTrackPt = f;}
     virtual void SetDeltaPhiWindow(Float_t f){fDeltaPhiWindow = f;}
@@ -178,6 +180,8 @@ class AliAnalysisTaskJetSpectrum2 : public AliAnalysisTaskSE
     Int_t         fNTrigger;              // number of triggers for selection
     UInt_t        *fTriggerBit;            //[fNTrigger] trigger bits 
     Int_t         fNAcceptance;            // number of triggers for selection
+    Short_t       fNBinsLeadingTrackPt;   // number of bins leading track pt in sparse. Two options: 1 or 10
+    Short_t       fNBinsMult;             // number of bins in multiplicity in sparse
     Int_t         fAnalysisType;          // Analysis type 
     Int_t         fTrackTypeRec;          // type of tracks used for FF 
     Int_t         fTrackTypeGen;          // type of tracks used for FF 
index cb7cb0a..e2a735d 100644 (file)
@@ -1,7 +1,7 @@
 Bool_t ConfigWithFlagsJetSpectrum2();\r
 AliAnalysisTaskJetSpectrum2 *jetspec = 0;\r
 \r
-AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec = "jets",const char* bGen = "jetsAODMC_UA104",const char* nonStdFile="",UInt_t filterMask = 32, Int_t iPhysicsSelectionFlag = AliVEvent::kMB,UInt_t iEventSelectionMask = 0,Int_t iCl = 0);\r
+AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec = "jets",const char* bGen = "jetsAODMC_UA104",const char* nonStdFile="",UInt_t filterMask = 32, Int_t iPhysicsSelectionFlag = AliVEvent::kMB,UInt_t iEventSelectionMask = 0,Int_t iCl = 0, Bool_t bRCSparseDimensions = kFALSE);\r
 \r
 \r
 AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 32,Bool_t kUseAODMC = kFALSE,Int_t iPhysicsSelectionFlag = AliVEvent::kMB,UInt_t iFlag = 0xfffffff, UInt_t iEventSelectionMask = 0,char* back = ""){\r
@@ -48,7 +48,7 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2Delta(UInt_t filterMask = 32,Boo
 }\r
 \r
 \r
-AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bGen ,const char* nonStdFile,UInt_t filterMask,Int_t iPhysicsSelectionFlag,UInt_t iEventSelectionMask,Int_t iCl)\r
+AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bGen ,const char* nonStdFile,UInt_t filterMask,Int_t iPhysicsSelectionFlag,UInt_t iEventSelectionMask,Int_t iCl, Bool_t bRCSparseDimensions)\r
 {\r
   // Creates a jet fider task, configures it and adds it to the analysis manager.\r
   // Get the pointer to the existing analysis manager via the static access method.\r
@@ -139,6 +139,12 @@ AliAnalysisTaskJetSpectrum2 *AddTaskJetSpectrum2(const char* bRec,const char* bG
    jetspec->SetUseGlobalSelection(kTRUE); \r
    jetspec->SetMinJetPt(-1.);//keep all jets \r
 \r
+   if(bRCSparseDimensions) {\r
+     jetspec->SetNRPBins(100);\r
+     jetspec->SetNMultBins(1);\r
+     jetspec->SetNPtLeadingBins(1);\r
+   }\r
+\r
    // to fetch the AOD from the AOD extension ouput \r
    if(strlen(nonStdFile))jetspec->SetNonStdFile(nonStdFile);\r
    mgr->AddTask(jetspec);\r