Parent Directory | Revision Log
- Introduced user-defined names of output files and random seeds number. Users can do it use options of PamVMCApplication constructor: PamVMCApplication(const char* name, const char *title, const char* filename="pamtest", Int_t seed=0). The Random object that I use is TRandom3 object which has astronomical large period (in case of default initialization 0). All random generators in the code use this object by calling of gRandom singleton which keeps it. - Corrected TOF digitization routine. No problems with TDC hits due to hadronic interactions anymore. - Some small changes was done to compile code under Root 5.23. + geant4_vmc v. 2.6 without any warnings - Some classes of PamG4RunConfiguartion was changed for geant4_vmc v. 2.6.Some obsolete classes was deleted as soon as developers implemented regions. - Navigation was changed from "geomRootToGeant4" to "geomRoot", because on VMC web page written that as soon as Geant4 has no option ONLY/MANY translation of overlapped geometry to Geant4 through VGM could be wrong. I'd like to stay with Root navigation: http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default option. - New Tracker digitization routine written by Sergio was implemented - PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20. The problem was that ROOT developers introduced in TVirtualMC class a new method SetMagField and new base class:TVirtualMagField from which user-defined classes shoukd be derived
1 | #include "PamVMCDigRunTrailer.h" |
2 | |
3 | ClassImp(PamVMCDigRunTrailer) |
4 | #include "CRC.h" |
5 | void PamVMCDigRunTrailer:: DigitizeRunTrailer(){ |
6 | |
7 | UChar_t buffRT[18]; |
8 | |
9 | // header: 16 bytes |
10 | DigitizePSCU(18,0x21); |
11 | |
12 | // pkt_counter (uint32) |
13 | fraw->AddCounterPhys(); |
14 | fraw->AddCounter(); |
15 | UInt_t countphys = fraw->GetCounterPhys(); |
16 | while ( countphys > 16777215 ) |
17 | countphys -= 16777215; |
18 | // |
19 | fraw->SetCounterPhys(countphys); |
20 | buffRT[0] = ((UChar_t)(countphys >> 24)); |
21 | buffRT[1] = ((UChar_t)(countphys >> 16)); |
22 | buffRT[2] = ((UChar_t)(countphys >> 8)); |
23 | buffRT[3] = (UChar_t)countphys; |
24 | |
25 | // pkt_readyCounter: valid packets in the run (uint32) |
26 | buffRT[4] = 0x00; |
27 | buffRT[5] = 0x00; |
28 | buffRT[6] = 0x00; |
29 | buffRT[7] = 0x00; |
30 | |
31 | // obt (uint32) |
32 | ULong64_t obt = fraw->GetOBT() + 30LL; |
33 | while ( obt > 4294967295LL ) |
34 | obt -= 4294967295LL; |
35 | UInt_t Uobt = UInt_t(obt); |
36 | fraw->SetOBT(Uobt); |
37 | // |
38 | buffRT[8] = ((UChar_t)(Uobt >> 24)); |
39 | buffRT[9] = ((UChar_t)(Uobt >> 16)); |
40 | buffRT[10] = ((UChar_t)(Uobt >> 8)); |
41 | buffRT[11] = (UChar_t)Uobt; |
42 | |
43 | // last time_sync_info (uint32) |
44 | buffRT[12] = 0x00; |
45 | buffRT[13] = 0x00; |
46 | buffRT[14] = 0x00; |
47 | buffRT[15] = 0x00; |
48 | |
49 | // crc (uint16) |
50 | |
51 | UShort_t crcRT = (UShort_t)CM_Compute_CRC16((UINT16)0, (BYTE*)&buffRT, (UINT32)(16)); |
52 | buffRT[16] = ((UChar_t)(crcRT >> 8)); |
53 | buffRT[17] = (UChar_t)crcRT; |
54 | |
55 | for(Int_t i=0; i<18; i++) fDataPSCU.push_back(buffRT[i]); |
56 | |
57 | cout<<"Size of RunTrailer = "<<fDataPSCU.size()<<endl; |
58 | } |
59 | |
60 | |
61 | void PamVMCDigRunTrailer::WriteRunTrailer(){ |
62 | |
63 | fraw->WritePSCU(&fDataPSCU); |
64 | } |
65 |
ViewVC Help | |
Powered by ViewVC 1.1.23 |