#include "hmdctrackingeff.h"

HMdcTrackingEff


class description - source file - inheritance tree (.pdf)

class HMdcTrackingEff : public HReconstructor

Inheritance Chart:
TObject
<-
TNamed
<-
HTask
<-
HReconstructor
<-
HMdcTrackingEff

    protected:
Bool_t fillIndexTable(Int_t*, Int_t&, Int_t, Int_t*, Int_t*, HLinearCategory*) void fillKineData(Int_t&, Int_t, Int_t*, Float_t*, Int_t, HMatrixCategory*, HLinearCategory*) void fillNTuple(Int_t, Int_t*, Int_t, HMatrixCategory*, HMatrixCategory*, HLinearCategory*, TIterator*, HMatrixCategory*, TIterator*, HMatrixCategory*, TNtuple*, TNtuple*) void fillSegData(Int_t, Int_t*, Float_t*, Int_t, HMatrixCategory*, HMatrixCategory*) void fillVectorFromKine(TLorentzVector& v, Int_t slot) void fillVectorFromSeg(TLorentzVector& v, Int_t slot, Int_t type) Int_t findGeantMeta(Int_t, Int_t, TIterator*, HMatrixCategory*, TIterator*, HMatrixCategory*) Int_t findPartner(Int_t*, Int_t, Int_t) HMdcTrkCand* findSameRealCand(Int_t, Int_t*, HMdcSegSim**, TIterator*, HMatrixCategory*, HMatrixCategory*, HLinearCategory*) HGeantKine* getKineInfo(Int_t, Int_t&, Int_t&, Float_t&, Float_t&, Float_t&, HLinearCategory*) Float_t getLabPhiDeg(Int_t sector, Float_t phi) Float_t getPhiPairDeg(TLorentzVector& v) TString getProcessString(Float_t) void getSegPointers(Int_t*, HMdcSegSim**, HMdcTrkCand*, HMatrixCategory*, Int_t mode = 0) Float_t getThetaPairDeg(TLorentzVector& v) Bool_t hasPartner(Int_t*, Int_t, Int_t) void initVariables() void kineToSegPhiThetaDeg(HGeantKine* kine, Float_t& theta, Float_t& phi) Float_t pairPhiToLabDeg(Float_t phi) Float_t pairThetaToLabDeg(Float_t theta) void printIndexTable(Int_t*, Int_t) void resetDataArray() void resetIndexTable(Int_t*, Int_t) Bool_t sameDecay(Int_t, Int_t, Float_t, Float_t, Float_t, Float_t) Bool_t sameTrkSegments(Int_t, HMdcSegSim**, Int_t mode = 0) public:
HMdcTrackingEff() HMdcTrackingEff(Text_t* name, Text_t* title) ~HMdcTrackingEff() static TClass* Class() virtual Int_t execute() virtual Bool_t finalize() virtual Bool_t init() virtual TClass* IsA() const void setOutputRoot(TString = ntuple_tracking_eff.root) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TString fNameRoot ! file name of root output file TFile* out ! file pointer TNtuple* single TNtuple* pairs TIterator* iterTrkCand ! TIterator* iterTrkCandIdeal ! TIterator* iterGeantTof ! TIterator* iterGeantShower ! HMatrixCategory* catmHMdcTrkCand ! HMatrixCategory* catmHMdcTrkCandIdeal ! HMatrixCategory* catmHMdcSegSim ! HMatrixCategory* catmHMdcSegIdeal ! HMatrixCategory* catmHGeantTof ! HMatrixCategory* catmHGeantShower ! HLinearCategory* catlHGeantKine ! Int_t indSegId[2] ! HMdcSegSim* pSegId[2] ! Int_t indSeg[2] ! HMdcSegSim* pSeg[2] ! Int_t trkNrId ! static const Int_t nEvnt number of event indexes stored in data word static const Int_t nKine number of kine indexes stored in data word static const Int_t nSeg number of segment indexes stored in data word static const Int_t nChi2 static const Int_t npair static const Int_t nsingle static const Int_t maxTrks ! static const Int_t nSingle ! nEvnt + nkine + nSeg + nChi2 + nsingle static const Int_t nPairs ! nEvnt + nkine + nSeg + nChi2 + nkine + nSeg + nChi2 + npair static const Int_t sizeInd ! Int_t indexTable[6000] ! maxtrks tracks : ind kine, ind seg1_id,ind seg2_id, ind seg1,ind seg2,ind used Float_t dSingle[40] ! Float_t dPairs[98] ! Int_t offsetSeg1Kine ! starting index in data word for particle 1 (kine) Int_t offsetSeg2Kine ! starting index in data word for particle 2 (kine) Int_t offsetSeg1 ! starting index in data word for seg1 (seg) Int_t offsetSeg2 ! starting index in data word for seg2 (seg) Int_t offsetChi2 ! starting index in data word for chi2 relative to seg Int_t offsetPair ! starting index in data word for pair infos Int_t offsetSingle ! starting index in data word for single infos

Class Description


 HMdcTrackingEff

 This class fills two ntuples for single lepton tracks and pairs to estimate
 the tracking efficiency in simulation.
 This tasks needs as input GeantKine, GeantTof, GeantShower ,HMdcTrkCand, HMdcSegSim,
 HMdcTrkCandIdeal and HMdcSegIdeal categories. The MdcTaskSet and HMdcIdealTracking
 with setup of paralle output categories has to run in front to fill the categories.

 In the following the variables of the ntuples are described.
----------------------------------
 SINGLE
 single[0] =evNr

 GEANT KINE information
 single[1] =sector    (from inner MdcSegIdeal)
 single[2] =ptrk      (parent Track number)
 single[3] =genInfo   GEANT generator
 single[4] =genInfo1  GEANT generator
 single[5] =genInfo2  GEANT generator
 single[6] =gID       GEANT particle ID
 single[7] =mom       GEANT momentum
 single[8] =vx        GEANT vertex
 single[9] =vy        GEANT vertex
 single[10]=vz        GEANT vertex

HMdcTrackingEff(void)
 Default constructor calls the function setParContainers().

HMdcTrackingEff(Text_t* name,Text_t* title) : HReconstructor(name,title)
 Constructor calls the constructor of class HReconstructor with the name
 and the title as arguments. It also calls the function setParContainers().

~HMdcTrackingEff(void)
 destructor deletes the iterator

void initVariables()
 init of all variables

void setOutputRoot(TString fname)
 Sets rootfile output of HMdcTrackinEf where ntuples were written.


Bool_t init(void)

void getSegPointers(Int_t* iSId_1,HMdcSegSim** pSId_1, HMdcTrkCand* trkCandIdeal, HMatrixCategory* catmHMdcSegIdeal, Int_t mode)
 get pointer to segments and index values for TrkCand
 mode ==0 both segments are done
 mode ==1 inner segment is done + indseg2=-2

HGeantKine* getKineInfo(Int_t trkNr,Int_t& parentTrk,Int_t& gID, Float_t& generatorInfo, Float_t& generatorInfo1, Float_t& generatorInfo2, HLinearCategory* catlHGeantKine)
 retrieves the Geant ID, parentTrack , generatorInfo,
 generatorInfo1 and generatorInfo2 for Geant track trkNr

Bool_t sameTrkSegments(Int_t trkNr,HMdcSegSim** pSeg,Int_t mode)
 checks if the Geant trkNr of inner and outer segment is the same
 mode==0 both segments are checked
 mode==1 inner segment is checked

HMdcTrkCand* findSameRealCand(Int_t trkNr,Int_t* iSeg,HMdcSegSim** pSeg, TIterator* iterTrkCand, HMatrixCategory* catmHMdcTrkCand, HMatrixCategory* catmHMdcSeg, HLinearCategory* catlHGeantKine)
 checks if the Geant trkNr of inner and outer segment is the same
 if only inner segment is available only this is checked
 if both segments are there both are checked
 a loop over all candidates is performed
 if the match of outer segment in all candidates fails
 the first object of trkCand is used
 if no match is found 0 is returned.
 the indexes of both segments are stored in iSeg. indseg==-1 means
 the segment has not been found. indseg==-2 says thare have been
 candidates, but none of them mathed the trk number.

TString getProcessString(Float_t generatorInfo1_1)
 decodes the generatorinfo1 into a string for printing

Bool_t sameDecay(Int_t parenttrk_1,Int_t parenttrk_2, Float_t generatorInfo1_1,Float_t generatorInfo1_2, Float_t generatorInfo2_1,Float_t generatorInfo2_2)
 checks if a lepton track comes from
 the same source

void resetIndexTable(Int_t* indexTable,Int_t n)
 resets the first n slots of indextable

Bool_t fillIndexTable(Int_t* indexTable,Int_t& track_ct, Int_t trkNrId_1, Int_t* indSegId_1, Int_t* indSeg_1, HLinearCategory* catlHGeantKine)
 fills the index table for track track_ct
 the maxium number of tracks is maxTrks.
 the tracks are stored in format
 indexTable[track_ct*sizeInd+xi]=varx where xi=0-sizeInd and varx are the
 values in the following table:
 indKine, indSeg1_id, indSeg2_id, indSeg1, indSeg2, indUsed
 0        1           2           3        4        5
 parentTrk, geantInfo, geantInfo1, geantInfo2
 6          7          8           9

void printIndexTable(Int_t* indexTable,Int_t track_ct)
 prints one slot track_ct to the screen

Int_t findPartner(Int_t* iT,Int_t size,Int_t i)
 returns the slot in indexTable which contains a partner track
 to track i from the same decay (pair)
 if nothing is found -1 is returned
 the found tracks are marked in the table as used
 self combinations are rejected.

Bool_t hasPartner(Int_t* iT,Int_t size,Int_t i)
 checks if track has been used in pair

void fillSegData(Int_t ind,Int_t* iT,Float_t* data,Int_t offset, HMatrixCategory* catmHMdcSegIdeal, HMatrixCategory* catmHMdcSegSim)
 indKine, indSeg1_id, indSeg2_id, indSeg1, indSeg2, indUsed
 0        1           2           3        4        5
 parentTrk, geantInfo, geantInfo1, geantInfo2
 6          7          8           9

void fillKineData(Int_t& sec,Int_t ind,Int_t* iT,Float_t* data,Int_t offset, HMatrixCategory* catmHMdcSegIdeal, HLinearCategory* catlHGeantKine)
 indKine, indSeg1_id, indSeg2_id, indSeg1, indSeg2, indUsed
 0        1           2           3        4        5
 parentTrk, geantInfo, geantInfo1, geantInfo2
 6          7          8           9

Int_t findGeantMeta(Int_t trkNr,Int_t sector, TIterator* iterGeantTof, HMatrixCategory* catmHGeantTof, TIterator* iterGeantShower, HMatrixCategory* catmHGeantShower)
 search meta (shower and meta) for the same Geant track
 in sector sector.
 return codes:
 -1 if nothing has been found
 -2 if showerhit has been found in other sector
 -3 if tofhit has been found in other sector
 0 if hit has been found in shower (system 0)
 1 if hit has been found in tof    (system 1)

void fillNTuple(Int_t evNr,Int_t* indexTable,Int_t size, HMatrixCategory* catmHMdcSegSim, HMatrixCategory* catmHMdcSegIdeal, HLinearCategory* catlHGeantKine, TIterator* iterGeantTof, HMatrixCategory* catmHGeantTof, TIterator* iterGeantShower, HMatrixCategory* catmHGeantShower, TNtuple* single,TNtuple* pairs)

void fillVectorFromSeg(TLorentzVector& v, Int_t slot,Int_t type)
 fills vector v with one leg of a pair from slot in indextable with segment information
 type has to be 0 (segment from ideal tracking) or 1 (segments from reconstruction)

void fillVectorFromKine(TLorentzVector& v, Int_t slot)
 fills vector v with one leg of a pair from slot in indextable with kine information

void kineToSegPhiThetaDeg(HGeantKine* kine,Float_t& theta,Float_t& phi)
 Convert geant mom to MDC phi/theta angle in degree

Float_t pairPhiToLabDeg(Float_t phi)
 Convert phi from TLorentzVector to phi Lab in degree

Float_t pairThetaToLabDeg(Float_t theta)
 Convert theta from TLorentzVector to theta Lab in degree

Float_t getLabPhiDeg(Int_t sector, Float_t phi)
 Convert MDC phi angle to the lab coordinate system  and degree

Float_t getThetaPairDeg(TLorentzVector& v)
 transform theta of vector to lab system and degree

Float_t getPhiPairDeg(TLorentzVector& v)
 transform phi of vector to lab system and degree

Bool_t finalize(void)

Int_t execute()



Inline Functions


               void resetDataArray()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)


Last update: Fri Jan 26 12:17:54 2007


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.