as per request of Andreas Morsch.
semantic.cache
html
tgt_*
-
+fluka*
+geant*
+runIt.C
+runflukageo.sh
+rungeant3geo.sh
//////////////////////////////////////////////////////////////////////////////
//
-// Forward Multiplicity Detector based on Silicon wafers This class
-// contains the base procedures for the Forward Multiplicity detector
-// Detector consists of 5 Si volumes covered pseudorapidity interval
-// from 1.7 to 5.1.
-//
+// Forward Multiplicity Detector based on Silicon wafers. This class
+// contains the base procedures for the Forward Multiplicity detector
+// Detector consists of 5 Si volumes covered pseudorapidity interval
+// from 1.7 to 5.1.
+//
+// This is the base class for all FMD manager classes.
+//
// The actual code is done by various separate classes. Below is
// diagram showing the relationship between the various FMD classes
// that handles the geometry
// envisioned that the classes should also define the support
// volumes and material for each of the detectors.
//
-//Begin_Html
-/*
- </pre>
- <br clear=left>
- <p>
- The responsible person for this module is
- <a href="mailto:Alla.Maevskaia@cern.ch">Alla Maevskaia</a>.
- </p>
- <p>
- Many modifications by <a href="mailto:cholm@nbi.dk">Christian
- Holm Christensen</a>.
- </p>
- <pre>
-*/
-//End_Html
+// The responsible person for this module is Alla Maevskaia
+// <Alla.Maevskaia@cern.ch>.
+//
+// Many modifications by Christian Holm Christensen <cholm@nbi.dk>
+//
#ifndef ROOT_TClonesArray
#include <TClonesArray.h>
#ifndef ALIMC_H
# include "AliMC.h"
#endif
-#ifndef ALILog_H
+#ifndef ALILOG_H
# include "AliLog.h"
#endif
#ifndef ALIMAGF_H
void
AliFMD::CreateGeometry()
{
- //
- // Create the geometry of Forward Multiplicity Detector version 0
//
+ // Create the geometry of Forward Multiplicity Detector. The actual
+ // construction of the geometry is delegated to the class AliFMDRing
+ // and AliFMDSubDetector and the relevant derived classes.
+ //
+ // The flow of this member function is:
+ //
+ // FOR rings fInner and fOuter DO
+ // AliFMDRing::Init();
+ // END FOR
+ //
+ // Set up hybrud card support (leg) volume shapes
+ //
+ // FOR rings fInner and fOuter DO
+ // AliFMDRing::SetupGeometry();
+ // END FOR
+ //
+ // FOR subdetectors fFMD1, fFMD2, and fFMD3 DO
+ // AliFMDSubDetector::SetupGeomtry();
+ // END FOR
+ //
+ // FOR subdetectors fFMD1, fFMD2, and fFMD3 DO
+ // AliFMDSubDetector::Geomtry();
+ // END FOR
+ //
+
// DebugGuard guard("AliFMD::CreateGeometry");
AliDebug(10, "Creating geometry");
//
// Build a simplified geometry of the FMD used for event display
//
+ // The actual building of the TNodes is done by
+ // AliFMDSubDetector::SimpleGeometry.
AliDebug(10, "Creating a simplified geometry");
TNode* top = gAlice->GetGeometry()->GetNode("alice");
AliFMD::DrawDetector()
{
//
- // Draw a shaded view of the Forward multiplicity detector version 0
+ // Draw a shaded view of the Forward multiplicity detector
//
// DebugGuard guard("AliFMD::DrawDetector");
AliDebug(10, "Draw detector");
AliFMD::MakeBranch(Option_t * option)
{
// Create Tree branches for the FMD.
+ //
+ // Options:
+ //
+ // H Make a branch of TClonesArray of AliFMDHit's
+ // D Make a branch of TClonesArray of AliFMDDigit's
+ // S Make a branch of TClonesArray of AliFMDSDigit's
+ //
const Int_t kBufferSize = 16000;
TString branchname(GetName());
TString opt(option);
void
AliFMD::SetHitsAddressBranch(TBranch *b)
{
+ // Set the TClonesArray to read hits into.
b->SetAddress(&fHits);
}
// hits[6] [Float_t ] Z-component of track's momentum
// hits[7] [Float_t ] Energy deposited by track
// hits[8] [Int_t ] Track's particle Id #
- // hits[9] [Float_t ] Time when the track hit
+ // hits[9] [Float_t ] Time when the track hit
+ //
+ //
AddHit(track,
UShort_t(vol[0]), // Detector #
Char_t(vol[1]), // Ring ID
&& hit->Sector() == sector
&& hit->Strip() == strip
&& hit->Track() == track) {
+ Warning("AddHit", "already had a hit in FMD%d%c[%2d,%3d] for track # %d,"
+ " adding energy (%f) to that hit (%f) -> %f",
+ detector, ring, sector, strip, track, edep, hit->Edep(),
+ hit->Edep() + edep);
hit->SetEdep(hit->Edep() + edep);
return;
}
// count1 ADC count (a 10-bit word)
// count2 ADC count (a 10-bit word), or -1 if not used
// count3 ADC count (a 10-bit word), or -1 if not used
+ //
TClonesArray& a = *(SDigitsArray());
new (a[fNsdigits++])
void
AliFMD::Hits2Digits()
{
+ // Create AliFMDDigit's from AliFMDHit's. This is done by making a
+ // AliFMDDigitizer, and executing that code.
+ //
AliRunDigitizer* manager = new AliRunDigitizer(1, 1);
manager->SetInputStream(0, "galice.root");
manager->SetOutputFile("H2Dfile");
void
AliFMD::Hits2SDigits()
{
+ // Create AliFMDSDigit's from AliFMDHit's. This is done by creating
+ // an AliFMDSDigitizer object, and executing it.
+ //
AliDigitizer* sdig = new AliFMDSDigitizer("galice.root");
sdig->Exec("");
}
void
AliFMD::Digits2Raw()
{
+ // Turn digits into raw data.
+ //
+ // Digits are read from the Digit branch, and processed to make
+ // three DDL files, one for each of the sub-detectors FMD1, FMD2,
+ // and FMD3.
+ //
+ // The raw data files consists of a header, followed by ALTRO
+ // formatted blocks.
+ //
+ // +-------------+
+ // | Header |
+ // +-------------+
+ // | ALTRO Block |
+ // | ... |
+ // +-------------+
+ // DDL file
+ //
+ // An ALTRO formatted block, in the FMD context, consists of a
+ // number of counts followed by a trailer.
+ //
+ // +------------------+
+ // | Count |
+ // | ... |
+ // | possible fillers |
+ // +------------------+
+ // | Trailer |
+ // +------------------+
+ // ALTRO block
+ //
+ // The counts are listed backwards, that is, starting with the
+ // latest count, and ending in the first.
+ //
+ // Each count consist of 1 or more ADC samples of the VA1_ALICE
+ // pre-amp. signal. Just how many samples are used depends on
+ // whether the ALTRO over samples the pre-amp. Each sample is a
+ // 10-bit word, and the samples are grouped into 40-bit blocks
+ //
+ // +------------------------------------+
+ // | S(n) | S(n-1) | S(n-2) | S(n-3) |
+ // | ... | ... | ... | ... |
+ // | S(2) | S(1) | AA | AA |
+ // +------------------------------------+
+ // Counts + possible filler
+ //
+ // The trailer of the number of words of signales, the starting
+ // strip number, the sector number, and the ring ID; each 10-bit
+ // words, packed into 40-bits.
+ //
+ // +------------------------------------+
+ // | # words | start | sector | ring |
+ // +------------------------------------+
+ // Trailer
+ //
+ // Note, that this method assumes that the digits are ordered.
+ //
AliFMD* fmd = static_cast<AliFMD*>(gAlice->GetDetector(GetName()));
fLoader->LoadDigits();
TTree* digitTree = fLoader->TreeD();
void
AliFMD::SetLegLength(Double_t length)
{
- // Set lenght of plastic legs that hold the hybrid (print board and
+ // Set lenght of plastic legs that hold the hybrid (print board and
// silicon sensor) onto the honeycomp support
//
// DebugGuard guard("AliFMD::SetLegLength");
- AliDebug(10, "AliFMD::SetLegLength");
+ AliDebug(10, "AliFMD::SetLegLength");
fLegLength = length;
fInner->SetLegLength(fLegLength);
fOuter->SetLegLength(fLegLength);
void
AliFMD::Browse(TBrowser* b)
{
+ // Browse this object.
+ //
AliDebug(10, "AliFMD::Browse");
AliDetector::Browse(b);
if (fInner) b->Add(fInner, "Inner Ring");
}
-//********************************************************************
-//
-// AliFMDv0
-//
-//__________________________________________________________________
-
-ClassImp(AliFMDv0);
-
-//********************************************************************
-//
-// AliFMDv1
-//
-//__________________________________________________________________
-
-ClassImp(AliFMDv1);
-
-
-//_//____________________________________________________________________
-void
-AliFMDv1::StepManager()
-{
- //
- // Called for every step in the Forward Multiplicity Detector
- //
- // The procedure is as follows:
- //
- // - IF NOT track is alive THEN RETURN ENDIF
- // - IF NOT particle is charged THEN RETURN ENDIF
- // - IF NOT volume name is "STRI" or "STRO" THEN RETURN ENDIF
- // - Get strip number (volume copy # minus 1)
- // - Get phi division number (mother volume copy #)
- // - Get module number (grand-mother volume copy #)
- // - section # = 2 * module # + phi division # - 1
- // - Get ring Id from volume name
- // - Get detector # from grand-grand-grand-mother volume name
- // - Get pointer to sub-detector object.
- // - Get track position
- // - IF track is entering volume AND track is inside real shape THEN
- // - Reset energy deposited
- // - Get track momentum
- // - Get particle ID #
- /// - ENDIF
- // - IF track is inside volume AND inside real shape THEN
- /// - Update energy deposited
- // - ENDIF
- // - IF track is inside real shape AND (track is leaving volume,
- // or it died, or it is stopped THEN
- // - Create a hit
- // - ENDIF
- //
- //
- // DebugGuard guard("AliFMDv1::StepManager");
- AliDebug(10, "AliFMDv1::StepManager");
- // return;
-
- // If the track is gone, return
- if (!gMC->IsTrackAlive()) return;
-
- // Only process charged particles
- if(TMath::Abs(gMC->TrackCharge()) <= 0) return;
-
- // Only do stuff is the track is in one of the strips.
- TString vol(gMC->CurrentVolName());
- if (!vol.Contains("STR")) return;
-
-
- // Get the strip number. Note, that GEANT numbers divisions from 1,
- // so we subtract one
- Int_t strip;
- gMC->CurrentVolID(strip);
- strip--;
-
- // Get the phi division of the module
- Int_t phiDiv; // * The phi division number (1 or 2)
- gMC->CurrentVolOffID(1, phiDiv); // in the module
-
- // Active volume number - not used.
- // Int_t active;
- // gMC->CurrentVolOffID(2, active);
-
- // Get the module number in the ring.
- Int_t module;
- gMC->CurrentVolOffID(3, module);
-
- // Ring copy number - the same as the detector number - not used
- // Int_t ringCopy; // * Ring copy number
- // gMC->CurrentVolOffID(4, ringCopy); // Same as detector number
-
- // Get the detector number from the path name
- Int_t detector = Int_t((gMC->CurrentVolOffName(5)[3]) - 48);
-
- // The sector number, calculated from module and phi division #
- Int_t sector = 2 * module + phiDiv - 1;
-
- // The ring ID is encoded in the volume name
- Char_t ring = vol[3];
-
- // Get a pointer to the sub detector structure
- AliFMDSubDetector* det = 0;
- switch (detector) {
- case 1: det = fFMD1; break;
- case 2: det = fFMD2; break;
- case 3: det = fFMD3; break;
- }
- if (!det) return;
-
- // Get the current track position
- TLorentzVector v;
- gMC->TrackPosition(v);
- // Check that the track is actually within the active area
- Bool_t isWithin = det->CheckHit(ring, module, v.X(), v.Y());
- Bool_t entering = gMC->IsTrackEntering() && isWithin;
- Bool_t inside = gMC->IsTrackInside() && isWithin;
- Bool_t out = (gMC->IsTrackExiting()
- || gMC->IsTrackDisappeared()
- || gMC->IsTrackStop()
- || !isWithin);
-// Reset the energy deposition for this track, and update some of
- // our parameters.
- if (entering) {
- fCurrentDeltaE = 0;
-
- // Get production vertex and momentum of the track
- fCurrentV = v;
- gMC->TrackMomentum(fCurrentP);
- fCurrentPdg = gMC->IdFromPDG(gMC->TrackPid());
-
- // if (fAnalyser)
- // fAnalyser->Update(detector, ring, isWithin, v.X(), v.Y());
- }
-
- // If the track is inside, then update the energy deposition
- if (inside && fCurrentDeltaE >= 0)
- fCurrentDeltaE += 1000 * gMC->Edep();
-
- // The track exits the volume, or it disappeared in the volume, or
- // the track is stopped because it no longer fulfills the cuts
- // defined, then we create a hit.
- if (out && fCurrentDeltaE >= 0) {
- fCurrentDeltaE += 1000 * gMC->Edep();
-
- AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),
- detector, ring, sector, strip,
- fCurrentV.X(), fCurrentV.Y(), fCurrentV.Z(),
- fCurrentP.X(), fCurrentP.Y(), fCurrentP.Z(),
- fCurrentDeltaE, fCurrentPdg, fCurrentV.T());
- fCurrentDeltaE = -1;
- }
-}
//___________________________________________________________________
//
// EOF
* See cxx source for full Copyright notice
*/
-////////////////////////////////////////////////
-// Manager and hits classes for set:Si-FMD //
-////////////////////////////////////////////////
-
+//____________________________________________________________________
+//
+// Manager class for the FMD - Base class.
+//
#ifndef ALIDETECTOR_H
# include <AliDetector.h>
#endif
ClassDef(AliFMD,8) // Base class FMD entry point
};
-//____________________________________________________________________
-class AliFMDv0 : public AliFMD
-{
-public:
- AliFMDv0() {}
- AliFMDv0(const char *name, const char *title="Coarse geometry")
- : AliFMD(name, title, false)
- {}
- virtual ~AliFMDv0()
- {}
-
- // Required member functions
- virtual Int_t IsVersion() const {return 0;}
- virtual void StepManager() {}
-
- ClassDef(AliFMDv0,1) // Coarse FMD geometry
-};
-
-//____________________________________________________________________
-#ifndef ROOT_TLorentzVector
-# include <TLorentzVector.h>
-#endif
-
-class AliFMDv1 : public AliFMD
-{
-public:
- AliFMDv1() {}
- AliFMDv1(const char *name, const char *title="Detailed geometry")
- : AliFMD(name, title, true)
- {}
- virtual ~AliFMDv1() {}
-
- // Required member functions
- virtual Int_t IsVersion() const {return 1;}
- virtual void StepManager();
-protected:
- Double_t fCurrentDeltaE; // The current accumelated energy loss
- TLorentzVector fCurrentV; // Current production vertex
- TLorentzVector fCurrentP; // Current momentum vector
- Int_t fCurrentPdg; // Current PDG code
-
- ClassDef(AliFMDv1,3) // Detailed FMD geometry
-};
-
#endif
//____________________________________________________________________
//
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//____________________________________________________________________
+//
+// Forward Multiplicity Detector based on Silicon wafers This class
+// contains the base procedures for the Forward Multiplicity detector
+// Detector consists of 5 Si volumes covered pseudorapidity interval
+// from 1.7 to 5.1.
+//
+// This contains the coarse version of the FMD - that is, the
+// simulation produces no hits in the FMD volumes.
+//
+// The actual code is done by various separate classes. Below is
+// diagram showing the relationship between the various FMD classes
+// that handles the geometry
+//
+//
+// +----------+ +----------+
+// | AliFMDv1 | | AliFMDv1 |
+// +----------+ +----------+
+// | |
+// +----+--------------+
+// |
+// | +------------+ 1 +---------------+
+// | +- | AliFMDRing |<>--| AliFMDPolygon |
+// V 2 | +------------+ +---------------+
+// +--------+<>--+ |
+// | AliFMD | ^
+// +--------+<>--+ V 1..2
+// 3 | +-------------------+
+// +-| AliFMDSubDetector |
+// +-------------------+
+// ^
+// |
+// +-------------+-------------+
+// | | |
+// +---------+ +---------+ +---------+
+// | AliFMD1 | | AliFMD2 | | AliFMD3 |
+// +---------+ +---------+ +---------+
+//
+//
+// See also the AliFMD class for a more detailed description of the
+// various components.
+//
+
+#ifndef ALIFMDV0_H
+# include "AliFMDv0.h"
+#endif
+
+//____________________________________________________________________
+ClassImp(AliFMDv0);
+
+//___________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+#ifndef ALIFMDV0_H
+#define ALIFMDV0_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
+ * reserved.
+ *
+ * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
+ *
+ * See cxx source for full Copyright notice
+ */
+
+//____________________________________________________________________
+//
+// Manager class for the FMD - Coarse version.
+//
+#ifndef ALIFMD_H
+# include <AliFMD.h>
+#endif
+
+//____________________________________________________________________
+class AliFMDv0 : public AliFMD
+{
+public:
+ AliFMDv0() {}
+ AliFMDv0(const char *name, const char *title="Coarse geometry")
+ : AliFMD(name, title, false)
+ {}
+ virtual ~AliFMDv0()
+ {}
+
+ // Required member functions
+ virtual Int_t IsVersion() const {return 0;}
+ virtual void StepManager() {}
+
+ ClassDef(AliFMDv0,1) // Coarse FMD geometry
+};
+
+
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//____________________________________________________________________
+//
+// Forward Multiplicity Detector based on Silicon wafers. This class
+// contains the base procedures for the Forward Multiplicity detector
+// Detector consists of 5 Si volumes covered pseudorapidity interval
+// from 1.7 to 5.1.
+//
+// This class contains the detailed version of the FMD - that is, hits
+// are produced during simulation.
+//
+// The actual code is done by various separate classes. Below is
+// diagram showing the relationship between the various FMD classes
+// that handles the geometry
+//
+//
+// +----------+ +----------+
+// | AliFMDv1 | | AliFMDv1 |
+// +----------+ +----------+
+// | |
+// +----+--------------+
+// |
+// | +------------+ 1 +---------------+
+// | +- | AliFMDRing |<>--| AliFMDPolygon |
+// V 2 | +------------+ +---------------+
+// +--------+<>--+ |
+// | AliFMD | ^
+// +--------+<>--+ V 1..2
+// 3 | +-------------------+
+// +-| AliFMDSubDetector |
+// +-------------------+
+// ^
+// |
+// +-------------+-------------+
+// | | |
+// +---------+ +---------+ +---------+
+// | AliFMD1 | | AliFMD2 | | AliFMD3 |
+// +---------+ +---------+ +---------+
+//
+//
+// See also the class AliFMD for a more detailed explanation of the
+// various componets.
+#ifndef ROOT_TVirtualMC
+# include <TVirtualMC.h>
+#endif
+#ifndef ALIFMDV1_H
+# include "AliFMDv1.h"
+#endif
+#ifndef ALIRUN_H
+# include "AliRun.h"
+#endif
+#ifndef ALIMC_H
+# include "AliMC.h"
+#endif
+#ifndef ALILOG_H
+# include "AliLog.h"
+#endif
+
+//____________________________________________________________________
+ClassImp(AliFMDv1);
+
+
+//____________________________________________________________________
+void
+AliFMDv1::StepManager()
+{
+ //
+ // Called for every step in the Forward Multiplicity Detector
+ //
+ // The procedure is as follows:
+ //
+ // - IF NOT track is alive THEN RETURN ENDIF
+ // - IF NOT particle is charged THEN RETURN ENDIF
+ // - IF NOT volume name is "STRI" or "STRO" THEN RETURN ENDIF
+ // - Get strip number (volume copy # minus 1)
+ // - Get phi division number (mother volume copy #)
+ // - Get module number (grand-mother volume copy #)
+ // - section # = 2 * module # + phi division # - 1
+ // - Get ring Id from volume name
+ // - Get detector # from grand-grand-grand-mother volume name
+ // - Get pointer to sub-detector object.
+ // - Get track position
+ // - IF track is entering volume AND track is inside real shape THEN
+ // - Reset energy deposited
+ // - Get track momentum
+ // - Get particle ID #
+ /// - ENDIF
+ // - IF track is inside volume AND inside real shape THEN
+ /// - Update energy deposited
+ // - ENDIF
+ // - IF track is inside real shape AND (track is leaving volume,
+ // or it died, or it is stopped THEN
+ // - Create a hit
+ // - ENDIF
+ //
+ //
+ // DebugGuard guard("AliFMDv1::StepManager");
+ AliDebug(10, "AliFMDv1::StepManager");
+ // return;
+
+ // If the track is gone, return
+ if (!gMC->IsTrackAlive()) return;
+
+ // Only process charged particles
+ if(TMath::Abs(gMC->TrackCharge()) <= 0) return;
+
+ // Only do stuff is the track is in one of the strips.
+ TString vol(gMC->CurrentVolName());
+ if (!vol.Contains("STR")) return;
+
+
+ // Get the strip number. Note, that GEANT numbers divisions from 1,
+ // so we subtract one
+ Int_t strip;
+ gMC->CurrentVolID(strip);
+ strip--;
+
+ // Get the phi division of the module
+ Int_t phiDiv; // * The phi division number (1 or 2)
+ gMC->CurrentVolOffID(1, phiDiv); // in the module
+
+ // Active volume number - not used.
+ // Int_t active;
+ // gMC->CurrentVolOffID(2, active);
+
+ // Get the module number in the ring.
+ Int_t module;
+ gMC->CurrentVolOffID(3, module);
+
+ // Ring copy number - the same as the detector number - not used
+ // Int_t ringCopy; // * Ring copy number
+ // gMC->CurrentVolOffID(4, ringCopy); // Same as detector number
+
+ // Get the detector number from the path name
+ Int_t detector = Int_t((gMC->CurrentVolOffName(5)[3]) - 48);
+
+ // The sector number, calculated from module and phi division #
+ Int_t sector = 2 * module + phiDiv - 1;
+
+ // The ring ID is encoded in the volume name
+ Char_t ring = vol[3];
+
+ // Get a pointer to the sub detector structure
+ AliFMDSubDetector* det = 0;
+ switch (detector) {
+ case 1: det = fFMD1; break;
+ case 2: det = fFMD2; break;
+ case 3: det = fFMD3; break;
+ }
+ if (!det) return;
+
+ // Get the current track position
+ TLorentzVector v;
+ gMC->TrackPosition(v);
+ // Check that the track is actually within the active area
+ Bool_t isWithin = det->CheckHit(ring, module, v.X(), v.Y());
+ Bool_t entering = gMC->IsTrackEntering() && isWithin;
+ Bool_t inside = gMC->IsTrackInside() && isWithin;
+ Bool_t out = (gMC->IsTrackExiting()
+ || gMC->IsTrackDisappeared()
+ || gMC->IsTrackStop()
+ || !isWithin);
+// Reset the energy deposition for this track, and update some of
+ // our parameters.
+ if (entering) {
+ fCurrentDeltaE = 0;
+
+ // Get production vertex and momentum of the track
+ fCurrentV = v;
+ gMC->TrackMomentum(fCurrentP);
+ fCurrentPdg = gMC->IdFromPDG(gMC->TrackPid());
+
+ // if (fAnalyser)
+ // fAnalyser->Update(detector, ring, isWithin, v.X(), v.Y());
+ }
+
+ // If the track is inside, then update the energy deposition
+ if (inside && fCurrentDeltaE >= 0)
+ fCurrentDeltaE += 1000 * gMC->Edep();
+
+ // The track exits the volume, or it disappeared in the volume, or
+ // the track is stopped because it no longer fulfills the cuts
+ // defined, then we create a hit.
+ if (out && fCurrentDeltaE >= 0) {
+ fCurrentDeltaE += 1000 * gMC->Edep();
+
+ AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(),
+ detector, ring, sector, strip,
+ fCurrentV.X(), fCurrentV.Y(), fCurrentV.Z(),
+ fCurrentP.X(), fCurrentP.Y(), fCurrentP.Z(),
+ fCurrentDeltaE, fCurrentPdg, fCurrentV.T());
+ fCurrentDeltaE = -1;
+ }
+}
+//___________________________________________________________________
+//
+// EOF
+//
--- /dev/null
+#ifndef ALIFMDV1_H
+#define ALIFMDV1_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
+ * reserved.
+ *
+ * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
+ *
+ * See cxx source for full Copyright notice
+ */
+
+//____________________________________________________________________
+//
+// Manager class for the FMD - Detailed version.
+//
+#ifndef ALIFMD_H
+# include <AliFMD.h>
+#endif
+#ifndef ROOT_TLorentzVector
+# include <TLorentzVector.h>
+#endif
+
+//____________________________________________________________________
+class AliFMDv1 : public AliFMD
+{
+public:
+ AliFMDv1() {}
+ AliFMDv1(const char *name, const char *title="Detailed geometry")
+ : AliFMD(name, title, true)
+ {}
+ virtual ~AliFMDv1() {}
+
+ // Required member functions
+ virtual Int_t IsVersion() const {return 1;}
+ virtual void StepManager();
+protected:
+ Double_t fCurrentDeltaE; // The current accumelated energy loss
+ TLorentzVector fCurrentV; // Current production vertex
+ TLorentzVector fCurrentP; // Current momentum vector
+ Int_t fCurrentPdg; // Current PDG code
+
+ ClassDef(AliFMDv1,3) // Detailed FMD geometry
+};
+
+#endif
+//____________________________________________________________________
+//
+// Local Variables:
+// mode: C++
+// End:
+//
+// EOF
+//
static Int_t eventsPerRun = 1;
-static Int_t nParticles = 1000;
+static Int_t nParticles = 100;
enum PprRun_t {
test50,
static PprGeo_t sgeo = kHoles;
static PprRad_t srad = kGluonRadiation;
static PprMag_t smag = k5kG;
-static MC_t smc = kFLUKA;
+// static MC_t smc = kFLUKA;
+static MC_t smc = kGEANT3;
// Comment line
static TString comment;
switch (smc) {
case kFLUKA:
- {
- //
- // libraries required by fluka21
- //
- gSystem->Load("libGeom");
- cout << "\t* Loading TFluka..." << endl;
- gSystem->Load("libTFluka");
-
- //
- // FLUKA MC
- //
- cout << "\t* Instantiating TFluka..." << endl;
- TFluka* fluka = new TFluka("C++ Interface to Fluka", 0/*verbosity*/);
- //
- // Use kTRUE as argument to generate alice.pemf first
- //
- TString alice_pemf(gSystem->Which(".", "FlukaVmc.pemf"));
- if (!alice_pemf.IsNull())
- fluka->SetGeneratePemf(kFALSE);
- else
- fluka->SetGeneratePemf(kTRUE);
- }
+ //
+ // libraries required by fluka21
+ //
+ gSystem->Load("libGeom");
+ cout << "\t* Loading TFluka..." << endl;
+ gSystem->Load("libTFluka");
+
+ //
+ // FLUKA MC
+ //
+ cout << "\t* Instantiating TFluka..." << endl;
+ new TFluka("C++ Interface to Fluka", 0/*verbosity*/);
break;
case kGEANT3:
- {
- //
- // Libraries needed by GEANT 3.21
- //
- gSystem->Load("libgeant321");
-
- //
- // GEANT 3.21 MC
- //
- TGeant3* geant3 = new TGeant3("C++ Interface to Geant3");
- }
+ //
+ // Libraries needed by GEANT 3.21
+ //
+ gSystem->Load("libgeant321");
+
+ //
+ // GEANT 3.21 MC
+ //
+ new TGeant3("C++ Interface to Geant3");
break;
default:
gAlice->Fatal("Config.C", "No MC type chosen");
rl->SetNumberOfEventsPerFile(3);
gAlice->SetRunLoader(rl);
+ switch (smc) {
+ case kFLUKA:
+ {
+ //
+ // Use kTRUE as argument to generate alice.pemf first
+ //
+ TString alice_pemf(gSystem->Which(".", "peg/mat17.pemf"));
+ if (!alice_pemf.IsNull())
+ ((TFluka*)gMC)->SetGeneratePemf(kFALSE);
+ else
+ ((TFluka*)gMC)->SetGeneratePemf(kTRUE);
+ }
+ break;
+ }
+
+
//
// Set External decayer
//
# $Id$
SRCS = AliFMD.cxx \
+ AliFMDv0.cxx \
+ AliFMDv1.cxx \
AliFMDSubDetector.cxx \
AliFMD1.cxx \
AliFMD2.cxx \