set centrality to 0 for p+p
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Jul 2011 19:51:08 +0000 (19:51 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Jul 2011 19:51:08 +0000 (19:51 +0000)
PWG4/JetTasks/AliAnalysisTaskJetServices.cxx
PWG4/JetTasks/AliAnalysisTaskJetServices.h
PWG4/macros/AnalysisTrainPWG4Jets.C
PWG4/macros/ConfigTrainGrid.C

index dd109e9..cd4f2ff 100644 (file)
@@ -82,6 +82,7 @@ AliAnalysisTaskJetServices::AliAnalysisTaskJetServices():
   fEventCutInfoESD(0),
   fFilterMask(0),
   fRPSubeventMethod(0),
+  fCollisionType(kPbPb),
   fAvgTrials(1),
   fVtxXMean(0),
   fVtxYMean(0),
@@ -141,6 +142,7 @@ AliAnalysisTaskJetServices::AliAnalysisTaskJetServices(const char* name):
   fEventCutInfoESD(0),
   fFilterMask(0),
   fRPSubeventMethod(0),
+  fCollisionType(kPbPb),
   fAvgTrials(1),
   fVtxXMean(0),
   fVtxYMean(0),
@@ -475,8 +477,11 @@ void AliAnalysisTaskJetServices::UserExec(Option_t */*option*/)
   // loop over all possible triggers for esd 
 
   Float_t cent = 0;
-  if(aod)cent = aod->GetHeader()->GetCentrality();
-  if(cent<0)cent = 101;
+  if(fCollisionType==kPbPb){
+    if(aod)cent = aod->GetHeader()->GetCentrality();
+    if(fDebug)Printf("%s:%d %3.3f",(char*)__FILE__,__LINE__,cent);
+    if(cent<0)cent = 101;
+  }
   fCentrality = cent;
   fRPAngle = 0;
 
@@ -584,7 +589,7 @@ void AliAnalysisTaskJetServices::UserExec(Option_t */*option*/)
       fh1Centrality->Fill(cent);
       AliAnalysisHelperJetTasks::Selected(kTRUE,kTRUE);// select this event
       if(aodH&&cand&&fFilterAODCollisions&&!esd){
-       if(cent<=80&&aodVtxIn){
+       if(fCentrality<=80&&aodVtxIn){
          aodH->SetFillAOD(kTRUE);
          aodH->SetFillExtension(kTRUE);
        }
@@ -594,7 +599,7 @@ void AliAnalysisTaskJetServices::UserExec(Option_t */*option*/)
       GetListOfTracks(&recTracks);
       CalculateReactionPlaneAngle(&recTracks);
       AliAnalysisHelperJetTasks::ReactionPlane(kTRUE,fRPAngle); // set slection to false
-      if(fUseAODInput&&cent<=80){
+      if(fUseAODInput&&fCentrality<=80){
        if(fFilterAODCollisions&&aod){
          aodH->SetFillAOD(kTRUE);
        }
@@ -889,26 +894,31 @@ Bool_t AliAnalysisTaskJetServices::IsEventCosmic(const AliESDEvent* esd) const {
 Int_t AliAnalysisTaskJetServices::GetEventClass(AliESDEvent *esd){
 
   Float_t cent = 0;
-  if(esd->GetCentrality()){
-    cent = esd->GetCentrality()->GetCentralityPercentile("V0M");
+  if(fCollisionType==kPbPb){
+    if(esd->GetCentrality()){
+      cent = esd->GetCentrality()->GetCentralityPercentile("V0M");
+    }
+    if(cent<0)cent = 101;
+    if(cent>80||cent<0)return 5;
+    if(cent>50)return 4;
+    if(cent>30)return 3;
+    if(cent>10)return 2;
+    return 1;
   }
-  if(cent<0)cent = 100;
-  if(cent>80||cent<0)return 5;
-  if(cent>50)return 4;
-  if(cent>30)return 3;
-  if(cent>10)return 2;
   return 1;
-
 }
 
 
 Int_t AliAnalysisTaskJetServices::GetEventClass(AliAODEvent *aod){
 
-  Float_t cent = aod->GetHeader()->GetCentrality();
-  if(cent>80||cent<0)return 5;
-  if(cent>50)return 4;
-  if(cent>30)return 3;
-  if(cent>10)return 2;
+  if(fCollisionType==kPbPb){
+    Float_t cent = aod->GetHeader()->GetCentrality();
+    if(cent>80||cent<0)return 5;
+    if(cent>50)return 4;
+    if(cent>30)return 3;
+    if(cent>10)return 2;
+    return 1;
+  }
   return 1;
 
 }
index 7e4c06a..958d1c7 100644 (file)
@@ -55,6 +55,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
     virtual void SetAODInput(Bool_t b){fUseAODInput = b;}
     virtual void SetRunRange(Float_t fLo,Float_t fUp){fRunRange[0] = fLo;fRunRange[1] = fUp;}
     virtual void SetMCData(Bool_t b){fMC = b;}
+    virtual void SetCollisionType(Int_t iType){fCollisionType = iType;}
     virtual void SetUsePhysicsSelection(Bool_t b){fUsePhysicsSelection = b;}
     virtual void SetPhysicsSelectionFlag(Int_t i){fPhysicsSelectionFlag = i;}
     virtual void SetFilterAODCollisions(Bool_t b){fFilterAODCollisions = b;}
@@ -108,6 +109,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
           kVertexZCut=1<<9,
           kVertexRCut=1<<10,
           kTotalEventCuts=(1<<11)-1};
+    enum {kPbPb = 0,kPP,kPbP};
 
  private:
 
@@ -123,6 +125,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
     UInt_t        fEventCutInfoESD;   // event selection info of what is cutted after physics selection
     UInt_t        fFilterMask;         // filter bit for slecected tracks
     Int_t         fRPSubeventMethod;   // method for subevent calculation
+    Int_t         fCollisionType;           // type of collisions
     Float_t       fAvgTrials;          // Average number of trials
     Float_t       fVtxXMean;           // mean x for cuts
     Float_t       fVtxYMean;           // mean y for cuts
@@ -175,7 +178,7 @@ class AliAnalysisTaskJetServices : public AliAnalysisTaskSE
         // Provisions for replication
     static AliAODHeader*    fgAODHeader;        //! Header for replication
     static TClonesArray*  fgAODVertices;        //! primary vertex for replication
-    ClassDef(AliAnalysisTaskJetServices,12)
+    ClassDef(AliAnalysisTaskJetServices,13)
 };
  
 #endif
index cb8dbfd..61c1032 100644 (file)
@@ -672,6 +672,14 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
        taskCl->SetEventSelection(kTRUE); // saves some computing time, not all vertices are processed
        taskCl->SetCentralityCut(fCenLo,fCenUp);
        if(kIsPbPb)taskCl->SetBackgroundBranch(kDefaultJetBackgroundBranch.Data());
+
+
+       if(iFilterAnalysis==2){
+        if(kIsPbPb)taskCl->SetJetTriggerPtCut(40);
+        else taskCl->SetJetTriggerPtCut(20.);
+       }
+
+
        //       taskCl->SetDebugLevel(3);
  
        taskCl->SetNRandomCones(1);
@@ -692,23 +700,12 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
        kJetSubtractBranchesCut1 += Form("%s ",taskCl->GetJetOutputBranch());
        kJetListSpectrum.Add(new TObjString(taskCl->GetJetOutputBranch()));
 
-       if(iFilterAnalysis==2){
-        if(kIsPbPb)taskCl->SetJetTriggerPtCut(0.);
-        else taskCl->SetJetTriggerPtCut(20.);
-       }
-
        // tmp track qa...
-       taskCl = AddTaskJetCluster("AOD","",1<<4|1<<8,iPhysicsSelectionFlag,"ANTIKT",0.4,2,1,kDeltaAODJetName.Data(),2.0);
+       taskCl = AddTaskJetCluster("AOD","",1<<8,iPhysicsSelectionFlag,"ANTIKT",0.4,2,1,kDeltaAODJetName.Data(),2.0);
        taskCl->SetEventSelection(kTRUE); // saves some computing time, not all vertices are processed
        taskCl->SetCentralityCut(fCenLo,fCenUp);
        taskCl->SetFilterMask(1<<4|1<<8,1);
 
-
-       taskCl = AddTaskJetCluster("AOD","",1<<9|1<<8,iPhysicsSelectionFlag,"ANTIKT",0.4,2,1,kDeltaAODJetName.Data(),2.0);
-       taskCl->SetEventSelection(kTRUE); // saves some computing time, not all vertices are processed
-       taskCl->SetCentralityCut(fCenLo,fCenUp);
-       taskCl->SetFilterMask(1<<9|1<<8,2);
-
        taskCl = AddTaskJetCluster("AOD","",kHighPtFilterMask,iPhysicsSelectionFlag,"ANTIKT",0.2,0,1,kDeltaAODJetName.Data(),0.15);
        taskCl->SetCentralityCut(fCenLo,fCenUp);
        taskCl->SetEventSelection(kTRUE); // saves some computing time, not all vertices are processed
@@ -881,6 +878,8 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
      taskjetServ->SetNonStdFile(kDeltaAODJetName.Data());
      taskjetServ->SetTrackEtaWindow(fTrackEtaWindow);
      taskjetServ->SetFilterMask(kHighPtFilterMask);
+     if(kIsPbPb)taskjetServ->SetCollisionType(AliAnalysisTaskJetServices::kPbPb);
+     else taskjetServ->SetCollisionType(AliAnalysisTaskJetServices::kPP);
      if(kIsPbPb){
        if(kDeltaAODJetName.Length()>0&&kFilterAOD)taskjetServ->SetFilterAODCollisions(kTRUE);
        //       else if(iAODanalysis)taskjetServ->SetFilterAODCollisions(kTRUE);
@@ -904,6 +903,7 @@ void AnalysisTrainPWG4Jets(const char *analysis_mode="local",
        Printf("%3d: %s",iJF+1,objStr->GetString().Data());
      }
 
+     // Printf("Type q to exit");if(getchar()=='q')return;
      if(iPWG4JetSpectrum&1){
        if(kIsPbPb){
         for(int iJF = 0;iJF < kJetListSpectrum.GetSize();iJF++){
index 7f06369..8eff021 100644 (file)
@@ -39,7 +39,7 @@
   // bextra == 0 4 plus
   // bextra == 1 large pass1 split..
   // bextra == 2 3 plus
-  Int_t bRun = 802; Int_t bExtra = 0;  char* cDate = "110702a";
+  Int_t bRun = 802; Int_t bExtra = 0;  char* cDate = "110704a";
   iAODanalysis = 0; 
   // 1 == Read Jets and tracks form the input AOD
   // needs the jet branchnames set explicitly
       kGridFilesPerJob       = 30;
       /*
       // Thnsparses... 
+
       ############# Possible jet branches ###################
-      1: jetsAOD_UA104_B0_Filter00256_Cut01000
-      2: jetsAOD_UA104_B0_Filter00256_Cut02000
-      3: jetsAOD_UA104_B2_Filter00256_Cut01000
-      4: jetsAOD_UA104_B2_Filter00256_Cut02000
-      5: clustersAOD_KT04_B0_Filter00256_Cut00150_Skip00
-      6: clustersAOD_KT04_B0_Filter00256_Cut00150_Skip00RandomConeSkip00
-      7: clustersAOD_KT04_B0_Filter00256_Cut00150_Skip00RandomCone_random
-      8: clustersAOD_KT04_B0_Filter00256_Cut02000_Skip00
-      9: clustersAOD_KT04_B0_Filter00256_Cut02000_Skip00RandomConeSkip00
-      10: clustersAOD_KT04_B0_Filter00256_Cut02000_Skip00RandomCone_random
-      11: clustersAOD_KT02_B0_Filter00256_Cut00150_Skip00
-      12: clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip02
-      13: clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip02RandomConeSkip02
-      14: clustersAOD_ANTIKT04_B0_Filter00256_Cut00150_Skip02RandomCone_random
-      15: clustersAOD_ANTIKT04_B0_Filter00256_Cut02000_Skip02
-      16: clustersAOD_ANTIKT02_B0_Filter00256_Cut00150_Skip00
-      17: clustersAOD_KT04_B1_Filter00256_Cut00150_Skip00RandomConeSkip00
-      18: clustersAOD_KT04_B1_Filter00256_Cut00150_Skip00RandomCone_random
-      19: clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip02
-      20: clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip02RandomConeSkip02
-      21: clustersAOD_ANTIKT04_B1_Filter00256_Cut00150_Skip02RandomCone_random
-      22: clustersAOD_ANTIKT02_B1_Filter00256_Cut00150_Skip00
-      23: clustersAOD_KT04_B2_Filter00256_Cut00150_Skip00RandomConeSkip00
-      24: clustersAOD_KT04_B2_Filter00256_Cut00150_Skip00RandomCone_random
-      25: clustersAOD_ANTIKT04_B2_Filter00256_Cut00150_Skip02
-      26: clustersAOD_ANTIKT04_B2_Filter00256_Cut00150_Skip02RandomConeSkip02
-      27: clustersAOD_ANTIKT04_B2_Filter00256_Cut00150_Skip02RandomCone_random
-      28: clustersAOD_ANTIKT02_B2_Filter00256_Cut00150_Skip00
-      29: clustersAOD_KT04_B2_Filter00256_Cut02000_Skip00RandomConeSkip00
-      30: clustersAOD_KT04_B2_Filter00256_Cut02000_Skip00RandomCone_random
-      31: clustersAOD_ANTIKT04_B2_Filter00256_Cut02000_Skip02
-      */
+      1: jetsAOD_UA104_B0_Filter00016_Cut01000
+      2: jetsAOD_UA104_B0_Filter00016_Cut02000
+      3: jetsAOD_UA104_B2_Filter00016_Cut01000
+      4: jetsAOD_UA104_B2_Filter00016_Cut02000
+      5: clustersAOD_KT04_B0_Filter00016_Cut00150_Skip00
+      6: clustersAOD_KT04_B0_Filter00016_Cut00150_Skip00RandomConeSkip00
+      7: clustersAOD_KT04_B0_Filter00016_Cut00150_Skip00RandomCone_random
+      8: clustersAOD_KT04_B0_Filter00016_Cut02000_Skip00
+      9: clustersAOD_KT04_B0_Filter00016_Cut02000_Skip00RandomConeSkip00
+      10: clustersAOD_KT04_B0_Filter00016_Cut02000_Skip00RandomCone_random
+      11: clustersAOD_KT02_B0_Filter00016_Cut00150_Skip00
+      12: clustersAOD_ANTIKT04_B0_Filter00016_Cut00150_Skip02
+      13: clustersAOD_ANTIKT04_B0_Filter00016_Cut00150_Skip02RandomConeSkip02
+      14: clustersAOD_ANTIKT04_B0_Filter00016_Cut00150_Skip02RandomCone_random
+      15: clustersAOD_ANTIKT04_B0_Filter00016_Cut02000_Skip02
+      16: clustersAOD_ANTIKT02_B0_Filter00016_Cut00150_Skip00
+      17: clustersAOD_KT04_B1_Filter00016_Cut00150_Skip00RandomConeSkip00
+      18: clustersAOD_KT04_B1_Filter00016_Cut00150_Skip00RandomCone_random
+      19: clustersAOD_ANTIKT04_B1_Filter00016_Cut00150_Skip02
+      20: clustersAOD_ANTIKT04_B1_Filter00016_Cut00150_Skip02RandomConeSkip02
+      21: clustersAOD_ANTIKT04_B1_Filter00016_Cut00150_Skip02RandomCone_random
+      22: clustersAOD_ANTIKT02_B1_Filter00016_Cut00150_Skip00
+      23: clustersAOD_KT04_B2_Filter00016_Cut00150_Skip00RandomConeSkip00
+      24: clustersAOD_KT04_B2_Filter00016_Cut00150_Skip00RandomCone_random
+      25: clustersAOD_ANTIKT04_B2_Filter00016_Cut00150_Skip02
+      26: clustersAOD_ANTIKT04_B2_Filter00016_Cut00150_Skip02RandomConeSkip02
+      27: clustersAOD_ANTIKT04_B2_Filter00016_Cut00150_Skip02RandomCone_random
+      28: clustersAOD_ANTIKT02_B2_Filter00016_Cut00150_Skip00
+      29: clustersAOD_KT04_B2_Filter00016_Cut02000_Skip00RandomConeSkip00
+      30: clustersAOD_KT04_B2_Filter00016_Cut02000_Skip00RandomCone_random
+      31: clustersAOD_ANTIKT04_B2_Filter00016_Cut02000_Skip02
+            */
       // UA1
       kJetMapSpectrum.Add(4,2);
       kJetBackMapSpectrum.Add(4,8);