/*
$Log$
+Revision 1.37 2002/03/25 20:01:49 cblume
+Introduce parameter class
+
Revision 1.36 2002/02/11 14:25:27 cblume
Geometry update, compressed hit structure
}
//_____________________________________________________________________________
-void AliTRD::DrawModule()
+void AliTRD::DrawModule() const
{
//
// Draw a shaded view of the Transition Radiation Detector version 0
}
//_____________________________________________________________________________
-Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
+Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t ) const
{
//
// Distance between the mouse and the TRD detector on the screen
}
//_____________________________________________________________________________
-AliHit* AliTRD::FirstHit2(Int_t track)
+AliHit* AliTRD::FirstHit2(Int_t track)
{
//
// Initializes the hit iterator.
,branchname);
}
- const char folder[] = "RunMC/Event/Data";
+ const char kFolder[] = "RunMC/Event/Data";
if (GetDebug()) {
printf("<AliTRD::MakeBranch2> %15s: Publishing %s to %s\n"
- ,ClassName(),branchname,folder);
+ ,ClassName(),branchname,kFolder);
}
- Publish(folder,&fTrackHits,branchname);
+ Publish(kFolder,&fTrackHits,branchname);
if (file) {
TBranch *b = gAlice->TreeH()->GetBranch(branchname);
virtual void Copy(TObject &trd);
virtual void CreateGeometry();
virtual void CreateMaterials();
- virtual void DrawModule();
- Int_t DistancetoPrimitive(Int_t px, Int_t py);
+ virtual void DrawModule() const;
+ Int_t DistancetoPrimitive(Int_t px, Int_t py) const;
virtual void LoadPoints(Int_t track);
TObjArray *RecPoints() const { return fRecPoints; };
virtual void Init();
#include <TObject.h>
#include <TArrayF.h>
+
+/////////////////////////////////////////////////////////////
+// //
+// Array of floats //
+// Origin M.Ivanov //
+// //
+/////////////////////////////////////////////////////////////
class AliTRDarrayF: public TObject, public TArrayF {
#include <TObject.h>
#include <TArrayI.h>
+
+/////////////////////////////////////////////////////////////
+// //
+// Array of integers //
+// Origin M.Ivanov //
+// //
+/////////////////////////////////////////////////////////////
class AliTRDarrayI: public TObject, public TArrayI {
/*
$Log$
+Revision 1.4 2001/05/07 08:08:05 cblume
+Update of TRD code
+
Revision 1.3 2000/12/08 16:07:02 cblume
Update of the tracking by Sergei
Add the tracking code
*/
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster //
+// //
+///////////////////////////////////////////////////////////////////////////////
#include "AliTRDcluster.h"
-#include "AliTRDgeometry.h"
#include "AliTRDrecPoint.h"
ClassImp(AliTRDcluster)
// ones are stored first;
//
- const Int_t size = 9;
+ const Int_t kSize = 9;
- Int_t entries[size][2], i, j, index;
+ Int_t entries[kSize][2], i, j, index;
- Bool_t index_added;
+ Bool_t indexAdded;
- for (i=0; i<size; i++) {
+ for (i=0; i<kSize; i++) {
entries[i][0]=-1;
entries[i][1]=0;
}
- for (Int_t k=0; k<size; k++) {
+ for (Int_t k=0; k<kSize; k++) {
index=track[k];
- index_added=kFALSE; j=0;
+ indexAdded=kFALSE;
+ j=0;
if (index >= 0) {
- while ( (!index_added) && ( j < size ) ) {
+ while ( (!indexAdded) && ( j < kSize ) ) {
if ((entries[j][0]==index) || (entries[j][1]==0)) {
entries[j][0]=index;
entries[j][1]=entries[j][1]+1;
- index_added=kTRUE;
+ indexAdded=kTRUE;
}
j++;
}
Int_t swap=1, tmp0, tmp1;
while ( swap > 0) {
swap=0;
- for(i=0; i<(size-1); i++) {
+ for(i=0; i<(kSize-1); i++) {
if ((entries[i][0] >= 0) && (entries[i+1][0] >= 0)) {
if ((entries[i][1] < entries[i+1][1]) ||
((entries[i][1] == entries[i+1][1]) &&
/* $Id$ */
#include <TObject.h>
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster //
+// //
+///////////////////////////////////////////////////////////////////////////////
class AliTRDrecPoint;
/*
$Log$
+Revision 1.10 2002/02/11 14:27:54 cblume
+Geometry and hit structure update
+
Revision 1.9 2001/05/07 08:08:05 cblume
Update of TRD code
}
//_____________________________________________________________________________
-Int_t AliTRDdataArrayF::GetSize()
+Int_t AliTRDdataArrayF::GetSize() const
{
//
// Returns the size of the complete object
}
//_____________________________________________________________________________
-Int_t AliTRDdataArrayF::GetDataSize()
+Int_t AliTRDdataArrayF::GetDataSize() const
{
//
// Returns the size of only the data part
virtual Float_t GetThreshold() const { return fThreshold; };
- virtual Int_t GetSize();
- virtual Int_t GetDataSize();
+ virtual Int_t GetSize() const;
+ virtual Int_t GetDataSize() const;
virtual Int_t GetOverThreshold(Float_t threshold);
protected:
/*
$Log$
+Revision 1.10 2002/02/11 14:27:54 cblume
+Geometry and hit structure update
+
Revision 1.9 2001/05/07 08:08:05 cblume
Update of TRD code
}
//_____________________________________________________________________________
-Int_t AliTRDdataArrayI::GetSize()
+Int_t AliTRDdataArrayI::GetSize() const
{
//
// Returns the size of the complete object
}
//_____________________________________________________________________________
-Int_t AliTRDdataArrayI::GetDataSize()
+Int_t AliTRDdataArrayI::GetDataSize() const
{
//
// Returns the size of only the data part
virtual Int_t GetThreshold() const { return fThreshold; };
- virtual Int_t GetSize();
- virtual Int_t GetDataSize();
+ virtual Int_t GetSize() const;
+ virtual Int_t GetDataSize() const;
virtual Int_t GetOverThreshold(Int_t threshold);
protected:
/* $Id: AliTRDdigit.h,v */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// The TRD digit //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliDigitNew.h"
//_____________________________________________________________________________
/*
$Log$
+Revision 1.34 2002/03/25 20:00:44 cblume
+Introduce parameter class and regions of interest for merging
+
Revision 1.33 2002/02/12 17:32:03 cblume
Rearrange the deleting of the list of sdigitsmanager
}
//_____________________________________________________________________________
-Bool_t AliTRDdigitizer::MakeBranch(const Char_t *file)
+Bool_t AliTRDdigitizer::MakeBranch(const Char_t *file) const
{
//
// Create the branches for the digits array
}
// Get the pointer to the hit tree
- TTree *HitTree = gAlice->TreeH();
+ TTree *hitTree = gAlice->TreeH();
// Get the number of entries in the hit tree
// (Number of primary particles creating a hit somewhere)
- Int_t nTrack = (Int_t) HitTree->GetEntries();
+ Int_t nTrack = (Int_t) hitTree->GetEntries();
if (fDebug > 0) {
printf("<AliTRDdigitizer::MakeDigits> ");
printf("Found %d primary particles\n",nTrack);
for (Int_t iTrack = 0; iTrack < nTrack; iTrack++) {
gAlice->ResetHits();
- nBytes += HitTree->GetEvent(iTrack);
+ nBytes += hitTree->GetEvent(iTrack);
// Loop through the TRD hits
Int_t iHit = 0;
}
//_____________________________________________________________________________
-Bool_t AliTRDdigitizer::WriteDigits()
+Bool_t AliTRDdigitizer::WriteDigits() const
{
//
// Writes out the TRD-digits and the dictionaries
virtual Bool_t InitDetector();
virtual void Exec(Option_t* option = 0);
virtual Bool_t Open(const Char_t *file, Int_t nEvent = 0);
- virtual Bool_t MakeBranch(const Char_t *file = 0);
+ virtual Bool_t MakeBranch(const Char_t *file = 0) const;
virtual Bool_t MakeDigits();
virtual void AddSDigitsManager(AliTRDdigitsManager *manager);
virtual void DeleteSDigitsManager();
virtual Bool_t ConvertSDigits();
virtual Bool_t MergeSDigits();
virtual Bool_t SDigits2Digits();
- virtual Bool_t WriteDigits();
+ virtual Bool_t WriteDigits() const;
virtual void SetCompress(Int_t c = 1) { fCompress = c; };
virtual void SetDebug(Int_t v = 1) { fDebug = v; };
/*
$Log$
+Revision 1.16 2002/02/12 11:42:08 cblume
+Remove fTree from destructor
+
Revision 1.15 2002/02/11 14:27:54 cblume
Geometry and hit structure update
//_____________________________________________________________________________
void AliTRDdigitsManager::SetRaw()
{
+ //
+ // Switch on the raw digits flag
+ //
fIsRaw = kTRUE;
/*
$Log$
+Revision 1.15 2002/02/11 14:21:16 cblume
+Update of the geometry. Get rid of MANY
+
Revision 1.14 2001/11/06 17:19:41 cblume
Add detailed geometry and simple simulator
}
//_____________________________________________________________________________
-void AliTRDgeometry::CreateGeometry(Int_t *idtmed)
+void AliTRDgeometry::CreateGeometry(Int_t *idtmed) const
{
//
// Create TRD geometry
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD geometry class //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliGeometry.h"
class AliTRDgeometry : public AliGeometry {
AliTRDgeometry();
virtual ~AliTRDgeometry();
- virtual void CreateGeometry(Int_t *idtmed);
+ virtual void CreateGeometry(Int_t *idtmed) const;
virtual Int_t IsVersion() const = 0;
virtual void Init();
virtual Bool_t Local2Global(Int_t d, Float_t *local, Float_t *global) const;
virtual Bool_t GetPHOShole() const = 0;
virtual Bool_t GetRICHhole() const = 0;
- virtual Int_t GetDetectorSec(const Int_t p, const Int_t) const;
+ virtual Int_t GetDetectorSec(const Int_t p, const Int_t c) const;
virtual Int_t GetDetector(const Int_t p, const Int_t c, const Int_t s) const;
virtual Int_t GetPlane(const Int_t d) const;
virtual Int_t GetChamber(const Int_t d) const;
/*
$Log$
+Revision 1.3 2002/02/11 14:21:16 cblume
+Update of the geometry. Get rid of MANY
+
Revision 1.2 2001/11/08 13:13:08 cblume
Change to MANY for UCFI/M/O and UAFI/M/O
}
//_____________________________________________________________________________
-void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed)
+void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed) const
{
//
// Create the volumina of the readout electronics
}
//_____________________________________________________________________________
-void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed)
+void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed) const
{
//
// Create the volumina of the cooling
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Detailed TRD geometry for the spaceframe without holes //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliTRDgeometryFull.h"
class AliTRDgeometryDetail : public AliTRDgeometryFull {
virtual ~AliTRDgeometryDetail();
void CreateGeometry(Int_t *idtmed);
- void CreateReadout(Int_t *idtmed);
- void CreateCooling(Int_t *idtmed);
+ void CreateReadout(Int_t *idtmed) const;
+ void CreateCooling(Int_t *idtmed) const;
void PositionReadout(Int_t ipla, Int_t icha);
void PositionCooling(Int_t ipla, Int_t icha, Int_t idrotm);
Int_t IsVersion() const { return 2; };
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD geometry for the spaceframe without holes //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliTRDgeometry.h"
class AliTRDgeometryFull : public AliTRDgeometry {
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD geometry with holes //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliTRDgeometry.h"
class AliTRDgeometryHole : public AliTRDgeometry {
/*
$Log$
+Revision 1.10 2000/11/20 08:56:51 cblume
+Fix the binning of the histograms
+
Revision 1.9 2000/11/01 14:53:21 cblume
Merge with TRD-develop
// //
// Contains the pixel information for one TRD chamber //
// //
+// //
///////////////////////////////////////////////////////////////////////////////
#include <TObjArray.h>
//_____________________________________________________________________________
Int_t AliTRDmatrix::GetIndex(Int_t iRow, Int_t iCol, Int_t iTime) const
{
+ //
+ // Get the index of a given pixel
+ //
if ((iRow >= 0) && (iRow < fRow ) &&
(iCol >= 0) && (iCol < fCol ) &&
//_____________________________________________________________________________
AliTRDpixel *AliTRDmatrix::GetPixel(Int_t iRow, Int_t iCol, Int_t iTime) const
{
+ //
+ // Get one pixel
+ //
Int_t iPixel = GetIndex(iRow,iCol,iTime);
if (iPixel < 0) {
class AliTRDpixel;
///////////////////////////////////////////////////////
+// //
// Stores the pixel-information of one TRD chamber //
+// //
///////////////////////////////////////////////////////
class AliTRDmatrix : public TObject {
* provided "as is" without express or implied warranty. *
**************************************************************************/
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD MC track //
+// Used for efficiency estimates and matching of reconstructed tracks //
+// to MC particles //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliTRDmcTrack.h"
#include "AliTRDgeometry.h"
for(Int_t i=0; i<6; i++) {
for(Int_t j=0; j<3; j++) {
- Pin[i][j]=0.;
- Pout[i][j] = 0.;
+ fPin[i][j]=0.;
+ fPout[i][j] = 0.;
}
}
for(Int_t i=0; i<6; i++) {
for(Int_t j=0; j<3; j++) {
- Pin[i][j]=0.;
- Pout[i][j] = 0.;
+ fPin[i][j]=0.;
+ fPout[i][j] = 0.;
}
}
if(opt >= 0) {
for(i = 0; i < AliTRDgeometry::Nplan(); i++) {
- if( Pin[i][0] * Pin[i][0]
- + Pin[i][1] * Pin[i][1]
- + Pin[i][2] * Pin[i][2] > 0.0005) break;
+ if( fPin[i][0] * fPin[i][0]
+ + fPin[i][1] * fPin[i][1]
+ + fPin[i][2] * fPin[i][2] > 0.0005) break;
}
- px = Pin[0][0]; py = Pin[0][1]; pz = Pin[0][2];
+ px = fPin[0][0]; py = fPin[0][1]; pz = fPin[0][2];
}
else {
for(i = AliTRDgeometry::Nplan() - 1; i >= 0; i--) {
- if( Pout[i][0] * Pout[i][0]
- + Pout[i][1] * Pout[i][1]
- + Pout[i][2] * Pout[i][2] > 0.0005) break;
+ if( fPout[i][0] * fPout[i][0]
+ + fPout[i][1] * fPout[i][1]
+ + fPout[i][2] * fPout[i][2] > 0.0005) break;
}
- px = Pout[i][0]; py = Pout[i][1]; pz = Pout[i][2];
+ px = fPout[i][0]; py = fPout[i][1]; pz = fPout[i][2];
}
return;
//
if(opt >= 0) {
- px = Pin[plane][0]; py = Pin[plane][1]; pz = Pin[plane][2];
+ px = fPin[plane][0]; py = fPin[plane][1]; pz = fPin[plane][2];
}
else {
- px = Pout[plane][0]; py = Pout[plane][1]; pz = Pout[plane][2];
+ px = fPout[plane][0]; py = fPout[plane][1]; pz = fPout[plane][2];
}
return;
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD MC track //
+// Used for efficiency estimates and matching of reconstructed tracks //
+// to MC particles //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class AliTRDgeometry;
AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass, Int_t charge, Int_t pdg);
void SetPin(Int_t plane, Double_t px, Double_t py, Double_t pz)
- { Pin[plane][0] = px; Pin[plane][1] = py; Pin[plane][2] = pz; }
+ { fPin[plane][0] = px; fPin[plane][1] = py; fPin[plane][2] = pz; }
void SetPout(Int_t plane, Double_t px, Double_t py, Double_t pz)
- { Pout[plane][0] = px; Pout[plane][1] = py; Pout[plane][2] = pz; }
+ { fPout[plane][0] = px; fPout[plane][1] = py; fPout[plane][2] = pz; }
void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz, Int_t opt = 0) const;
void GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
Int_t fN; // Number of TRD clusters associated with the track
Int_t fIndex[200]; // Indices of these clusters
- Double_t Pin[6][3]; // Px,Py,Pz at the entrance of each TRD plane
- Double_t Pout[6][3]; // Px,Py,Pz at the exit of each TRD plane
+ Double_t fPin[6][3]; // Px,Py,Pz at the entrance of each TRD plane
+ Double_t fPout[6][3]; // Px,Py,Pz at the exit of each TRD plane
ClassDef(AliTRDmcTrack,1) // TRD MC track
/*
$Log$
+Revision 1.2 2002/03/28 10:00:36 hristov
+Some additional initialisation
+
Revision 1.1 2002/03/25 20:01:18 cblume
Introduce parameter class
}
//_____________________________________________________________________________
-Float_t AliTRDparameter::CrossTalk(Float_t time)
+Float_t AliTRDparameter::CrossTalk(Float_t time) const
{
//
// Applies the pad-pad capacitive cross talk
}
//_____________________________________________________________________________
-Int_t AliTRDparameter::ExB(Float_t driftlength, Float_t *xyz)
+Int_t AliTRDparameter::ExB(Float_t driftlength, Float_t *xyz) const
{
//
// Applies E x B effects to the position of a single electron
//_____________________________________________________________________________
Int_t AliTRDparameter::PadResponse(Float_t signal, Float_t dist
- , Int_t plane, Float_t *pad)
+ , Int_t plane, Float_t *pad) const
{
//
// Applies the pad response
}
//_____________________________________________________________________________
-Float_t AliTRDparameter::TimeResponse(Float_t time)
+Float_t AliTRDparameter::TimeResponse(Float_t time) const
{
//
// Applies the preamp shaper time response
}
//_____________________________________________________________________________
-Double_t AliTRDparameter::LUTposition(Int_t iplane, Double_t ampL,
- Double_t ampC,
- Double_t ampR)
+Double_t AliTRDparameter::LUTposition(Int_t iplane, Double_t ampL
+ , Double_t ampC
+ , Double_t ampR) const
{
//
// Calculates the cluster position using the lookup table.
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD parameter class //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "TNamed.h"
class AliTRDgeometry;
Int_t LUTOn() const { return fLUTOn; };
virtual Int_t Diffusion(Float_t driftlength, Float_t *xyz);
- virtual Int_t ExB(Float_t driftlength, Float_t *xyz);
+ virtual Int_t ExB(Float_t driftlength, Float_t *xyz) const;
virtual Float_t Col0Tilted(Float_t col0, Float_t rowOffset, Int_t plane);
- virtual Int_t PadResponse(Float_t signal, Float_t dist, Int_t plane, Float_t *pad);
- virtual Float_t CrossTalk(Float_t time);
- virtual Float_t TimeResponse(Float_t time);
- virtual Double_t LUTposition(Int_t iplane, Double_t ampL, Double_t ampC, Double_t ampR);
+ virtual Int_t PadResponse(Float_t signal, Float_t dist, Int_t plane, Float_t *pad) const;
+ virtual Float_t CrossTalk(Float_t time) const;
+ virtual Float_t TimeResponse(Float_t time) const;
+ virtual Double_t LUTposition(Int_t iplane, Double_t ampL, Double_t ampC, Double_t ampR) const;
protected:
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// The TRD particle identification base class //
+// //
+// Its main purposes are: //
+// - Provide I/O framework for all neccessary files //
+// - Assignment of a e/pi propability to a given track //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include <TNamed.h>
class TObjArray;
void SetThreePadOnly(Bool_t only) { fThreePadOnly = only; };
void SetEvent(Int_t event) { fEvent = event; };
- TObjArray *GetTrackArray() { return fTrackArray; };
- TObjArray *GetClusterArray() { return fClusterArray; };
+ TObjArray *GetTrackArray() const { return fTrackArray; };
+ TObjArray *GetClusterArray() const { return fClusterArray; };
- Float_t GetPIDratioMin() { return fPIDratioMin; };
- Bool_t GetPIDpurePoints() { return fPIDpurePoints; };
- Float_t GetPIDindexMin() { return fPIDindexMin; };
- Float_t GetPIDindexMax() { return fPIDindexMax; };
+ Float_t GetPIDratioMin() const { return fPIDratioMin; };
+ Bool_t GetPIDpurePoints() const { return fPIDpurePoints; };
+ Float_t GetPIDindexMin() const { return fPIDindexMin; };
+ Float_t GetPIDindexMax() const { return fPIDindexMax; };
- Bool_t GetThreePadOnly() { return fThreePadOnly; };
+ Bool_t GetThreePadOnly() const { return fThreePadOnly; };
protected:
/*
$Log$
+Revision 1.2 2001/11/07 11:04:22 hristov
+Minor corrections needed on Sun (arrays with undefined size created by new, inline decration removed when the body was hot in the header file)
+
Revision 1.1 2001/11/06 17:19:41 cblume
Add detailed geometry and simple simulator
}
//_____________________________________________________________________________
-Int_t AliTRDpidLQ::GetIndex(const Int_t imom, const Int_t ipid)
+Int_t AliTRDpidLQ::GetIndex(const Int_t imom, const Int_t ipid) const
{
//
// Returns the histogram index
/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// The TRD particle identification class //
+// //
+// Its main purposes are: //
+// - Creation and bookkeeping of the propability distributions //
+// - Assignment of a e/pi propability to a given track based on //
+// the LQ method //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliTRDpid.h"
class AliTRDpidLQ : public AliTRDpid {
virtual Bool_t FillSpectra(const AliTRDtrack *t);
Int_t GetIndex(const AliTRDtrack *t);
- Int_t GetIndex(const Int_t imom, const Int_t ipid);
+ Int_t GetIndex(const Int_t imom, const Int_t ipid) const;
Int_t GetIndex(const Float_t mom, const Int_t ipid);
TObjArray* GetHist() const { return fHist; };
/*
$Log$
+Revision 1.3 2000/10/15 23:40:01 cblume
+Remove AliTRDconst
+
Revision 1.2 2000/10/06 16:49:46 cblume
Made Getters const
///////////////////////////////////////////////////////////////////////////////
// //
-// This class contains the TRD points for the ALICE event display //
+// This class contains the TRD points for the ALICE event display. //
+// Used to seperately display dEdx and TR photon hits. //
// //
///////////////////////////////////////////////////////////////////////////////
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// This class contains the TRD points for the ALICE event display. //
+// Used to seperately display dEdx and TR photon hits. //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliPoints.h"
class AliTRDpoints : public AliPoints {
/*
$Log$
+Revision 1.7 2001/12/05 15:04:34 hristov
+Changes related to the corrections of AliRecPoint
+
Revision 1.6 2001/02/14 18:22:26 cblume
Change in the geometry of the padplane
// 2) if two or more indexes appear equal number of times, the lowest
// ones are stored first;
- const Int_t size = 9;
+ const Int_t kSize = 9;
- Int_t entries[size][2], i, j, index;
+ Int_t entries[kSize][2], i, j, index;
- Bool_t index_added;
+ Bool_t indexAdded;
- for (i=0; i<size; i++) {
+ for (i=0; i<kSize; i++) {
entries[i][0]=-1;
entries[i][1]=0;
}
- for (Int_t k=0; k<size; k++) {
+ for (Int_t k=0; k<kSize; k++) {
index=track[k];
- index_added=kFALSE; j=0;
+ indexAdded=kFALSE; j=0;
if (index >= 0) {
- while ( (!index_added) && ( j < size ) ) {
+ while ( (!indexAdded) && ( j < kSize ) ) {
if ((entries[j][0]==index) || (entries[j][1]==0)) {
entries[j][0]=index;
entries[j][1]=entries[j][1]+1;
- index_added=kTRUE;
+ indexAdded=kTRUE;
}
j++;
}
Int_t swap=1, tmp0, tmp1;
while ( swap > 0) {
swap=0;
- for(i=0; i<(size-1); i++) {
+ for(i=0; i<(kSize-1); i++) {
if ((entries[i][0] >= 0) && (entries[i+1][0] >= 0)) {
if ((entries[i][1] < entries[i+1][1]) ||
((entries[i][1] == entries[i+1][1]) &&
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD reconstructed point //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliRecPoint.h"
class AliTRDrecPoint : public AliRecPoint {
AliTRDrecPoint(const char * opt);
virtual ~AliTRDrecPoint();
- virtual void Print(Option_t* opt) {};
+ virtual void Print(Option_t* opt) const {};
virtual void AddDigit(Int_t digit);
virtual void AddDigit(AliDigitNew &digit) {};
/*
$Log$
+Revision 1.12 2002/02/12 16:06:45 cblume
+Remove delete fTree
+
Revision 1.11 2001/11/19 08:44:08 cblume
Fix bugs reported by Rene
}
//_____________________________________________________________________________
-const AliTRDsegmentID * AliTRDsegmentArrayBase::operator[](Int_t i)
+const AliTRDsegmentID * AliTRDsegmentArrayBase::operator[](Int_t i) const
{
//
// Returns a segment with the given index <i>
AliTRDsegmentArrayBase &operator=(const AliTRDsegmentArrayBase &a);
const AliTRDsegmentID *At(Int_t i) const;
- const AliTRDsegmentID *operator[](Int_t i);
+ const AliTRDsegmentID *operator[](Int_t i) const;
Bool_t AddSegment(AliTRDsegmentID *segment);
AliTRDsegmentID *AddSegment(Int_t index);
/*
$Log$
+Revision 1.3 2000/11/01 14:53:21 cblume
+Merge with TRD-develop
+
Revision 1.1.4.1 2000/10/04 16:34:58 cblume
Replace include files by forward declarations
*/
///////////////////////////////////////////////////////////////////////////////
+// //
// Base class for a detector segment //
+// //
///////////////////////////////////////////////////////////////////////////////
#include "AliTRDsegmentID.h"
/* $Id: AliTRDsegmentID.h,v */
-////////////////////////////////////////////////
-// Base class for a detector segment //
-////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Base class for a detector segment //
+// //
+///////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD simulation - multimodule (regular rad.) //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class TH1D;
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Simplified TRD slow simulator //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class AliTRDsimpleGen;
virtual void Copy(TObject &s);
virtual void ProcessEvent(Int_t ievent);
- virtual AliTRDsimpleGen *GetGenerator() { return fGenerator; };
+ virtual AliTRDsimpleGen *GetGenerator() const { return fGenerator; };
protected:
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Particle generator for the simplescopic TRD simulator //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class AliTRDsimpleGen : public TObject {
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Simple TRD Monte Carlo class //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
#include "AliMC.h"
#include "AliMCProcess.h"
/*
$Log$
+Revision 1.5 2001/11/06 17:19:41 cblume
+Add detailed geometry and simple simulator
+
Revision 1.4 2001/10/21 18:30:02 hristov
Several pointers were set to zero in the default constructors to avoid memory management problems
Add the tracking code
*/
-
+
+//////////////////////////////////////////////////////////////////////
+// //
+// Hit compression class //
+// Adapted from AliTPCTimeBin by Marian //
+// //
+//////////////////////////////////////////////////////////////////////
+
#include "AliTRDcluster.h"
#include "AliTRDtimeBin.h"
AliTRDtimeBin::AliTRDtimeBin() {
//default constructor
fN=0;
- for (UInt_t i=0; i<kMAX_CLUSTER_PER_TIME_BIN; i++)
+ for (UInt_t i=0; i<kMaxClusterPerTimeBin; i++)
fClusters[i]=0;
}
//______________________________________________________
// Insert cluster in TimeBin cluster array.
// Clusters are sorted according to Y coordinate.
- if (fN==kMAX_CLUSTER_PER_TIME_BIN) {
+ if (fN==kMaxClusterPerTimeBin) {
printf("AliTRDtimeBin::InsertCluster(): Too many clusters !\n");
return;
}
/* $Id: AliTRDtimeBin.h,v */
+//////////////////////////////////////////////////////////////////////
+// //
+// Hit compression class //
+// Adapted from AliTPCTimeBin by Marian //
+// //
+//////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class AliTRDcluster;
-const unsigned kMAX_CLUSTER_PER_TIME_BIN=3500;
-
//-----------------------------------------------------------------
class AliTRDtimeBin : public TObject {
AliTRDtimeBin();
virtual ~AliTRDtimeBin() { };
- void InsertCluster(AliTRDcluster*,UInt_t);
+ void InsertCluster(AliTRDcluster *c, UInt_t index);
operator Int_t() const {return fN;}
AliTRDcluster* operator[](Int_t i);
Int_t Find(Double_t y) const;
protected:
+
+ enum { kMaxClusterPerTimeBin=3500 };
- UInt_t fN;
- AliTRDcluster *fClusters[kMAX_CLUSTER_PER_TIME_BIN];
- UInt_t fIndex[kMAX_CLUSTER_PER_TIME_BIN];
+ UInt_t fN; // ????
+ AliTRDcluster *fClusters[kMaxClusterPerTimeBin]; // ????
+ UInt_t fIndex[kMaxClusterPerTimeBin]; // ????
ClassDef(AliTRDtimeBin,1) // Provides tools to address clusters which lay within one time bin
/*
$Log$
+Revision 1.8 2001/05/30 12:17:47 hristov
+Loop variables declared once
+
Revision 1.7 2001/05/28 17:07:58 hristov
Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
*/
+/////////////////////////////////////////////////////////////////////////////
+// //
+// TRD track object //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
#include <iostream.h>
#include <TObject.h>
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+/////////////////////////////////////////////////////////////////////////////
+// //
+// TRD track object //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class AliTRDcluster;
Double_t GetP() const {
return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl());
}
- Double_t GetPredictedChi2(const AliTRDcluster*) const ;
+ Double_t GetPredictedChi2(const AliTRDcluster *c) const ;
Double_t GetPt() const {return 0.299792458*0.4/GetC()/100;}
void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const ;
Double_t GetSigmaC2() const {return fCcc;}
* provided "as is" without express or implied warranty. *
**************************************************************************/
+////////////////////////////////////////////////
+// //
+// Manager class for TRD hits //
+// //
+////////////////////////////////////////////////
+
#include "AliTRDtrackHits.h"
#include "TClonesArray.h"
#include "AliTRDhit.h"
void AliTRDtrackHits::AddHitTRD(Int_t volumeID, Int_t trackID, Double_t x,
Double_t y, Double_t z,Int_t q, Bool_t inDrift)
{
+ //
+ // Add one TRD hit
+ //
+
if (inDrift) q=2*q+1;
else q=2*q;
AddHitKartez(volumeID, trackID,x,y,z,q);
* See cxx source for full Copyright notice */
////////////////////////////////////////////////
-// Manager class for TRD hits //
+// //
+// Manager class for TRD hits //
+// //
////////////////////////////////////////////////
#include "../TPC/AliTPCTrackHitsV2.h"
/*
$Log$
+Revision 1.14 2001/11/14 10:50:46 cblume
+Changes in digits IO. Add merging of summable digits
+
Revision 1.13 2001/05/30 12:17:47 hristov
Loop variables declared once
*/
+////////////////////////////////////////////////////////////////////////////////
+// //
+// The TRD tracker //
+// //
+////////////////////////////////////////////////////////////////////////////////
+
#include <iostream.h>
#include <TFile.h>
ClassImp(AliTRDtracker)
- const Float_t AliTRDtracker::fSeedDepth = 0.5;
- const Float_t AliTRDtracker::fSeedStep = 0.05;
- const Float_t AliTRDtracker::fSeedGap = 0.25;
+ const Float_t AliTRDtracker::fgkSeedDepth = 0.5;
+ const Float_t AliTRDtracker::fgkSeedStep = 0.05;
+ const Float_t AliTRDtracker::fgkSeedGap = 0.25;
- const Float_t AliTRDtracker::fMaxSeedDeltaZ12 = 40.;
- const Float_t AliTRDtracker::fMaxSeedDeltaZ = 25.;
- const Float_t AliTRDtracker::fMaxSeedC = 0.0052;
- const Float_t AliTRDtracker::fMaxSeedTan = 1.2;
- const Float_t AliTRDtracker::fMaxSeedVertexZ = 150.;
+ const Float_t AliTRDtracker::fgkMaxSeedDeltaZ12 = 40.;
+ const Float_t AliTRDtracker::fgkMaxSeedDeltaZ = 25.;
+ const Float_t AliTRDtracker::fgkMaxSeedC = 0.0052;
+ const Float_t AliTRDtracker::fgkMaxSeedTan = 1.2;
+ const Float_t AliTRDtracker::fgkMaxSeedVertexZ = 150.;
- const Double_t AliTRDtracker::fSeedErrorSY = 0.2;
- const Double_t AliTRDtracker::fSeedErrorSY3 = 2.5;
- const Double_t AliTRDtracker::fSeedErrorSZ = 0.1;
+ const Double_t AliTRDtracker::fgkSeedErrorSY = 0.2;
+ const Double_t AliTRDtracker::fgkSeedErrorSY3 = 2.5;
+ const Double_t AliTRDtracker::fgkSeedErrorSZ = 0.1;
- const Float_t AliTRDtracker::fMinClustersInSeed = 0.7;
+ const Float_t AliTRDtracker::fgkMinClustersInSeed = 0.7;
- const Float_t AliTRDtracker::fMinClustersInTrack = 0.5;
- const Float_t AliTRDtracker::fSkipDepth = 0.05;
- const Float_t AliTRDtracker::fLabelFraction = 0.5;
- const Float_t AliTRDtracker::fWideRoad = 20.;
+ const Float_t AliTRDtracker::fgkMinClustersInTrack = 0.5;
+ const Float_t AliTRDtracker::fgkSkipDepth = 0.05;
+ const Float_t AliTRDtracker::fgkLabelFraction = 0.5;
+ const Float_t AliTRDtracker::fgkWideRoad = 20.;
- const Double_t AliTRDtracker::fMaxChi2 = 24.;
+ const Double_t AliTRDtracker::fgkMaxChi2 = 24.;
//____________________________________________________________________
AliTRDtracker::AliTRDtracker()
AliTRDtracker::AliTRDtracker(const Text_t* name, const Text_t* title)
:TNamed(name, title)
{
+ //
+ // TRD tracker contructor
+ //
+
fEvent = 0;
fGeom = NULL;
//___________________________________________________________________
AliTRDtracker::~AliTRDtracker()
{
+ //
+ // Destructor
+ //
+
delete fClusters;
delete fTracks;
delete fSeeds;
delete fGeom;
+
}
//___________________________________________________________________
void AliTRDtracker::Clusters2Tracks(TH1F *hs, TH1F *hd)
{
+ //
+ // Do the trackfinding
+ //
+
Int_t i;
Int_t inner, outer;
Int_t fTotalNofTimeBins = fGeom->GetTimeMax() * AliTRDgeometry::Nplan();
- Int_t nSteps = (Int_t) (fSeedDepth / fSeedStep);
- Int_t gap = (Int_t) (fTotalNofTimeBins * fSeedGap);
- Int_t step = (Int_t) (fTotalNofTimeBins * fSeedStep);
+ Int_t nSteps = (Int_t) (fgkSeedDepth / fgkSeedStep);
+ Int_t gap = (Int_t) (fTotalNofTimeBins * fgkSeedGap);
+ Int_t step = (Int_t) (fTotalNofTimeBins * fgkSeedStep);
// nSteps = 1;
}
//_____________________________________________________________________
-Double_t AliTRDtracker::ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt)
+Double_t AliTRDtracker::ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const
{
+ //
// Parametrised "expected" error of the cluster reconstruction in Y
+ //
Double_t s = 0.08 * 0.08;
return s;
+
}
//_____________________________________________________________________
-Double_t AliTRDtracker::ExpectedSigmaZ2(Double_t r, Double_t tgl)
+Double_t AliTRDtracker::ExpectedSigmaZ2(Double_t r, Double_t tgl) const
{
+ //
// Parametrised "expected" error of the cluster reconstruction in Z
+ //
Double_t s = 6 * 6 /12.;
return s;
+
}
//_____________________________________________________________________
Double_t x2,Double_t y2,
Double_t x3,Double_t y3)
{
+ //
// Initial approximation of the track curvature
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+ //
Double_t d=(x2-x1)*(y3-y2)-(x3-x2)*(y2-y1);
Double_t a=0.5*((y3-y2)*(y2*y2-y1*y1+x2*x2-x1*x1)-
Double_t xr=TMath::Abs(d/(d*x1-a)), yr=d/(d*y1-b);
return -xr*yr/sqrt(xr*xr+yr*yr);
+
}
//_____________________________________________________________________
Double_t x2,Double_t y2,
Double_t x3,Double_t y3)
{
+ //
// Initial approximation of the track curvature times center of curvature
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+ //
Double_t d=(x2-x1)*(y3-y2)-(x3-x2)*(y2-y1);
Double_t a=0.5*((y3-y2)*(y2*y2-y1*y1+x2*x2-x1*x1)-
Double_t xr=TMath::Abs(d/(d*x1-a)), yr=d/(d*y1-b);
return -a/(d*y1-b)*xr/sqrt(xr*xr+yr*yr);
+
}
//_____________________________________________________________________
Double_t x2,Double_t y2,
Double_t z1,Double_t z2)
{
+ //
// Initial approximation of the tangent of the track dip angle
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+ //
return (z1 - z2)/sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
+
}
//___________________________________________________________________
Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
- Int_t s, Int_t rf, Int_t matched_index,
+ Int_t s, Int_t rf, Int_t matchedIndex,
TH1F *hs, TH1F *hd)
{
+ //
// Starting from current position on track=t this function tries
// to extrapolate the track up to timeBin=rf and to confirm prolongation
// if a close cluster is found. *sec is a pointer to allocated
// array of sectors, in which the initial sector has index=s.
-
+ //
// TH1F *hsame = hs;
// TH1F *hdiff = hd;
// Bool_t good_match;
- const Int_t TIME_BINS_TO_SKIP=Int_t(fSkipDepth*sec->GetNtimeBins());
- Int_t try_again=TIME_BINS_TO_SKIP;
+ const Int_t kTimeBinsToSkip=Int_t(fgkSkipDepth*sec->GetNtimeBins());
+ Int_t tryAgain=kTimeBinsToSkip;
Double_t alpha=AliTRDgeometry::GetAlpha();
return 0;
}
- AliTRDtimeBin& time_bin=sec[s][nr];
+ AliTRDtimeBin& timeBin=sec[s][nr];
Double_t sy2=ExpectedSigmaY2(t.GetX(),t.GetTgl(),t.GetPt());
Double_t sz2=ExpectedSigmaZ2(t.GetX(),t.GetTgl());
Double_t road=25.*sqrt(t.GetSigmaY2() + sy2), y=t.GetY(), z=t.GetZ();
- if (road>fWideRoad) {
+ if (road>fgkWideRoad) {
if (t.GetNclusters() > 4) {
cerr<<t.GetNclusters()<<" FindProlongation: Road is too wide !\n";
}
UInt_t index=0;
// Int_t ncl = 0;
- Double_t max_chi2=fMaxChi2;
+ Double_t maxChi2=fgkMaxChi2;
- if (time_bin) {
+ if (timeBin) {
- for (Int_t i=time_bin.Find(y-road); i<time_bin; i++) {
- AliTRDcluster* c=(AliTRDcluster*)(time_bin[i]);
+ for (Int_t i=timeBin.Find(y-road); i<timeBin; i++) {
+ AliTRDcluster* c=(AliTRDcluster*)(timeBin[i]);
// good_match = kFALSE;
- // if((c->GetTrackIndex(0) == matched_index) ||
- // (c->GetTrackIndex(1) == matched_index) ||
- // (c->GetTrackIndex(2) == matched_index)) good_match = kTRUE;
+ // if((c->GetTrackIndex(0) == matchedIndex) ||
+ // (c->GetTrackIndex(1) == matchedIndex) ||
+ // (c->GetTrackIndex(2) == matchedIndex)) good_match = kTRUE;
// if(hsame) hsame->Fill(TMath::Abs(c->GetY()-y)/road);
// if(hdiff) hdiff->Fill(road);
Double_t chi2=t.GetPredictedChi2(c);
- // if((c->GetTrackIndex(0) == matched_index) ||
- // (c->GetTrackIndex(1) == matched_index) ||
- // (c->GetTrackIndex(2) == matched_index))
+ // if((c->GetTrackIndex(0) == matchedIndex) ||
+ // (c->GetTrackIndex(1) == matchedIndex) ||
+ // (c->GetTrackIndex(2) == matchedIndex))
// hdiff->Fill(chi2);
// ncl++;
- if (chi2 > max_chi2) continue;
- max_chi2=chi2;
+ if (chi2 > maxChi2) continue;
+ maxChi2=chi2;
cl=c;
- index=time_bin.GetIndex(i);
+ index=timeBin.GetIndex(i);
}
if(!cl) {
- for (Int_t i=time_bin.Find(y-road); i<time_bin; i++) {
- AliTRDcluster* c=(AliTRDcluster*)(time_bin[i]);
+ for (Int_t i=timeBin.Find(y-road); i<timeBin; i++) {
+ AliTRDcluster* c=(AliTRDcluster*)(timeBin[i]);
if (c->GetY() > y+road) break;
if (c->IsUsed() > 0) continue;
// ncl++;
- if (chi2 > max_chi2) continue;
- max_chi2=chi2;
+ if (chi2 > maxChi2) continue;
+ maxChi2=chi2;
cl=c;
- index=time_bin.GetIndex(i);
+ index=timeBin.GetIndex(i);
}
}
if (cl) {
- t.Update(cl,max_chi2,index);
+ t.Update(cl,maxChi2,index);
- try_again=TIME_BINS_TO_SKIP;
+ tryAgain=kTimeBinsToSkip;
} else {
- if (try_again==0) break;
+ if (tryAgain==0) break;
if (y > ymax) {
// cerr<<"y > ymax: "<<y<<" > "<<ymax<<endl;
s = (s+1) % ns;
return 0;
}
}
- if(!sec->TECframe(nr,y,z)) try_again--;
+ if(!sec->TECframe(nr,y,z)) tryAgain--;
}
}
//_____________________________________________________________________________
void AliTRDtracker::GetEvent(const Char_t *hitfile, const Char_t *clusterfile)
{
+ //
// Opens a ROOT-file with TRD-clusters and reads the cluster-tree in
+ //
ReadClusters(fClusters, clusterfile);
}
*/
- AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD");
- fGeom = TRD->GetGeometry();
+ AliTRD *trd = (AliTRD*) gAlice->GetDetector("TRD");
+ fGeom = trd->GetGeometry();
}
//_____________________________________________________________________________
void AliTRDtracker::SetUpSectors(AliTRDtrackingSector *sec)
{
+ //
// Fills clusters into TRD tracking_sectors
// Note that the numbering scheme for the TRD tracking_sectors
// differs from that of TRD sectors
+ //
for (Int_t i=0; i<AliTRDgeometry::Nsect(); i++) sec[i].SetUp();
while (ncl--) {
printf("\r %d left ",ncl);
AliTRDcluster *c=(AliTRDcluster*)fClusters->UncheckedAt(ncl);
- Int_t detector=c->GetDetector(), local_time_bin=c->GetLocalTimeBin();
+ Int_t detector=c->GetDetector(), localTimeBin=c->GetLocalTimeBin();
Int_t sector=fGeom->GetSector(detector);
- Int_t tracking_sector = AliTRDgeometry::kNsect - sector - 1;
+ Int_t trackingSector = AliTRDgeometry::kNsect - sector - 1;
- Int_t tb=sec[sector].GetTimeBin(detector,local_time_bin);
+ Int_t tb=sec[sector].GetTimeBin(detector,localTimeBin);
index=ncl;
- sec[tracking_sector][tb].InsertCluster(c,index);
+ sec[trackingSector][tb].InsertCluster(c,index);
}
printf("\r\n");
AliTRDtrackingSector* fTrSec, Int_t turn,
TH1F *hs, TH1F *hd)
{
+ //
// Creates track seeds using clusters in timeBins=i1,i2
+ //
Int_t i2 = inner, i1 = outer;
Int_t ti[3], to[3];
TH1F *hsame = hs;
TH1F *hdiff = hd;
Bool_t match = false;
- Int_t matched_index;
+ Int_t matchedIndex;
// find seeds
Double_t x[5], c[15];
- Int_t max_sec=AliTRDgeometry::kNsect;
+ Int_t maxSec=AliTRDgeometry::kNsect;
Double_t alpha=AliTRDgeometry::GetAlpha();
Double_t shift=AliTRDgeometry::GetAlpha()/2.;
}
- for (Int_t ns=0; ns<max_sec; ns++) {
+ for (Int_t ns=0; ns<maxSec; ns++) {
printf("\n MakeSeeds: sector %d \n", ns);
- Int_t nl2=fTrSec[(ns-2+max_sec)%max_sec][i2];
- Int_t nl=fTrSec[(ns-1+max_sec)%max_sec][i2];
+ Int_t nl2=fTrSec[(ns-2+maxSec)%maxSec][i2];
+ Int_t nl=fTrSec[(ns-1+maxSec)%maxSec][i2];
Int_t nm=fTrSec[ns][i2];
- Int_t nu=fTrSec[(ns+1)%max_sec][i2];
- Int_t nu2=fTrSec[(ns+2)%max_sec][i2];
+ Int_t nu=fTrSec[(ns+1)%maxSec][i2];
+ Int_t nu2=fTrSec[(ns+2)%maxSec][i2];
AliTRDtimeBin& r1=fTrSec[ns][i1];
if (js<nl2) {
if(turn != 2) continue;
- AliTRDtimeBin& r2=fTrSec[(ns-2+max_sec)%max_sec][i2];
+ AliTRDtimeBin& r2=fTrSec[(ns-2+maxSec)%maxSec][i2];
cl=r2[js];
y2=cl->GetY(); z2=cl->GetZ();
for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
}
else if (js<nl2+nl) {
if(turn != 1) continue;
- AliTRDtimeBin& r2=fTrSec[(ns-1+max_sec)%max_sec][i2];
+ AliTRDtimeBin& r2=fTrSec[(ns-1+maxSec)%maxSec][i2];
cl=r2[js-nl2];
y2=cl->GetY(); z2=cl->GetZ();
for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
}
else if (js<nl2+nl+nm+nu) {
if(turn != 1) continue;
- AliTRDtimeBin& r2=fTrSec[(ns+1)%max_sec][i2];
+ AliTRDtimeBin& r2=fTrSec[(ns+1)%maxSec][i2];
cl=r2[js-nl2-nl-nm];
y2=cl->GetY(); z2=cl->GetZ();
for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
}
else {
if(turn != 2) continue;
- AliTRDtimeBin& r2=fTrSec[(ns+2)%max_sec][i2];
+ AliTRDtimeBin& r2=fTrSec[(ns+2)%maxSec][i2];
cl=r2[js-nl2-nl-nm-nu];
y2=cl->GetY(); z2=cl->GetZ();
for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
match = false;
- matched_index = -1;
+ matchedIndex = -1;
for (Int_t ii=0; ii<3; ii++) {
// cerr<<"ti["<<ii<<"] = "<<ti[ii]<<"; to["<<ii<<"] = "<<to[ii]<<endl;
if(ti[ii] < 0) continue;
if(to[kk] >= nprim) continue;
if(ti[ii] == to[kk]) {
//cerr<<"ti["<<ii<<"] = "<<ti[ii]<<" = "<<to[kk]<<" = to["<<kk<<"]"<<endl;
- matched_index = ti[ii];
+ matchedIndex = ti[ii];
match = true;
}
}
}
- if(TMath::Abs(z1-z2) > fMaxSeedDeltaZ12) continue;
+ if(TMath::Abs(z1-z2) > fgkMaxSeedDeltaZ12) continue;
Double_t zz=z1 - z1/x1*(x1-x2);
- if (TMath::Abs(zz-z2)>fMaxSeedDeltaZ) continue;
+ if (TMath::Abs(zz-z2)>fgkMaxSeedDeltaZ) continue;
Double_t d=(x2-x1)*(0.-y2)-(0.-x2)*(y2-y1);
if (d==0.) {cerr<<"TRD MakeSeeds: Straight seed !\n"; continue;}
x[1]=z1;
x[2]=f1trd(x1,y1,x2,y2,x3,y3);
- if (TMath::Abs(x[2]) > fMaxSeedC) continue;
+ if (TMath::Abs(x[2]) > fgkMaxSeedC) continue;
x[3]=f2trd(x1,y1,x2,y2,x3,y3);
x[4]=f3trd(x1,y1,x2,y2,z1,z2);
- if (TMath::Abs(x[4]) > fMaxSeedTan) continue;
+ if (TMath::Abs(x[4]) > fgkMaxSeedTan) continue;
Double_t a=asin(x[3]);
Double_t zv=z1 - x[4]/x[2]*(a+asin(x[2]*x1-x[3]));
- if (TMath::Abs(zv)>fMaxSeedVertexZ) continue;
+ if (TMath::Abs(zv)>fgkMaxSeedVertexZ) continue;
Double_t sy1=r1[is]->GetSigmaY2(), sz1=r1[is]->GetSigmaZ2();
Double_t sy2=cl->GetSigmaY2(), sz2=cl->GetSigmaZ2();
- Double_t sy3=fSeedErrorSY3, sy=fSeedErrorSY, sz=fSeedErrorSZ;
+ Double_t sy3=fgkSeedErrorSY3, sy=fgkSeedErrorSY, sz=fgkSeedErrorSZ;
Double_t f20=(f1trd(x1,y1+sy,x2,y2,x3,y3)-x[2])/sy;
Double_t f22=(f1trd(x1,y1,x2,y2+sy,x3,y3)-x[2])/sy;
AliTRDtrack *track=new AliTRDtrack(r1[is],index,x,c,x1,ns*alpha+shift);
- Int_t rc=FindProlongation(*track,fTrSec,ns,i2,matched_index,hsame,hdiff);
+ Int_t rc=FindProlongation(*track,fTrSec,ns,i2,matchedIndex,hsame,hdiff);
// if (match) hsame->Fill((Float_t) track->GetNclusters());
// else hdiff->Fill((Float_t) track->GetNclusters());
// continue;
if ((rc < 0) ||
- (track->GetNclusters() < (i1-i2)*fMinClustersInSeed)) delete track;
+ (track->GetNclusters() < (i1-i2)*fgkMinClustersInSeed)) delete track;
else {
fSeeds->AddLast(track); fNseeds++;
printf("\r found seed %d ", fNseeds);
Char_t treeName[12];
sprintf(treeName,"TreeR%d_TRD",fEvent);
- TTree *ClusterTree = (TTree*) file->Get(treeName);
+ TTree *clusterTree = (TTree*) file->Get(treeName);
- TObjArray *ClusterArray = new TObjArray(400);
+ TObjArray *clusterArray = new TObjArray(400);
- ClusterTree->GetBranch("TRDcluster")->SetAddress(&ClusterArray);
+ clusterTree->GetBranch("TRDcluster")->SetAddress(&clusterArray);
- Int_t nEntries = (Int_t) ClusterTree->GetEntries();
- printf("found %d entries in %s.\n",nEntries,ClusterTree->GetName());
+ Int_t nEntries = (Int_t) clusterTree->GetEntries();
+ printf("found %d entries in %s.\n",nEntries,clusterTree->GetName());
// Loop through all entries in the tree
Int_t nbytes;
for (Int_t iEntry = 0; iEntry < nEntries; iEntry++) {
// Import the tree
- nbytes += ClusterTree->GetEvent(iEntry);
+ nbytes += clusterTree->GetEvent(iEntry);
// Get the number of points in the detector
- Int_t nCluster = ClusterArray->GetEntriesFast();
+ Int_t nCluster = clusterArray->GetEntriesFast();
printf("Read %d clusters from entry %d \n", nCluster, iEntry);
// Loop through all TRD digits
for (Int_t iCluster = 0; iCluster < nCluster; iCluster++) {
- c = (AliTRDcluster*)ClusterArray->UncheckedAt(iCluster);
+ c = (AliTRDcluster*)clusterArray->UncheckedAt(iCluster);
AliTRDcluster *co = new AliTRDcluster(*c);
co->SetSigmaY2(c->GetSigmaY2() * fSY2corr);
array->AddLast(co);
- delete ClusterArray->RemoveAt(iCluster);
+ delete clusterArray->RemoveAt(iCluster);
}
}
file->Close();
- delete ClusterArray;
+ delete clusterArray;
savedir->cd();
}
TH1F *hsame = hs;
TH1F *hdiff = hd;
- Int_t num_of_time_bins = fTrSec[0].GetNtimeBins();
+ Int_t numOfTimeBins = fTrSec[0].GetNtimeBins();
Int_t nseed=fSeeds->GetEntriesFast();
Int_t nSeedClusters;
if (FindProlongation(t,fTrSec,ns,0,label,hsame,hdiff)) {
cerr<<"No of clusters in the track = "<<t.GetNclusters()<<endl;
- if (t.GetNclusters() >= Int_t(fMinClustersInTrack*num_of_time_bins)) {
+ if (t.GetNclusters() >= Int_t(fgkMinClustersInTrack*numOfTimeBins)) {
Int_t label = GetTrackLabel(t);
t.SetLabel(label);
t.CookdEdx();
}
//__________________________________________________________________
-void AliTRDtracker::UseClusters(AliTRDtrack t) {
+void AliTRDtracker::UseClusters(AliTRDtrack t)
+{
+ //
+ // Mark used cluster
+ //
+
Int_t ncl=t.GetNclusters();
for (Int_t i=0; i<ncl; i++) {
Int_t index = t.GetClusterIndex(i);
AliTRDcluster *c=(AliTRDcluster*)fClusters->UncheckedAt(index);
c->Use();
}
+
}
//__________________________________________________________________
-Int_t AliTRDtracker::GetTrackLabel(AliTRDtrack t) {
+Int_t AliTRDtracker::GetTrackLabel(AliTRDtrack t)
+{
+ //
+ // Get MC label
+ //
Int_t label=123456789, index, i, j;
Int_t ncl=t.GetNclusters();
- const Int_t range = AliTRDgeometry::kNplan * fGeom->GetTimeMax();
- Bool_t label_added;
+ const Int_t kRange = AliTRDgeometry::kNplan * fGeom->GetTimeMax();
+ Bool_t labelAdded;
- // Int_t s[range][2];
- Int_t **s = new Int_t* [range];
- for (i=0; i<range; i++) {
+ // Int_t s[kRange][2];
+ Int_t **s = new Int_t* [kRange];
+ for (i=0; i<kRange; i++) {
s[i] = new Int_t[2];
}
- for (i=0; i<range; i++) {
+ for (i=0; i<kRange; i++) {
s[i][0]=-1;
s[i][1]=0;
}
AliTRDcluster *c=(AliTRDcluster*)fClusters->UncheckedAt(index);
for (Int_t k=0; k<3; k++) {
label=c->GetTrackIndex(k);
- label_added=kFALSE; j=0;
+ labelAdded=kFALSE; j=0;
if (label >= 0) {
- while ( (!label_added) && ( j < range ) ) {
+ while ( (!labelAdded) && ( j < kRange ) ) {
if (s[j][0]==label || s[j][1]==0) {
s[j][0]=label;
s[j][1]=s[j][1]+1;
- label_added=kTRUE;
+ labelAdded=kTRUE;
}
j++;
}
Int_t max=0;
label = -123456789;
- for (i=0; i<range; i++) {
+ for (i=0; i<kRange; i++) {
if (s[i][1]>max) {
max=s[i][1]; label=s[i][0];
}
}
delete []s;
- if(max > ncl*fLabelFraction) return label;
+ if(max > ncl*fgkLabelFraction) return label;
else return -1;
}
//___________________________________________________________________
-
-Int_t AliTRDtracker::WriteTracks(const Char_t *filename) {
+Int_t AliTRDtracker::WriteTracks(const Char_t *filename)
+{
+ //
+ // Write the tracks to the output file
+ //
TDirectory *savedir=gDirectory;
cerr<<"WriteTracks: done"<<endl;
return 1;
+
}
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+////////////////////////////////////////////////////////////////////////////////
+// //
+// The TRD tracker //
+// //
+////////////////////////////////////////////////////////////////////////////////
+
#include <TNamed.h>
#include <TH1.h>
AliTRDtracker();
AliTRDtracker(const Text_t* name, const Text_t* title);
- ~AliTRDtracker();
+ virtual ~AliTRDtracker();
virtual void Clusters2Tracks(TH1F *hs, TH1F *hd);
- Double_t ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt);
- Double_t ExpectedSigmaZ2(Double_t r, Double_t tgl);
+ Double_t ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const;
+ Double_t ExpectedSigmaZ2(Double_t r, Double_t tgl) const;
Int_t FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
Int_t s, Int_t rf=0, Int_t matched_index = -1,
TH1F *hs=0, TH1F *hd=0);
Int_t WriteTracks(const Char_t *filename);
void ReadClusters(TObjArray *array, const Char_t *filename);
- Float_t GetSeedGap() const {return fSeedGap;}
- Float_t GetSeedStep() const {return fSeedStep;}
- Float_t GetSeedDepth() const {return fSeedDepth;}
- Float_t GetSkipDepth() const {return fSkipDepth;}
- Double_t GetMaxChi2() const {return fMaxChi2;}
- Float_t GetMaxSeedC() const {return fMaxSeedC;}
- Float_t GetMaxSeedTan() const {return fMaxSeedTan;}
- Double_t GetSeedErrorSY() const {return fSeedErrorSY;}
- Double_t GetSeedErrorSY3() const {return fSeedErrorSY3;}
- Double_t GetSeedErrorSZ() const {return fSeedErrorSZ;}
- Float_t GetLabelFraction() const {return fLabelFraction;}
- Float_t GetWideRoad() const {return fWideRoad;}
-
- Float_t GetMinClustersInTrack() const {return fMinClustersInTrack;}
- Float_t GetMinClustersInSeed() const {return fMinClustersInSeed;}
- Float_t GetMaxSeedDeltaZ() const {return fMaxSeedDeltaZ;}
- Float_t GetMaxSeedVertexZ() const {return fMaxSeedVertexZ;}
+ Float_t GetSeedGap() const {return fgkSeedGap;}
+ Float_t GetSeedStep() const {return fgkSeedStep;}
+ Float_t GetSeedDepth() const {return fgkSeedDepth;}
+ Float_t GetSkipDepth() const {return fgkSkipDepth;}
+ Double_t GetMaxChi2() const {return fgkMaxChi2;}
+ Float_t GetMaxSeedC() const {return fgkMaxSeedC;}
+ Float_t GetMaxSeedTan() const {return fgkMaxSeedTan;}
+ Double_t GetSeedErrorSY() const {return fgkSeedErrorSY;}
+ Double_t GetSeedErrorSY3() const {return fgkSeedErrorSY3;}
+ Double_t GetSeedErrorSZ() const {return fgkSeedErrorSZ;}
+ Float_t GetLabelFraction() const {return fgkLabelFraction;}
+ Float_t GetWideRoad() const {return fgkWideRoad;}
+
+ Float_t GetMinClustersInTrack() const {return fgkMinClustersInTrack;}
+ Float_t GetMinClustersInSeed() const {return fgkMinClustersInSeed;}
+ Float_t GetMaxSeedDeltaZ() const {return fgkMaxSeedDeltaZ;}
+ Float_t GetMaxSeedVertexZ() const {return fgkMaxSeedVertexZ;}
void SetSY2corr(Float_t w) {fSY2corr = w;}
Float_t fSY2corr; // Correction coefficient for
// cluster SigmaY2
- static const Float_t fSeedGap; // Distance between inner and outer
- // time bin in seeding
- // (fraction of all time bins)
+ static const Float_t fgkSeedGap; // Distance between inner and outer
+ // time bin in seeding
+ // (fraction of all time bins)
- static const Float_t fSeedStep; // Step in iterations
- static const Float_t fSeedDepth; // Fraction of TRD allocated for seeding
- static const Float_t fSkipDepth; // Fraction of TRD which can be skipped
+ static const Float_t fgkSeedStep; // Step in iterations
+ static const Float_t fgkSeedDepth; // Fraction of TRD allocated for seeding
+ static const Float_t fgkSkipDepth; // Fraction of TRD which can be skipped
// in track prolongation
- static const Double_t fMaxChi2; // max increment in track chi2
+ static const Double_t fgkMaxChi2; // max increment in track chi2
- static const Float_t fMinClustersInTrack; // min fraction of clusters in track
- static const Float_t fMinClustersInSeed; // min fraction of clusters in seed
- static const Float_t fMaxSeedDeltaZ; // max dZ in MakeSeeds
- static const Float_t fMaxSeedDeltaZ12; // max abs(z1-z2) in MakeSeeds
- static const Float_t fMaxSeedC; // max initial curvature in MakeSeeds
- static const Float_t fMaxSeedTan; // max initial Tangens(lambda) in MakeSeeds
- static const Float_t fMaxSeedVertexZ; // max vertex Z in MakeSeeds
- static const Double_t fSeedErrorSY; // sy parameter in MakeSeeds
- static const Double_t fSeedErrorSY3; // sy3 parameter in MakeSeeds
- static const Double_t fSeedErrorSZ; // sz parameter in MakeSeeds
- static const Float_t fLabelFraction; // min fraction of clusters in GetTrackLabel
- static const Float_t fWideRoad; // max road width in FindProlongation
+ static const Float_t fgkMinClustersInTrack; // min fraction of clusters in track
+ static const Float_t fgkMinClustersInSeed; // min fraction of clusters in seed
+ static const Float_t fgkMaxSeedDeltaZ; // max dZ in MakeSeeds
+ static const Float_t fgkMaxSeedDeltaZ12; // max abs(z1-z2) in MakeSeeds
+ static const Float_t fgkMaxSeedC; // max initial curvature in MakeSeeds
+ static const Float_t fgkMaxSeedTan; // max initial Tangens(lambda) in MakeSeeds
+ static const Float_t fgkMaxSeedVertexZ; // max vertex Z in MakeSeeds
+ static const Double_t fgkSeedErrorSY; // sy parameter in MakeSeeds
+ static const Double_t fgkSeedErrorSY3; // sy3 parameter in MakeSeeds
+ static const Double_t fgkSeedErrorSZ; // sz parameter in MakeSeeds
+ static const Float_t fgkLabelFraction; // min fraction of clusters in GetTrackLabel
+ static const Float_t fgkWideRoad; // max road width in FindProlongation
ClassDef(AliTRDtracker,1) // manager base class
/*
$Log$
+Revision 1.7 2001/11/19 08:44:08 cblume
+Fix bugs reported by Rene
+
Revision 1.6 2001/05/28 17:07:58 hristov
Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
Revision 1.1.2.1 2000/09/22 14:47:52 cblume
Add the tracking code
-*/
+*/
+
+/////////////////////////////////////////////////////////////////////////
+// //
+// Tracking sector //
+// //
+/////////////////////////////////////////////////////////////////////////
#include <TObject.h>
ClassImp(AliTRDtrackingSector)
//_______________________________________________________
-
AliTRDtrackingSector::~AliTRDtrackingSector()
{
//
}
//_______________________________________________________
-
void AliTRDtrackingSector::SetUp()
{
- AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD");
- fGeom = TRD->GetGeometry();
+ //
+ // Initialization
+ //
+
+ AliTRD *trd = (AliTRD*) gAlice->GetDetector("TRD");
+ fGeom = trd->GetGeometry();
fTimeBinSize = fGeom->GetTimeBinSize();
}
//______________________________________________________
-
Double_t AliTRDtrackingSector::GetX(Int_t tb) const
{
+ //
+ // Get global x coordinate
+ //
+
if( (tb<0) || (tb>fN-1)) {
fprintf(stderr,"AliTRDtrackingSector::GetX: TimeBin index is out of range !\n");
return -99999.;
}
else {
- Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
- Int_t local_tb = tb_per_plane - tb%tb_per_plane - 1;
+ Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
+ Int_t localTb = tbPerPlane - tb%tbPerPlane - 1;
- Int_t plane = tb/tb_per_plane;
+ Int_t plane = tb/tbPerPlane;
Float_t t0 = fGeom->GetTime0(plane);
- Double_t x = t0 - (local_tb + 0.5) * fTimeBinSize;
+ Double_t x = t0 - (localTb + 0.5) * fTimeBinSize;
return x;
+
}
+
}
//______________________________________________________
-
Int_t AliTRDtrackingSector::GetTimeBinNumber(Double_t x) const
{
- Float_t r_out = fGeom->GetTime0(AliTRDgeometry::Nplan()-1);
- Float_t r_in = fGeom->GetTime0(0) - AliTRDgeometry::DrThick();
+ //
+ // Returns the time bin number
+ //
+
+ Float_t rOut = fGeom->GetTime0(AliTRDgeometry::Nplan()-1);
+ Float_t rIn = fGeom->GetTime0(0) - AliTRDgeometry::DrThick();
- if(x >= r_out) return fN-1;
- if(x <= r_in) return 0;
+ if(x >= rOut) return fN-1;
+ if(x <= rIn) return 0;
Int_t plane;
for (plane = AliTRDgeometry::Nplan()-1; plane >= 0; plane--) {
if(x > (fGeom->GetTime0(plane) - AliTRDgeometry::DrThick())) break;
}
- Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
- Int_t local_tb = Int_t((fGeom->GetTime0(plane)-x)/fTimeBinSize);
+ Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
+ Int_t localTb = Int_t((fGeom->GetTime0(plane)-x)/fTimeBinSize);
- if((local_tb < 0) || (local_tb >= tb_per_plane)) {
+ if((localTb < 0) || (localTb >= tbPerPlane)) {
printf("AliTRDtrackingSector::GetTimeBinNumber: \n");
printf("local time bin %d is out of bounds [0..%d]: x = %f \n",
- local_tb,tb_per_plane-1,x);
+ localTb,tbPerPlane-1,x);
return -1;
}
- Int_t time_bin = (plane + 1) * tb_per_plane - 1 - local_tb;
+ Int_t timeBin = (plane + 1) * tbPerPlane - 1 - localTb;
- return time_bin;
+ return timeBin;
}
//______________________________________________________
-
-Int_t AliTRDtrackingSector::GetTimeBin(Int_t det, Int_t local_tb) const
+Int_t AliTRDtrackingSector::GetTimeBin(Int_t det, Int_t localTb) const
{
+ //
+ // Time bin
+ //
+
Int_t plane = fGeom->GetPlane(det);
- Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
+ Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
- Int_t time_bin = (plane + 1) * tb_per_plane - 1 - local_tb;
+ Int_t timeBin = (plane + 1) * tbPerPlane - 1 - localTb;
+
+ return timeBin;
- return time_bin;
}
Bool_t AliTRDtrackingSector::TECframe(Int_t tb, Double_t y, Double_t z) const
{
-//
-// Returns <true> if point defined by <x(tb),y,z> is within
-// the TEC G10 frame, otherwise returns <false>
-//
+ //
+ // Returns <true> if point defined by <x(tb),y,z> is within
+ // the TEC G10 frame, otherwise returns <false>
+ //
if((tb > (fN-1)) || (tb < 0)) return kFALSE;
- Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
- Int_t plane = tb/tb_per_plane;
+ Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
+ Int_t plane = tb/tbPerPlane;
Double_t x = GetX(tb);
y = TMath::Abs(y);
}
return kFALSE;
+
}
/* $Id: AliTRDtrackingSector.h,v */
+/////////////////////////////////////////////////////////////////////////
+// //
+// Tracking sector //
+// //
+/////////////////////////////////////////////////////////////////////////
+
#include <TObject.h>
class AliTRDtimeBin;
protected:
- Int_t fN;
- AliTRDgeometry *fGeom; // Pointer to TRD geometry
- AliTRDtimeBin *fTimeBin; // Pointer to array of AliTRDtimeBin
- Float_t fTimeBinSize; // Time bin size in cm
+ Int_t fN; // ???????
+ AliTRDgeometry *fGeom; // Pointer to TRD geometry
+ AliTRDtimeBin *fTimeBin; // Pointer to array of AliTRDtimeBin
+ Float_t fTimeBinSize; // Time bin size in cm
ClassDef(AliTRDtrackingSector,1) // Provides tools to address clusters which lay within one sector