- @ref sim (see also @ref FMD_sim)
- @ref rec (see also @ref FMD_rec)
- @ref util (see also @ref FMD_util)
+ - @ref script (see also @ref FMD_script)
- @ref quick
- @ref authors
dummy) calibration and alignment data. These derive from
TTask.
+ @section script Scripts
+
+ Most scripts live in @c FMD/scripts. The notiable exceptions are
+ @ref Simulate.C, @ref Reconstruct.C, and @ref Config.C
+
@section quick Quick start
First, install ROOT. Then Install TGeant3:
// Initialize the reconstructor
AliDebug(1, Form("Init called with runloader 0x%x", runLoader));
// Initialize the geometry
- AliFMDGeometry* fmd = AliFMDGeometry::Instance();
- fmd->Init();
- fmd->InitTransformations();
+ AliFMDGeometry* geom = AliFMDGeometry::Instance();
+ geom->Init();
+ geom->InitTransformations();
+
+ // Initialize the parameters
+ AliFMDParameters* param = AliFMDParameters::Instance();
+ param->Init();
// Current vertex position
fCurrentVertex = 0;
// Get the eta and phi of a digit
//
// Get geometry.
- AliFMDGeometry* fmd = AliFMDGeometry::Instance();
+ AliFMDGeometry* geom = AliFMDGeometry::Instance();
Double_t x, y, z, r, theta;
- fmd->Detector2XYZ(digit->Detector(), digit->Ring(), digit->Sector(),
+ geom->Detector2XYZ(digit->Detector(), digit->Ring(), digit->Sector(),
digit->Strip(), x, y, z);
// Correct for vertex offset.
z += fCurrentVertex;
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = /home/hehi/cholm/work/alice/aliroot/FMD
-FILE_PATTERNS = *.h
+INPUT = /home/hehi/cholm/work/alice/aliroot/FMD \
+ /home/hehi/cholm/work/alice/aliroot/FMD/scripts/
+FILE_PATTERNS = *.h \
+ *.C
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
+SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
// Read in the geometry, and get alignment data from CDB, and apply
// that to the geometry.
//
+/** Apply alignment to a geometry
+ @ingroup simple_script
+ */
void
ApplyAlignment()
{
#include <TParticle.h>
#include <TCanvas.h>
+/** @class CheckAlign
+ @brief Check alignment
+ @code
+ Root> .L Compile.C
+ Root> Compile("CheckAlign.C")
+ Root> CheckAlign c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class CheckAlign : public AliFMDInput
{
public:
#include <TArrayF.h>
#include <TCanvas.h>
+/** @class CheckRaw
+ @brief Check raw I/O
+ @code
+ Root> .L Compile.C
+ Root> Compile("CheckRaw.C")
+ Root> CheckRaw c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class CheckRaw : public AliFMDInput
{
public:
//
// Script to compare the output of GEANT 3.21 to FLUKA 2.
//
+/** @ingroup simple_script
+ */
void
Compare()
{
// Script to compile (using ACLic) and load a script. It sets the
// include path to contain the relevant directories.
//
+/** @defgroup FMD_script Scripts
+ @brief Scripts for the FMD
+*/
+/** @defgroup simple_script Simple scripts
+ @ingroup FMD_script
+ @brief Scripts for the FMD
+*/
+/** Compile an FMD script using ACLic
+ @param script Script to compile
+ @param option Compile option
+ @ingroup FMD_script
+*/
void
Compile(const char* script, Option_t* option="g")
{
// Read in digits, and convert them to raw data files. This is mainly
// for testing.
//
+/** Convert digits to Raw data
+ @ingroup simple_script
+*/
void
Convert2Raw()
{
//
// Draw hits in the specialised FMD event display
//
+/** Display hits
+ @ingroup FMD_script
+ */
void
DisplayHits()
{
/* $Id$ */
// Script to document the FMD code
+/** @ingroup simple_script
+ */
void
Document()
{
#include <TArrayF.h>
#include <TCanvas.h>
+/** @class DrawDigitsRecs
+ @brief Draw digit ADC versus Rec point mult
+ @code
+ Root> .L Compile.C
+ Root> Compile("DrawDigitsRecs.C")
+ Root> DrawDigitsRecs c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class DrawDigitsRecs : public AliFMDInputDigits
{
private:
fAdcVsSingle->SetYTitle("Strip Multiplicity");
}
//__________________________________________________________________
+ /** Begining of event
+ @param ev Event number
+ @return @c false on error */
Bool_t Begin(Int_t ev)
{
fMap.Reset();
#include <TArrayF.h>
#include <TParticle.h>
+/** @class DrawHits
+ @brief Draw hit energy loss
+ @code
+ Root> .L Compile.C
+ Root> Compile("DrawHits.C")
+ Root> DrawHits c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class DrawHits : public AliFMDInputHits
{
private:
#include <TStyle.h>
#include <TArrayF.h>
+/** @class DrawHitsDigits
+ @brief Draw hit energy loss versus digit ADC
+ @code
+ Root> .L Compile.C
+ Root> Compile("DrawHitsDigits.C")
+ Root> DrawHitsDigits c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class DrawHitsDigits : public AliFMDInputHits
{
private:
fElossVsAdc->SetYTitle("ADC value");
}
//__________________________________________________________________
+ /** Begining of event
+ @param ev Event number
+ @return @c false on error */
Bool_t Begin(Int_t ev)
{
fMap.Reset();
#include <AliLog.h>
//____________________________________________________________________
+/** @class DrawHitsRecs
+ @brief Draw hit energy loss versus rec point mult
+ @code
+ Root> .L Compile.C
+ Root> Compile("DrawHitsRecs.C")
+ Root> DrawHitsRecs c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class DrawHitsRecs : public AliFMDInputHits
{
private:
fHitsVsStrip->SetYTitle("Strip Multiplicity");
}
//__________________________________________________________________
+ /** Begining of event
+ @param ev Event number
+ @return @c false on error */
Bool_t Begin(Int_t ev)
{
fMap.Reset();
# include <iostream>
using namespace std;
#endif
-
+/** @defgroup lego_script LEGO script
+ @ingroup FMD_script
+*/
//____________________________________________________________________
+/** @ingroup lego_script
+ @param ang
+ @return */
Float_t
deg2eta(Float_t ang)
{
//____________________________________________________________________
+/** @ingroup lego_script
+ @param which
+ @param what
+ @param back
+ @return */
TH1*
getHisto(const Char_t* which, const Char_t* what, TH1* back=0)
{
}
//____________________________________________________________________
+/** @ingroup lego_script
+ @param what
+*/
void
drawLego(const char* what="abso")
{
//____________________________________________________________________
+/** @ingroup lego_script
+ */
void
DrawLego()
{
//
// Script to draw a X-section, LOSS, or range made with MakeXsection
//
+/** @ingroup xsec_script
+ @param scale
+ @param filename
+ @param var
+ @param medName
+ @param thick
+ @param pdgName
+*/
void
DrawXsection(Bool_t scale=kFALSE,
const char* filename="xsec.root",
#include <AliRun.h>
#include <TNtuple.h>
+/** @class Media
+ @brief Media description
+ @ingroup FMD_script
+ */
struct Media : public TNamed
{
TArrayI* fMeds;
//____________________________________________________________________
+/** @class GetMedia
+ @brief Get media where a particle is produced
+ @code
+ Root> .L Compile.C
+ Root> Compile("GetMedia.C")
+ Root> GetMedia c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class GetMedia : public AliFMDInputHits
{
private:
return AliFMDInputHits::Init();
}
//__________________________________________________________________
+ /** Begining of event
+ @param ev Event number
+ @return @c false on error */
Bool_t Begin(Int_t ev)
{
fEv = ev;
#include <TGeoManager.h>
#include <TGeoMedium.h>
#include <TGeant3.h>
-
+/** @defgroup xsec_script X-section script
+ @ingroup FMD_script
+*/
//____________________________________________________________________
+/** @ingroup xsec_script
+ */
struct Mech
{
char* name;
//____________________________________________________________________
+/** @ingroup xsec_script
+ @param medName
+ @param pdgName
+ @param n
+ @param emin
+ @param emax
+*/
void
GetXsection(const char* medName, const char* pdgName,
Int_t n=91, Float_t emin=1e-5, Float_t emax=1e4)
//
// Make fake alignment data.
//
+/** Make fake alignment data
+ @ingroup simple_script
+ */
void
MakeAlignment()
{
#include <TArrayF.h>
#include <iostream>
+/** @class Poisson
+ @brief Make a poisson reconstruction
+ @code
+ Root> .L Compile.C
+ Root> Compile("Poisson.C")
+ Root> Poisson c
+ Root> c.Run();
+ @endcode
+ @ingroup FMD_script
+ */
class Poisson : public AliFMDInput
{
private:
if (!fFile) return kFALSE;
return kTRUE;
}
+ /** Begining of event
+ @param event Event number
+ @return @c false on error */
Bool_t Begin(Int_t event)
{
if (!AliFMDInput::Begin(event)) return kFALSE;
} // Loop over rings
} // Loop over detectors
}
+ /** For each bin, reconstruct the charge particle multiplicity as
+ @f[
+ m = - N_{total} \log\left(\frac{N_{empty}}{N_{total}}\right)
+ @f]
+ where @f$ N_{total}@f$ is the total number of strips in the bin,
+ and @f$ N_{empty}@f$ is the number of strips in the bin that did
+ not fire.
+ @return @c true */
Bool_t End()
{
for (Int_t etaBin = 1; etaBin <= fEmpty->GetNbinsX(); etaBin++) {
//
// Small script to test consistency of writing and reading raw data.
//
+/** Check raw data I/O
+ @ingroup simple_script
+ */
void
RawTest()
{
+++ /dev/null
-//
-// $Id$
-//
-// Script to read a raw data file, and dump it to std::cout
-//
-#include <iomanip>
-
-void
-ShowRaw(Int_t det=2, bool verbose=false, Int_t event=0)
-{
- TString file(Form("raw%d/FMD_%d.ddl", event,
- AliFMDParameters::kBaseDDL + det - 1));
-
- std::cout << "Reading raw data file " << file << std::endl;
-
- TH1* h = new TH1F("rawData", "Raw Data", 128, 0, 1024);
-
-
- // This method creates a text file containing the same information
- // stored in an Altro file. The information in the text file is
- // organized pad by pad and and for each pad it consists in a
- // sequence of bunches (Bunch length +2, Time bin of the last
- // amplitude sample in the bunch, amplitude values) It is used
- // mainly //for debugging
-
- AliAltroBuffer buff(file.Data(),0);
- Int_t numWords,padNum,rowNum,secNum=0;
- Int_t value = 0;
- Int_t zero = 0;
- if (!buff.ReadDataHeader()) {
- std::cout<< file << " isn't a valid data file!" << std::endl;
- }
-
- while(buff.ReadTrailerBackward(numWords,padNum,rowNum,secNum)){
- if (verbose)
- std::cout << "Ring: " << (secNum == 0 ? 'I' : 'O')
- << " Sector: " << std::setw(2) << rowNum
- << " Strip: " << std::setw(3) << padNum
- << " Words: " << std::setw(4) << numWords << std::endl;
- if (numWords == 0) zero++;
- if (numWords % 4){
- if (verbose)
- std::cout << "Skipping trailer of "
- << (4 - numWords % 4) << " words" << std::endl;
- for(Int_t j = 0; j < (4 - numWords % 4); j++)
- value=buff.GetNextBackWord();
- }//end if
- for(Int_t i = 0; i <numWords; i++) {
- value=buff.GetNextBackWord();
- if (verbose) {
- std::cout << std::setw(5) << value << std::flush;
- if (i % 16 == 15) std::cout << std::endl;
- }
- h->Fill(value);
- }//end for
- if (verbose)
- std::cout << std::endl;
- if (zero > 1) {
- std::cout << "Error: Read zero channels - should not happen"
- << std::endl;
- break;
- }
- }//end while
-
- TCanvas* c = new TCanvas("raw", "Raw Data");
- c->SetFillColor(0);
- c->SetLogy();
- c->SetBorderMode(0);
- h->Draw();
- return;
-}
-//____________________________________________________________________
-//
-// EOF
-//
// Script I used for rapid prototyping of the FMD3 geometry - in
// particular the support cone
//
+/** @defgroup simple_geom Simple geometry
+ @ingroup FMD_script
+*/
+/** Calculate wafer parameters
+ @param dl Lower diameter
+ @param dh Higer diameter
+ @param theta Opening angle
+ @param r Wafer radius
+ @param verbose Maybe be verbose
+ @return Corners of shape
+ @ingroup simple_geom
+*/
//____________________________________________________________________
TObjArray*
waferParameters(double dl, double dh, double theta, double r,
return verticies;
}
+/** Create the sensor shape
+ @param name
+ @param rl
+ @param rh
+ @param th
+ @param r
+ @param dz
+ @ingroup simple_geom
+ @return */
//____________________________________________________________________
TShape*
createModuleShape(const Char_t* name, double rl, double rh, double th,
return (TShape*)moduleShape;
}
+/**
+ @param name
+ @param rl
+ @param rh
+ @param th
+ @param siThick
+ @param waferR
+ @param staggering
+ @param z
+ @ingroup simple_geom
+ @return
+*/
//____________________________________________________________________
TNode*
createRing(const char* name, double rl, double rh, double th,
}
//____________________________________________________________________
+/**
+ @param noseRl
+ @param noseRh
+ @param noseDz
+ @param noseZ
+ @param backRl
+ @param backRh
+ @param backDz
+ @param coneL
+ @param beamW
+ @param beamDz
+ @param flangeR
+ @return
+ @ingroup simple_geom
+*/
TNode*
createSupport(double noseRl, double noseRh, double noseDz, double noseZ,
double backRl, double backRh, double backDz, double coneL,
//____________________________________________________________________
+/**
+ @ingroup simple_geom
+ */
void
SimpleGeometry()
{
//
// Check integrety of Hardware2Detector and Detector2Hardware
//
-
+/** @defgroup ALTRO_test ALTRO test
+ @ingroup FMD_script
+*/
//____________________________________________________________________
+/** @ingroup ALTRO_test
+ @param ddl
+ @param hwaddr
+ @return */
Char_t*
Addr2Str(UInt_t ddl, UInt_t hwaddr)
{
}
//____________________________________________________________________
+/** @ingroup ALTRO_test
+ @param det
+ @param ring
+ @param sec
+ @param str
+ @return */
Char_t*
Det2Str(UShort_t det, Char_t ring, UShort_t sec, UShort_t str)
{
}
//____________________________________________________________________
+/** @ingroup ALTRO_test
+ @param det
+ @param ring
+ @param sec
+ @param str
+ @param ddl
+ @param hwaddr
+ @param odet
+ @param oring
+ @param osec
+ @param ostr
+*/
void
PrintTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str,
UInt_t ddl, UInt_t hwaddr,
}
//____________________________________________________________________
+/** @ingroup ALTRO_test
+ @param det
+ @param ring
+ @param sec
+ @param str
+ @param odet
+ @param oring
+ @param osec
+ @param ostr
+*/
void
CheckTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str,
UShort_t odet, Char_t oring, UShort_t osec, UShort_t ostr)
}
//____________________________________________________________________
+/** @ingroup ALTRO_test
+ */
void
TestAltroMapping()
{
//
// Check integrety of Hardware2Detector and Detector2Hardware
//
-
+/** @defgroup HW_Test Hardware map test
+ @ingroup FMD_script
+*/
//____________________________________________________________________
+/** @ingroup HW_test
+ @param ddl
+ @param hwaddr
+ @return */
Char_t*
Addr2Str(UInt_t ddl, UInt_t hwaddr)
{
}
//____________________________________________________________________
+/** @ingroup HW_test
+ @param det
+ @param ring
+ @param sec
+ @param str
+ @return */
Char_t*
Det2Str(UShort_t det, Char_t ring, UShort_t sec, UShort_t str)
{
}
//____________________________________________________________________
+/** @ingroup HW_test
+ @param det
+ @param ring
+ @param sec
+ @param str
+ @param ddl
+ @param hwaddr
+ @param odet
+ @param oring
+ @param osec
+ @param ostr
+*/
void
PrintTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str,
UInt_t ddl, UInt_t hwaddr,
}
//____________________________________________________________________
+/** @ingroup HW_test
+ @param det
+ @param ring
+ @param sec
+ @param str
+ @param odet
+ @param oring
+ @param osec
+ @param ostr
+*/
void
CheckTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str,
UShort_t odet, Char_t oring, UShort_t osec, UShort_t ostr)
}
//____________________________________________________________________
+/** @ingroup HW_test
+ */
void
TestHWMap()
{
//
// Test I/O of ALiFMDMap
//
+/** @defgroup MAPIO_TEST Map I/O test
+ @ingroup FMD_script
+*/
//____________________________________________________________________
+/** @ingroup MAPIO_test
+ */
void
WriteTree()
{
}
//____________________________________________________________________
+/** @ingroup MAPIO_test
+ */
void
ReadTree()
{
//____________________________________________________________________
+/** @ingroup MAPIO_test
+ */
void
WriteMap()
{
}
//____________________________________________________________________
+/** @ingroup MAPIO_test
+ @return */
+void
ReadMap()
{
TFile* file = TFile::Open("map.root", "READ");
//____________________________________________________________________
+/** @ingroup MAPIO_test
+ */
void
TestMapIO()
{
//
// Test of AliFMDAltro{Reader,Writer}
//
+/** @ingroup simple_script
+ */
void
TestRawIO()
{
// Script to try to fit the reponse function of the VA1 signals, based
// on a finite number of ALTRO samples.
//
+/** Make Va1 response
+ @param n
+ @param B
+ @param dc
+ @param errors
+ @ingroup simple_script
+*/
void
VA1Response(Int_t n=2, Float_t B=5, Float_t dc=.01, Bool_t errors=kFALSE)
{
//
// Small script that shows a signal train from a VA1 pre-amp.
//
+/** Make VA1 sample train
+ @ingroup simple_script
+ */
void
VA1Train()
{
//
// Christian
//
+/** Calculate wafer parameters
+ @param c
+ @return
+ @ingroup simple_script
+*/
TObjArray*
WaferParameters(const char c)
{
return verticies;
}
+/** Draw wafers
+ @ingroup simple_script
+ */
void
Wafer()
{