]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding the number of fired chips in the ITS fast OR (Domenico, Massimo)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Oct 2008 09:53:55 +0000 (09:53 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Oct 2008 09:53:55 +0000 (09:53 +0000)
ITS/AliITSClusterFinderV2SPD.cxx
ITS/AliITSClusterFinderV2SPD.h
ITS/AliITSDetTypeRec.cxx
ITS/AliITSDetTypeRec.h
ITS/AliITSReconstructor.cxx
ITS/AliITSVertexer.cxx
ITS/AliITSVertexer.h
STEER/AliMultiplicity.cxx
STEER/AliMultiplicity.h

index f3f672c54f4396c9a322304b47267794842d229a..12dbe39d092da57cc90c3d903fb16b55776b0e3c 100644 (file)
@@ -251,7 +251,7 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
 
 
 
-void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStream* input, 
+void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStreamSPD* input, 
                                        TClonesArray** clusters) 
 {
   //------------------------------------------------------------
@@ -291,6 +291,21 @@ void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStream* input,
     bins[index].SetQ(1);
   }
 
+  // get the FastOr bit map
+  fDetTypeRec->ResetFastOrFiredMap();
+  for(UInt_t eq=0; eq<20; eq++) {
+    for(UInt_t hs=0; hs<6; hs++) {
+      for(UInt_t chip=0; chip<10; chip++) {
+        if(input->GetFastOrSignal(eq,hs,chip)) {
+          UInt_t module = input->GetOfflineModuleFromOnline(eq,hs,chip);
+          UInt_t chipInModule = ( chip>4 ? chip-5 : chip );
+          UInt_t chipKey = module*5 + chipInModule;
+          fDetTypeRec->SetFastOrFiredMap(chipKey);
+        }
+      }
+    }
+  }
+
   delete [] binsSPDInit;
   delete [] binsSPD;
   
index 205ef4b952db97415124c43c405c3dd2ab5cb7f1..7150dcfaa51aa2e99d2e5c8b219949750fce0119 100644 (file)
@@ -14,6 +14,7 @@
 class TClonesArray;
 class AliRawReader;
 class AliITSRawStream;
+class AliITSRawStreamSPD;
 
 class AliITSClusterFinderV2SPD : public AliITSClusterFinderV2 {
 public:
@@ -26,7 +27,7 @@ public:
  protected:
 
   void FindClustersSPD(TClonesArray *digits);
-  void FindClustersSPD(AliITSRawStream* input,TClonesArray** clusters);
+  void FindClustersSPD(AliITSRawStreamSPD* input,TClonesArray** clusters);
   Int_t ClustersSPD(AliBin* bins, TClonesArray* digits,TClonesArray* clusters,Int_t maxBins, Int_t nzbins,Int_t iModule,Bool_t rawdata=kFALSE);
 
   Int_t fLastSPD1;       //index of the last SPD1 detector
index 9d3fb51eb46cd043e322ad20b59f0b04e48d74da..647126551b1be53cdc890047b88b592d7b5e3f64 100644 (file)
@@ -93,7 +93,8 @@ fRecPoints(0),
 fNRecPoints(0),
 fSelectedVertexer(),
 fFirstcall(kTRUE),
-fLoadOnlySPDCalib(0){
+fLoadOnlySPDCalib(0),
+fFastOrFiredMap(1200){
     // Standard Constructor
     // Inputs:
     //    none.
@@ -151,7 +152,8 @@ fRecPoints(rec.fRecPoints),
 fNRecPoints(rec.fNRecPoints),
 fSelectedVertexer(rec.fSelectedVertexer),
 fFirstcall(rec.fFirstcall),
-fLoadOnlySPDCalib(rec.fLoadOnlySPDCalib){
+fLoadOnlySPDCalib(rec.fLoadOnlySPDCalib),
+fFastOrFiredMap(rec.fFastOrFiredMap){
 
   // Copy constructor. 
 
@@ -995,7 +997,7 @@ void AliITSDetTypeRec::DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Op
     if (!all && !det[id]) continue;
     rec = (AliITSClusterFinderV2*)GetReconstructionModel(id);
     if (!rec)
-      AliFatal("The reconstruction class was not instanciated");
+      AliFatal("The reconstruction class was not instantiated");
     rec->SetDetTypeRec(this);
     rec->RawdataToClusters(rawReader,clusters);    
   } 
index 7ed6c6290f1f7d0d62d94a1526f494e18e99c933..a8547de19944cb5cd1da25845540381caec4d045 100644 (file)
@@ -14,6 +14,7 @@ $Id$
 #include <TObject.h>
 #include <TObjArray.h>
 #include <TClonesArray.h>
+#include <TBits.h>
 #include "AliITSDDLModuleMapSDD.h"
 #include "AliITSresponseSDD.h"
 #include "AliITSgeom.h"
@@ -110,6 +111,10 @@ class AliITSDetTypeRec : public TObject {
     void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det,Bool_t v2=kFALSE);
     void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
 
+    void   SetFastOrFiredMap(UInt_t chip){fFastOrFiredMap.SetBitNumber(chip);}
+    TBits  GetFastOrFiredMap() const {return fFastOrFiredMap;}
+    void   ResetFastOrFiredMap(){fFastOrFiredMap.ResetAllBits();}
+
   private:
     // private methods
     AliITSDetTypeRec(const AliITSDetTypeRec& rec);
@@ -159,7 +164,9 @@ class AliITSDetTypeRec : public TObject {
     Bool_t fFirstcall;         //! flag
     Bool_t fLoadOnlySPDCalib;  //! flag for loading calibrations only fr SPD
 
-    ClassDef(AliITSDetTypeRec,13) // ITS Reconstruction structure
+    TBits fFastOrFiredMap;     // Map of FastOr fired chips
+
+    ClassDef(AliITSDetTypeRec,14) // ITS Reconstruction structure
 };
 
 #endif
index aae6b120c3b5a29fd8b6a59f262355e4ea20b508..31e1721413be0750663ea42ce26b555eacb2df48 100644 (file)
@@ -168,47 +168,52 @@ AliVertexer* AliITSReconstructor::CreateVertexer() const
 {
 // create a ITS vertexer
 
+  AliITSVertexer *vptr;
   Int_t vtxOpt = GetRecoParam()->GetVertexer();
   if(vtxOpt==3){
     Info("CreateVertexer","a AliITSVertexerIons object has been selected\n");
-    return new AliITSVertexerIons();
+    vptr =  new AliITSVertexerIons();
   }
-  if(vtxOpt==4){
+  else if(vtxOpt==4){
     Double_t smear[3]={0.005,0.005,0.01};
     Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); 
-    return new AliITSVertexerFast(smear);
+    vptr = new AliITSVertexerFast(smear);
   }
-  if(vtxOpt==1){
+  else if(vtxOpt==1){
     Info("CreateVertexer","a AliITSVertexerZ object has been selected\n");
-    return new AliITSVertexerZ();
+    vptr =  new AliITSVertexerZ();
   }
-  if(vtxOpt==2){
+  else if(vtxOpt==2){
     Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n");
-    return new AliITSVertexerCosmics();
+    vptr = new AliITSVertexerCosmics();
   }
-  if(vtxOpt==5){ 
+  else if(vtxOpt==5){ 
     Info("CreateVertexer","vertex is fixed in the position of the TDI\n");
-    return new AliITSVertexerFixed("TDI");
+    vptr = new AliITSVertexerFixed("TDI");
   }
-  if(vtxOpt==6){ 
+  else if(vtxOpt==6){ 
     Info("CreateVertexer","vertex is fixed in the position of the TED\n");
-    return new AliITSVertexerFixed("TED");
+    vptr = new AliITSVertexerFixed("TED");
   }
+  else {
   // by default an AliITSVertexer3D object is instatiated
-  Info("CreateVertexer","a AliITSVertexer3D object has been selected\n");
-  AliITSVertexer3D*  vtxr = new AliITSVertexer3D();
-  Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ();
-  Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR();
-  vtxr->SetWideFiducialRegion(dzw,drw);
-  Float_t dzn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionZ();
-  Float_t drn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionR();
-  vtxr->SetNarrowFiducialRegion(dzn,drn);
-  Float_t dphil=GetRecoParam()->GetVertexer3DLooseDeltaPhiCut();
-  Float_t dphit=GetRecoParam()->GetVertexer3DTightDeltaPhiCut();
-  vtxr->SetDeltaPhiCuts(dphil,dphit);
-  Float_t dcacut=GetRecoParam()->GetVertexer3DDCACut();
-  vtxr->SetDCACut(dcacut);
-  return vtxr;
+    Info("CreateVertexer","a AliITSVertexer3D object has been selected\n");
+    AliITSVertexer3D*  vtxr = new AliITSVertexer3D();
+    Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ();
+    Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR();
+    vtxr->SetWideFiducialRegion(dzw,drw);
+    Float_t dzn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionZ();
+    Float_t drn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionR();
+    vtxr->SetNarrowFiducialRegion(dzn,drn);
+    Float_t dphil=GetRecoParam()->GetVertexer3DLooseDeltaPhiCut();
+    Float_t dphit=GetRecoParam()->GetVertexer3DTightDeltaPhiCut();
+    vtxr->SetDeltaPhiCuts(dphil,dphit);
+    Float_t dcacut=GetRecoParam()->GetVertexer3DDCACut();
+    vtxr->SetDCACut(dcacut);
+    vptr = vtxr;
+  }
+  vptr->SetDetTypeRec(fDetTypeRec);
+  return vptr;
 }
 
 //_____________________________________________________________________________
index a5aa8759de53daa99c3ef7ab96002e23df622999..51d999e3589f00b709d7c53c5841c3f7d0672a45 100644 (file)
@@ -23,7 +23,8 @@ AliITSVertexer::AliITSVertexer():AliVertexer(),
 fLadders(), 
 fLadOnLay2(0),
 fFirstEvent(0),
-fLastEvent(-1)
+fLastEvent(-1),
+fDetTypeRec(NULL)
 {
   // Default Constructor
   SetLaddersOnLayer2();
@@ -45,6 +46,9 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   if(!fCurrentVertex)success=kFALSE;
   if(fCurrentVertex && fCurrentVertex->GetNContributors()<1)success=kFALSE;
 
+  // get the FastOr bit mask
+  TBits fastOrFiredMap = fDetTypeRec->GetFastOrFiredMap();
+
   AliITSMultReconstructor multReco;
 
   if(!success){
@@ -57,7 +61,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
     multReco.LoadClusterFiredChips(itsClusterTree);
     Short_t nfcL1 = multReco.GetNFiredChips(0);
     Short_t nfcL2 = multReco.GetNFiredChips(1);
-    fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,nfcL1,nfcL2);
+    fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,nfcL1,nfcL2,fastOrFiredMap);
     return;
   }
 
@@ -93,7 +97,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   }
   Short_t nfcL1 = multReco.GetNFiredChips(0);
   Short_t nfcL2 = multReco.GetNFiredChips(1);
-  fMult = new AliMultiplicity(notracks,tht,phi,dphi,labels,labelsL2,nosingleclus,ths,phs,nfcL1,nfcL2);
+  fMult = new AliMultiplicity(notracks,tht,phi,dphi,labels,labelsL2,nosingleclus,ths,phs,nfcL1,nfcL2,fastOrFiredMap);
 
   delete [] tht;
   delete [] phi;
index e850e7e3adab1dddbfe069dc60940009fbffead7..4223b7ce641d8e764cb7fb21b0d7b765b489489a 100644 (file)
@@ -2,6 +2,7 @@
 #define ALIITSVERTEXER_H
 
 #include<AliVertexer.h>
+#include "AliITSDetTypeRec.h"
 
 ///////////////////////////////////////////////////////////////////
 //                                                               //
@@ -34,6 +35,7 @@ class AliITSVertexer : public AliVertexer {
       if(imod>=0 && imod<kNSPDMod) return fUseModule[imod];
       else return 0;
     }
+    virtual void SetDetTypeRec(const AliITSDetTypeRec *ptr){fDetTypeRec = ptr;}
     enum{kNSPDMod=240};
 
     // Methods containing run-loaders, should be moved to some other class
@@ -56,9 +58,10 @@ class AliITSVertexer : public AliVertexer {
     AliITSVertexer& operator=(const AliITSVertexer& /* vtxr */);
 
     Int_t fFirstEvent;          // First event to be processed by FindVertices
-    Int_t fLastEvent;           // Last event to be processed by FindVertices 
+    Int_t fLastEvent;           // Last event to be processed by FindVertices
+    const AliITSDetTypeRec *fDetTypeRec;  //! pointer to DetTypeRec
 
-  ClassDef(AliITSVertexer,6);
+  ClassDef(AliITSVertexer,7);
 };
 
 #endif
index 370d2a646b5f3949499eedb4d96308600ea544f7..233adbe2b3876269fd5af53a5a820f46546c6adf 100644 (file)
@@ -14,7 +14,8 @@ AliMultiplicity::AliMultiplicity():
   fPhi(0),
   fDeltPhi(0),
   fThsingle(0),
-  fPhisingle(0)
+  fPhisingle(0),
+  fFastOrFiredChips(1200)
 {
   // Default Constructor
   fFiredChips[0] = 0;
@@ -22,7 +23,7 @@ AliMultiplicity::AliMultiplicity():
 }
 
 //______________________________________________________________________
-AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *t,  Float_t *ph, Float_t *df, Int_t *labels, Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2):
+AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *t,  Float_t *ph, Float_t *df, Int_t *labels, Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2, TBits fFastOr):
   TObject(),
   fNtracks(ntr),
   fNsingle(ns),
@@ -32,7 +33,8 @@ AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *t,  Float_t *ph, Float_t *d
   fPhi(0),
   fDeltPhi(0),
   fThsingle(0),
-  fPhisingle(0)
+  fPhisingle(0),
+  fFastOrFiredChips(1200)
 {
 // Standard constructor
   if(ntr>0){
@@ -59,6 +61,7 @@ AliMultiplicity::AliMultiplicity(Int_t ntr, Float_t *t,  Float_t *ph, Float_t *d
   }
   fFiredChips[0] = nfcL1;
   fFiredChips[1] = nfcL2;
+  fFastOrFiredChips = fFastOr;
 }
 
 //______________________________________________________________________
@@ -72,7 +75,8 @@ AliMultiplicity::AliMultiplicity(const AliMultiplicity& m):
   fPhi(0),
   fDeltPhi(0),
   fThsingle(0),
-  fPhisingle(0)
+  fPhisingle(0),
+  fFastOrFiredChips(1200)
 {
   // copy constructor
   Duplicate(m);
@@ -147,6 +151,8 @@ void AliMultiplicity::Duplicate(const AliMultiplicity& m){
 
   fFiredChips[0] = m.fFiredChips[0];
   fFiredChips[1] = m.fFiredChips[1];
+
+  fFastOrFiredChips = m.fFastOrFiredChips;
 }
 
 //______________________________________________________________________
index 410501b2c67a1e61e45c5bd7570bed1dfb7d6b78..3e4828ac1c6d95da382f9e7e42a828df7f0dd5ab 100644 (file)
@@ -2,6 +2,7 @@
 #define ALIMULTIPLICITY_H
 
 #include<TObject.h>
+#include <TBits.h>
 #include<TMath.h>
 
 ////////////////////////////////////////////////////////
@@ -16,7 +17,7 @@ class AliMultiplicity : public TObject {
   AliMultiplicity();               // default constructor
   // standard constructor
   AliMultiplicity(Int_t ntr,Float_t *t, Float_t *ph, Float_t *df, Int_t *labels,
-                  Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2);
+         Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2, TBits fFastOrFiredChips);
   AliMultiplicity(const AliMultiplicity& m);
   AliMultiplicity& operator=(const AliMultiplicity& m);
   virtual void Copy(TObject &obj) const;
@@ -44,6 +45,10 @@ class AliMultiplicity : public TObject {
   Short_t GetNumberOfFiredChips(Int_t layer) const { return fFiredChips[layer]; }
   void SetFiredChips(Int_t layer, Short_t firedChips) { fFiredChips[layer] = firedChips; }
 
+  void   SetFastOrFiredChips(UInt_t chip){fFastOrFiredChips.SetBitNumber(chip);}
+  TBits  GetFastOrFiredChips() const {return fFastOrFiredChips;}
+  Bool_t TestFastOrFiredChips(UInt_t chip) const {return fFastOrFiredChips.TestBitNumber(chip);}
+
   protected:
   void Duplicate(const AliMultiplicity &m);  // used by copy ctr.
 
@@ -59,7 +64,9 @@ class AliMultiplicity : public TObject {
   Double32_t *fPhisingle;    //[fNsingle] array with phi values of L2 clusters
   Short_t fFiredChips[2];    // Number of fired chips in the two SPD layers
 
-  ClassDef(AliMultiplicity,7);
+  TBits fFastOrFiredChips;   // Map of FastOr fired chips
+
+  ClassDef(AliMultiplicity,8);
 };
 
 inline Int_t AliMultiplicity::GetLabel(Int_t i, Int_t layer) const