//
// Default constructor for class AliFMD
//
- AliDebug(0, "Default CTOR");
+ AliDebug(0, "\tDefault CTOR");
fHits = 0;
fDigits = 0;
fIshunt = 0;
//
// Standard constructor for Forward Multiplicity Detector
//
- AliDebug(0, "Standard CTOR");
+ AliDebug(0, "\tStandard CTOR");
// Initialise Hit array
HitsArray();
//
// DebugGuard guard("AliFMD::CreateGeometry");
- AliDebug(10, "Creating geometry");
+ AliDebug(10, "\tCreating geometry");
fInner->Init();
fOuter->Init();
// Also defined are two rotation matricies.
//
// DebugGuard guard("AliFMD::CreateMaterials");
- AliDebug(10, "Creating materials");
+ AliDebug(10, "\tCreating materials");
Int_t id;
Double_t a = 0;
Double_t z = 0;
//
// The actual building of the TNodes is done by
// AliFMDSubDetector::SimpleGeometry.
- AliDebug(10, "Creating a simplified geometry");
+ AliDebug(10, "\tCreating a simplified geometry");
TNode* top = gAlice->GetGeometry()->GetNode("alice");
// Draw a shaded view of the Forward multiplicity detector
//
// DebugGuard guard("AliFMD::DrawDetector");
- AliDebug(10, "Draw detector");
+ AliDebug(10, "\tDraw detector");
//Set ALIC mother transparent
gMC->Gsatt("ALIC","SEEN",0);
// 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, Form("\tLeg length set to %lf cm", length));
fLegLength = length;
fInner->SetLegLength(fLegLength);
fOuter->SetLegLength(fLegLength);
// hybrid (print board and silicon sensor) onto the honeycomp
// support
//
- // DebugGuard guard("AliFMD::SetLegOffset");
- AliDebug(10, "AliFMD::SetLegOffset");
+ AliDebug(10, Form("\tLeg offset set to %lf cm", offset));
fInner->SetLegOffset(offset);
fOuter->SetLegOffset(offset);
}
// Set the diameter of the plastic legs that hold the hybrid (print
// board and silicon sensor) onto the honeycomp support
//
- // DebugGuard guard("AliFMD::SetLegRadius");
- AliDebug(10, "AliFMD::SetLegRadius");
+ AliDebug(10, Form("\tLeg radius set to %lf cm", radius));
fLegRadius = radius;
fInner->SetLegRadius(fLegRadius);
fOuter->SetLegRadius(fLegRadius);
// Set the distance between the front and back sensor modules
// (module staggering).
//
- // DebugGuard guard("AliFMD::SetModuleSpacing");
- AliDebug(10, "AliFMD::SetModuleSpacing");
+ AliDebug(10, Form("\tModule spacing set to %lf cm", spacing));
fModuleSpacing = spacing;
fInner->SetModuleSpacing(fModuleSpacing);
fOuter->SetModuleSpacing(fModuleSpacing);
{
// Browse this object.
//
- AliDebug(10, "AliFMD::Browse");
+ AliDebug(30, "\tBrowsing the FMD");
AliDetector::Browse(b);
if (fInner) b->Add(fInner, "Inner Ring");
if (fOuter) b->Add(fOuter, "Outer Ring");
// Set various parameters
void SetLegLength(Double_t length=1);
void SetLegRadius(Double_t radius=.5);
- void SetLegOffset(Double_t offset=.5);
+ void SetLegOffset(Double_t offset=2);
void SetModuleSpacing(Double_t spacing=1);
void SetSiDensity(Float_t r=2.33) { fSiDensity = r; }
void SetSiThickness(Float_t r=0.03) { fSiThickness = r; }
// airId Id # of the Air medium
// alId Id # of the Aluminium medium
//
+ AliDebug(10, "\tDefining the geometry for FMD1");
fInnerHoneyLowR = fInner->GetLowR() + 1;
fInnerHoneyHighR = fInner->GetHighR() + 1;
fOuterHoneyLowR = 0;
//
// The Z passed in isn't used.
z = fInnerZ + fDz;
- gMC->Gspos("FMD1", 1, mother, 0, 0, z, fRotationId);
+ AliDebug(10, Form("\tPutting FMD1 in %s at z=%lf cm", mother, z));
+ gMC->Gspos("FMD1", 1, mother, 0, 0, z, fRotationId, "ONLY");
AliFMDSubDetector::Geometry("FMD1", pbRotId, idRotId, z);
}
// airId Id # of the Air medium
// alId Id # of the Aluminium medium
//
+ AliDebug(10, "\tDefining the geometry for FMD1");
fInnerHoneyLowR = fInner->GetLowR() + 1;
fInnerHoneyHighR = fOuter->GetHighR() + 1;
fOuterHoneyLowR = fOuter->GetLowR() + 1;
// z Z position (not really used here, but passed down)
//
z = fDz + fOuterZ;
+ AliDebug(10, Form("\tPutting FMD2 in %s at z=%lf cm", mother, z));
AliFMDSubDetector::Geometry("FMD2", pbRotId, idRotId, z);
gMC->Gspos("FMD2", 1, mother, 0, 0, z, fRotationId);
}
fVolumeId(0)
{
// Default constructor for the FMD3 sub-detector
+ AliDebug(10, "\t\tDefault CTOR");
}
AliFMD3::~AliFMD3()
{
// Destructor - does nothing
+ AliDebug(10, "\t\tDTOR");
}
// airId Id # of the Air medium
// kaptionId Id # of the Aluminium medium
//
+ AliDebug(10, "\tSetting up the geometry for FMD3");
Double_t innerZl = fInnerZ;
Double_t innerZh = (fInnerZ
- fInner->GetModuleSpacing()
gMC->Matrix(fRotationId, 90, 0, 90, 90, 0, 0);
//0, 180, 90, 90, 180, 0);
+
AliFMDSubDetector::SetupGeometry(airId, alId, carbonId);
}
// z Z position (not really used here, but passed down)
//
z = fSupport.GetZ();
- AliDebug(10, Form("Passing z=%lf to ring volumes", z));
- AliFMDSubDetector::Geometry("FMD3", pbRotId, idRotId, z);
fSupport.Geometry(mother, fRotationId, z);
+ AliDebug(10, Form("\t\tPassing z=%lf to ring volumes", z));
+ AliFMDSubDetector::Geometry("FMD3", pbRotId, idRotId, z);
}
// a = (fOuterHoneyHighR - fInnerHoneyHighR) / (x1 - x2)
//
//
+ AliDebug(10, "\tCreating simplified geometry for FMD3");
Double_t dz = (TMath::Abs(fInnerZ - fOuterZ)
+ fOuter->GetSiThickness()
+ fOuter->GetPrintboardThickness()
//____________________________________________________________________
void
-AliFMD3::Gsatt()
+AliFMD3::Gsatt() const
{
+ // Set draw attributes for the FMD3
+ AliDebug(10, "Setting drawing attributes for FMD3");
AliFMDSubDetector::Gsatt();
fSupport.Gsatt();
}
Int_t idRotId, Double_t z=0);
virtual void SimpleGeometry(TList* nodes, TNode* mother,
Int_t colour, Double_t zMother);
- virtual void Gsatt();
+ virtual void Gsatt() const;
protected:
Int_t fVolumeId; // Volume ID
AliFMD3Support fSupport; // Support for FMD3
Double_t innerRl, Double_t outerZl,
Double_t outerZh, Double_t outerRl);
virtual void Geometry(const char* mother, Int_t idRotId, Double_t z=0);
- virtual void Gsatt();
+ virtual void Gsatt() const;
void SetNoseZ(Double_t x=-46) { fNoseZ = x; }
void SetNoseLowR(Double_t x=5.5) { fNoseLowR = x; }
{
// Initialize the ring object.
// DebugGuard guard("AliFMDRing::Init");
- AliDebug(10, "AliFMDRing::Init");
+ AliDebug(30, Form("\tInitializing ring %c", fId));
fPolygon.Clear();
SetupCoordinates();
}
AliFMDRing::~AliFMDRing()
{
// Destructor - deletes shape and rotation matricies
+ AliDebug(30, Form("\tDestructing ring %c", fId));
if (fShape) delete fShape;
if (fRotMatricies) delete fRotMatricies;
}
AliFMDRing::Browse(TBrowser* /* b */)
{
// DebugGuard guard("AliFMDRing::Browse");
- AliDebug(10, "AliFMDRing::Browse");
+ AliDebug(30, Form("\tBrowsing ring %c", fId));
}
{
// Calculates the parameters of the polygon shape.
//
- // DebugGuard guard("AliFMDRing::SetupCoordinates");
- AliDebug(10, "AliFMDRing::SetupCoordinates");
+ //
+
// Get out immediately if we have already done all this
if (fPolygon.GetNVerticies() > 1) return;
+ AliDebug(10, Form("\tSetting up the coordinates for ring %c", fId));
double tanTheta = TMath::Tan(fTheta * TMath::Pi() / 180.);
double tanTheta2 = TMath::Power(tanTheta,2);
// Checks if a point (x,y) is inside the module with number moduleNo
//
// DebugGuard guard("AliFMDRing::IsWithin");
- AliDebug(10, "AliFMDRing::IsWithin");
+ AliDebug(20, Form("\tChecking wether the hit at (%lf,%lf) in module %d "
+ "is within this ring (%c)", x, y, moduleNo, fId));
bool ret = false;
double r2 = x * x + y * y;
if (r2 < fHighR * fHighR && r2 > fLowR * fLowR) {
// hits in the detector.
//
// DebugGuard guard("AliFMDRing::Draw");
- AliDebug(10, "AliFMDRing::Draw");
+ AliDebug(20, Form("\tDrawing ring %c", fId));
// The unrotated coordinates of the polygon verticies
if (fPolygon.GetNVerticies() < 1) return;
// idRotId Identity rotation matrix
//
// DebugGuard guard("AliFMDRing::SetupGeometry");
- AliDebug(10, "AliFMDRing::SetupGeometry");
+ AliDebug(10, Form("\tSetting up the geometry for ring %c", fId));
const TVector2& bCorner = fPolygon.GetVertex(3); // Third corner
const TVector2& aCorner = fPolygon.GetVertex(5); // First corner
// Place virtual module volume
name = Form(fgkVirtualFormat, fId, (isFront ? 'F' : 'B'));
dz = (w - fRingDepth) / 2;
- gMC->Gspos(name.Data(), id, name2.Data(), 0., 0., dz,fRotations[i]);
+ gMC->Gspos(name.Data(), id, name2.Data(), 0., 0., dz,fRotations[i],
+ "ONLY");
// We only need to place the children once, they are copied when
// we place the other virtual volumes.
// the silicon is on the edge of the virtual volume.
name = Form(fgkActiveFormat, fId);
dz = (w - fSiThickness) / 2;
- gMC->Gspos(name.Data(), id, name2.Data(),0.,0.,dz,idRotId);
+ gMC->Gspos(name.Data(), id, name2.Data(),0.,0.,dz,idRotId, "ONLY");
// Place print board. This is put immediately behind the silicon
name = Form(fgkPrintboardFormat, fId, 'T');
- (fLegLength + (isFront ? fModuleSpacing : 0)) /2);
name = (isFront ? AliFMD::fgkLongLegName : AliFMD::fgkShortLegName);
gMC->Gspos(name.Data(), id*10 + 1, name2.Data(),
- aCorner.X() + fLegOffset + fLegRadius, 0., dz, idRotId, "");
+ aCorner.X() + fLegOffset + fLegRadius, 0., dz, idRotId, "ONLY");
Double_t y = cCorner.Y() - yoffset - fLegOffset - fLegRadius;
- gMC->Gspos(name.Data(),id*10+2,name2.Data(),cCorner.X(), y,dz,idRotId,"");
- gMC->Gspos(name.Data(),id*10+3,name2.Data(),cCorner.X(), -y,dz,idRotId,"");
+ gMC->Gspos(name.Data(),id*10+2,name2.Data(),cCorner.X(),y,dz,
+ idRotId,"ONLY");
+ gMC->Gspos(name.Data(),id*10+3,name2.Data(),cCorner.X(),-y,dz,
+ idRotId,"ONLY");
}
}
//____________________________________________________________________
// idRotId Identity rotation matrix
//
// DebugGuard guard("AliFMDRing::Geometry");
- AliDebug(10, "AliFMDRing::Geometry");
TString name;
Double_t offsetZ = (fSiThickness
+ fPrintboardThickness
+ fLegLength + fModuleSpacing) / 2;
name = Form(fgkRingFormat, fId);
- AliDebug(10, Form("Placing ring %s in %s at z=%lf-%lf=%lf",
- name.Data(), mother, z, offsetZ, z-offsetZ));
- gMC->Gspos(name.Data(), baseId, mother, 0., 0., z - offsetZ, idRotId, "");
+ AliDebug(10, Form("\tPlacing ring %s in %s at z=%lf-%lf=%lf (base ID: %d)",
+ name.Data(), mother, z, offsetZ, z-offsetZ, baseId));
+ gMC->Gspos(name.Data(), baseId, mother, 0., 0., z - offsetZ, idRotId,
+ "ONLY");
}
//____________________________________________________________________
// n Detector number
//
// DebugGuard guard("AliFMDRing::SimpleGeometry");
- AliDebug(10, "AliFMDRing::SimpleGeometry");
SetupCoordinates();
+ AliDebug(10, Form("\tCreating simple geometry for "
+ "ring %c at z=%lf cm in %s",
+ fId, z, mother->GetName()));
// If the shape hasn't been defined yet, we define it here.
if (!fShape) {
+
TString name(Form(fgkActiveFormat, fId));
TString title(Form("Shape of modules in %c Rings", fId));
Int_t n = fPolygon.GetNVerticies();
// Set drawing attributes for the RING
//
// DebugGuard guard("AliFMDRing::Gsatt");
- AliDebug(10, "AliFMDRing::Gsatt");
+ AliDebug(10, Form("\tSetting drawing attributes for Ring %c", fId));
TString name;
name = Form(fgkRingFormat,fId);
gMC->Gsatt(name.Data(), "SEEN", 0);
fInner(0),
fOuter(0)
{
+ // Normal CTOR
SetAlThickness();
SetHoneycombThickness();
}
AliFMDSubDetector::Draw(Option_t* /* opt */) const
{
// DebugGuard guard("AliFMDSubDetector::Draw");
- AliDebug(10, "AliFMDSubDetector::Draw");
+ AliDebug(30, Form("\tDrawing FMD%d", fId));
+ Gsatt();
+ gMC->Gdraw(Form("FMD%d", fId));
+}
+
+//____________________________________________________________________
+void
+AliFMDSubDetector::DrawSpecs() const
+{
+ // DebugGuard guard("AliFMDSubDetector::Draw");
+ AliDebug(30, Form("\tDrawing specs foro FMD%d", fId));
+ gMC->DrawOneSpec(Form("FMD%d", fId));
}
//____________________________________________________________________
{
// Check if a hit (x,y) in module module of ring ring is within the
// actual shape.
+ AliDebug(30, Form("\tChecking wether the hit at (%lf,%lf) "
+ "is in ring %c module %d", x, y, ring, module));
Bool_t ret = kFALSE;
switch (ring) {
case 'i':
// colour Colour of the nodes
// zMother Z position of the node in the mother volume
//
- for (int i = 0; i < 2; i++) {
+ AliDebug(20, Form("\tCreating simple geometry for FMD%d", fId));
+ for (int i = 0; i < 2; i++) {
AliFMDRing* r = 0;
Double_t z = 0;
switch (i) {
// alId Medium of honeycomb
//
// DebugGuard guard("AliFMDSubDetector::SetupGeometry");
- AliDebug(10, "AliFMDSubDetector::SetupGeometry");
+ AliDebug(20, Form("\tSetting up the geometry for FMD%d", fId));
TString name;
Double_t par[5];
// support in the mother volume
//
// DebugGuard guard("AliFMDSubDetector::Geometry");
- AliDebug(10, "AliFMDSubDetector::Geometry");
+ AliDebug(20, Form("\tDefining the rings in %s (z=%lf cm)",
+ mother, zMother));
Double_t ringW;
Double_t z = 0;
Double_t z2 = z;
z2 -= zMother;
if (zMother > 0) z2 *= -1;
- AliDebug(10, Form("Putting ring %c in %s at z=%lf-%lf=%lf",
+ AliDebug(10, Form("\tPutting ring %c in %s at z=%lf-%lf=%lf",
c, mother, z, zMother, z2));
r->Geometry(mother, fId, z2, pbRotId, idRotId);
ringW = r->GetRingDepth();
// Top of honeycomb
name = Form(fgkHoneyTopFormat, fId, c);
- gMC->Gspos(name.Data(), 1, mother, 0, 0, z2, idRotId);
+ gMC->Gspos(name.Data(), 1, mother, 0, 0, z2, idRotId, "ONLY");
// Air in top of honeycomb
name2 = name;
name = Form(fgkHoneyTopInnerFormat, fId, c);
- gMC->Gspos(name.Data(), 1, name2.Data(),0,fAlThickness,0,idRotId);
+ gMC->Gspos(name.Data(), 1, name2.Data(),0,fAlThickness,0,idRotId,"ONLY");
// Bottom of honeycomb
name = Form(fgkHoneyBottomFormat, fId, c);
- gMC->Gspos(name.Data(), 1, mother, 0, 0, z2, idRotId);
+ gMC->Gspos(name.Data(), 1, mother, 0, 0, z2, idRotId, "ONLY");
// Air in bottom of honeycomb
name2 = name;
name = Form(fgkHoneyBottomInnerFormat, fId, c);
- gMC->Gspos(name.Data(),1,name2.Data(),0,-fAlThickness,0,idRotId);
+ gMC->Gspos(name.Data(),1,name2.Data(),0,-fAlThickness,0,idRotId, "ONLY");
}
}
//____________________________________________________________________
void
-AliFMDSubDetector::Gsatt()
+AliFMDSubDetector::Gsatt() const
{
// Set drawing attributes for the detector
//
// DebugGuard guard("AliFMDSubDetector::Gsatt");
- AliDebug(10, "AliFMDSubDetector::Gsatt");
+ AliDebug(30, Form("\tSetting draw attributs for FMD%d", fId));
TString name;
name = Form("FMD%d", fId);
Int_t colour,
Double_t zMother);
- virtual void Gsatt();
+ virtual void Gsatt() const;
virtual void Draw(Option_t* option="BIOL0") const; //*MENU*
+ virtual void DrawSpecs() const; // *MENU*
virtual Bool_t CheckHit(Char_t ring, Int_t module, Double_t x, Double_t y);
void SetInner(AliFMDRing* r) { fInner = r; }
// - ENDIF
//
//
- // DebugGuard guard("AliFMDv1::StepManager");
- AliDebug(10, "AliFMDv1::StepManager");
- // return;
AliDebug(10, Form("Is inside %s", gMC->CurrentVolName()));
// If the track is gone, return
|| gMC->IsTrackDisappeared()
|| gMC->IsTrackStop()
|| !isWithin);
-// Reset the energy deposition for this track, and update some of
+
+ AliDebug(2, Form("Is inside FMD%d%c[%02d,%03d]: particle is %s",
+ detector, ring, sector, strip,
+ (entering ? "entering" :
+ (inside ? "inside" :
+ "exiting"))));
+
+ // Reset the energy deposition for this track, and update some of
// our parameters.
if (entering) {
fCurrentDeltaE = 0;
kParam_8000, //
kParam_4000, //
kParam_2000, //
+ kParam_fmd, //
kHijing_cent1, //
kHijing_cent2, //
kHijing_per1, //
"kParam_8000", //
"kParam_4000", //
"kParam_2000", //
+ "kParam_fmd", //
"kHijing_cent1", //
"kHijing_cent2", //
"kHijing_per1", //
//____________________________________________________________________
// This part for configuration
//static EG_t eg = test50;
- EG_t eg = kParam_2000;
+ EG_t eg = kParam_fmd;
Geo_t geo = kNoHoles;
Rad_t rad = kGluonRadiation;
Mag_t mag = k5kG;
gGener=gener;
}
break;
+ case kParam_fmd:
+ {
+ comment = comment.Append("HIJINGparam N=100");
+ AliGenHIJINGpara *gener = new AliGenHIJINGpara(100);
+ gener->SetMomentumRange(0, 999999.);
+ gener->SetPhiRange(0., 360.);
+ // Set pseudorapidity range from -8 to 8.
+ Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
+ Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
+ gener->SetThetaRange(thmin,thmax);
+ gGener=gener;
+ }
+ break;
//
// Hijing Central
//
void DrawDetail()
{
// gAlice->Init("FMD/scripts/ConfigInner.C");
- gAlice->Init("FMD/scripts/ConfigFmdOnly.C");
+ AliLog::SetModuleDebugLevel("FMD", 6);
+ gAlice->Init("$(ALICE)/FMD/Config.C");
gMC->Gsatt("*", "seen", -1);
gMC->Gsatt("alic", "seen", 0);
- gROOT->LoadMacro("FMD/ViewFMD.C");
+ gROOT->LoadMacro("$(ALICE)/FMD/ViewFMD.C");
gInterpreter->ProcessLine("ViewFMD()");
// gROOT->LoadMacro("VZERO/ViewVZERO.C");
// gInterpreter->ProcessLine("ViewVZERO()");
gMC->SetClipBox(".");
gMC->SetClipBox("*", 0, 10000, -1000, 1000, -1000, 1000);
gMC->DefaultRange();
- gMC->Gdraw("alic", 60, 0, 0, -5, 10, .3, .3);
+ gMC->Gdraw("alic", 90, 0, 0, -5, 10, .15, .15);
gPad->Modified();
gPad->cd();
- // gPad->Print("FMD3_detail.png");
+ gPad->Print("FMD3_detail.png");
}
void DrawFMD3()
{
// gAlice->Init("FMD/scripts/ConfigInner.C");
- gAlice->Init("FMD/scripts/ConfigFmdOnly.C");
+ gAlice->Init("$(ALICE)/FMD/Config.C");
gMC->Gsatt("*", "seen", -1);
gMC->Gsatt("alic", "seen", 0);
- gROOT->LoadMacro("FMD/ViewFMD.C");
+ gROOT->LoadMacro("$(ALICE)/FMD/ViewFMD.C");
gInterpreter->ProcessLine("ViewFMD()");
gMC->Gdopt("hide", "on");
gMC->Gdopt("shad", "on");
gPad->Modified();
gPad->cd();
- gPad->Print("FMD3_detail.png");
+ gPad->Print("FMD3.png");
}
// Script to digit multiplicity information to std::cout.
//
void
-ShowDigits()
+ShowDigits(Int_t det=2)
{
AliRunLoader* runLoader = AliRunLoader::Open("galice.root");
runLoader->LoadgAlice();
AliLoader* fmdLoader = runLoader->GetLoader("FMDLoader");
fmdLoader->LoadDigits("READ");
+ TH1* h = new TH1F("digitData", "Digit Data", 128, 0, 1024);
Int_t nEvents = runLoader->TreeE()->GetEntries();
for (Int_t event = 0; event < nEvents; event++) {
cout << "Event # " << event << endl;
digit->Print();
total++;
}
+ if (digit->Detector() == det)
+ h->Fill(digit->Counts());
}
}
cout << "Total number of digits: " << total << endl;
}
+
+ TCanvas* c = new TCanvas("digit", "Digit Data");
+ c->SetFillColor(0);
+ c->SetLogy();
+ c->SetBorderMode(0);
+ h->Draw();
}
std::cout << "Reading raw data file " << file << std::endl;
- TH1* h = new TH1F("rawData", "Raw Data", 90, 0, 90);
+ TH1* h = new TH1F("rawData", "Raw Data", 128, 0, 1024);
// This method creates a text file containing the same information
break;
}
}//end while
+
+ TCanvas* c = new TCanvas("raw", "Raw Data");
+ c->SetFillColor(0);
+ c->SetLogy();
+ c->SetBorderMode(0);
h->Draw();
return;
}