Change for reprocessing 2012 data
authorcblume <Christoph.Blume@cern.ch>
Wed, 23 Jul 2014 11:48:30 +0000 (13:48 +0200)
committercblume <Christoph.Blume@cern.ch>
Wed, 23 Jul 2014 11:49:48 +0000 (13:49 +0200)
TRD/AliTRDCalibTask.cxx
TRD/AliTRDCalibTask.h

index 15b67dd..fb3a42c 100644 (file)
@@ -100,6 +100,7 @@ AliTRDCalibTask::AliTRDCalibTask(const char *name)
   fTRDChamberStatus(0),
   fNEvents(0),
   fNEventsInput(0),
+  fNEventsTrigger(0),
   fNbTRDTrack(0),
   fNbTRDTrackOffline(0),
   fNbTRDTrackStandalone(0),
@@ -147,6 +148,7 @@ AliTRDCalibTask::AliTRDCalibTask(const char *name)
   fRangePrimaryVertexZ(9999999.0),
   fRejectPileUpWithSPD(kFALSE),
   fRejectPileUpWithTOF(kFALSE),
+  fRejectPileUpWithTOFOrITS(kFALSE),
   fMinNbTracks(9),
   fMaxNbTracks(999999999),
   fCutWithVdriftCalib(kFALSE),
@@ -211,6 +213,7 @@ AliTRDCalibTask::~AliTRDCalibTask()
   // Pointeur
   if(fNEvents) delete fNEvents;
   if(fNEventsInput) delete fNEventsInput;
+  if(fNEventsTrigger) delete fNEventsTrigger;
   if(fNbTRDTrack) delete fNbTRDTrack;
   if(fNbTRDTrackOffline) delete fNbTRDTrackOffline;
   if(fNbTRDTrackStandalone) delete fNbTRDTrackStandalone;
@@ -347,6 +350,8 @@ void AliTRDCalibTask::UserCreateOutputObjects()
   
   fNEvents = new TH1I(Form("NEvents_%s",(const char*)fName),"NEvents", 2, 0, 2);
   fListHist->Add(fNEvents);
+  fNEventsTrigger = new TH1I(Form("NEventsTrigger_%s",(const char*)fName),"NEventsTrigger", 2, 0, 2);
+  fListHist->Add(fNEventsTrigger);
   fNEventsInput = new TH1I(Form("NEventsInput_%s",(const char*)fName),"NEventsInput", 2, 0, 2);
   fListHist->Add(fNEventsInput);
   
@@ -644,7 +649,12 @@ void AliTRDCalibTask::UserExec(Option_t *)
     }   
 
   }
-    
+
+  TString classfired = fESD->GetFiredTriggerClasses();
+  Bool_t isWU =  classfired.Contains("WU");
+  if(isWU) fNEventsTrigger->Fill(1.5);
+  else fNEventsTrigger->Fill(0.5);
+  
   //printf("Class Fired %s\n",(const char*)fESD->GetFiredTriggerClasses());
   //printf("Trigger passed\n");
   
@@ -828,6 +838,15 @@ void AliTRDCalibTask::UserExec(Option_t *)
       if(TMath::Abs(nbcrossing)>0.5) continue;
     }
 
+    // ITS or TOF
+    if(fRejectPileUpWithTOFOrITS) {
+      ULong_t statusits = fkEsdTrack->GetStatus();
+      UChar_t itsPixel = fkEsdTrack->GetITSClusterMap();
+      Bool_t itskany = kFALSE;
+      if(((statusits & AliVTrack::kITSrefit) == AliVTrack::kITSrefit) && ((TESTBIT(itsPixel, 0) || TESTBIT(itsPixel, 1)))) itskany = kTRUE;
+      if(!(itskany || (TMath::Abs(nbcrossing)<0.5))) continue;
+    }
+
     // First Absolute gain calibration
     Int_t trdNTracklets = (Int_t) fkEsdTrack->GetTRDntracklets();
     Int_t trdNTrackletsPID = (Int_t) fkEsdTrack->GetTRDntrackletsPID(); 
index f5b3447..390ffde 100644 (file)
@@ -80,6 +80,7 @@ class AliTRDCalibTask : public AliAnalysisTaskSE {
   void SetRangePrimaryVertexZ(Double_t rangePrimaryVertexZ)            {fRangePrimaryVertexZ = TMath::Abs(rangePrimaryVertexZ);}; 
   void SetRejectPileUpWithSPD(Bool_t rejectPileUpWithSPD)              {fRejectPileUpWithSPD = rejectPileUpWithSPD;};
   void SetRejectPileUpWithTOF(Bool_t rejectPileUpWithTOF)              {fRejectPileUpWithTOF = rejectPileUpWithTOF;};
+  void SetRejectPileUpWithTOFOrITS(Bool_t rejectPileUpWithTOFOrITS)    {fRejectPileUpWithTOFOrITS = rejectPileUpWithTOFOrITS;};
   void SetMinNbTracks(Int_t minNbTracks)                               {fMinNbTracks = minNbTracks;};
   void SetMaxNbTracks(Int_t maxNbTracks)                               {fMaxNbTracks = maxNbTracks;};
   void SetCutWithVdriftCalib(Bool_t cutWithVdriftCalib)                {fCutWithVdriftCalib = cutWithVdriftCalib;};
@@ -128,7 +129,8 @@ class AliTRDCalibTask : public AliAnalysisTaskSE {
   AliTRDCalibChamberStatus *fTRDChamberStatus;   //! calibration chamber status
 
   TH1I        *fNEvents;                         //! counter  
-  TH1I        *fNEventsInput;                    //! counter  
+  TH1I        *fNEventsInput;                    //! counter
+  TH1I        *fNEventsTrigger;                  //! counter trigger   
   
   TH1F        *fNbTRDTrack;                      //! nb ESD tracks with TRD clusters
   TH1F        *fNbTRDTrackOffline;               //! nb ESD tracks with TRD clusters
@@ -186,6 +188,7 @@ class AliTRDCalibTask : public AliAnalysisTaskSE {
   Double_t    fRangePrimaryVertexZ;              // Were the primary vertex is
   Bool_t      fRejectPileUpWithSPD;              // Reject pile-up events with SPD
   Bool_t      fRejectPileUpWithTOF;              // Reject pile-up tracks with TOF
+  Bool_t      fRejectPileUpWithTOFOrITS;         // Reject pile-up tracks with TOF or ITS
   Int_t       fMinNbTracks;                      // Min Nb Tracks
   Int_t       fMaxNbTracks;                      // Max Nb Tracks
   Bool_t      fCutWithVdriftCalib;               // CutWithVdriftCalib for the gain and PH
@@ -226,7 +229,7 @@ class AliTRDCalibTask : public AliAnalysisTaskSE {
   AliTRDCalibTask(const AliTRDCalibTask&); 
   AliTRDCalibTask& operator=(const AliTRDCalibTask&); 
 
-  ClassDef(AliTRDCalibTask, 6); 
+  ClassDef(AliTRDCalibTask, 7); 
 };
 
 #endif