#include "TObject.h"
#include "TTree.h"
+
#include "AliDetector.h"
-#include <Riostream.h>
+
#include "AliTOFSDigitizer.h"
#include "AliTOFGeometry.h"
AliTOF();
AliTOF(const char *name, const char *title, Option_t *option="noTimeZero");
virtual ~AliTOF() ;
-
- static Int_t NDDL() { return kNDDL;};
- static Int_t NTRM() { return kNTRM;}
- static Int_t NTdc() { return kNTdc;};
- static Int_t NCh() { return kNCh;};
- static Int_t NPadXTRM() { return kNCh*kNTdc;};
-
// getters for AliTOF object status
//Float_t GetTimeRes() const {return fTimeRes;};
//Float_t GetChrgRes() const {return fChrgRes;};
private:
- // DAQ characteristics
- // cfr. TOF-TDR pag. 105 for Glossary
- // TARODA : TOF-ALICE Read Out and Data Acquisition system
- enum {
- kNDDL = 4, // Number of DDL (Detector Data Link) per sector
- kNTRM = 10, // Number of TRM ( Readout Module) per DDL
- kNTdc = 30, // Number of Tdc (Time to Digital Converter) per TRM
- kNCh = 8 // Number of channels per Tdc
- };
-
ClassDef(AliTOF,7) // Time Of Flight base class
};
#include <TTree.h>
#include <TMath.h>
#include "AliLog.h"
-#include "AliTOF.h"
+
#include "AliTOFGeometry.h"
#include "AliTOFdigit.h"
#include "AliTOFDDLRawData.h"
if (eureka!=digs->GetTotPad()) printf(" eureka = %d AND digs->GetTotPad() = %d",eureka,digs->GetTotPad());
*/
- if (sector!=iSector || (Int_t)((Float_t)eureka/AliTOF::NPadXTRM()/AliTOF::NTRM())!=iDDL) continue;
+ if (sector!=iSector || (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM()/AliTOFGeometry::NTRM())!=iDDL) continue;
if (fVerbose==2) ftxt <<" Sector: "<<sector<<" plate: "<<plate<<" strip "<<strip<<" padx "<<padx<<" padz "<<padz<<" eureka "<<eureka<<endl;
- iTRM = (Int_t)((Float_t)eureka/AliTOF::NPadXTRM() - AliTOF::NTRM()*iDDL);
+ iTRM = (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM() - AliTOFGeometry::NTRM()*iDDL);
- iTDC = (Int_t)(AliTOF::NTdc()*
+ iTDC = (Int_t)(AliTOFGeometry::NTdc()*
(
- (Float_t)eureka/AliTOF::NPadXTRM() -
- (Int_t)((Float_t)eureka/AliTOF::NPadXTRM())
+ (Float_t)eureka/AliTOFGeometry::NPadXTRM() -
+ (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM())
)
);
- iCH = (Int_t)(AliTOF::NCh() *
+ iCH = (Int_t)(AliTOFGeometry::NCh() *
(
- (Float_t)eureka/AliTOF::NPadXTRM()*AliTOF::NTdc() - (Int_t)((Float_t)eureka/AliTOF::NPadXTRM()*AliTOF::NTdc()) -
- (Int_t)((Float_t)eureka/AliTOF::NPadXTRM()*AliTOF::NTdc() - (Int_t)((Float_t)eureka/AliTOF::NPadXTRM()*AliTOF::NTdc()))
+ (Float_t)eureka/AliTOFGeometry::NPadXTRM()*AliTOFGeometry::NTdc() - (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM()*AliTOFGeometry::NTdc()) -
+ (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM()*AliTOFGeometry::NTdc() - (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM()*AliTOFGeometry::NTdc()))
)
);
/*
$Log$
+Revision 1.7 2004/11/05 07:20:08 decaro
+TOF library splitting and conversion of some printout messages in AliLog schema (T.Kuhr)
+
Revision 1.6 2004/06/15 15:27:59 decaro
TOF raw data: preliminary implementation and style changes
const Float_t AliTOFGeometry::fgkDprecMax = 0.0000100;//num.prec.tolerance on Thma
const Float_t AliTOFGeometry::fgkDprecCen = 0.0000005;//num.prec.tolerance on <Theta>
+const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-window for the TDC bins [ps]
+
//_____________________________________________________________________________
AliTOFGeometry::AliTOFGeometry()
{
static Int_t MaxTOFTree() { return kMaxTOFTree;};
+ static Int_t NDDL() { return kNDDL;};
+ static Int_t NTRM() { return kNTRM;}
+ static Int_t NTdc() { return kNTdc;};
+ static Int_t NCh() { return kNCh;};
+ static Int_t NPadXTRM() { return kNCh*kNTdc;};
+
+
static Float_t RinTOF() { return fgkxTOF;};
static Float_t Rmin() { return fgkRmin;};
static Float_t Rmax() { return fgkRmax;};
static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / kNSectors; };
+ static Float_t TdcBinWidth() {return fgkTdcBin;};
+
virtual void Init();
virtual void SetHoles(Bool_t holes) {fHoles = holes;};
kMaxTOFTree = 5 // numer of geom. levels:
};
+ // DAQ characteristics
+ // cfr. TOF-TDR pag. 105 for Glossary
+ // TARODA : TOF-ALICE Read Out and Data Acquisition system
+ enum {
+ kNDDL = 4, // Number of DDL (Detector Data Link) per sector
+ kNTRM = 10, // Number of TRM ( Readout Module) per DDL
+ kNTdc = 30, // Number of Tdc (Time to Digital Converter) per TRM
+ kNCh = 8 // Number of channels per Tdc
+ };
+
static const Int_t fgkTimeDiff; // Min signal separation (ps)
static const Float_t fgkRmin; // Inner radius of the TOF (cm)
Float_t fHeights[kNPlates][kMaxNstrip];//Strip heights
Float_t fPhiSec; //sector Phi width (deg)
+ static const Float_t fgkTdcBin; // time-window for the TDC bins [ps]
+
ClassDef(AliTOFGeometry,1) // TOF Geometry base class
};
fLogChargeSmearing=0.13;
fTimeSmearing =0.022;
fAverageTimeFlag=0 ;
- fTdcBin = 50.; // 1 TDC bin = 50 ps
+
fAdcBin = 0.25; // 1 ADC bin = 0.25 pC (or 0.03 pC)
fAdcMean = 50.; // ADC distribution mpv value for Landau (in bins)
// it corresponds to a mean value of ~100 bins
if(timediff>=0.2) nlargeTofDiff++;
- digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/fTdcBin); // TDC bin number (each bin -> 50. ps)
+ digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/AliTOFGeometry::TdcBinWidth()); // TDC bin number (each bin -> 50. ps)
Float_t landauFactor = gRandom->Landau(fAdcMean, fAdcRms);
digit[1] = (Int_t) (qInduced[indexOfPad] * landauFactor); // ADC bins (each bin -> 0.25 (or 0.03) pC)
AliTOFSDigit *sdig = static_cast<AliTOFSDigit*>(hitMap->GetHit(vol));
Int_t tdctime = (Int_t) digit[0];
Int_t adccharge = (Int_t) digit[1];
- sdig->Update(fTdcBin,tdctime,adccharge,tracknum);
+ sdig->Update(AliTOFGeometry::TdcBinWidth(),tdctime,adccharge,tracknum);
ntotalupdatesinEv++;
ntotalupdates++;
} else {
virtual ~AliTOFSDigitizer() ; // dtor
+ //static Float_t WidthTdcBin() {return fgkTdcBin;};
+
virtual void Exec(Option_t *verboseOption);
void SetSDigitsFile(char * /*file*/ ) {;}
void SetLogChargeSmearing(Float_t logChargeSmearing){fLogChargeSmearing=logChargeSmearing;}
void SetTimeSmearing(Float_t timeSmearing) {fTimeSmearing=timeSmearing;}
void SetAverageTimeFlag(Int_t averageTimeFlag) {fAverageTimeFlag=averageTimeFlag;}
- void SetTdcBin(Float_t tdcBin) {fTdcBin=tdcBin;}
+
void SetAdcBin(Float_t adcBin) {fAdcBin=adcBin;}
void SetAdcMean(Float_t adcMean) {fAdcMean=adcMean;}
void SetAdcRms(Float_t adcRms) {fAdcRms=adcRms;}
Float_t GetLogChargeSmearing()const {return fLogChargeSmearing;}
Float_t GetTimeSmearing() const {return fTimeSmearing;}
Int_t GetAverageTimeFlag() const {return fAverageTimeFlag;}
- Float_t GetTdcBin() const {return fTdcBin;}
+
Float_t GetAdcBin() const {return fAdcBin;}
Float_t GetAdcMean() const {return fAdcMean;}
Float_t GetAdcRms() const {return fAdcRms;}
Float_t fLogChargeSmearing;// Smearing in log of charge ratio
Float_t fTimeSmearing; // Smearing in time in time vs log(q1/q2) plot
Int_t fAverageTimeFlag; // flag (see the setter for details)
- Float_t fTdcBin; // time-window for the TDC bins [ps]
+
Float_t fAdcBin; // charge-window for the ADC bins [pC]
Float_t fAdcMean; // mean value for the ADC spectrum [bins]
Float_t fAdcRms; // rms value for the ADC spectrum [bins]
delete trackTOFin;
- Double_t tof=50*c->GetTDC()+32; // in ps
+ //Double_t tof=50*c->GetTDC()+32; // in ps
+ Double_t tof=AliTOFGeometry::TdcBinWidth()*c->GetTDC()+32; // in ps
t->SetTOFsignal(tof);
t->SetTOFcluster(c->GetIndex());
Double_t time[10]; t->GetIntegratedTimes(time);