accordingly modified.
Int_t AliITSHits2Digits(const char *inFile = "galice.root"){
+ ////////////////////////////////////////////////////////////////////
+ // This macro will take hits from a galice.root file and
+ // produce digits for the ITS using the settings for the detector
+ // simulations defined in this file. It will measure the time
+ // required to do so and the increase in the galice.root file.
+ // There is only one input, that of the name of the root file
+ // containing the hits and to which the digits will be written to.
+ // This macro will process all of the events on the root file.
+ ////////////////////////////////////////////////////////////////////
// Dynamically link some shared libs
if (gClassTable->GetID("AliRun") < 0) {
return 2;
} // end if !gAlice
- gAlice->GetEvent(0);
AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
if (!ITS) {
cerr<<"AliITSHits2Digits.C : AliITS object not found on file"
AliITSsimulationSSD *sim2 = new AliITSsimulationSSD(seg2,res2);
ITS->SetSimulationModel(2,sim2);
- if(!gAlice->TreeD()){
- cout << "Having to create the Digits Tree." << endl;
- gAlice->MakeTree("D");
- } // end if !gAlice->TreeD()
- //make branch
- ITS->MakeBranch("D");
- ITS->SetTreeAddress();
cout << "Digitizing ITS..." << endl;
TStopwatch timer;
Long_t size0 = file->GetSize();
timer.Start();
- ITS->Hits2Digits();
+ gAlice->Hits2Digits("ITS");
timer.Stop(); timer.Print();
- delete gAlice; gAlice=0;
file->Close();
Long_t size1 = file->GetSize();
cout << "File size before = " << size0 << " file size after = " << size1;
Int_t AliITSHits2DigitsDefault(const char *inFile = "galice.root"){
+ ////////////////////////////////////////////////////////////////////
+ // This macro will take hits from a galice.root file and
+ // produce digits for the ITS using the standard detector
+ // simulations. It will measure the time required to do so and the
+ // increase in the galice.root file. There is only one input, that
+ // of the name of the root file containing the hits and to which the
+ // digits will be written to. This macro will process all of the
+ // events on the root file.
+ ////////////////////////////////////////////////////////////////////
// Dynamically link some shared libs
if (gClassTable->GetID("AliRun") < 0) {
return 2;
} // end if !gAlice
- gAlice->GetEvent(0);
AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
if (!ITS) {
cerr<<"ITSHits2Digits.C : AliITS object not found on file" << endl;
cerr << " AliITSgeom not found. Can't digitize with out it." << endl;
return 4;
} // end if
-
- if(!gAlice->TreeD()){
- cout << "Having to create the Digits Tree." << endl;
- gAlice->MakeTree("D");
- } // end if !gAlice->TreeD()
- //make branch
- ITS->MakeBranch("D");
- ITS->SetTreeAddress();
cout << "Digitizing ITS..." << endl;
TStopwatch timer;
Long_t size0 = file->GetSize();
timer.Start();
- ITS->Hits2Digits();
+ gAlice->Hits2Digits("ITS");
timer.Stop(); timer.Print();
- delete gAlice; gAlice=0;
file->Close();
Long_t size1 = file->GetSize();
cout << "File size before = " << size0 << " file size after = " << size1;
Int_t AliITSHits2DigitsDubna(const char *inFile = "galice.root"){
+ ////////////////////////////////////////////////////////////////////
+ // This macro will take hits from a galice.root file and
+ // produce digits for the ITS using the settings for the detector
+ // simulations defined in this file. Specificaly it replaces the
+ // default SPD simulation with that of Dubna It will measure the
+ // time required to do so and the increase in the galice.root file.
+ // There is only one input, that of the name of the root file
+ // containing the hits and to which the digits will be written to.
+ // This macro will process all of the events on the root file.
+ ////////////////////////////////////////////////////////////////////
+
// Dynamically link some shared libs
if (gClassTable->GetID("AliRun") < 0) {
gROOT->LoadMacro("loadlibs.C");
return 2;
} // end if !gAlice
- gAlice->GetEvent(0);
AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
if (!ITS) {
cerr<<"ITSHits2Digits.C : AliITS object not found on file" << endl;
return 4;
} // end if
- if(!gAlice->TreeD()){
- cout << "Having to create the Digits Tree." << endl;
- gAlice->MakeTree("D");
- } // end if !gAlice->TreeD()
- //make branch
- ITS->MakeBranch("D");
- ITS->SetTreeAddress();
-
// SPD
cout << "Changing from Default SPD simulation, and responce." << endl;
AliITSDetType *iDetType=ITS->DetType(0);
TStopwatch timer;
Long_t size0 = file->GetSize();
timer.Start();
- ITS->Hits2Digits();
+ gAlice->Hits2Digits();
timer.Stop(); timer.Print();
- delete gAlice; gAlice=0;
file->Close();
Long_t size1 = file->GetSize();
cout << "File size before = " << size0 << " file size after = " << size1;
# prepare TPC tracks for matching with the ITS
aliroot -q -b "$ALICE_ROOT/ITS/TPCtracking.C($1)"
# digitize ITS
-aliroot -q -b "$ALICE_ROOT/ITS/AliITSHitsToDigitsDefault.C(0,$[$1-1])"
+aliroot -q -b "$ALICE_ROOT/ITS/AliITSHits2DigitsDefault.C"
# create reconstructed points for the ITS
aliroot -q -b "$ALICE_ROOT/ITS/ITSDigitsToClusters.C(0,$[$1-1])"
# prepare for tracking
# prepare TPC tracks for matching with the ITS
aliroot -q -b "$ALICE_ROOT/ITS/TPCtracking.C($1)"
# digitize ITS
-aliroot -q -b "$ALICE_ROOT/ITS/AliITSHitsToDigitsDefault.C(0,$[$1-1])"
+aliroot -q -b "$ALICE_ROOT/ITS/AliITSHits2DigitsDefault.C"
# create reconstructed points for the ITS
aliroot -q -b "$ALICE_ROOT/ITS/ITSDigitsToClusters.C(0,$[$1-1])"
# prepare for tracking