Modifications:
authormivanov <mivanov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Mar 2013 07:57:21 +0000 (07:57 +0000)
committermivanov <mivanov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Mar 2013 07:57:21 +0000 (07:57 +0000)
1.) V0 filtering: Check the presence of the gamma conversion (it is pure but small rate) - changing the downscale for the gammas (lower momenta?) - for the LHC13b+c we have 8000 gammas only (increased by factor 10)

2.) High pt trracsk filtering
    Comment. Why do we have 2 highPt trees? Looks like one is obsolete.

   Adding the total number of tracks in the ESD  (for pileup). Until now we had only tracks pointing to the primary vertex.

   Reduce pile-up tracks  - new flag  (fReducePileUp)
       - Logical or decission done outside of the ESDtrackCuts:
        a.) Rough point to the primary vertex
        b.) The matching with outer detectors
        c.) Or keep small fraction of the pile-up ()

PWGPP/AliAnalysisTaskFilteredTree.cxx
PWGPP/AliAnalysisTaskFilteredTree.h

index 5f60ca7..56ec566 100644 (file)
@@ -44,6 +44,7 @@
 #include "AliESDInputHandler.h"\r
 #include "AliESDVertex.h"\r
 #include "AliTracker.h"\r
+#include "AliVTrack.h"\r
 #include "AliGeomManager.h"\r
 \r
 #include "AliCentrality.h"\r
@@ -73,6 +74,7 @@ AliAnalysisTaskFilteredTree::AliAnalysisTaskFilteredTree(const char *name)
   , fPitList(0)\r
   , fUseMCInfo(kFALSE)\r
   , fUseESDfriends(kFALSE)\r
+  , fReducePileUp(kTRUE)\r
   , fFilteredTreeEventCuts(0)\r
   , fFilteredTreeAcceptanceCuts(0)\r
   , fFilteredTreeRecAcceptanceCuts(0)\r
@@ -493,7 +495,7 @@ void AliAnalysisTaskFilteredTree::Process(AliESDEvent *const esdEvent, AliMCEven
   Bool_t isEventOK = evtCuts->AcceptEvent(esdEvent,mcEvent,vtxESD); \r
   //printf("isEventOK %d, isEventTriggered %d, status %d, vz %f \n",isEventOK, isEventTriggered, vtxESD->GetStatus(), vtxESD->GetZv());\r
   //printf("GetAnalysisMode() %d \n",GetAnalysisMode());\r
-\r
+  Int_t ntracks = esdEvent->GetNumberOfTracks();\r
 \r
   // check event cuts\r
   if(isEventOK && isEventTriggered)\r
@@ -573,21 +575,22 @@ void AliAnalysisTaskFilteredTree::Process(AliESDEvent *const esdEvent, AliMCEven
       //Double_t vtxZ=vtxESD->GetZ();\r
       if(!fTreeSRedirector) return;\r
       (*fTreeSRedirector)<<"highPt"<<\r
-        "fileName.="<<&fileName<<\r
+        "fileName.="<<&fileName<<            \r
         "runNumber="<<runNumber<<\r
         "evtTimeStamp="<<evtTimeStamp<<\r
         "evtNumberInFile="<<evtNumberInFile<<\r
        "triggerClass="<<&triggerClass<<      //  trigger\r
-        "Bz="<<bz<<\r
+        "Bz="<<bz<<                           //  magnetic field\r
         "vtxESD.="<<vtxESD<<\r
+       "ntracksESD="<<ntracks<<              // number of tracks in the ESD\r
       //  "vtxESDx="<<vtxX<<\r
       //  "vtxESDy="<<vtxY<<\r
       //  "vtxESDz="<<vtxZ<<\r
-       "IRtot="<<ir1<<\r
+       "IRtot="<<ir1<<                      // interaction record history info\r
        "IRint2="<<ir2<<\r
-        "mult="<<mult<<\r
+        "mult="<<mult<<                      // multiplicity of tracks pointing to the primary vertex\r
         "esdTrack.="<<track<<\r
-        "centralityF="<<centralityF<<\r
+        "centralityF="<<centralityF<<       \r
         "\n";\r
     }\r
   }\r
@@ -1122,7 +1125,20 @@ void AliAnalysisTaskFilteredTree::ProcessAll(AliESDEvent *const esdEvent, AliMCE
       if(fUseESDfriends && isOKtrackInnerC2 && isOKouterITSc) dumpToTree = kTRUE;\r
       if(fUseMCInfo     && isOKtrackInnerC3) dumpToTree = kTRUE;\r
       TObjString triggerClass = esdEvent->GetFiredTriggerClasses().Data();\r
-\r
+      if (fReducePileUp){  \r
+       //\r
+       // 18.03 - Reduce pile-up chunks, done outside of the ESDTrackCuts for 2012/2013 data pile-up about 95 % of tracks\r
+       // Done only in case no MC info \r
+       //\r
+       Float_t dcaTPC[2];\r
+       track->GetImpactParametersTPC(dcaTPC[0],dcaTPC[1]);\r
+       Bool_t isRoughPrimary = TMath::Abs(dcaTPC[1])<10;\r
+       Bool_t hasOuter=(track->IsOn(AliVTrack::kITSin))||(track->IsOn(AliVTrack::kTOFout))||(track->IsOn(AliVTrack::kTRDin));\r
+       Bool_t keepPileUp=gRandom->Rndm()<0.05;\r
+       if ( (!hasOuter) && (!isRoughPrimary) && (!keepPileUp)){\r
+         dumpToTree=kFALSE;\r
+       }\r
+      }\r
       /////////////////\r
       //book keeping of created dummy objects (to avoid NULL in trees)\r
       Bool_t newvtxESD=kFALSE;\r
@@ -1186,34 +1202,36 @@ void AliAnalysisTaskFilteredTree::ProcessAll(AliESDEvent *const esdEvent, AliMCE
       AliExternalTrackParam* ptrackInnerC2 = (AliExternalTrackParam*)trackInnerC2->Clone();\r
       AliExternalTrackParam* pouterITSc = (AliExternalTrackParam*)outerITSc->Clone();\r
       AliExternalTrackParam* ptrackInnerC3 = (AliExternalTrackParam*)trackInnerC3->Clone();\r
-\r
+      Int_t ntracks = esdEvent->GetNumberOfTracks();\r
+      \r
       if(fTreeSRedirector && dumpToTree) \r
       {\r
 \r
         (*fTreeSRedirector)<<"highPt"<<\r
-        "fileName.="<<&fileName<<\r
-        "runNumber="<<runNumber<<\r
-        "evtTimeStamp="<<evtTimeStamp<<\r
-        "evtNumberInFile="<<evtNumberInFile<<\r
-        "triggerClass="<<&triggerClass<<      //  trigger\r
-        "Bz="<<bz<<\r
-        "vtxESD.="<<pvtxESD<<\r
-        //"vtxESDx="<<vtxX<<\r
-        //"vtxESDy="<<vtxY<<\r
-        //"vtxESDz="<<vtxZ<<\r
-        "IRtot="<<ir1<<\r
-        "IRint2="<<ir2<<\r
-        "mult="<<mult<<\r
-        "esdTrack.="<<ptrack<<\r
-        "extTPCInnerC.="<<ptpcInnerC<<\r
-        "extInnerParamC.="<<ptrackInnerC<<\r
-        "extInnerParam.="<<ptrackInnerC2<<\r
-        "extOuterITS.="<<pouterITSc<<\r
-        "extInnerParamRef.="<<ptrackInnerC3<<\r
-        "chi2TPCInnerC="<<chi2(0,0)<<\r
-        "chi2InnerC="<<chi2trackC(0,0)<<\r
-        "chi2OuterITS="<<chi2OuterITS(0,0)<<\r
-        "centralityF="<<centralityF;\r
+         "fileName.="<<&fileName<<                // name of the chunk file (hopefully full)\r
+         "runNumber="<<runNumber<<                // runNumber\r
+         "evtTimeStamp="<<evtTimeStamp<<          // time stamp of event (in seconds)\r
+         "evtNumberInFile="<<evtNumberInFile<<    // event number\r
+         "triggerClass="<<&triggerClass<<         // trigger class as a string\r
+         "Bz="<<bz<<                              // solenoid magnetic field in the z direction (in kGaus)\r
+         "vtxESD.="<<pvtxESD<<                    // vertexer ESD tracks (can be biased by TPC pileup tracks)\r
+         //"vtxESDx="<<vtxX<<\r
+         //"vtxESDy="<<vtxY<<\r
+         //"vtxESDz="<<vtxZ<<\r
+         "IRtot="<<ir1<<                         // interaction record (trigger) counters - coutner 1\r
+         "IRint2="<<ir2<<                        // interaction record (trigger) coutners - counter 2\r
+         "mult="<<mult<<                         // multiplicity of tracks pointing to the primary vertex\r
+         "ntracks="<<ntracks<<                   // number of the esd tracks (to take into account the pileup in the TPC)\r
+         "esdTrack.="<<ptrack<<                  // esdTrack as used in the physical analysis\r
+         "extTPCInnerC.="<<ptpcInnerC<<          // ??? \r
+         "extInnerParamC.="<<ptrackInnerC<<      // ???\r
+         "extInnerParam.="<<ptrackInnerC2<<      // ???\r
+         "extOuterITS.="<<pouterITSc<<           // ???\r
+         "extInnerParamRef.="<<ptrackInnerC3<<   // ???\r
+         "chi2TPCInnerC="<<chi2(0,0)<<           // chi2   of tracks ???\r
+         "chi2InnerC="<<chi2trackC(0,0)<<        // chi2s  of tracks TPCinner to the combined\r
+         "chi2OuterITS="<<chi2OuterITS(0,0)<<    // chi2s  of tracks TPC at inner wall to the ITSout\r
+         "centralityF="<<centralityF;\r
         if (fUseMCInfo)\r
         {\r
           (*fTreeSRedirector)<<"highPt"<<\r
@@ -1555,7 +1573,7 @@ Bool_t AliAnalysisTaskFilteredTree::IsHighDeDxParticle(AliESDtrack * track) {
 void AliAnalysisTaskFilteredTree::ProcessV0(AliESDEvent *const esdEvent, AliMCEvent * const mcEvent, AliESDfriend *const /*esdFriend*/)\r
 {\r
   //\r
-  // Select real events with V0 (K0s and Lambda) high-pT candidates\r
+  // Select real events with V0 (K0s and Lambda and Gamma) high-pT candidates\r
   //\r
   if(!esdEvent) {\r
     AliDebug(AliLog::kError, "esdEvent not available");\r
@@ -1942,7 +1960,13 @@ Bool_t AliAnalysisTaskFilteredTree::IsV0Downscaled(AliESDv0 *const v0)
   Double_t scalempt= TMath::Min(maxPt,10.);\r
   Double_t downscaleF = gRandom->Rndm();\r
   downscaleF *= fLowPtV0DownscaligF;\r
-  \r
+  //\r
+  // Special treatment of the gamma conversion pt spectra is softer - \r
+  Double_t mass00=  v0->GetEffMass(0,0);\r
+  const Double_t cutMass=0.2;\r
+  if (TMath::Abs(mass00-0)<cutMass){\r
+    downscaleF/=10.;  // 10 times smaller downscaling for the gamma concersion candidate\r
+  }\r
   //printf("V0 TMath::Exp(2*scalempt) %e, downscaleF %e \n",TMath::Exp(2*scalempt), downscaleF);\r
   if (TMath::Exp(2*scalempt)<downscaleF) return kTRUE;\r
   return kFALSE;\r
index 342df52..feecc63 100644 (file)
@@ -110,6 +110,7 @@ class AliAnalysisTaskFilteredTree : public AliAnalysisTaskSE {
 
   Bool_t fUseMCInfo;        // use MC information
   Bool_t fUseESDfriends;        // use esd friends
+  Bool_t fReducePileUp;        // downscale the information for the pile-up TPC tracks
 
   AliFilteredTreeEventCuts      *fFilteredTreeEventCuts;      // event cuts
   AliFilteredTreeAcceptanceCuts *fFilteredTreeAcceptanceCuts; // acceptance cuts