class AliTPCComparisonDraw: public TObject{ public: AliTPCComparisonDraw(){fTree = 0;} void SetIO(const char *fname = "cmpTracks.root"); void ResPt(); void Eff(); // TH1F * EffVsPt(const char* selection, const char * quality, Float_t min=0.15, Float_t max=3.); TH1F * EffVsRM(const char* selection, const char * quality, Float_t min=90, Float_t max=250, Int_t nBins=10); TH1F * EffVsRS(const char* selection, const char * quality, Float_t min=90, Float_t max=250, Int_t nBins=10); TH1F * ResPtvsPt(const char* selection, const char * quality, Float_t min=0.15, Float_t max=5., Int_t nBins=10); TH1F * MeanPtvsPt(const char* selection, const char * quality, Float_t min=0.15, Float_t max=5., Int_t nBins=10); // TH1F * ResdEdxvsN(const char* selection, const char * quality, Float_t min=50, Float_t max=150., Int_t nBins=10); // TH1F * MeandEdxvsN(const char* selection, const char * quality, Float_t min=50, Float_t max=150., Int_t nBins=10); static void AliLabelAxes(TH1* histo, const char* xAxisTitle, const char* yAxisTitle); Double_t* CreateLogBins(Int_t nBins, Double_t xMin, Double_t xMax); // static TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec); static TH1F* CreateResHisto(TH2F* hRes2, TH1F **phMean, Bool_t drawBinFits = kTRUE,Bool_t overflowBinFits = kFALSE); TTree * fTree; // ClassDef(AliTPCComparisonDraw,1) }; ClassImp(AliTPCComparisonDraw) //////////////////////////////////////////////////////////////////////// // // Start of implementation of the class digitRow // //////////////////////////////////////////////////////////////////////// const Int_t kgRowBytes = 32; class digitRow: public TObject { public: digitRow(); virtual ~digitRow(){;} void SetRow(Int_t row); Bool_t TestRow(Int_t row); digitRow & operator=(const digitRow &digOld); Int_t RowsOn(Int_t upto=8*kgRowBytes); Int_t Last(); Int_t First(); void Reset(); //private: UChar_t fDig[kgRowBytes]; ClassDef(digitRow,1) // container for digit pattern }; ClassImp(digitRow) //////////////////////////////////////////////////////////////////////// // // Start of implementation of the class AliTPCGenInfo // //////////////////////////////////////////////////////////////////////// class AliTPCGenInfo: public TObject { public: AliTPCGenInfo(); ~AliTPCGenInfo(); void Update(); AliTrackReference fTrackRef; // track reference saved in the output tree AliTrackReference fTrackRefOut; // decay track reference saved in the output tree AliTrackReference fTRdecay; // track reference at decay point TParticle fParticle; // generated particle Int_t fLabel; // track label Int_t fEventNr; // event number Int_t fMCtracks; // indication of how many times the track is retuturned back Int_t fPdg; //pdg code Float_t fDecayCoord[3]; // position of particle decay Double_t fVDist[4]; //distance of the particle vertex from primary vertex Bool_t fTPCdecay; //indicates decay in TPC Int_t fRowsWithDigitsInn; // number of rows with digits in the inner sectors Int_t fRowsWithDigits; // number of rows with digits in the outer sectors Int_t fRowsTrackLength; // last - first row with digit Int_t fDigitsInSeed; // digits in the default seed rows Float_t fPrim; // theoretical dedx in tpc according particle momenta and mass digitRow fRow; // information about digits row pattern TClonesArray * fReferences; //containner with all track references ClassDef(AliTPCGenInfo,1) // container for }; ClassImp(AliTPCGenInfo) class AliTPCGenV0Info: public TObject { public: AliTPCGenInfo fMCd; //info about daughter particle AliTPCGenInfo fMCm; //info about mother particle void Update(); // put some derived info to special field Double_t fDist1; //info about closest distance according closest MC - linear DCA Double_t fDist2; //info about closest distance parabolic DCA // Double_t fPdr[3]; //momentum at vertex daughter - according approx at DCA Double_t fPd[4]; //exact momentum from MC info Double_t fX[3]; //exact position of the vertex Double_t fXr[3]; //rec. position according helix // Double_t fPm[3]; //momentum at the vertex mother Double_t fAngle[3]; //three angels Double_t fRr; // rec position of the vertex Double_t fR; //exact r position of the vertex Int_t fPdg[2]; //pdg code of mother and daugter particles Int_t fLab[2]; //MC label of the partecle ClassDef(AliTPCGenV0Info,1) // container for }; ClassImp(AliTPCGenV0Info) void AliTPCGenV0Info::Update() { fPd[0] = fMCd.fParticle.Px(); fPd[1] = fMCd.fParticle.Py(); fPd[2] = fMCd.fParticle.Pz(); fPd[3] = fMCd.fParticle.P(); fX[0] = fMCd.fParticle.Vx(); fX[1] = fMCd.fParticle.Vy(); fX[2] = fMCd.fParticle.Vz(); fR = TMath::Sqrt( fX[0]*fX[0]+ fX[1]*fX[1]); fPdg[0] = fMCd.fParticle.GetPdgCode(); fPdg[1] = fMCm.fParticle.GetPdgCode(); // fLab[0] = fMCd.fParticle.GetUniqueID(); fLab[1] = fMCm.fParticle.GetUniqueID(); } ///////////////////////////////////////////////////////////////////////// class AliTPCRecInfo: public TObject { public: AliTPCRecInfo(){fTP = new TClonesArray("AliTPCTrackPoint2",0);} ~AliTPCRecInfo(){if (fTP) {fTP->Delete();delete fTP;}} // AliTPCtrack fTPCTrack; // tpc track Float_t fTRLocalCoord[3]; //local coordinates of the track ref. Int_t fReconstructed; //flag if track was reconstructed Double_t fRecPhi; // reconstructed phi angle (0;2*kPI) Double_t fLambda; // reconstructed Double_t fRecPt_1; // reconstructed Float_t fdEdx; // reconstructed dEdx Int_t fFake; // fake track Int_t fMultiple; // number of reconstructions TClonesArray *fTP; //!container with track points void Reset(); // ClassDef(AliTPCRecInfo,1) // container for }; ClassImp(AliTPCRecInfo) void AliTPCRecInfo::Reset() { fMultiple =0; fFake =0; fReconstructed=0; fRecPhi =0; fLambda =0; } ///////////////////////////////////////////////////////// ///////////////////////////////////////////////////////// ///////////////////////////////////////////////////////// class AliTPCRecV0Info: public TObject { public: AliTPCRecInfo fT1; //track1 AliTPCRecInfo fT2; //track2 Double_t fDist1; //info about closest distance according closest MC - linear DCA Double_t fDist2; //info about closest distance parabolic DCA // Double_t fPdr[3]; //momentum at vertex daughter - according approx at DCA Double_t fXr[3]; //rec. position according helix // Double_t fPm[3]; //momentum at the vertex mother Double_t fAngle[3]; //three angles Double_t fRr; // rec position of the vertex Int_t fLab[2]; //MC label of the partecle ClassDef(AliTPCRecV0Info,1) // container for }; ClassImp(AliTPCRecV0Info) //////////////////////////////////////////////////////////////////////// // // Start of implementation of the class TPCFindGenTracks // //////////////////////////////////////////////////////////////////////// class TPCFindGenTracks { public: TPCFindGenTracks(); TPCFindGenTracks(const char * fnGalice, const char* fnRes ="genTracks.root", Int_t nEvents=1, Int_t firstEvent=0); virtual ~TPCFindGenTracks(); void Reset(); Int_t Exec(); Int_t Exec(Int_t nEvents, Int_t firstEventNr); void CreateTreeGenTracks(); void CloseOutputFile(); Int_t TreeKLoop(); Int_t TreeTRLoop(); Int_t TreeDLoop(); //void FillInfo(Int_t iParticle); void SetFirstEventNr(Int_t i) {fFirstEventNr = i;} void SetNEvents(Int_t i) {fNEvents = i;} void SetDebug(Int_t level) {fDebug = level;} Int_t SetIO(Int_t eventNr); Int_t CloseIOEvent(); Int_t CloseIO(); Int_t SetIO(); Float_t TR2LocalX(AliTrackReference *trackRef, AliTPCParam *paramTPC); public: AliTPCGenInfo* fMCInfo; //! information writen per particle Int_t fDebug; //! debug flag Int_t fEventNr; //! current event number Int_t fLabel; //! track label Int_t fNEvents; //! number of events to process Int_t fFirstEventNr; //! first event to process Int_t fNParticles; //! number of particles in TreeK TTree *fTreeGenTracks; //! output tree with generated tracks char fFnRes[1000]; //! output file name with stored tracks TFile *fFileGenTracks; //! output file with stored fTreeGenTracks // AliRunLoader * fLoader; //! pointer to the run loader TTree * fTreeD; //! current tree with digits TTree * fTreeTR; //! current tree with TR AliStack *fStack; //! current stack // digitRow *fContainerDigitRow; //! big container for partial information // AliTrackReference *fReferences; //! container with track references Int_t *fReferenceIndex0; //! first index for given track Int_t *fReferenceIndex1; //! last index for given track AliTrackReference *fDecayRef; //! container with decay track references // AliTPCParam* fParamTPC; //! AliTPCParam Double_t fVPrim[3]; //! primary vertex position // the fVDist[3] contains size of the 3-vector private: // some constants for the original non-pareller tracking (by Y.Belikov) static const Int_t seedRow11 = 158; // nRowUp - 1 static const Int_t seedRow12 = 139; // nRowUp - 1 - (Int_t) 0.125*nRowUp static const Int_t seedRow21 = 149; // seedRow11 - shift static const Int_t seedRow22 = 130; // seedRow12 - shift static const Double_t kRaddeg = 180./3.14159265358979312; static const Int_t fgMaxIndexTR = 50000; // maximum number of tracks with a track ref static const Int_t fgMaxTR = 1000000; // maximum number of track refs static const Int_t fgMaxParticles = 2000000; // maximum number of generated particles static const Double_t fgPtCut = 0.05; // do not store particles with generated pT less than this ClassDef(TPCFindGenTracks,1) // class which creates and fills tree with TPCGenTrack objects }; ClassImp(TPCFindGenTracks) //////////////////////////////////////////////////////////////////////// // // Start of implementation of the class TPCCmpTr // //////////////////////////////////////////////////////////////////////// class TPCCmpTr { public: TPCCmpTr(); TPCCmpTr(const char* fnGenTracks, const char* fnCmpRes ="cmpTracks.root", const char* fnGalice ="galice.root", Int_t nEvents=1, Int_t firstEvent=0); virtual ~TPCCmpTr(); void Reset(); Int_t Exec(); Int_t Exec(Int_t nEvents, Int_t firstEventNr); Int_t SetIO(); Int_t SetIO(Int_t eventNr ); void CreateTreeCmp(); void CloseOutputFile(); Bool_t ConnectGenTree(); Int_t TreeGenLoop(Int_t eventNr); Int_t TreeTLoop(Int_t eventNr); void SetFirstEventNr(Int_t i) {fFirstEventNr = i;} void SetNEvents(Int_t i) {fNEvents = i;} void SetDebug(Int_t level) {fDebug = level;} // tmp method, should go to TrackReferenceTPC TVector3 TR2Local(AliTrackReference *trackRef, AliTPCParam *paramTPC); private: Int_t fEventNr; //! current event number Int_t fNEvents; //! number of events to process Int_t fFirstEventNr; //! first event to process // char fFnCmp[1000]; //! output file name with cmp tracks TFile *fFileCmp; //! output file with cmp tracks TTree *fTreeCmp; //! output tree with cmp tracks // char fFnGenTracks[1000]; //! input file name with gen tracks TFile *fFileGenTracks; TTree *fTreeGenTracks; // // AliRunLoader * fLoader; //! pointer to the run loader TTree *fTreeRecTracks; //! tree with reconstructed tracks TTree *fTreePoints; //! tree with reconstructed points // Int_t *fIndexRecTracks; //! index of particle label in the TreeT_TPC Int_t *fFakeRecTracks; //! number of fake tracks Int_t *fMultiRecTracks; //! number of multiple reconstructions // TObjArray * fTracks; //!container with tracks TObjArray * fTrackPoints; //! container with track points // AliTPCParam* fParamTPC; //! AliTPCParam Int_t fNParticles; //! number of particles in the input tree genTracks Int_t fDebug; //! debug flag Int_t fNextTreeGenEntryToRead; //! last entry already read from genTracks tree // AliTPCGenInfo* fMCInfo; //! MC information writen per particle AliTPCRecInfo* fRecInfo; //! Rec. information writen per particle // AliTPCtrack *fTPCTrack; //! pointer to TPC track to connect branch ClassDef(TPCCmpTr,1) // class which creates and fills tree with TPCGenTrack objects }; ClassImp(TPCCmpTr)