/*
$Log$
+Revision 1.16 2000/10/24 09:22:35 gosset
+Method AddHitsForRecFromRawClusters: real Z of raw cluster and not Z of chamber
+
+Revision 1.15 2000/10/12 15:17:30 gosset
+Sign of fSimpleBValue corrected: sign ox Bx and not Bz (thanks to Galina)
+
+Revision 1.14 2000/10/04 18:21:26 morsch
+Include stdlib.h
+
+Revision 1.13 2000/10/02 21:28:09 fca
+Removal of useless dependecies via forward declarations
+
+Revision 1.12 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
+Revision 1.11 2000/09/22 09:16:33 hristov
+Casting needed on DEC
+
+Revision 1.10 2000/09/19 09:49:50 gosset
+AliMUONEventReconstructor package
+* track extrapolation independent from reco_muon.F, use of AliMagF...
+* possibility to use new magnetic field (automatic from generated root file)
+
Revision 1.9 2000/07/20 12:45:27 gosset
New "EventReconstructor..." structure,
hopefully more adapted to tree/streamer.
//__________________________________________________________________________
#include <iostream.h>
+#include <stdlib.h>
#include <TRandom.h>
#include <TFile.h>
+#include <TTree.h>
#include "AliMUONEventReconstructor.h"
#include "AliMUON.h"
#include "AliMUONTrack.h"
#include "AliMUONChamber.h"
#include "AliMUONTrackHit.h"
+#include "AliMagF.h"
#include "AliRun.h"
#include "TParticle.h"
fRecTrackHitsPtr = new TClonesArray("AliMUONTrack", 100);
fNRecTrackHits = 0; // really needed or GetEntriesFast sufficient ????
- // Sign of fSimpleBValue according to sign of value at (50,50,950).
+ // Sign of fSimpleBValue according to sign of Bx value at (50,50,950).
Float_t b[3], x[3];
x[0] = 50.; x[1] = 50.; x[2] = 950.;
gAlice->Field()->Field(x, b);
- fSimpleBValue = TMath::Sign(fSimpleBValue, b[2]);
+ fSimpleBValue = TMath::Sign(fSimpleBValue,(Double_t) b[0]);
// See how to get fSimple(BValue, BLength, BPosition)
// automatically calculated from the actual magnetic field ????
// Returns impact parameter at vertex in bending plane (cm),
// from the signed bending momentum "BendingMomentum" in bending plane (GeV/c),
// using simple values for dipole magnetic field.
- // The sign is the sign of the charge.
+ // The sign of "BendingMomentum" is the sign of the charge.
return (-0.0003 * fSimpleBValue * fSimpleBLength * fSimpleBPosition /
BendingMomentum);
}
Double_t AliMUONEventReconstructor::GetBendingMomentumFromImpactParam(Double_t ImpactParam)
{
// Returns signed bending momentum in bending plane (GeV/c),
+ // the sign being the sign of the charge for particles moving forward in Z,
// from the impact parameter "ImpactParam" at vertex in bending plane (cm),
// using simple values for dipole magnetic field.
- // The sign is the sign of the charge.
return (-0.0003 * fSimpleBValue * fSimpleBLength * fSimpleBPosition /
ImpactParam);
}
// only if hit is efficient (keep track for checking ????)
if (gRandom->Rndm() > fEfficiency) return NULL;
// only if radius between RMin and RMax
- bendCoor = Hit->fY;
- nonBendCoor = Hit->fX;
+ bendCoor = Hit->Y();
+ nonBendCoor = Hit->X();
radius = TMath::Sqrt((bendCoor * bendCoor) + (nonBendCoor * nonBendCoor));
if ((radius < fRMin[chamber]) || (radius > fRMax[chamber])) return NULL;
// new AliMUONHitForRec from GEANT hit and increment number of AliMUONHitForRec's
// original raw cluster
hitForRec->SetChamberNumber(ch);
hitForRec->SetHitNumber(iclus);
- // Z coordinate of the chamber (cm)
- // could (should) be more exact from chamber geometry ????
- hitForRec->SetZ((&(pMUON->Chamber(ch)))->Z());
+ // Z coordinate of the raw cluster (cm)
+ hitForRec->SetZ(clus->fZ[0]);
if (fPrintLevel >= 10) {
cout << "chamber (0...): " << ch <<
" raw cluster (0...): " << iclus << endl;
AliMUONSegment *segment;
Bool_t last2st;
Double_t bendingSlope, distBend, distNonBend, extBendCoor, extNonBendCoor,
- impactParam, maxImpactParam;
+ impactParam = 0., maxImpactParam = 0.; // =0 to avoid compilation warnings.
AliMUON *pMUON = (AliMUON*) gAlice->GetModule("MUON"); // necessary ????
if (fPrintLevel >= 1)
cout << "enter MakeSegmentsPerStation (0...) " << Station << endl;
AliMUONSegment *bestSegment, *extrapSegment, *segment;
AliMUONTrack *track, *nextTrack;
AliMUONTrackParam *trackParam1, trackParam[2], trackParamVertex;
- Int_t ch, chInStation, chBestHit, iHit, iSegment, station, trackIndex;
+ // -1 to avoid compilation warnings
+ Int_t ch = -1, chInStation, chBestHit = -1, iHit, iSegment, station, trackIndex;
Double_t bestChi2, chi2, dZ1, dZ2, dZ3, maxSigma2Distance, mcsFactor;
AliMUON *pMUON = (AliMUON*) gAlice->GetModule("MUON"); // necessary ????
// local maxSigma2Distance, for easy increase in testing
return;
}
-void AliMUONEventReconstructor::Streamer(TBuffer &R__b)
-{
- ;
-}