]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility to select SPD modules used in vertex calculation (F. Prino)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Jul 2008 14:31:57 +0000 (14:31 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Jul 2008 14:31:57 +0000 (14:31 +0000)
ITS/AliITSVertexer.cxx
ITS/AliITSVertexer.h
ITS/AliITSVertexer3D.cxx
ITS/AliITSVertexerZ.cxx

index c5f13f07791e566524e906629014695675932ed8..a5aa8759de53daa99c3ef7ab96002e23df622999 100644 (file)
@@ -16,6 +16,8 @@ ClassImp(AliITSVertexer)
 //                  AliITSVertexerCosmics                           //
 //////////////////////////////////////////////////////////////////////
 
+/* $Id$ */
+
 //______________________________________________________________________
 AliITSVertexer::AliITSVertexer():AliVertexer(),
 fLadders(), 
@@ -25,6 +27,7 @@ fLastEvent(-1)
 {
   // Default Constructor
   SetLaddersOnLayer2();
+  for(Int_t i=0; i<kNSPDMod;i++) fUseModule[i]=kTRUE;
 }
 
 //______________________________________________________________________
index 7d82a04a7bb5e5483e4de952b5ee45021cfa16bf..e850e7e3adab1dddbfe069dc60940009fbffead7 100644 (file)
@@ -9,6 +9,8 @@
 //                                                               //
 ///////////////////////////////////////////////////////////////////
 
+/* $Id$ */
+
 class TString;
 
 class AliITSVertexer : public AliVertexer {
@@ -25,6 +27,14 @@ class AliITSVertexer : public AliVertexer {
     void SetLastEvent(Int_t ev){fLastEvent = ev;}
     const Float_t GetPipeRadius()const {return fgkPipeRadius;}
     void SetLaddersOnLayer2(Int_t ladwid=4);
+    virtual void SetUseModule(Int_t imod, Bool_t optUse){
+      if(imod>=0 && imod<kNSPDMod) fUseModule[imod]=optUse;
+    }
+    virtual Bool_t IsModuleUsed(Int_t imod) const {
+      if(imod>=0 && imod<kNSPDMod) return fUseModule[imod];
+      else return 0;
+    }
+    enum{kNSPDMod=240};
 
     // Methods containing run-loaders, should be moved to some other class
     void Init(TString filename);
@@ -36,6 +46,7 @@ class AliITSVertexer : public AliVertexer {
     UShort_t *fLadders; // array with layer1-layer2 ladders correspondances  
     Int_t fLadOnLay2;   // (2*fLadOnLay2+1)=number of layer2 ladders 
                       // associated to a layer1 ladder
+    Bool_t  fUseModule[kNSPDMod]; // flag for enabling/disabling SPD modules
  
  private:
     // copy constructor (NO copy allowed: the constructor is protected
@@ -47,7 +58,7 @@ class AliITSVertexer : public AliVertexer {
     Int_t fFirstEvent;          // First event to be processed by FindVertices
     Int_t fLastEvent;           // Last event to be processed by FindVertices 
 
-  ClassDef(AliITSVertexer,5);
+  ClassDef(AliITSVertexer,6);
 };
 
 #endif
index ddc6d49ec4a530b6bc625277adb8790fca619168..72a99b52b4a72c882c579780bd1576cadd85558f 100644 (file)
@@ -209,6 +209,7 @@ Int_t AliITSVertexer3D::FindTracklets(TTree *itsClusterTree, Int_t optCuts){
   Int_t nolines = 0;
   // Loop on modules of layer 1
   for(Int_t modul1= firstL1; modul1<=lastL1;modul1++){   // Loop on modules of layer 1
+    if(!fUseModule[modul1]) continue;
     UShort_t ladder=int(modul1/4)+1; // ladders are numbered starting from 1
     branch->GetEvent(modul1);
     Int_t nrecp1 = itsRec->GetEntries();
@@ -234,6 +235,7 @@ Int_t AliITSVertexer3D::FindTracklets(TTree *itsClusterTree, Int_t optCuts){
          Int_t ladmod=fLadders[ladder-1]+ladl2;
          if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2);
          Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1);
+         if(!fUseModule[modul2]) continue;
          branch->GetEvent(modul2);
          Int_t nrecp2 = itsRec->GetEntries();
          for(Int_t j2=0;j2<nrecp2;j2++){
index 07778e63b39abb51bf4173fa06cdbd8354cc32ae..5aedc635e4dd4729d6b0245559dea60d36c78e99 100644 (file)
@@ -247,6 +247,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
   static TClonesArray points("AliITSZPoint",maxdim);
   Int_t nopoints =0;
   for(Int_t modul1= fFirstL1; modul1<=fLastL1;modul1++){   // Loop on modules of layer 1
+    if(!fUseModule[modul1]) continue;
     UShort_t ladder=int(modul1/4)+1;  // ladders are numbered starting from 1
     branch->GetEvent(modul1);
     Int_t nrecp1 = itsRec->GetEntries();
@@ -278,6 +279,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
          Int_t ladmod=fLadders[ladder-1]+ladl2;
          if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2);
          Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1);
+         if(!fUseModule[modul2]) continue;
          branch->GetEvent(modul2);
          Int_t nrecp2 = itsRec->GetEntries();
          for(Int_t j2=0;j2<nrecp2;j2++){
@@ -332,7 +334,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
   TH1F *hc = fZCombc;
 
   
-  if(hc->GetBinContent(hc->GetMaximumBin())<3)hc->Rebin(3);
+  if(hc->GetBinContent(hc->GetMaximumBin())<3)hc->Rebin(4);
   Int_t binmin,binmax;
   Int_t nPeaks=GetPeakRegion(hc,binmin,binmax);   
   if(nPeaks==2)AliWarning("2 peaks found");