-void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStream* input,
+void AliITSClusterFinderV2SPD::FindClustersSPD(AliITSRawStreamSPD* input,
TClonesArray** clusters)
{
//------------------------------------------------------------
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;
class TClonesArray;
class AliRawReader;
class AliITSRawStream;
+class AliITSRawStreamSPD;
class AliITSClusterFinderV2SPD : public AliITSClusterFinderV2 {
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
fNRecPoints(0),
fSelectedVertexer(),
fFirstcall(kTRUE),
-fLoadOnlySPDCalib(0){
+fLoadOnlySPDCalib(0),
+fFastOrFiredMap(1200){
// Standard Constructor
// Inputs:
// none.
fNRecPoints(rec.fNRecPoints),
fSelectedVertexer(rec.fSelectedVertexer),
fFirstcall(rec.fFirstcall),
-fLoadOnlySPDCalib(rec.fLoadOnlySPDCalib){
+fLoadOnlySPDCalib(rec.fLoadOnlySPDCalib),
+fFastOrFiredMap(rec.fFastOrFiredMap){
// Copy constructor.
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);
}
#include <TObject.h>
#include <TObjArray.h>
#include <TClonesArray.h>
+#include <TBits.h>
#include "AliITSDDLModuleMapSDD.h"
#include "AliITSresponseSDD.h"
#include "AliITSgeom.h"
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);
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
{
// 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;
}
//_____________________________________________________________________________
fLadders(),
fLadOnLay2(0),
fFirstEvent(0),
-fLastEvent(-1)
+fLastEvent(-1),
+fDetTypeRec(NULL)
{
// Default Constructor
SetLaddersOnLayer2();
if(!fCurrentVertex)success=kFALSE;
if(fCurrentVertex && fCurrentVertex->GetNContributors()<1)success=kFALSE;
+ // get the FastOr bit mask
+ TBits fastOrFiredMap = fDetTypeRec->GetFastOrFiredMap();
+
AliITSMultReconstructor multReco;
if(!success){
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;
}
}
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;
#define ALIITSVERTEXER_H
#include<AliVertexer.h>
+#include "AliITSDetTypeRec.h"
///////////////////////////////////////////////////////////////////
// //
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
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
fPhi(0),
fDeltPhi(0),
fThsingle(0),
- fPhisingle(0)
+ fPhisingle(0),
+ fFastOrFiredChips(1200)
{
// Default Constructor
fFiredChips[0] = 0;
}
//______________________________________________________________________
-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),
fPhi(0),
fDeltPhi(0),
fThsingle(0),
- fPhisingle(0)
+ fPhisingle(0),
+ fFastOrFiredChips(1200)
{
// Standard constructor
if(ntr>0){
}
fFiredChips[0] = nfcL1;
fFiredChips[1] = nfcL2;
+ fFastOrFiredChips = fFastOr;
}
//______________________________________________________________________
fPhi(0),
fDeltPhi(0),
fThsingle(0),
- fPhisingle(0)
+ fPhisingle(0),
+ fFastOrFiredChips(1200)
{
// copy constructor
Duplicate(m);
fFiredChips[0] = m.fFiredChips[0];
fFiredChips[1] = m.fFiredChips[1];
+
+ fFastOrFiredChips = m.fFastOrFiredChips;
}
//______________________________________________________________________
#define ALIMULTIPLICITY_H
#include<TObject.h>
+#include <TBits.h>
#include<TMath.h>
////////////////////////////////////////////////////////
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;
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.
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