add option to use / neglect clusters which are not in chamber
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Nov 2009 10:37:48 +0000 (10:37 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Nov 2009 10:37:48 +0000 (10:37 +0000)
update macro run.C to load also libTENDER.so

PWG1/TRD/AliTRDcheckDET.cxx
PWG1/TRD/AliTRDcheckDET.h
PWG1/TRD/run.C

index 3b34d5d..d3a0066 100644 (file)
@@ -76,6 +76,7 @@ AliTRDcheckDET::AliTRDcheckDET():
   ,fTriggerNames(0x0)
   ,fReconstructor(0x0)
   ,fGeo(0x0)
+  ,fFlags(0)
 {
   //
   // Default constructor
@@ -873,7 +874,7 @@ TH1 *AliTRDcheckDET::PlotPHt(const AliTRDtrackV1 *track){
     Int_t detector = tracklet->GetDetector();
     tracklet->ResetClusterIter();
     while((c = tracklet->NextCluster())){
-      if(!c->IsInChamber()) continue;
+      if(!IsUsingClustersOutsideChamber() && !c->IsInChamber()) continue;
       Int_t localtime        = c->GetLocalTimeBin();
       Double_t absoluteCharge = TMath::Abs(c->GetQ());
       h->Fill(localtime, absoluteCharge);
@@ -936,7 +937,7 @@ TH1 *AliTRDcheckDET::PlotPHx(const AliTRDtrackV1 *track){
     if(!(tracklet = fkTrack->GetTracklet(itl)) || !(tracklet->IsOK())) continue;
     tracklet->ResetClusterIter();
     while((c = tracklet->NextCluster())){
-      if(!c->IsInChamber()) continue;
+      if(!IsUsingClustersOutsideChamber() && !c->IsInChamber()) continue;
       x = c->GetX()-AliTRDcluster::GetXcorr(c->GetLocalTimeBin());
       y = c->GetY()-AliTRDcluster::GetYcorr(AliTRDgeometry::GetLayer(c->GetDetector()), c->GetCenter());
 
@@ -1207,4 +1208,4 @@ Bool_t AliTRDcheckDET::MakeBarPlot(TH1 *histo, Int_t color){
   histo->SetBarWidth(.6);
   histo->Draw("bar1");
   return kTRUE;
-}
+}
\ No newline at end of file
index 04fef04..b5b55e1 100644 (file)
@@ -75,9 +75,14 @@ public:
   virtual Bool_t PostProcess();
   virtual Bool_t GetRefFigure(Int_t ifig);
   
+  Bool_t IsUsingClustersOutsideChamber() const {return TESTBIT(fFlags, kUseClustersOutsideChamber);}
+  void UseClustersOutsideChamber(Bool_t b = kTRUE) {if(b) SETBIT(fFlags, kUseClustersOutsideChamber); else CLRBIT(fFlags, kUseClustersOutsideChamber);}
   void SetRecoParam(AliTRDrecoParam *r);
 
 private:
+  enum{
+    kUseClustersOutsideChamber
+  };
   AliTRDcheckDET(const AliTRDcheckDET &);
   AliTRDcheckDET& operator=(const AliTRDcheckDET &);
   void GetDistanceToTracklet(Double_t *dist, AliTRDseedV1 * const tracklet, AliTRDcluster * const c);
@@ -90,8 +95,8 @@ private:
   TMap *fTriggerNames;                 //! Containing trigger class names
   AliTRDReconstructor *fReconstructor; // TRD Reconstructor
   AliTRDgeometry *fGeo;                // TRD Geometry object
+  UChar_t fFlags;                      // Flags for setting
     
   ClassDef(AliTRDcheckDET, 1)
 };
 #endif
-
index c29d983..8838dff 100644 (file)
@@ -99,6 +99,7 @@ void run(Char_t *trd="ALL", const Char_t *files=0x0, Long64_t nev=1234567890, Lo
   AliLog::SetGlobalLogLevel(AliLog::kError);
   if(gSystem->Load("libANALYSIS.so")<0) return;
   if(gSystem->Load("libANALYSISalice.so")<0) return;
+  if(gSystem->Load("libTENDER.so")<0) return;
   if(gSystem->Load("libPWG1.so")<0) return;
 
   Bool_t fHasMCdata =  HasReadMCData(trd);