/*
$Log$
+Revision 1.27 2001/07/27 13:03:12 hristov
+Default Branch split level set to 99
+
+Revision 1.26 2001/05/03 08:11:31 hristov
+stdlib.h included to define exit()
+
+Revision 1.25 2001/04/25 14:50:42 gosset
+Corrections to violations of coding conventions
+
+Revision 1.24 2001/03/30 09:37:58 gosset
+Initialisations of pointers... for GEANT background events in the constructor
+
+Revision 1.23 2001/01/26 21:44:45 morsch
+Use access functions to AliMUONDigit, ... member data.
+
+Revision 1.22 2001/01/26 20:00:53 hristov
+Major upgrade of AliRoot code
Revision 1.20 2001/01/08 11:01:02 gosset
Modifications used for addendum to Dimuon TDR (JP Cussonneau):
*. MaxBendingMomentum to make both a segment and a track (default 500)
Addition of files for track reconstruction in C++
*/
-//__________________________________________________________________________
+////////////////////////////////////
//
// MUON event reconstructor in ALICE
//
// * MakeEventToBeReconstructed to build the array of hits to be reconstructed
// * MakeSegments to build the segments
// * MakeTracks to build the tracks
-//__________________________________________________________________________
+//
+////////////////////////////////////
-#include <iostream.h>
-#include <stdlib.h>
+#include <iostream.h> // for cout
+#include <stdlib.h> // for exit()
-#include <TRandom.h>
-#include <TFile.h>
#include <TTree.h>
-#include "AliMUONEventReconstructor.h"
#include "AliMUON.h"
+#include "AliMUONChamber.h"
+#include "AliMUONEventReconstructor.h"
#include "AliMUONHitForRec.h"
-#include "AliMUONSegment.h"
-#include "AliMUONHit.h"
#include "AliMUONRawCluster.h"
+#include "AliMUONRecoEvent.h"
+#include "AliMUONSegment.h"
#include "AliMUONTrack.h"
-#include "AliMUONChamber.h"
#include "AliMUONTrackHit.h"
#include "AliMagF.h"
-#include "AliRun.h"
-#include "TParticle.h"
-#include "AliMUONRecoEvent.h"
+#include "AliRun.h" // for gAlice
//************* Defaults parameters for reconstruction
static const Double_t kDefaultMinBendingMomentum = 3.0;
cout << endl;
}
+ // Initializions for GEANT background events
+ fBkgGeantFile = 0;
+ fBkgGeantTK = 0;
+ fBkgGeantParticles = 0;
+ fBkgGeantTH = 0;
+ fBkgGeantHits = 0;
+ fBkgGeantEventNumber = -1;
+
// Initialize to 0 pointers to RecoEvent, tree and tree file
fRecoEvent = 0;
fEventTree = 0;
}
//__________________________________________________________________________
-Double_t AliMUONEventReconstructor::GetImpactParamFromBendingMomentum(Double_t BendingMomentum)
+Double_t AliMUONEventReconstructor::GetImpactParamFromBendingMomentum(Double_t BendingMomentum) const
{
// Returns impact parameter at vertex in bending plane (cm),
// from the signed bending momentum "BendingMomentum" in bending plane (GeV/c),
}
//__________________________________________________________________________
-Double_t AliMUONEventReconstructor::GetBendingMomentumFromImpactParam(Double_t ImpactParam)
+Double_t AliMUONEventReconstructor::GetBendingMomentumFromImpactParam(Double_t ImpactParam) const
{
// Returns signed bending momentum in bending plane (GeV/c),
// the sign being the sign of the charge for particles moving forward in Z,
// like in Fortran TRACKF_STAT.
AliMUONHitForRec* hitForRec;
Double_t bendCoor, nonBendCoor, radius;
- Int_t chamber = Hit->fChamber - 1; // chamber(0...)
+ Int_t chamber = Hit->Chamber() - 1; // chamber(0...)
// only in tracking chambers (fChamber starts at 1)
if (chamber >= kMaxMuonTrackingChambers) return NULL;
// only if hit is efficient (keep track for checking ????)
// on the radius between RMin and RMax.
AliMUONHitForRec *hitForRec;
AliMUONRawCluster *clus;
- Int_t iclus, nclus;
+ Int_t iclus, nclus, nTRentries;
TClonesArray *rawclusters;
if (fPrintLevel >= 1) cout << "enter AddHitsForRecFromRawClusters" << endl;
AliMUON *pMUON = (AliMUON*) gAlice->GetModule("MUON"); // necessary ????
// Security on MUON ????
+ pMUON->ResetRawClusters();
+ nTRentries = Int_t(TR->GetEntries());
+ if (nTRentries != 1) {
+ cout << "Error in AliMUONEventReconstructor::AddHitsForRecFromRawClusters"
+ << endl;
+ cout << "nTRentries = " << nTRentries << " not equal to 1" << endl;
+ exit(0);
+ }
+ TR->GetEvent(0); // only one entry
// Loop over tracking chambers
for (Int_t ch = 0; ch < kMaxMuonTrackingChambers; ch++) {
// number of HitsForRec to 0 for the chamber
if (ch == 0) fIndexOfFirstHitForRecPerChamber[ch] = 0;
else fIndexOfFirstHitForRecPerChamber[ch] = fNHitsForRec;
rawclusters = pMUON->RawClustAddress(ch);
- pMUON->ResetRawClusters();
- TR->GetEvent((Int_t) (TR->GetEntries()) - 1); // to be checked ????
+// pMUON->ResetRawClusters();
+// TR->GetEvent((Int_t) (TR->GetEntries()) - 1); // to be checked ????
nclus = (Int_t) (rawclusters->GetEntries());
// Loop over (cathode correlated) raw clusters
for (iclus = 0; iclus < nclus; iclus++) {
if (fRecoEvent->MakeDumpTracks(fRecTracksPtr)) {
if (fPrintLevel > 1) fRecoEvent->EventInfo();
TBranch *branch = fEventTree->GetBranch("Event");
- if (!branch) branch = fEventTree->Branch("Event", "AliMUONRecoEvent", &fRecoEvent, 64000,1);
+ if (!branch) branch = fEventTree->Branch("Event", "AliMUONRecoEvent", &fRecoEvent, 64000);
branch->SetAutoDelete();
fTreeFile->cd();
fEventTree->Fill();