]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/api.txt
- Remove double declaration in Digitizer
[u/mrichter/AliRoot.git] / RICH / api.txt
CommitLineData
5b919694 1How to open session:
d3eb6079 2 use static method AliRunLoader::Open("galice.root","AlicE","update")
8493d0aa 3How to get total number of events in galice.root:
4 use AliRun::GetEventsPerRun()
5How to avoid using gAlice:
6 detector->GetLoader()->GetRunLoader()->GetAliRun() returns gAlice global pointer.
d3eb6079 7How to retrieve pointer to alice run loader:
8 use pRICH->GetLoader()->GetRunLoader() (all detector classes inherit from AliDetector which has GetLoader())
9 use method AliRun::GetRunLoader for gAlice (deprecated)
998b831f 10How to get pointers to different root trees:
ab6b554e 11 TreeE belongs to AliRunLoader, available after AliRunLoader::LoadHeader()
12 TreeK belongs to AliRunLoader, available after AliRunLoader::LoadKinematics()
13 TreeH belongs to AliLoader , available after AliLoader::LoadHits()
14 TreeS belongs to AliLoader , available after AliLoader::LoadSDigits()
15 TreeD belongs to AliLoader , available after AliLoader::LoadDigits()
16 TreeR belongs to AliLoader , available after AliLoader::LoadRecPoints()
d3eb6079 17 all methods return 0 on success.
18How to get event of interest:
19 AliRunLoader::GetEvent(event_number) returns 0 on success
5b919694 20How to deal with the stack of particles?
998b831f 21 - first of all, the stack includes primary as well as secondary particles
5b919694 22 - pointer to the stack is taken:
d3eb6079 23 AliRun::Stack() (global gAlice of type AliRun - deprecated way to do)
5b919694 24 AliRunLoader::Stack() but before one needs to load event header by AliRunLoader::LoadHeader() otherwise both methods return 0.
25 Moreover loading header gives the information about number of particles only.
d3eb6079 26 To retrieve the list of particle one also needs to load kinematics by AliRunLoader::LoadKinematics()
5b919694 27 - total amount of particles in stack for a given event:
28 AliStack::GetNtrack()
29 AliRun::GetEvent() (after LoadHeader())
30 - total amount of primary particles in stack for a given event (after LoadHeader()):
31 AliStack::GetNprimary()
d3eb6079 32How to retrieve hits:
33 Hits are stored on primary by primary basis. Hits for the given primary is TClonesArray.
34 To retrieve all hits one needs to do:
35 -initialize the root tree and containers: pRich->GetLoader()->LoadHits(); (AliLoader::LoadHits() returns 0 on success)
36 -read number of entries in TreeH: pRich->GetLoader()->TreeH()->GetEntries()
37 -then for each entry: pRich->GetLoader()->TreeH()->GetEntry(i)
38How to retrieve sdigits?
09c52ebc 39 Sdigits stored in tree S with the branch of TClonesArray, all sdigits in a single TClonesArray
40 So the tree has only one entry.
41 One needs to say:
8493d0aa 42 -pRich->GetLoader()->LoadSDigits(); this one open file, get the tree and invoke AliRICH::SetTreeAddress()
d3eb6079 43How to retrieve digits?
44 Digits stored in tree D with the 7 branches of TClonesArray, one per chamber, all digits of a given chamber in a single TClonesArray
45 So the tree has only one entry.
46 -One needs to say:
47 pRich->GetLoader()->LoadDigits(); this one opens file, gets the tree and invoke AliRICH::SetTreeAddress() which in turn corresponds
48 branches of the tree to the digits containers in memory. There are 7 containers, one per chamber, all of them belong to AliRICH.
49 -Then one needs to take the tree entry (only one) to the memory:
50 pRich->GetLoader()->TreeD()->GetEntry(0)
51 -Finally pRich->Digits(chamber_number) returns the pointer to TClonesArray of AliRICHdigit
52What are the debug methods avail:
8493d0aa 53 AliLog::SetGlobalDebugLevel(AliLog::kDebug)
5b919694 54How to get info for a given particle number:
d3eb6079 55 Header and Kinematics trees must be loaded, then possible to retrieve pointer to Stack of particles
09c52ebc 56 Int_t AliRunLoader::LoadHeader(); Int_t AliRunLoader::LoadKinematics()
57 AliStack *AliRunLoader::Stack()
58 TParticle *AliStack::Particle(tid)
59 TParticle::Print()
5b919694 60How to deal with AliRunDigitizer:
09c52ebc 61 AliRunDigitizer::Exec() just call AliRunDigitizer::Digitize()
8493d0aa 62What are the meanings of different VMC flags:
5b919694 63 gMC->IsTrackAlive()
64 gMC->IsTrackStop()
65 gMC->IsTrackDisappeared()
d3eb6079 66How is sdigit produced from hit:
67 Responsible method is AliRICH::Hits2SDigits
5b919694 68 One hit may affect one or more pads.
d3eb6079 69 Hit position is taken on the anode wires plane as the most of avalanche is developed there.
70 This position is not directly available, track intersections with entrance and exit of amplification gap are only stored.
71 So the position in the middle of the gap is calculated as average out of pHit->In() and pHit->Out() positions.
72 Then, total charge collected for this hit is calculated by AliRICHParam::Hit2Qdc.
73 Area of disintegration is a list of pads affected by current hit. This is a parameter of Mathienson
5b919694 74How to get pad number for a local position:
d3eb6079 75 use static TVector AliRICHParam::Loc2Pad(TVector2 position);
5b919694 76Why list of chambers belongs to AliRICHParam:
8493d0aa 77
78How to check if a given stack particle is primary:
79 Stack is TClonesArray of TParticle. TParticle::GetMother(0) returns -1 if it's primary (no mother)
80How to loop over all possible object:
81 for(Int_t iEventN=0;iEventN < GetLoader()->GetRunLoader()->GetAliRun()->GetEventsPerRun();iEventN++){//events loop
82 for(Int_t iEntryN=0;iEntryN < GetLoader()->TreeH()->GetEntries();iEntryN++){//TreeH loop
83 GetLoader()->TreeH()->GetEntry(iEntryN);//get current entry (prim)
84 for(Int_t iHitN=0;iHitN<Hits()->GetEntries();iHitN++){//hits loop
85 AliVHMPIDHit *pHit=(AliVHMPIDHit*)Hits()->At(iHitN);//get current hit
5b919694 86
8493d0aa 87 }//hits loop
88 }//TreeH loop
89 }//events loop