Float_t katrack=0, kamag=0, kageom=0;
Float_t prtrack=0, prmag=0, prgeom=0;
Float_t pif=0, kaf=0, prf=0, pin=0, kan=0, prn=0;
- Float_t px, py, pz, x, y, z, pdgcode, mass;
- Int_t event, matc, imam;
+ Float_t px, py, pz, x, y, z, mass;
+ Int_t event, matc, imam, pdgcode;
Int_t indexOfFile=0, numfile=0;
//////// Loop over tracks (particles)///////////////////////
for (Int_t i=0; i < nparticles; i++) {
fNtuple->GetEvent(i);
- event=fNtuple->GetLeaf("event")->GetValue();
- pdgcode=fNtuple->GetLeaf("ipart")->GetValue();
+ event=(Int_t)(fNtuple->GetLeaf("event")->GetValue());
+ pdgcode=(Int_t)(fNtuple->GetLeaf("ipart")->GetValue());
mass=fNtuple->GetLeaf("mext")->GetValue(0);
- matc=fNtuple->GetLeaf("matc")->GetValue(0);
- imam=fNtuple->GetLeaf("imam")->GetValue(0);
+ matc=(Int_t)(fNtuple->GetLeaf("matc")->GetValue(0));
+ imam=(Int_t)(fNtuple->GetLeaf("imam")->GetValue(0));
px=fNtuple->GetLeaf("pxvtx")->GetValue(0);
py=fNtuple->GetLeaf("pyvtx")->GetValue(0);
pz=fNtuple->GetLeaf("pzvtx")->GetValue(0);
//////////////////////////////////////////////////////////////////////////////
-#include "TTask.h"
-#include "TBenchmark.h"
-#include "TTree.h"
-#include "TSystem.h"
-#include "TFile.h"
-#include "TParticle.h"
-
#include "AliConst.h"
#include "AliRun.h"
#include "AliTOFConstants.h"
#include "AliDetector.h"
#include "AliMC.h"
+#include "TTask.h"
+#include "TBenchmark.h"
+#include "TTree.h"
+#include "TSystem.h"
+#include "TFile.h"
+#include "TParticle.h"
#include <TClonesArray.h>
#include "../TGeant3/TGeant3.h"
-#include "TFile.h"
#include <TF1.h>
#include <TF2.h>
-#include "TTask.h"
-#include "TTree.h"
-#include "TSystem.h"
#include "TROOT.h"
#include "TFolder.h"
#include "TNtuple.h"
Float_t x = tofHit->X(); tofpos[0]=x;
Float_t y = tofHit->Y(); tofpos[1]=y;
Float_t z = tofHit->Z(); tofpos[2]=z;
-
+ /* var used for QA
Float_t tofradius = TMath::Sqrt(x*x+y*y); // radius cilindrical coordinate of the TOF hit
+ */
// momentum components (cosine) when striking the TOF
Float_t pxtof = tofHit->GetPx();
Float_t pytof = tofHit->GetPy();
Float_t pztof = tofHit->GetPz();
// scalar product indicating the direction of the particle when striking the TOF
+ /* var used for QA
// (>0 for outgoing particles)
Float_t isGoingOut = (x*pxtof+y*pytof+z*pztof)/TMath::Sqrt(x*x+y*y+z*z);
+ */
Float_t momtof = tofHit->GetMom();
// now momentum components when striking the TOF
pxtof *= momtof;
}
}
- istrip=(Int_t)(zNoise-zLen[iplate-1])/((zLen[iplate]-zLen[iplate-1])/zStrips[iplate-1]); //the strip number in the plate
+ istrip=(Int_t)((zNoise-zLen[iplate-1])/((zLen[iplate]-zLen[iplate-1])/zStrips[iplate-1])); //the strip number in the plate
istrip++;
ipadAlongX = (Int_t)(AliTOFConstants::fgkNpadX*gRandom->Rndm())+1;
Float_t x=trackArray[itrack-1].GetRxTPC();
Float_t y=trackArray[itrack-1].GetRyTPC();
Float_t z=trackArray[itrack-1].GetRzTPC();
+ /* vars used for QA
Float_t RxTPC=x;
Float_t RyTPC=y;
Float_t RzTPC=z;
+ */
Float_t Wx=x;
Float_t Wy=y;
Float_t Wz=z;
Float_t px=trackArray[itrack-1].GetPxTPC();
Float_t py=trackArray[itrack-1].GetPyTPC();
Float_t pz=trackArray[itrack-1].GetPzTPC();
+ /* vars used for QA
Float_t pxTPC=px;
Float_t pyTPC=py;
Float_t pzTPC=pz;
-
+ */
Float_t p = TMath::Sqrt(px*px+py*py+pz*pz);
+ /* var used for QA
Float_t pTPC=p;
-
+ */
Float_t rho = TMath::Sqrt(x*x+y*y);
Float_t phi=0.;
if(TMath::Abs(x)>0. || TMath::Abs(y)>0.) phi=TMath::ATan2(y,x);
if(phi<0.) phi=phi+2.*TMath::Pi();
+ /* var used for QA
Float_t phiTPC=phi*kRaddeg;
+ */
if(fSigmavsp) {
if(p==0) printf(" p=%f in g=0.022/p\n",p);
g=0.022/p;
}
x=rho*TMath::Cos(phi);
y=rho*TMath::Sin(phi);
+ /* var used for QA
Float_t zTPC=z;
+ */
if(fSigmavsp) {
if(p==0) printf(" p=%f in g=0.0275/p\n",p);
g=0.0275/p;
}
////////////////////////////////////////////////////////////////////////
-void AliTOFSDigit::Update(Int_t tdc, Int_t adc, Int_t track)
+void AliTOFSDigit::Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track)
{
//
// Add charge and track
//
Int_t sameTime = -1;
-
+ Float_t tdcwindow=((Float_t)AliTOFConstants::fgkTimeDiff)/tdcbin;
for (Int_t i = 0; i < fNDigits; i++) {
- if (TMath::Abs(tdc-fTdc->At(i)) < AliTOFConstants::fgkTimeDiff) {
+ if (TMath::Abs(tdc-fTdc->At(i)) < tdcwindow) {
sameTime = i;
break;
}
// starting from the digits data.
//
- AliTOF* tof;
-
- if(gAlice){
- tof =(AliTOF*) gAlice->GetDetector("TOF");
- }else{
- printf("AliTOFSDigit::GetTotPad - No AliRun object present, exiting");
- return 0;
- }
-
- Int_t pad = fPadx+tof->GetNpadX()*(fPadz-1);
+ Int_t pad = fPadx+AliTOFConstants::fgkNpadX*(fPadz-1);
Int_t before=0;
switch(fPlate){
case 1: before = 0;
break;
- case 2: before = tof->GetNStripC();
+ case 2: before = AliTOFConstants::fgkNStripC;
break;
- case 3: before = tof->GetNStripB() + tof->GetNStripC();
+ case 3: before = AliTOFConstants::fgkNStripB + AliTOFConstants::fgkNStripC;
break;
- case 4: before = tof->GetNStripA() + tof->GetNStripB() + tof->GetNStripC();
+ case 4: before = AliTOFConstants::fgkNStripA + AliTOFConstants::fgkNStripB + AliTOFConstants::fgkNStripC;
break;
- case 5: before = tof->GetNStripA() + 2*tof->GetNStripB() + tof->GetNStripC();
+ case 5: before = AliTOFConstants::fgkNStripA + 2*AliTOFConstants::fgkNStripB + AliTOFConstants::fgkNStripC;
break;
}
Int_t strip = fStrip+before;
- Int_t padTot = tof->GetPadXStr()*(strip-1)+pad;
+ Int_t padTot = AliTOFConstants::fgkPadXStrip*(strip-1)+pad;
return padTot;
}
void GetLocation(Int_t* Loc) const;
Int_t GetTotPad() const;
- void Update(Int_t tdc, Int_t adc, Int_t track);
+ void Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track);
// getters for AliTOFSDigit object
Int_t GetNDigits() const {return fNDigits;}
Bool_t isCloneOfThePrevious=dummy && ((vol[3]==previousPadX) && (vol[4]==previousPadZ));
- // much stronger check to be inserted here
+ Bool_t isNeighOfThePrevious=dummy && ((((vol[3]==previousPadX-1) || (vol[3]==previousPadX+1)) && (vol[4]==previousPadZ)) || ((vol[3]==previousPadX) && ((vol[4]==previousPadZ+1) || (vol[4]==previousPadZ-1))));
- if(!isCloneOfThePrevious){
+ if(!isCloneOfThePrevious && !isNeighOfThePrevious){
// update "previous" values
// in fact, we are yet in the future, so the present is past
previousTrack=tracknum;
if(timediff>=0.2) nlargeTofDiff++;
- digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/fTdcBin); // TDC bin number (each bin -> 25. ps)
+ digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/fTdcBin); // 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(tdctime,adccharge,tracknum);
+ sdig->Update(fTdcBin,tdctime,adccharge,tracknum);
ntotalupdatesinEv++;
ntotalupdates++;
} else {
--- /dev/null
+void AliTOFanalyzeMatching(const char* datafile)
+{
+
+ //
+ // Matching efficiency and contamination
+ // for different particle species
+ // (pions, kaons and protons).
+ // All histos are saved into a separate file
+ // datafile is assumed to be the file name containing
+ // the results of the matching in TNtuple format.
+ //
+ // Author: F. Pierella | pierella@bo.infn.it
+ //
+ // Use case:
+ // start root
+ // root[0] .L AliTOFanalyzeMatching.C
+ // root[1] AliTOFanalyzeMatching("matchingNtuple.root")
+
+ // output (histos!) filename
+ char outFileName[100];
+ strcpy(outFileName,"histo");
+ strcat(outFileName,datafile);
+
+ // dummy histos (for normalization)
+ TH1F* hpitot= new TH1F("hpitot","",12,0.,3.);
+ TH1F* hkatot= new TH1F("hkatot","",12,0.,3.);
+ TH1F* hprtot= new TH1F("hprtot","",12,0.,3.);
+
+ TH1F* hpimatched= new TH1F("hpimatched","",12,0.,3.);
+ TH1F* hkamatched= new TH1F("hkamatched","",12,0.,3.);
+ TH1F* hprmatched= new TH1F("hprmatched","",12,0.,3.);
+
+
+ // matching efficiency histos
+ TH1F* hpimatcheff= new TH1F("hpimatcheff","Matching efficiency for pions",12,0.,3.);
+ TH1F* hkamatcheff= new TH1F("hkamatcheff","Matching efficiency for kaons",12,0.,3.);
+ TH1F* hprmatcheff= new TH1F("hprmatcheff","Matching efficiency for protons",12,0.,3.);
+
+ // matching contamination histos
+ TH1F* hpimatchcon= new TH1F("hpimatchcon","Matching contamination for pions",12,0.,3.);
+ TH1F* hkamatchcon= new TH1F("hkamatchcon","Matching contamination for kaons",12,0.,3.);
+ TH1F* hprmatchcon= new TH1F("hprmatchcon","Matching contamination for protons",12,0.,3.);
+
+
+ TFile *file = TFile::Open(datafile,"old");
+ TNtuple* fNtuple= (TNtuple*)file->Get("Ntuple"); // get ntuple from file
+ Int_t nvar = fNtuple->GetNvar(); cout <<"N of var.="<< nvar << endl;
+ fNtuple->GetEvent(0);
+
+ file->cd();
+ Int_t nparticles = (Int_t)fNtuple->GetEntries();
+
+ for (Int_t i=0; i < nparticles; i++) {
+ fNtuple->GetEvent(i);
+ Int_t event=fNtuple->GetLeaf("event")->GetValue();
+ Int_t pdgcode=fNtuple->GetLeaf("ipart")->GetValue();
+ Int_t matc=fNtuple->GetLeaf("matc")->GetValue(0);
+ Float_t px=fNtuple->GetLeaf("pxvtx")->GetValue(0);
+ Float_t py=fNtuple->GetLeaf("pyvtx")->GetValue(0);
+ Float_t pz=fNtuple->GetLeaf("pzvtx")->GetValue(0);
+
+ Float_t pvtx=TMath::Sqrt(px*px+py*py+pz*pz);
+ Float_t ptvtx=TMath::Sqrt(px*px+py*py);
+ Int_t abspdgcode=TMath::Abs(pdgcode);
+
+
+ // N (1+2+3+4+(-4)) cases
+ if(matc>=1 || matc==-4){
+ switch(abspdgcode){
+ case 211:
+ hpitot->Fill(pvtx);
+ break;
+ case 321:
+ hkatot->Fill(pvtx);
+ break;
+ case 2212:
+ hprtot->Fill(pvtx);
+ break;
+ }
+ }
+
+
+ // N_matched (3+4) cases
+ if(matc==3 || matc==4){
+ switch(abspdgcode){
+ case 211:
+ hpimatched->Fill(pvtx);
+ break;
+ case 321:
+ hkamatched->Fill(pvtx);
+ break;
+ case 2212:
+ hprmatched->Fill(pvtx);
+ break;
+ }
+ }
+
+
+ // N_t (3) case
+ if(matc==3){
+ switch(abspdgcode){
+ case 211:
+ hpimatcheff->Fill(pvtx);
+ break;
+ case 321:
+ hkamatcheff->Fill(pvtx);
+ break;
+ case 2212:
+ hprmatcheff->Fill(pvtx);
+ break;
+ }
+ }
+
+ // N_w (4) case
+ if(matc==4){
+ switch(abspdgcode){
+ case 211:
+ hpimatchcon->Fill(pvtx);
+ break;
+ case 321:
+ hkamatchcon->Fill(pvtx);
+ break;
+ case 2212:
+ hprmatchcon->Fill(pvtx);
+ break;
+ }
+ }
+
+ }
+
+ // histo normalization
+ // efficiency
+ hpimatcheff->Divide(hpitot);
+ hkamatcheff->Divide(hkatot);
+ hprmatcheff->Divide(hprtot);
+
+ // contamination
+ hpimatchcon->Divide(hpimatched);
+ hkamatchcon->Divide(hkamatched);
+ hprmatchcon->Divide(hprmatched);
+
+
+ TFile *houtfile = new TFile(outFileName,"recreate");
+ houtfile->cd();
+
+ hpitot->Write();
+ hkatot->Write();
+ hprtot->Write();
+
+ hpimatched->Write();
+ hkamatched->Write();
+ hprmatched->Write();
+
+ hpimatcheff->Write();
+ hkamatcheff->Write();
+ hprmatcheff->Write();
+
+ hpimatchcon->Write();
+ hkamatchcon->Write();
+ hprmatchcon->Write();
+ houtfile->Close();
+
+ cout << "File " << outFileName << " with histos has been created" << endl;
+}
/*
$Log$
+Revision 1.25 2001/11/22 11:22:51 hristov
+Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
+
Revision 1.23 2001/09/27 10:39:20 vicinanz
SDigitizer and Merger added
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
- ycoor += (1-(upDown+1)/2)*gap;
+ Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
+ Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
+ ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ Float_t deltaMovingDown=-0.5; // [cm]
do {
ang = atan(zpos/radius);
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
printf("%f, St. %2i, Pl.4 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;
/*
$Log$
+Revision 1.27 2001/11/22 11:22:51 hristov
+Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
+
Revision 1.26 2001/11/13 14:36:40 vicinanz
Updated check for ppad[1] range
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
- ycoor += (1-(upDown+1)/2)*gap;
+ Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
+ Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
+ ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ Float_t deltaMovingDown=-0.5; // [cm]
do {
ang = atan(zpos/radius);
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
printf("%f, St. %2i, Pl.4 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;
/*
$Log$
+Revision 1.25 2001/11/22 11:22:51 hristov
+Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
+
Revision 1.23 2001/09/27 10:39:20 vicinanz
SDigitizer and Merger added
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
- ycoor += (1-(upDown+1)/2)*gap;
+ Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
+ Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
+ ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ Float_t deltaMovingDown=-0.5; // [cm]
do {
ang = atan(zpos/radius);
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
if(fDebug) {
printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- // Float_t gap = fGapA; //cm distance between the strip axis
- // to avoid overlaps
- Float_t gap = fGapA+1.; //cm distance between the strip axis
+ Float_t gap = fGapA+1.; //cm updated distance between the strip axis
+ // 1 cm is a special value exclusively for AliTOFv2FHoles geometry
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
-
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ //Float_t deltaMovingDown=-0.0; // [cm] special value for AliTOFv2FHoles
+
do {
- ycoor+=0.6; // fp to avoid overlaps
ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- // zcoor = zpos+(zFLTB/2+zFLTA/2+db)+1.; // fp to avoid overlaps
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
if(fDebug) {
printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
i++;
} while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
-
+
// Plate C
zpos = zpos + zSenStrip/TMath::Cos(ang);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;
/*
$Log$
+Revision 1.25 2001/11/22 11:22:51 hristov
+Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
+
Revision 1.23 2001/09/27 10:39:20 vicinanz
SDigitizer and Merger added
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
- ycoor += (1-(upDown+1)/2)*gap;
+ Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
+ Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
+ ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
if(fDebug) {
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ Float_t deltaMovingDown=-0.5; // [cm]
do {
ang = atan(zpos/radius);
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
if(fDebug) {
printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;
/*
$Log$
+Revision 1.15 2001/11/22 11:22:51 hristov
+Updated version of TOF digitization, N^2 problem solved (J.Chudoba)
+
Revision 1.13 2001/09/27 10:39:21 vicinanz
SDigitizer and Merger added
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
- ycoor += (1-(upDown+1)/2)*gap;
+ Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
+ Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
+ ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
if(fDebug) {
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ Float_t deltaMovingDown=-0.5; // [cm]
do {
ang = atan(zpos/radius);
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
if(fDebug) {
printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA+0.5; //cm updated distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
- ycoor += (1-(upDown+1)/2)*gap;
+ Float_t deltaSpaceinB=-0.5; // [cm] to avoid overlaps with the end of freon frame
+ Float_t deltaGapinB=0.5; // [cm] to avoid overlaps in between initial strips
+ ycoor = -hTof*0.5+ kspace+deltaSpaceinB ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*(gap+deltaGapinB);
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
if(fDebug) {
ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
+ // this avoid overlaps in between outer strips in plate B
+ Float_t deltaMovingUp=0.8; // [cm]
+ Float_t deltaMovingDown=-0.5; // [cm]
do {
ang = atan(zpos/radius);
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
- gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
+ gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingDown+deltaMovingUp, zcoor,idrotm[nrot], "ONLY");
+ deltaMovingUp+=0.8; // update delta moving toward the end of the plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
if(fDebug) {
printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+kspace+gap;
+ Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate
+ ycoor= -hTof*0.5+kspace+gap+deltaGap;
do {
i++;