gMC->Gdman(18, 4, "MAN");
}
-
-//_____________________________________________________________________________
-Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
-{
- //
- // Distance between the mouse and the TRD detector on the screen
- // Dummy routine
- //
-
- return 9999;
-
-}
//_____________________________________________________________________________
void AliTRD::Init()
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void DrawModule() const;
- virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void LoadPoints(Int_t track);
virtual void Hits2Digits();
fGraphsAreIni = kFALSE;
}
-// //_____________________________________________________________________________
-// void AliTRDDataDCS::Streamer(TBuffer &R__b)
-// {
-// //
-// // Custom streamer
-// //
-
-// if (R__b.IsReading()) {
-
-// R__b.ReadBool (fGraphsAreIni);
-// R__b.ReadBool (fFitsAreIni);
-
-
-// for (UInt_t iAlias=0; iAlias<fNAlias; iAlias++) {
-// TString::ReadString (R__b, TString::Class());
-// R__b.ReadChar (fConfs[iAlias].fDataType);
-// R__b.ReadUInt (fConfs[iAlias].fNChannel);
-// R__b.ReadBool (fConfs[iAlias].fEnableGraph);
-// R__b.ReadBool (fConfs[iAlias].fEnableFit);
-// R__b.ReadInt (fConfs[iAlias].fMinPoints);
-// R__b.ReadInt (fConfs[iAlias].fIter);
-// R__b.ReadDouble (fConfs[iAlias].fMaxDelta);
-// R__b.ReadInt (fConfs[iAlias].fFitReq);
-// }
-
-
-// if (fGraphsAreIni) {
-// for (UInt_t iAlias=0; iAlias<fNAlias; iAlias++)
-// fDatas[iAlias].GetGraph() = *(TObjArray*)R__b.ReadObject (TObjArray::Class());
-// }
-
-// if (fFitsAreIni) {
-// for (UInt_t iAlias=0; iAlias<fNAlias; iAlias++)
-// fDatas[iAlias].GetFit() = *(TObjArray*)R__b.ReadObject (TObjArray::Class());
-// }
-
-// AliInfo (Form("Read %d octets to the stream (%d Ko)", R__b.Length(), R__b.Length()/1024));
-
-// } else {
-// R__b.WriteBool (fGraphsAreIni);
-// R__b.WriteBool (fFitsAreIni);
-
-// for (UInt_t iAlias = 0; iAlias < fNAlias; iAlias++) {
-// TString::WriteString (R__b, &fConfs[iAlias].fAmanda);
-// R__b.WriteChar (fConfs[iAlias].fDataType);
-// R__b.WriteUInt (fConfs[iAlias].fNChannel);
-// R__b.WriteBool (fConfs[iAlias].fEnableGraph);
-// R__b.WriteBool (fConfs[iAlias].fEnableFit);
-// R__b.WriteInt (fConfs[iAlias].fMinPoints);
-// R__b.WriteInt (fConfs[iAlias].fIter);
-// R__b.WriteDouble (fConfs[iAlias].fMaxDelta);
-// R__b.WriteInt (fConfs[iAlias].fFitReq);
-// }
-
-// if (fGraphsAreIni) {
-// for (UInt_t iAlias = 0; iAlias < fNAlias; iAlias++)
-// R__b.WriteObject ((TObject*)&fDatas[iAlias].GetGraph());
-// }
-
-// if (fFitsAreIni) {
-// for (UInt_t iAlias = 0; iAlias < fNAlias; iAlias++)
-// R__b.WriteObject ((TObject*)&fDatas[iAlias].GetFit());
-// }
-
-// AliInfo (Form("Write %d octets to the stream (%d Ko)", R__b.Length(), R__b.Length()/1024));
-// }
-// }
-
//_____________________________________________________________________________
Bool_t AliTRDDataDCS::ExtractDCS (TMap *dcsAlias)
{
Int_t minPoints, Int_t iter,
Double_t maxDelta, Int_t fitReq)
{
+ //
+ // Do the spline fit
+ //
+
if (graph == 0x0) {
AliError("No graph for fit");
return 0x0;
class AliTRDDataDCS : public TNamed
{
- public :
+ public :
- AliTRDDataDCS ();
+ AliTRDDataDCS ();
~AliTRDDataDCS ();
Bool_t ExtractDCS (TMap * aliDCS);
void Print (Option_t* option = "") const;
- protected :
+ protected :
TGraph * FindAndMakeGraph (TMap * dcsMap, const char * amandaStr,
char dataType);
Bool_t enableGraph, Bool_t enableFit, Int_t kMinPoints,
Int_t kIter, Double_t kMaxDelta, Int_t kFitReq);
- private :
+ private :
enum { kChamberByteStatus = 0
, kPreTrigger = 1
, kMagneticField = 21
};
- Bool_t fGraphsAreIni;
- Bool_t fFitsAreIni;
- UInt_t fNAlias;
+ Bool_t fGraphsAreIni; // Check whether graphs are initialized
+ Bool_t fFitsAreIni; // Check whether firs are initialized
+ UInt_t fNAlias; // Number of aliases
class AliTRDDataDCSdata {
public:
, UChar_t col, UChar_t row, UChar_t time
, Char_t timebin, Float_t center, UShort_t volid);
AliTRDcluster(const AliTRDcluster &c);
+ virtual ~AliTRDcluster() {};
virtual void AddTrackIndex(Int_t *i);
ClassImp(AliTRDclusterCorrection)
-AliTRDclusterCorrection *gAliTRDclusterCorrection = 0;
-
//_____________________________________________________________________________
AliTRDclusterCorrection::AliTRDclusterCorrection()
:TObject()
// pointer gAliTRDclusterCorrection (Is this needed somewhere ????)
//
- if (gAliTRDclusterCorrection != 0) {
- return gAliTRDclusterCorrection;
- }
+ AliTRDclusterCorrection *clusterCorrection = 0x0;
TFile *fileIn = new TFile("$ALICE_ROOT/TRD/TRDcorrection.root");
if (!fileIn){
- gAliTRDclusterCorrection = new AliTRDclusterCorrection();
- return gAliTRDclusterCorrection;
+ clusterCorrection = new AliTRDclusterCorrection();
+ return clusterCorrection;
}
- gAliTRDclusterCorrection = (AliTRDclusterCorrection *)
- fileIn->Get("TRDcorrection");
- if (gAliTRDclusterCorrection == 0) {
- gAliTRDclusterCorrection = new AliTRDclusterCorrection();
+ clusterCorrection = (AliTRDclusterCorrection *)
+ fileIn->Get("TRDcorrection");
+ if (clusterCorrection == 0) {
+ clusterCorrection = new AliTRDclusterCorrection();
}
- return gAliTRDclusterCorrection;
+ return clusterCorrection;
}
Float_t GetCorrection(Int_t plane, Int_t timebin, Float_t angle) const;
Float_t GetOffsetAngle() const { return fOffsetAngle; }
- Float_t GetAngle(Int_t i) { return (i - 10.0) / 10.0 + fOffsetAngle; }
+ Float_t GetAngle(Int_t i) const { return (i - 10.0) / 10.0 + fOffsetAngle; }
Float_t GetSigma(Int_t plane, Int_t timebin, Float_t angle) const;
void SetCorrection(Int_t plane,Int_t timebin, Float_t angle, Float_t value,Float_t sigma);
AliTRDclusterMI::AliTRDclusterMI()
:AliTRDcluster()
,fRmsY(0)
- ,fNPads(0)
+ ,fNPadsMI(0)
,fRelPos(0)
{
//
AliTRDclusterMI::AliTRDclusterMI(const AliTRDcluster &c)
:AliTRDcluster(c)
,fRmsY(0)
- ,fNPads(0)
+ ,fNPadsMI(0)
,fRelPos(0)
{
//
AliTRDclusterMI();
AliTRDclusterMI(const AliTRDcluster &c);
- void SetRmsY(Float_t rmsy) { fRmsY = rmsy; }
- void SetNPads(Int_t npads) { fNPads = npads; }
- void SetRelPos(Float_t pos) { fRelPos = TMath::Nint(pos*128.0); }
+ void SetRmsY(Float_t rmsy) { fRmsY = rmsy; }
+ void SetNPads(Int_t npads) { fNPadsMI = npads; }
+ void SetRelPos(Float_t pos) { fRelPos = TMath::Nint(pos*128.0); }
- Float_t GetRmsY() const { return fRmsY; }
- Char_t GetNPads() const { return fNPads; }
- Float_t GetRelPos() const { return float(fRelPos)/128.0; }
+ Float_t GetRmsY() const { return fRmsY; }
+ Char_t GetNPads() const { return fNPadsMI; }
+ Float_t GetRelPos() const { return float(fRelPos)/128.0; }
protected:
Float_t fRmsY; // RMS in y direction ????
- Char_t fNPads; // Number of pads ????
+ Char_t fNPadsMI; // Number of pads ????
Char_t fRelPos; // Relative position ????
ClassDef(AliTRDclusterMI,2) // ClusterMI for the TRD
// ADC thresholds
// There is no ADC threshold anymore, and simParam should not be used in clusterizer. KO
- Float_t ADCthreshold = 0;
+ Float_t adcThreshold = 0;
// Threshold value for the maximum
Float_t maxThresh = recParam->GetClusMaxThresh();
,indexesIn
,fIndexesOut
,nTimeTotal
- ,ADCthreshold
+ ,adcThreshold
,calGainFactorROC
,calGainFactorDetValue);
}
//_____________________________________________________________________________
-Double_t AliTRDclusterizer::GetCOG(Double_t signal[5])
+Double_t AliTRDclusterizer::GetCOG(Double_t signal[5]) const
{
//
// Get COG position
, AliTRDSignalIndex *indexesIn
, AliTRDSignalIndex *indexesOut
, Int_t nTimeTotal
- , Float_t ADCthreshold
+ , Float_t adcThreshold
, AliTRDCalROC *calGainFactorROC
, Float_t calGainFactorDetValue)
{
while (indexesIn->NextTbinIndex(iTime))
{
// Store the amplitude of the digit if above threshold
- if (outADC[iTime] > ADCthreshold)
+ if (outADC[iTime] > adcThreshold)
{
digitsOut->SetDataUnchecked(iRow,iCol,iTime,outADC[iTime]);
indexesOut->AddIndexTBin(iRow,iCol,iTime);
, AliTRDCalROC *calGainFactorROC
, Float_t calGainFactorDetValue);
virtual Double_t Unfold(Double_t eps, Int_t plane, Double_t *padSignal);
- Double_t GetCOG(Double_t signal[5]);
+ Double_t GetCOG(Double_t signal[5]) const;
virtual void ResetHelperIndexes(AliTRDSignalIndex *indexesIn);
protected:
Int_t GetIdx1(Int_t row, Int_t col) const;
- inline Int_t GetIdx1Unchecked(Int_t row, Int_t col) const
+ Int_t GetIdx1Unchecked(Int_t row, Int_t col) const
{ return row + col * fNrow; };
inline Bool_t CheckBounds(Int_t idx1, Int_t idx2);
inline Bool_t OutOfBoundsError(Int_t idx1, Int_t idx2);
/* $Id$ */
-/*
-
- New release on 2007/08/17
-
-The default raw data version (now fRAWversion ) is set to 3
-in the constructer because version 3 raw data read and write
-are fully debugged.
-
-*/
-
-//////////////////////////////////////////////////
-// //
-// TRD front end electronics parameters class //
-// Contains all FEE (MCM, TRAP, PASA) related //
-// parameters, constants, and mapping. //
-// //
-//////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD front end electronics parameters class //
+// Contains all FEE (MCM, TRAP, PASA) related //
+// parameters, constants, and mapping. //
+// //
+// New release on 2007/08/17: //
+// The default raw data version (now fRAWversion ) is set to 3 //
+// in the constructor because version 3 raw data read and write //
+// are fully debugged. //
+// //
+// Author: //
+// Ken Oyama (oyama@physi.uni-heidelberg.de) //
+// //
+////////////////////////////////////////////////////////////////////////////
#include <TMath.h>
//_____________________________________________________________________________
AliTRDfeeParam* AliTRDfeeParam::Instance()
{
+ //
// Instance constructor
-
+ //
+
if (fgTerminated != kFALSE) {
return 0;
}
}
return fgInstance;
+
}
//_____________________________________________________________________________
delete fgInstance;
fgInstance = 0;
}
+
}
//_____________________________________________________________________________
fTFc2 = 0.6241;
}
- // fGeo = AliTRDgeometry::Instance();
fCP = AliTRDCommonParam::Instance();
}
//_____________________________________________________________________________
AliTRDfeeParam::AliTRDfeeParam(const AliTRDfeeParam &p)
:TObject(p)
- // ,fGeo(p.fGeo)
,fCP(p.fCP)
,fTFr1(p.fTFr1)
,fTFr2(p.fTFr2)
//
// AliTRDfeeParam copy constructor
//
+
}
//_____________________________________________________________________________
//
// AliTRDfeeParam destructor
//
+
}
//_____________________________________________________________________________
if (this != &p) {
((AliTRDfeeParam &) p).Copy(*this);
}
+
return *this;
+
}
//_____________________________________________________________________________
// Copy function
//
- // ((AliTRDfeeParam &) p).fGeo = fGeo;
((AliTRDfeeParam &) p).fCP = fCP;
((AliTRDfeeParam &) p).fTFr1 = fTFr1;
((AliTRDfeeParam &) p).fTFr2 = fTFr2;
((AliTRDfeeParam &) p).fRAWstoreRaw = fRAWstoreRaw;
TObject::Copy(p);
+
}
//_____________________________________________________________________________
Int_t AliTRDfeeParam::GetPadRowFromMCM(Int_t irob, Int_t imcm) const
{
//
- // return on which pad row this mcm sits
+ // Return on which pad row this mcm sits
//
return fgkNmcmRobInRow*(irob/2) + imcm/fgkNmcmRobInCol;
+
}
//_____________________________________________________________________________
// Caution: ADC ordering in the online data is opposite to the pad column ordering.
// And it is not one-by-one correspondence. Precise drawing can be found in:
// http://wiki.kip.uni-heidelberg.de/ti/TRD/index.php/Image:ROB_MCM_numbering.pdf
+ //
if (iadc < 0 || iadc > 19 ) return -100;
Int_t mcmcol = imcm%fgkNmcmRobInCol + GetRobSide(irob)*fgkNmcmRobInCol; // MCM column number on ROC [0..7]
Int_t padcol = mcmcol*fgkNcolMcm + fgkNcolMcm + 1 - iadc;
// if( padcol < 0 || padcol >= fgkNcol ) return -1; // thisi s commented because of reson above KO
+
return padcol;
+
}
//_____________________________________________________________________________
if ( irow < 0 || icol < 0 || irow > fgkNrowC1 || icol > fgkNcol ) return -1;
return (icol%(fgkNcol/2))/fgkNcolMcm + fgkNmcmRobInCol*(irow%fgkNmcmRobInRow);
+
}
//_____________________________________________________________________________
Int_t AliTRDfeeParam::GetROBfromPad(Int_t irow, Int_t icol) const
{
//
- // return on which rob this pad is
+ // Return on which rob this pad is
//
return (irow/fgkNmcmRobInRow)*2 + GetColSide(icol);
+
}
//_____________________________________________________________________________
Int_t AliTRDfeeParam::GetRobSide(Int_t irob) const
{
//
- // return on which side this rob sits (A side = 0, B side = 1)
+ // Return on which side this rob sits (A side = 0, B side = 1)
//
if ( irob < 0 || irob >= fgkNrobC1 ) return -1;
+
return irob%2;
+
}
//_____________________________________________________________________________
Int_t AliTRDfeeParam::GetColSide(Int_t icol) const
{
//
- // return on which side this column sits (A side = 0, B side = 1)
+ // Return on which side this column sits (A side = 0, B side = 1)
//
if ( icol < 0 || icol >= fgkNcol ) return -1;
+
return icol/(fgkNcol/2);
+
}
-//
-//void AliTRDfeeParam::GetFilterParam( Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped ) const
+//_____________________________________________________________________________
+//void AliTRDfeeParam::GetFilterParam( Float_t &r1, Float_t &r2, Float_t &c1
+// , Float_t &c2, Float_t &ped ) const
//{
//
// Return current filter parameter
//_____________________________________________________________________________
void AliTRDfeeParam::SetEBsglIndThr(Int_t val)
{
+ //
// Set Event Buffer Sngle Indicator Threshold (EBIS in TRAP conf).
// Timebin is indicated if ADC value >= val.
+ //
if( val >= 0 && val <= 1023 ) {
fEBsglIndThr = val;
AliError(Form("EBsglIndThr value %d is out of range, keep previously set value (%d).",
val, fEBsglIndThr));
}
+
}
//_____________________________________________________________________________
void AliTRDfeeParam::SetEBsumIndThr(Int_t val)
{
+ //
// Set Event Buffer Sum Indicator Threshold (EBIT in TRAP conf).
// Timebin is indicated if ADC sum value >= val.
+ //
if( val >= 0 && val <= 4095 ) {
fEBsumIndThr = val;
- } else {
+ }
+ else {
AliError(Form("EBsumIndThr value %d is out of range, keep previously set value (%d).",
val, fEBsumIndThr));
}
-}
+}
//_____________________________________________________________________________
void AliTRDfeeParam::SetEBindLUT(Int_t val)
{
+ //
// Set Event Buffer Indicator Look-Up Table (EBIL in TRAP conf).
// 8 bits value forms lookup table for combination of three criterions.
+ //
if( val >= 0 && val <= 255 ) {
fEBindLUT = val;
- } else {
+ }
+ else {
AliError(Form("EBindLUT value %d is out of range, keep previously set value (%d).",
val, fEBindLUT));
}
+
}
//_____________________________________________________________________________
void AliTRDfeeParam::SetEBignoreNeighbour(Int_t val)
{
+ //
// Set Event Buffer Indicator Neighbor Sensitivity. (EBIN in TRAP conf).
// If 0, take account of neigbor's values.
+ //
if( val >= 0 && val <= 1 ) {
fEBignoreNeighbour = val;
- } else {
+ }
+ else {
AliError(Form("EBignoreNeighbour value %d is out of range, keep previously set value (%d).",
val, fEBignoreNeighbour));
}
}
//_____________________________________________________________________________
-Int_t AliTRDfeeParam::GetRAWversion()
-{
- // Return raw data version (major number only)
-
- return fRAWversion;
-}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetRAWversion( Int_t rawver )
+void AliTRDfeeParam::SetRAWversion( Int_t rawver )
{
+ //
// Set raw data version (major number only)
// Maximum available number is preset in fgkMaxRAWversion
+ //
if( rawver >= 0 && rawver <= fgkMaxRAWversion ) {
-
- fRAWversion = rawver ;
- } else {
+ fRAWversion = rawver;
+ }
+ else {
AliError(Form("Raw version is out of range: %d",rawver));
}
-}
-
-//_____________________________________________________________________________
-Bool_t AliTRDfeeParam::GetRAWstoreRaw()
-{
- // Returns kTRUE if raw data itself is read instead of filtered data
-
- return fRAWstoreRaw;
-}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetRAWstoreRaw( Bool_t storeraw )
-{
- // If kTRUE is set, raw data itself is read instead of filtered data
- fRAWstoreRaw = storeraw;
}
/* $Id$ */
-//////////////////////////////////////////////////
-// //
-// TRD front end electronics parameters class //
-// Contains all FEE (MCM, TRAP, PASA) related //
-// parameters, constants, and mapping. //
-// //
-//////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD front end electronics parameters class //
+// Contains all FEE (MCM, TRAP, PASA) related //
+// parameters, constants, and mapping. //
+// //
+// Author: //
+// Ken Oyama (oyama@physi.uni-heidelberg.de) //
+// //
+////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
virtual Int_t GetColSide(Int_t icol) const;
static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; }
- static Int_t GetNmcmRob() { return fgkNmcmRob; }
+ static Int_t GetNmcmRob() { return fgkNmcmRob; }
static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; }
static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; }
- static Int_t GetNrobC0() { return fgkNrobC0; }
- static Int_t GetNrobC1() { return fgkNrobC1; }
- static Int_t GetNadcMcm() { return fgkNadcMcm; }
- // static Int_t GetNtimebin() { return fgkNtimebin; }
- static Int_t GetNcol() { return fgkNcol; }
- static Int_t GetNcolMcm() { return fgkNcolMcm; }
- static Int_t GetNrowC0() { return fgkNrowC0; }
- static Int_t GetNrowC1() { return fgkNrowC1; }
-
- // static Int_t GetADCpedestal() { return fgkADCpedestal; }
- // static Int_t GetADCnoise() { return fgkADCnoise; }
- static Int_t GetADCDAC() { return fgkADCDAC; }
-
- static Bool_t isPFon() { return fgkPFon; }
- static Bool_t isGFon() { return fgkGFon; }
- static Bool_t isTFon() { return fgkTFon; }
-
- static Int_t GetPFtimeConstant() { return fgkPFtimeConstant; }
- static Int_t GetPFeffectPedestal() { return fgkPFeffectPedestal; }
+ static Int_t GetNrobC0() { return fgkNrobC0; }
+ static Int_t GetNrobC1() { return fgkNrobC1; }
+ static Int_t GetNadcMcm() { return fgkNadcMcm; }
+ // static Int_t GetNtimebin() { return fgkNtimebin; }
+ static Int_t GetNcol() { return fgkNcol; }
+ static Int_t GetNcolMcm() { return fgkNcolMcm; }
+ static Int_t GetNrowC0() { return fgkNrowC0; }
+ static Int_t GetNrowC1() { return fgkNrowC1; }
+
+ // static Int_t GetADCpedestal() { return fgkADCpedestal; }
+ // static Int_t GetADCnoise() { return fgkADCnoise; }
+ static Int_t GetADCDAC() { return fgkADCDAC; }
+
+ static Bool_t IsPFon() { return fgkPFon; }
+ static Bool_t IsGFon() { return fgkGFon; }
+ static Bool_t IsTFon() { return fgkTFon; }
+
+ static Int_t GetPFtimeConstant() { return fgkPFtimeConstant; }
+ static Int_t GetPFeffectPedestal() { return fgkPFeffectPedestal; }
// Float_t GetClusThr() { return fClusThr; };
// Float_t GetPadThr() const { return fPadThr; };
//virtual void GetFilterParam(Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped) const;
// Int_t GetFilterType() const { return fFilterType; };
- static Int_t GetTFtype() { return fgkTFtype; }
- static Int_t GetTFnExp() { return fgkTFnExp; }
- Float_t GetTFr1() const { return fTFr1; }
- Float_t GetTFr2() const { return fTFr2; }
- Float_t GetTFc1() const { return fTFc1; }
- Float_t GetTFc2() const { return fTFc2; }
+ static Int_t GetTFtype() { return fgkTFtype; }
+ static Int_t GetTFnExp() { return fgkTFnExp; }
+ Float_t GetTFr1() const { return fTFr1; }
+ Float_t GetTFr2() const { return fTFr2; }
+ Float_t GetTFc1() const { return fTFc1; }
+ Float_t GetTFc2() const { return fTFc2; }
- static Float_t GetTFattPar() { return ((Float_t)fgkTFattPar1) / ((Float_t)fgkTFattPar2) ; }
- Float_t GetTFf0() const { return 1 + fgkTFon*(-1+GetTFattPar()); } // 1 if TC off
+ static Float_t GetTFattPar() { return ((Float_t) fgkTFattPar1) / ((Float_t) fgkTFattPar2); }
+ Float_t GetTFf0() const { return 1.0 + fgkTFon*(-1.0+GetTFattPar()); } // 1 if TC off
void SetEBsglIndThr(Int_t val);
- Int_t GetEBsglIndThr() const { return fEBsglIndThr; }
+ Int_t GetEBsglIndThr() const { return fEBsglIndThr; }
void SetEBsumIndThr(Int_t val);
- Int_t GetEBsumIndThr() const { return fEBsumIndThr; }
+ Int_t GetEBsumIndThr() const { return fEBsumIndThr; }
void SetEBindLUT(Int_t val);
- Int_t GetEBindLUT() const { return fEBindLUT; }
+ Int_t GetEBindLUT() const { return fEBindLUT; }
void SetEBignoreNeighbour(Int_t val);
- Int_t GetEBignoreNeighbour() const { return fEBignoreNeighbour; }
+ Int_t GetEBignoreNeighbour() const { return fEBignoreNeighbour; }
// Concerning raw data format
- Int_t GetRAWversion();
+ Int_t GetRAWversion() const { return fRAWversion; }
void SetRAWversion( Int_t rawver );
- Bool_t GetRAWstoreRaw();
- void SetRAWstoreRaw( Bool_t storeraw );
+ Bool_t GetRAWstoreRaw() const { return fRAWstoreRaw; }
+ void SetRAWstoreRaw( Bool_t storeraw ) { fRAWstoreRaw = storeraw; }
protected:
- static AliTRDfeeParam *fgInstance;
- static Bool_t fgTerminated; // Defines if this class has already been terminated
+ static AliTRDfeeParam *fgInstance; // Singleton instance
+ static Bool_t fgTerminated; // Defines if this class has already been terminated
- // AliTRDgeometry *fGeo; // TRD geometry class
- AliTRDCommonParam *fCP; // TRD common parameters class
+ AliTRDCommonParam *fCP; // TRD common parameters class
// Remark: ISO C++ allows initialization of static const values only for integer.
static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1)
// ADC intrinsic parameters
- // static const Int_t fgkADCpedestal = 0; // This is simulation parameter and not the value set in FEE, moved to simParam
- // static const Int_t fgkADCnoise = 10; // This is simulation parameter and not the value set in FEE, moved to simParam
static const Int_t fgkADCDAC = 0; // 5 bit ADC gain parameter
// TRAP filter global setup
static const Bool_t fgkTFon = kTRUE; // Tail cancelation Filter enable/disable flag (old name fTCOn)
// PF setup
- static const Int_t fgkPFtimeConstant = 0; // 0 for fastest, 3 for slowest (no effect, probably)
- static const Int_t fgkPFeffectPedestal = 10; // [in ADC units] the desired baseline (Additive)
+ static const Int_t fgkPFtimeConstant = 0; // 0 for fastest, 3 for slowest (no effect, probably)
+ static const Int_t fgkPFeffectPedestal = 10; // [in ADC units] the desired baseline (Additive)
// GF setup
- static const Int_t fgkGFnoise = 0; // Noise level increased by gain filter x 100 [in ADC] (to be measured)
+ static const Int_t fgkGFnoise = 0; // Noise level increased by gain filter x 100 [in ADC] (to be measured)
// TF setup
- static const Int_t fgkTFtype = 1; // TC type (0=analog, 1=digital, 2=MI) (old name fFilterType)
+ static const Int_t fgkTFtype = 1; // TC type (0=analog, 1=digital, 2=MI) (old name fFilterType)
// OLD TF setup (calculated from above) (valid only for fgkTFsimType = 0 or 1)
- static const Int_t fgkTFnExp = 1; // Number of exponential for simType 0 and 1
+ static const Int_t fgkTFnExp = 1; // Number of exponential for simType 0 and 1
// following need Instance because initialized in constructor
- Float_t fTFr1; // Time constant [us] long (old name fR1)
- Float_t fTFr2; // Time constant [us] short(old name fR2)
- Float_t fTFc1; // Weight long (old name fC1)
- Float_t fTFc2; // Weight short (old name fC2)
+ Float_t fTFr1; // Time constant [us] long (old name fR1)
+ Float_t fTFr2; // Time constant [us] short(old name fR2)
+ Float_t fTFc1; // Weight long (old name fC1)
+ Float_t fTFc2; // Weight short (old name fC2)
// here is for TRAP simulation (not yet used)
- static const Int_t fgkTFdecayWeightL = 270; // 0 to 1024 corresponds to 0 to 0.5
- static const Int_t fgkTFdecayParL = 348; // 0 to 511 corresponds to 0.75 to 1
- static const Int_t fgkTFdecayParS = 449; // 0 to 511 correponds to 0.25 to 0.5
- static const Int_t fgkTFattPar1 = 45; // attenuationParameter = fgkTFattenuationParameter1/fgkTFattenuationParameter2
- static const Int_t fgkTFattPar2 = 14; // = -alphaL/ln(lambdaL)-(1-alphaL)/ln(lambdaS)
+ static const Int_t fgkTFdecayWeightL = 270; // 0 to 1024 corresponds to 0 to 0.5
+ static const Int_t fgkTFdecayParL = 348; // 0 to 511 corresponds to 0.75 to 1
+ static const Int_t fgkTFdecayParS = 449; // 0 to 511 correponds to 0.25 to 0.5
+ static const Int_t fgkTFattPar1 = 45; // attenuationParameter = fgkTFattenuationParameter1/fgkTFattenuationParameter2
+ static const Int_t fgkTFattPar2 = 14; // = -alphaL/ln(lambdaL)-(1-alphaL)/ln(lambdaS)
// ZS parameters
- Int_t fEBsglIndThr; // EBIS in ADC units
- Int_t fEBsumIndThr; // EBIT in ADC units
- Int_t fEBindLUT; // EBIL lookup table
- Int_t fEBignoreNeighbour; // EBIN 0:include neighbor
+ Int_t fEBsglIndThr; // EBIS in ADC units
+ Int_t fEBsumIndThr; // EBIT in ADC units
+ Int_t fEBindLUT; // EBIL lookup table
+ Int_t fEBignoreNeighbour; // EBIN 0:include neighbor
// Charge accumulators
- static const Int_t fgkPREPqAcc0Start = 0; // Preprocessor Charge Accumulator 0 Start
- static const Int_t fgkPREPqAcc0End = 10; // Preprocessor Charge Accumulator 0 End
- static const Int_t fgkPREPqAcc1Start = 11; // Preprocessor Charge Accumulator 1 Start
- static const Int_t fgkPREPqAcc1End = 20; // Preprocessor Charge Accumulator 1 End
- static const Int_t fgkMinClusterCharge = 20; // Hit detection [in ADC units]
+ static const Int_t fgkPREPqAcc0Start = 0; // Preprocessor Charge Accumulator 0 Start
+ static const Int_t fgkPREPqAcc0End = 10; // Preprocessor Charge Accumulator 0 End
+ static const Int_t fgkPREPqAcc1Start = 11; // Preprocessor Charge Accumulator 1 Start
+ static const Int_t fgkPREPqAcc1End = 20; // Preprocessor Charge Accumulator 1 End
+ static const Int_t fgkMinClusterCharge = 20; // Hit detection [in ADC units]
// OLD TRAP processing parameters calculated from above
- //static const Float_t fClusThr; // Cluster threshold
- //static const Float_t fPadThr; // Pad threshold
+ //static const Float_t fClusThr; // Cluster threshold
+ //static const Float_t fPadThr; // Pad threshold
// For raw production
- Int_t fRAWversion; // Raw data production version
- static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported
- Bool_t fRAWstoreRaw; // Store unfiltered data for raw data stream
+ Int_t fRAWversion; // Raw data production version
+ static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported
+ Bool_t fRAWstoreRaw; // Store unfiltered data for raw data stream
private:
AliTRDfeeParam();
- ClassDef(AliTRDfeeParam,2) //
-};
+ ClassDef(AliTRDfeeParam,2) // The TRD front end electronics parameter
+};
#endif
// Default constructor
//
- for (Int_t ltb = 0; ltb < kMAX_TB; ltb++) {
+ for (Int_t ltb = 0; ltb < kMAXTB; ltb++) {
for (Int_t plane = 0; plane < 6; plane++) {
fIndex[ltb][plane][0] = -1;
fIndex[ltb][plane][1] = -1;
for (Int_t i = 0; i < 6; i++) {
for (Int_t j = 0; j < 3; j++) {
- Pin[i][j] = 0.0;
- Pout[i][j] = 0.0;
- XYZin[i][j] = 0.0;
- XYZout[i][j] = 0.0;
+ fPin[i][j] = 0.0;
+ fPout[i][j] = 0.0;
+ fXYZin[i][j] = 0.0;
+ fXYZout[i][j] = 0.0;
}
}
// Main constructor
//
- for (Int_t ltb = 0; ltb < kMAX_TB; ltb++) {
+ for (Int_t ltb = 0; ltb < kMAXTB; ltb++) {
for (Int_t plane = 0; plane < 6; plane++) {
fIndex[ltb][plane][0] = -1;
fIndex[ltb][plane][1] = -1;
for (Int_t i = 0; i < 6; i++) {
for (Int_t j = 0; j < 3; j++) {
- Pin[i][j] = 0.0;
- Pout[i][j] = 0.0;
- XYZin[i][j] = 0.0;
- XYZout[i][j] = 0.0;
+ fPin[i][j] = 0.0;
+ fPout[i][j] = 0.0;
+ fXYZin[i][j] = 0.0;
+ fXYZout[i][j] = 0.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) {
+ if ((fPin[i][0]*fPin[i][0]
+ + fPin[i][1]*fPin[i][1]
+ + fPin[i][2]*fPin[i][2]) > 0.0005) {
break;
}
}
- px = Pin[i][0];
- py = Pin[i][1];
- pz = Pin[i][2];
- x = XYZin[i][0];
- y = XYZin[i][1];
- z = XYZin[i][2];
+ px = fPin[i][0];
+ py = fPin[i][1];
+ pz = fPin[i][2];
+ x = fXYZin[i][0];
+ y = fXYZin[i][1];
+ z = fXYZin[i][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) {
+ 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];
- x = XYZout[i][0];
- y = XYZout[i][1];
- z = XYZout[i][2];
+ px = fPout[i][0];
+ py = fPout[i][1];
+ pz = fPout[i][2];
+ x = fXYZout[i][0];
+ y = fXYZout[i][1];
+ z = fXYZout[i][2];
}
//
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;
class AliTRDgeometry;
-const Int_t kMAX_TB = 30;
-
class AliTRDmcTrack : public TObject {
public:
+ enum { kMAXTB = 30 };
+
AliTRDmcTrack();
AliTRDmcTrack(Int_t label, Int_t seedLabel, Bool_t primary
, Float_t mass, Int_t charge, Int_t pdg);
void SetSeedLabel(Int_t l) { fSeedLab = l; }
void SetNumberOfClusters(Int_t n) { fN = n; }
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 SetXYZin(Int_t plane, Double_t x, Double_t y, Double_t z)
- { XYZin[plane][0] = x;
- XYZin[plane][1] = y;
- XYZin[plane][2] = z; }
+ { fXYZin[plane][0] = x;
+ fXYZin[plane][1] = y;
+ fXYZin[plane][2] = z; }
void SetXYZout(Int_t plane, Double_t x, Double_t y, Double_t z)
- { XYZout[plane][0] = x;
- XYZout[plane][1] = y;
- XYZout[plane][2] = z; }
+ { fXYZout[plane][0] = x;
+ fXYZout[plane][1] = y;
+ fXYZout[plane][2] = z; }
Int_t GetTrackIndex() const { return fLab; }
Int_t GetSeedLabel() const { return fSeedLab; }
void GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
, Int_t plane, Int_t opt = 0) const;
void GetXYZin(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const
- { x = XYZin[plane][0];
- y = XYZin[plane][1];
- z = XYZin[plane][2];
+ { x = fXYZin[plane][0];
+ y = fXYZin[plane][1];
+ z = fXYZin[plane][2];
return; }
void GetXYZout(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const
- { x = XYZout[plane][0];
- y = XYZout[plane][1];
- z = XYZout[plane][2];
+ { x = fXYZout[plane][0];
+ y = fXYZout[plane][1];
+ z = fXYZout[plane][2];
return; }
Bool_t IsPrimary() const { return fPrimary; }
Int_t fPDG; // PDG code of the MC track
Int_t fN; // Number of TRD clusters associated with the track
- Int_t fIndex[kMAX_TB][6][2]; // Indices of these clusters
+ Int_t fIndex[kMAXTB][6][2]; // 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
- Double_t XYZin[6][3]; // X,Y,Z at the entrance of the TRD
- Double_t XYZout[6][3]; // X,Y,Z at the exit of the TRD
+ Double_t fXYZin[6][3]; // X,Y,Z at the entrance of the TRD
+ Double_t fXYZout[6][3]; // X,Y,Z at the exit of the TRD
- ClassDef(AliTRDmcTrack,1) // TRD MC track
+ ClassDef(AliTRDmcTrack,2) // TRD MC track
};
-
#endif
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.4 2006/08/28 17:12:18 cblume
-Remove the last print statements
+/* $Id$ */
-Revision 1.3 2006/08/11 17:58:05 cblume
-Next round of effc++ changes
-
-Revision 1.2 2006/04/05 12:45:40 hristov
-Updated TRD trigger code. Now the trigger code can run:
-
-- in the simulation step, through the central trigger interface, to
-produce and store "tracklets" and to produce and analyze tracks, with
-inputs to the central trigger
-
-- in the reconstruction step: if the tracklets have already been produced
-in the simulation step (by the trigger option), then only the tracks are
-produced and stored in the ESD event; if not, the trigger start by
-producing the tracklets, etc.
-
-Bogdan
-
-Revision 1.1.1.1 2004/08/19 14:58:11 vulpescu
-CVS head
-
-Revision 1.1.1.1 2004/08/18 07:47:17 vulpescu
-test
-
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// //
-// Multi Chip Module exponential filter and tracklet finder //
-// //
-// //
-///////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+// //
+// //
+// Multi Chip Module exponential filter and tracklet finder //
+// //
+// //
+////////////////////////////////////////////////////////////////////////////
#include <TMath.h>
}
//_____________________________________________________________________________
-void AliTRDmcm::Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir)
+void AliTRDmcm::Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir) const
{
//
// Sort two parallel vectors (x1[nel], x2[nel]) after the second one (x2)
/* $Id$ */
-///////////////////////////////////////////////////////
-// //
-// Multi Chip Module object //
-// //
-///////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+// //
+// Multi Chip Module object //
+// //
+////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
public:
- enum { kMaxTrackletsPerMCM = 4, kMcmCol = 21, kMcmTBmax = 60, kSelClus = 6, kMaxClus = 4 };
+ enum { kMaxTrackletsPerMCM = 4
+ , kMcmCol = 21
+ , kMcmTBmax = 60
+ , kSelClus = 6
+ , kMaxClus = 4 };
AliTRDmcm();
AliTRDmcm(const AliTRDmcm &m);
Bool_t IsCluster(Float_t amp[3]) const;
void AddTimeBin(Int_t itime);
Int_t CreateSeeds();
- void Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir);
+ void Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir) const;
void Filter(Int_t nexp, Int_t ftype = 0);
void DeConvExpA(Double_t *source, Double_t *target, Int_t n, Int_t nexp);
}
// Then apply fileters one by one to filtered data array
- if( fFeeParam->isPFon() ) FilterPedestal();
- if( fFeeParam->isGFon() ) FilterGain();
- if( fFeeParam->isTFon() ) FilterTail();
+ if( fFeeParam->IsPFon() ) FilterPedestal();
+ if( fFeeParam->IsGFon() ) FilterGain();
+ if( fFeeParam->IsTFon() ) FilterTail();
}
//_____________________________________________________________________________