FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
PndRichReco Class Reference

#include <PndRichReco.h>

Public Member Functions

 PndRichReco ()
 
 PndRichReco (UInt_t version)
 
virtual ~PndRichReco ()
 
void Init ()
 
void Register ()
 
void SetGeoVersion (UInt_t version)
 
void RichFullReconstruction (TVector3 pos, TVector3 dir, Float_t ts, Float_t &chi2, Float_t &chTh, Float_t &dChTh, Int_t &nph)
 
std::vector< double > GetPhis ()
 
std::vector< double > GetThetas ()
 
std::vector< double > GetDThetas ()
 
std::vector< PndRichPhotonCherenkovPhotonListFlat (PndRichBarPoint *track)
 
double BetaPeakFinding (std::vector< PndRichPhoton > photons, Double_t nopt, Double_t nnz)
 
void HitSelection (std::vector< size_t > &it, std::vector< double > &ph, std::vector< double > &th, std::vector< PndRichPhoton > photons, Double_t beta, Double_t nopt, Double_t nnz, Double_t dthc)
 
void AppendFlatMirrorReflections (std::vector< PndRichPhoton > &ph, TVector3 hit, Double_t hitTime, PndRichBarPoint *track)
 

Private Attributes

TClonesArray * fRichPDHit
 
PndRichGeofGeo
 PndRichPDHit TCA. More...
 
UInt_t fEvent
 
UInt_t fGeoVersion
 
UInt_t fGeoVersionMirr
 
UInt_t fParticleID
 
Double_t fMirrorLength
 
TVector3 fTrackPosition
 
TVector3 fTrackDirection
 
std::vector< PndRichMirrorSegmentfMirrSegs
 
Double_t fPhDetAngle
 
Double_t fZamid
 
Double_t fTrackTime
 
TVectorT< double > gResVect
 
TMatrixT< double > gRotMatr
 

Detailed Description

Definition at line 23 of file PndRichReco.h.

Constructor & Destructor Documentation

PndRichReco::PndRichReco ( )

Definition at line 434 of file PndRichReco.cxx.

References fGeoVersion, Init(), and Register().

434  :
435  fRichPDHit(0),
436  fGeo(NULL),
437  fEvent(0),
438  fGeoVersion(0),
439  fGeoVersionMirr(0),
440  fParticleID(0),
441  fMirrorLength(0.),
442  fTrackPosition(0.,0.,0.),
443  fTrackDirection(0.,0.,0.),
444  fMirrSegs(),
445  fPhDetAngle(0.),
446  fZamid(0.),
447  gResVect(),
448  gRotMatr()
449 {
450  fGeoVersion = 313;
451  Init(); // init geometry parameters
452  Register();
453 
454 //-----------------------------------------------------
455 }
std::vector< PndRichMirrorSegment > fMirrSegs
Definition: PndRichReco.h:39
TVector3 fTrackDirection
Definition: PndRichReco.h:37
Double_t fPhDetAngle
Definition: PndRichReco.h:41
TClonesArray * fRichPDHit
Definition: PndRichReco.h:28
Double_t fZamid
Definition: PndRichReco.h:42
UInt_t fEvent
Definition: PndRichReco.h:31
TVectorT< double > gResVect
Definition: PndRichReco.h:44
PndRichGeo * fGeo
PndRichPDHit TCA.
Definition: PndRichReco.h:30
Double_t fMirrorLength
Definition: PndRichReco.h:35
UInt_t fParticleID
Definition: PndRichReco.h:34
void Register()
UInt_t fGeoVersionMirr
Definition: PndRichReco.h:33
TVector3 fTrackPosition
Definition: PndRichReco.h:36
TMatrixT< double > gRotMatr
Definition: PndRichReco.h:45
UInt_t fGeoVersion
Definition: PndRichReco.h:32
PndRichReco::PndRichReco ( UInt_t  version)

Definition at line 458 of file PndRichReco.cxx.

References Init(), and Register().

459  :
460  fRichPDHit(0),
461  fGeo(NULL),
462  fEvent(0),
463  fGeoVersion(version),
464  fGeoVersionMirr(0),
465  fParticleID(0),
466  fMirrorLength(0.),
467  fTrackPosition(0.,0.,0.),
468  fTrackDirection(0.,0.,0.),
469  fMirrSegs(),
470  fPhDetAngle(0.),
471  fZamid(0.),
472  gResVect(),
473  gRotMatr()
474 {
475  Init(); // init geometry parameters
476  Register();
477 
478 //-----------------------------------------------------
479 }
std::vector< PndRichMirrorSegment > fMirrSegs
Definition: PndRichReco.h:39
TVector3 fTrackDirection
Definition: PndRichReco.h:37
Double_t fPhDetAngle
Definition: PndRichReco.h:41
TClonesArray * fRichPDHit
Definition: PndRichReco.h:28
Double_t fZamid
Definition: PndRichReco.h:42
UInt_t fEvent
Definition: PndRichReco.h:31
TVectorT< double > gResVect
Definition: PndRichReco.h:44
PndRichGeo * fGeo
PndRichPDHit TCA.
Definition: PndRichReco.h:30
Double_t fMirrorLength
Definition: PndRichReco.h:35
UInt_t fParticleID
Definition: PndRichReco.h:34
void Register()
UInt_t fGeoVersionMirr
Definition: PndRichReco.h:33
TVector3 fTrackPosition
Definition: PndRichReco.h:36
TMatrixT< double > gRotMatr
Definition: PndRichReco.h:45
UInt_t fGeoVersion
Definition: PndRichReco.h:32
PndRichReco::~PndRichReco ( )
virtual

Definition at line 426 of file PndRichReco.cxx.

427 {
428  //
429  FairRootManager *fManager =FairRootManager::Instance();
430  fManager->Write();
431 }

Member Function Documentation

void PndRichReco::AppendFlatMirrorReflections ( std::vector< PndRichPhoton > &  ph,
TVector3  hit,
Double_t  hitTime,
PndRichBarPoint track 
)

Definition at line 819 of file PndRichReco.cxx.

References fMirrSegs, i, phot, PndRichPhoton::SetHitPos(), PndRichPhoton::SetHitTime(), PndRichPhoton::SetMirror(), PndRichPhoton::SetTrack(), and PndRichPhoton::TrackCalc().

Referenced by CherenkovPhotonListFlat().

822  {
824  phot.SetHitPos(hit);
825  phot.SetHitTime(hitTime);
826  phot.SetTrack(track);
827  //phot.SetTrackPos(pos);
828  //phot.SetTrackDir(dir);
829  //phot.SetDTime(time);
830  vector<PndRichMirrorSegment*> segs;
831  // direct photon tracks
832  if (phot.TrackCalc()) ph.push_back(phot);
833  // single reflection photon tracks
834  for(UInt_t i=0; i<fMirrSegs.size(); i++) {
835  segs.clear();
836  segs.push_back(&fMirrSegs[i]);
837  phot.SetMirror(segs);
838  if (phot.TrackCalc()) ph.push_back(phot);
839  }
840  // double reflection photon tracks
841  for(UInt_t i=0; i<fMirrSegs.size()-1; i++) {
842  for(UInt_t j=i+1; j<fMirrSegs.size(); j++) {
843  segs.clear();
844  segs.push_back(&fMirrSegs[i]);
845  segs.push_back(&fMirrSegs[j]);
846  phot.SetMirror(segs);
847  if (phot.TrackCalc()) ph.push_back(phot);
848  }
849  }
850 }
std::vector< PndRichMirrorSegment > fMirrSegs
Definition: PndRichReco.h:39
void SetMirror(std::vector< PndRichMirrorSegment * > mirrors)
TLorentzVector phot
void SetTrack(PndRichBarPoint *track)
Int_t i
Definition: run_full.C:25
void SetHitPos(TVector3 hit)
void SetHitTime(Double_t hitTime)
virtual bool TrackCalc()
PndSdsMCPoint * hit
Definition: anasim.C:70
double PndRichReco::BetaPeakFinding ( std::vector< PndRichPhoton photons,
Double_t  nopt,
Double_t  nnz 
)

Definition at line 674 of file PndRichReco.cxx.

References b, Double_t, fabs(), fTrackTime, and i.

Referenced by RichFullReconstruction().

676  {
677  // beta peak finding
678  Int_t nch = 60;
679  Double_t bmin = 1.0/nopt;
680  Double_t bmax = 1+(1-bmin)*0.2;
681  //Double_t dbeta = (bmax-bmin)/nch; //[R.K. 01/2017] unused variable?
682  Double_t beta = 1.0;
683  //Double_t thcmin = 0; //[R.K. 01/2017] unused variable?
684  //Double_t thcmax = std::acos(bmin); //[R.K. 01/2017] unused variable?
685  Double_t bim = 0;
686  Int_t ibm = -1;
687  Double_t dtm = 3;//0.5;
688  int nph = 0;
689  for(size_t j=0; j<2; j++) {
690  std::vector<Double_t> bi(nch,0);
691  bim = 0;
692  ibm = -1;
693  nph = 0;
694  for(UInt_t i=0; i<photons.size(); i++) {
695  Double_t thcc = photons.at(i).GetTheta();
696  Double_t phcc = photons.at(i).GetPhi();
697  Double_t thcm = thc(phcc,nopt,beta,nnz);
698  Double_t b = bmin+thcc*(beta-bmin)/thcm;
699  Int_t ib = (b-bmin)/(bmax-bmin)*nch;
700  Double_t dt = photons.at(i).GetTime() - fTrackTime;
701  if ((ib>=0)&&(ib<nch)&&std::fabs(dt)<dtm) {
702  nph++;
703  bi.at(ib)++;
704  if (bim<bi.at(ib)) {
705  bim = bi.at(ib);
706  ibm = ib;
707  }
708  }
709  }
710  beta = bmin+ibm*(bmax-bmin)/nch;
711  }
712  return beta;
713 }
Int_t i
Definition: run_full.C:25
TTree * b
Double_t fTrackTime
Definition: PndRichReco.h:43
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
std::vector< PndRichPhoton > PndRichReco::CherenkovPhotonListFlat ( PndRichBarPoint track)

Definition at line 793 of file PndRichReco.cxx.

References AppendFlatMirrorReflections(), Double_t, fGeoVersionMirr, fMirrorLength, fRichPDHit, PndRichPDHit::GetPosition(), PndRichPDHit::GetTime(), hit, and nHits.

Referenced by RichFullReconstruction().

793  {
794  size_t nHits = fRichPDHit->GetEntriesFast();
795  PndRichPDHit* richPDHit = NULL;
796  std::vector<PndRichPhoton> ph;
797  for(size_t ih=0; ih<nHits; ih++ ) {
798  //
799  richPDHit = (PndRichPDHit*) fRichPDHit->At(ih);
800  TVector3 hit = richPDHit->GetPosition();
801  Double_t hitTime = richPDHit->GetTime();
802  AppendFlatMirrorReflections(ph,hit,hitTime,track);
803  //
804  if ((fGeoVersionMirr>=21)&&(fGeoVersionMirr<=29)) {
805  Double_t x_hit = hit.X();
806  // left mirror
807  TVector3 hitLeft = richPDHit->GetPosition();
808  hitLeft.SetX(fMirrorLength - x_hit);
809  AppendFlatMirrorReflections(ph,hitLeft,hitTime,track);
810  // right mirror
811  TVector3 hitRight = richPDHit->GetPosition();
812  hitRight.SetX(-fMirrorLength - x_hit);
813  AppendFlatMirrorReflections(ph,hitRight,hitTime,track);
814  }
815  }
816  return ph;
817 }
TClonesArray * fRichPDHit
Definition: PndRichReco.h:28
Double_t fMirrorLength
Definition: PndRichReco.h:35
int nHits
Definition: RiemannTest.C:16
void AppendFlatMirrorReflections(std::vector< PndRichPhoton > &ph, TVector3 hit, Double_t hitTime, PndRichBarPoint *track)
Double_t
virtual Double_t GetTime()
Definition: PndRichPDHit.h:47
TVector3 GetPosition() const
Definition: PndRichPDHit.h:50
UInt_t fGeoVersionMirr
Definition: PndRichReco.h:33
PndSdsMCPoint * hit
Definition: anasim.C:70
std::vector< double > PndRichReco::GetDThetas ( )

Definition at line 666 of file PndRichReco.cxx.

References i, and n.

Referenced by PndRichRecoTask::Exec().

666  {
667  size_t n = fi.size();
668  std::vector<double> dth(n);
669  for(size_t i=0;i<n;i++)
670  dth.at(i) = ti.at(i) - thc(fi.at(i),nopt_,beta_,nnz_);
671  return dth;
672 }
Int_t i
Definition: run_full.C:25
int n
TFile * fi
std::vector< double > PndRichReco::GetPhis ( )

Definition at line 662 of file PndRichReco.cxx.

References fi.

Referenced by PndRichRecoTask::Exec().

662 { return fi; };
TFile * fi
std::vector< double > PndRichReco::GetThetas ( )

Definition at line 664 of file PndRichReco.cxx.

Referenced by PndRichRecoTask::Exec().

664 { return ti; };
void PndRichReco::HitSelection ( std::vector< size_t > &  it,
std::vector< double > &  ph,
std::vector< double > &  th,
std::vector< PndRichPhoton photons,
Double_t  beta,
Double_t  nopt,
Double_t  nnz,
Double_t  dthc 
)

Definition at line 715 of file PndRichReco.cxx.

References Double_t, fabs(), fTrackTime, hit, and i.

Referenced by RichFullReconstruction().

722  {
723  //
724  it.resize(photons.size());
725  ph.resize(photons.size());
726  th.resize(photons.size());
727  Double_t hitx, hity = 10;
728  Double_t thccc, phccc, dthccc = 10;
729  //Double_t dthc = 0.03;
730  size_t itccc;
731  Double_t dt = 0;
732  Int_t ind = 0;
733  Double_t dtm = 3;
734  for(UInt_t i=0; i<photons.size(); i++) {
735  TVector3 hit = photons.at(i).GetHitPos();
736  //th.at(ind) = photons.at(i).GetTheta();
737  //ph.at(ind) = photons.at(i).GetPhi();
738  //ind++;
739  if (((hit.X()!=hitx)||(hit.Y()!=hity))&&(hity!=10)) {
740  Double_t thcm = thc(phccc,nopt,beta,nnz);
741  if (std::fabs(thccc-thcm)<dthc && std::fabs(dt)<dtm) {
742  it.at(ind) = itccc;
743  th.at(ind) = thccc;
744  ph.at(ind) = phccc;
745  ind++;
746  }
747  dthccc = 10;
748  }
749  Double_t thcc = photons.at(i).GetTheta();
750  Double_t phcc = photons.at(i).GetPhi();
751  Double_t thcm = thc(phcc,nopt,beta,nnz);
752  Double_t dthccl = std::fabs(thcc-thcm);
753  if (dthccl<dthccc) {
754  itccc = i;
755  dthccc = dthccl;
756  thccc = thcc;
757  phccc = phcc;
758  dt = photons.at(i).GetTime() - fTrackTime;
759  }
760  hitx = hit.X();
761  hity = hit.Y();
762  }
763  Double_t thcm = thc(phccc,nopt,beta,nnz);
764  if (std::fabs(thccc-thcm)<dthc && std::fabs(dt)<dtm) {
765  it.at(ind) = itccc;
766  th.at(ind) = thccc;
767  ph.at(ind) = phccc;
768  ind++;
769  }
770  //
771  /*
772  ph.resize(photons.size());
773  th.resize(photons.size());
774  Double_t dthc = 0.02;
775  Int_t ind = 0;
776  for(UInt_t i=0; i<photons.size(); i++) {
777  Double_t thcc = photons.at(i).GetTheta();
778  Double_t phcc = photons.at(i).GetPhi();
779  Double_t thcm = thc(phcc,nopt,beta,nnz);
780  if (std::fabs(thcc-thcm)<dthc) {
781  th.at(ind) = thcc;
782  ph.at(ind) = phcc;
783  ind++;
784  }
785  }*/
786  it.resize(ind);
787  ph.resize(ind);
788  th.resize(ind);
789 }
Int_t i
Definition: run_full.C:25
Double_t fTrackTime
Definition: PndRichReco.h:43
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
PndSdsMCPoint * hit
Definition: anasim.C:70
void PndRichReco::Init ( )

Definition at line 481 of file PndRichReco.cxx.

References PndRichGeo::aerogelOffset(), PndRichGeo::aerogelSize(), Double_t, fabs(), fEvent, fGeo, fGeoVersion, fGeoVersionMirr, PndRichGeo::flatMirrorYGlob(), PndRichGeo::flatMirrorZGlob(), fMirrorLength, fMirrSegs, fPhDetAngle, fRichPDHit, fZamid, gResVect, gRotMatr, i, PndRichGeo::init(), PndRichGeo::mirrorLength(), PndRichGeo::phDetAngle(), PndRichGeo::phDetY(), PndRichGeo::phDetZ(), Pi, pnt, point, PndRichGeo::richOffset(), PndRichMirrorSegment::SetDimensions(), PndRichMirrorSegment::SetNormal(), and PndRichMirrorSegment::SetPoint().

Referenced by PndRichReco().

482 {
483  size_t nlayers = (fGeoVersion%1000)/100;
485  nlayers = nlayers ? nlayers : 3;
486 
487  FairRootManager *fManager = FairRootManager::Instance();
488  fGeo = new PndRichGeo();
490  fRichPDHit = dynamic_cast<TClonesArray *> (fManager->GetObject("RichPDHit"));
491  //
492  TVector3 richOffset = fGeo->richOffset();
493  TVector3 aerogelOffset = fGeo->aerogelOffset();
494  TVector3 aerogelSize = fGeo->aerogelSize();
495  Double_t zain = richOffset.Z() + aerogelOffset.Z();
496  fZamid = zain + 0.5*aerogelSize.Z(); // midle position of the point of cherenkov photons emission
497  //fZamid = zain + 0.69075*aerogelSize.Z(); // optimal position of the point of cherenkov photons emission
498  //
500  std::vector<Double_t> flatMirrorY = fGeo->flatMirrorYGlob();
501  std::vector<Double_t> flatMirrorZ = fGeo->flatMirrorZGlob();
502  //
503  std::vector<Double_t> phDetY = fGeo->phDetY();
504  std::vector<Double_t> phDetZ = fGeo->phDetZ();
505  TVector3 pPhDet = TVector3(0,phDetY[0],phDetZ[0]+zain);
506  TVector3 nPhDet = TVector3(0,phDetZ[0]-phDetZ[1],phDetY[1]-phDetY[0]).Unit();
507  Int_t ns = flatMirrorY.size()-2;
508  TVector3 pnt, point;
509  for(int i=ns; i>=0; i--) {
510  pnt = TVector3(0,flatMirrorY[i],flatMirrorZ[i]);
511  point = pnt-2*nPhDet*((pnt-pPhDet)*nPhDet);
512  flatMirrorY.push_back(point.Y());
513  flatMirrorZ.push_back(point.Z());
514  }
515  //
517  for(UInt_t i=0; i<flatMirrorY.size()-1; i++) {
518  PndRichMirrorSegment mirrSeg;
519  // middle point on the mirror segment
520  Double_t xm = 0;
521  Double_t ym = (flatMirrorY[i+1]+flatMirrorY[i])/2;
522  Double_t zm = (flatMirrorZ[i+1]+flatMirrorZ[i])/2;
523  mirrSeg.SetPoint(TVector3(xm,ym,zm));
524  // size of the flat mirror segment
525  Double_t dxm = 3*fMirrorLength/2;
526  Double_t dym = std::fabs(flatMirrorY[i+1]-flatMirrorY[i])/2;
527  Double_t dzm = std::fabs(flatMirrorZ[i+1]-flatMirrorZ[i])/2;
528  mirrSeg.SetDimensions(TVector3(dxm,dym,dzm));
529  // normal vector of the flat mirror segment
530  TVector3 norm = (TVector3(-1,0,0).Cross(TVector3(0,
531  flatMirrorY[i+1]-flatMirrorY[i],
532  flatMirrorZ[i+1]-flatMirrorZ[i]))).Unit();
533  mirrSeg.SetNormal(norm.Unit());
534  fMirrSegs.push_back(mirrSeg);
535  }
536  for(UInt_t i=0; i<flatMirrorY.size()-1; i++) {
537  PndRichMirrorSegment mirrSeg;
538  // middle point on the mirror segment
539  Double_t xm = 0;
540  Double_t ym = -(flatMirrorY[i+1]+flatMirrorY[i])/2;
541  Double_t zm = (flatMirrorZ[i+1]+flatMirrorZ[i])/2;
542  mirrSeg.SetPoint(TVector3(xm,ym,zm));
543  // size of the flat mirror segment
544  Double_t dxm = 3*fMirrorLength/2;
545  Double_t dym = std::fabs(flatMirrorY[i+1]-flatMirrorY[i])/2;
546  Double_t dzm = std::fabs(flatMirrorZ[i+1]-flatMirrorZ[i])/2;
547  mirrSeg.SetDimensions(TVector3(dxm,dym,dzm));
548  // normal vector of the flat mirror segment
549  TVector3 norm = (TVector3(-1,0,0).Cross(TVector3(0,
550  -flatMirrorY[i+1]+flatMirrorY[i],
551  flatMirrorZ[i+1]-flatMirrorZ[i]))).Unit();
552  mirrSeg.SetNormal(norm.Unit());
553  fMirrSegs.push_back(mirrSeg);
554  }
555  fEvent = 0;
556 
557  // covariance matrix of track resolutions (for test)
558  double scal = TMath::Pi()/180;
559  double sigx = 0.1, sigy = 0.2, rhoxy = 0.3;
560  double sigt = 0.3*scal, sigf = 0.5*scal, rhotf = -0.5;
561  TMatrixT<double> covMatr(4,4);
562 
563  for(int i=0;i<4;i++)
564  for(int j=0;j<4;j++)
565  covMatr[i][j] = 0;
566  covMatr[0][0] = sigx*sigx;
567  covMatr[0][1] = sigx*sigy*rhoxy;
568  covMatr[1][0] = covMatr[0][1];
569  covMatr[1][1] = sigy*sigy;
570  covMatr[2][2] = sigt*sigt;
571  covMatr[2][3] = sigt*sigf*rhotf;
572  covMatr[3][2] = covMatr[2][3];
573  covMatr[3][3] = sigf*sigf;
574 
575  gResVect.ResizeTo(4);
576  gRotMatr.ResizeTo(4,4);
577  gRotMatr = covMatr.EigenVectors(gResVect);
578  covMatr.Print();
579  gRotMatr.Print();
580  gResVect.Print();
581 
582  gInvCovMatr.ResizeTo(4,4);
583  gInvCovMatr = covMatr.Invert();
584 
585 }
std::vector< PndRichMirrorSegment > fMirrSegs
Definition: PndRichReco.h:39
TVector3 aerogelOffset()
Definition: PndRichGeo.h:129
Int_t i
Definition: run_full.C:25
std::vector< Double_t > phDetZ()
Definition: PndRichGeo.h:183
TVector3 aerogelSize()
Definition: PndRichGeo.h:126
Double_t fPhDetAngle
Definition: PndRichReco.h:41
TClonesArray * pnt
void SetPoint(TVector3 point)
TClonesArray * fRichPDHit
Definition: PndRichReco.h:28
std::vector< Double_t > phDetY()
Definition: PndRichGeo.h:180
Double_t fZamid
Definition: PndRichReco.h:42
UInt_t fEvent
Definition: PndRichReco.h:31
void SetNormal(TVector3 normal)
TVectorT< double > gResVect
Definition: PndRichReco.h:44
PndRichGeo * fGeo
PndRichPDHit TCA.
Definition: PndRichReco.h:30
Double_t fMirrorLength
Definition: PndRichReco.h:35
Double_t
void init(size_t ver=0)
Definition: PndRichGeo.cxx:82
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
std::vector< Double_t > flatMirrorZGlob()
Definition: PndRichGeo.h:177
UInt_t fGeoVersionMirr
Definition: PndRichReco.h:33
Double_t phDetAngle()
Definition: PndRichGeo.h:102
void SetDimensions(TVector3 dims)
Double_t mirrorLength()
Definition: PndRichGeo.h:153
TVector3 richOffset()
Definition: PndRichGeo.h:117
TMatrixT< double > gRotMatr
Definition: PndRichReco.h:45
UInt_t fGeoVersion
Definition: PndRichReco.h:32
Double_t Pi
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
std::vector< Double_t > flatMirrorYGlob()
Definition: PndRichGeo.h:174
void PndRichReco::Register ( )

This will create a branch in the output tree called PndRichPDPoint, setting the last parameter to kFALSE means: this collection will not be written to the file, it will exist only during the simulation.

Definition at line 852 of file PndRichReco.cxx.

Referenced by PndRichReco().

853 {
854 
861 }
void PndRichReco::RichFullReconstruction ( TVector3  pos,
TVector3  dir,
Float_t  ts,
Float_t &  chi2,
Float_t &  chTh,
Float_t &  dChTh,
Int_t &  nph 
)

Definition at line 588 of file PndRichReco.cxx.

References BetaPeakFinding(), CherenkovPhotonListFlat(), Double_t, evt, fEvent, fGeoVersionMirr, fRichPDHit, fTrackTime, fZamid, gResVect, gRotMatr, HitSelection(), i, pos, sqrt(), and ts.

Referenced by PndRichRecoTask::Exec().

589  {
590 
591  if ( fRichPDHit->GetEntriesFast()==0 ) return;
592 
593  // randomization with correlation of ideal track parameters (for test)
594  TVectorT<double> evt(4), evto(4);
595  for(int i=0;i<4;i++)
596  evt[i] = 0*gRandom->Gaus(0,sqrt(gResVect[i]));
597  evto = gRotMatr*evt;
598 
599  // finding position of the track in middle depth of the aerogel bar
600  Double_t tam = (fZamid-pos0.Z())/dir0.Z();
601  TVector3 pos = pos0 + tam*dir0 + TVector3(evto[0],evto[1],0.);
602 
603  TVector3 dir(1,0,0);
604  dir.SetTheta(dir0.Theta()+evto[2]);
605  dir.SetPhi(dir0.Phi()+evto[3]);
606  dir = dir.Unit();
607 
608  fTrackTime = ts;
609 
610  track = new PndRichBarPoint(pos,dir,ts);
611  xTrack = pos.X();
612  yTrack = pos.Y();
613  zTrack = pos.Z();
614  tTrack = dir.Theta();
615  fTrack = dir.Phi();
616 
617  // flat mirror
618  if (((fGeoVersionMirr>=11)&&(fGeoVersionMirr<=19))||
619  ((fGeoVersionMirr>=21)&&(fGeoVersionMirr<=29))) {
620  //std::vector<PndRichPhoton> photons;
621  beta_ = 1;
622  dbeta_ = 0;
623  photons = CherenkovPhotonListFlat(track);
624  if (photons.size()) {
625  Double_t nnz = dir.Z();
626  Double_t nopt = 1.05;
627  // beta peak finding
628  Double_t beta = BetaPeakFinding(photons,nopt,nnz);
629  // hits selection
630  HitSelection(it,fi,ti,photons,beta,nopt,nnz,0.03);
631  //
632  nopt_ = nopt;
633  beta_ = beta;
634  nnz_ = nnz;
635  Minimizer_v1();
636 
637  // hits selection
638  HitSelection(it,fi,ti,photons,beta_,nopt_,nnz_,0.01);
639  Minimizer_v1();
640 
641  // fit with track parameters
642  xTrack_ = xTrack;
643  yTrack_ = yTrack;
644  tTrack_ = tTrack;
645  fTrack_ = fTrack;
646  dxTrack_ = 0.001;
647  dyTrack_ = 0.001;
648  dtTrack_ = 0.001;
649  dfTrack_ = 0.001;
650  //Minimizer_v2();
651  }
652 
653  chi2 = chi2_;
654  chTh = beta_;
655  dChTh = dbeta_;
656  nph = fi.size();
657 
658  }
659  fEvent++;
660 }
TVector3 pos
void HitSelection(std::vector< size_t > &it, std::vector< double > &ph, std::vector< double > &th, std::vector< PndRichPhoton > photons, Double_t beta, Double_t nopt, Double_t nnz, Double_t dthc)
Int_t i
Definition: run_full.C:25
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
int evt
Definition: checkhelixhit.C:36
TClonesArray * fRichPDHit
Definition: PndRichReco.h:28
Double_t fZamid
Definition: PndRichReco.h:42
UInt_t fEvent
Definition: PndRichReco.h:31
double BetaPeakFinding(std::vector< PndRichPhoton > photons, Double_t nopt, Double_t nnz)
TVectorT< double > gResVect
Definition: PndRichReco.h:44
TFile * fi
Double_t fTrackTime
Definition: PndRichReco.h:43
Double_t
PndMCTrack * track
Definition: anaLmdCluster.C:89
UInt_t fGeoVersionMirr
Definition: PndRichReco.h:33
TMatrixT< double > gRotMatr
Definition: PndRichReco.h:45
std::vector< PndRichPhoton > CherenkovPhotonListFlat(PndRichBarPoint *track)
PndPidEmcAssociatorTask * ts
void PndRichReco::SetGeoVersion ( UInt_t  version)
inline

Definition at line 57 of file PndRichReco.h.

References fGeoVersion.

57 { fGeoVersion = version; };
UInt_t fGeoVersion
Definition: PndRichReco.h:32

Member Data Documentation

UInt_t PndRichReco::fEvent
private

Definition at line 31 of file PndRichReco.h.

Referenced by Init(), and RichFullReconstruction().

PndRichGeo* PndRichReco::fGeo
private

PndRichPDHit TCA.

Definition at line 30 of file PndRichReco.h.

Referenced by Init().

UInt_t PndRichReco::fGeoVersion
private

Definition at line 32 of file PndRichReco.h.

Referenced by Init(), PndRichReco(), and SetGeoVersion().

UInt_t PndRichReco::fGeoVersionMirr
private

Definition at line 33 of file PndRichReco.h.

Referenced by CherenkovPhotonListFlat(), Init(), and RichFullReconstruction().

Double_t PndRichReco::fMirrorLength
private

Definition at line 35 of file PndRichReco.h.

Referenced by CherenkovPhotonListFlat(), and Init().

std::vector<PndRichMirrorSegment> PndRichReco::fMirrSegs
private

Definition at line 39 of file PndRichReco.h.

Referenced by AppendFlatMirrorReflections(), and Init().

UInt_t PndRichReco::fParticleID
private

Definition at line 34 of file PndRichReco.h.

Double_t PndRichReco::fPhDetAngle
private

Definition at line 41 of file PndRichReco.h.

Referenced by Init().

TClonesArray* PndRichReco::fRichPDHit
private

Definition at line 28 of file PndRichReco.h.

Referenced by CherenkovPhotonListFlat(), Init(), and RichFullReconstruction().

TVector3 PndRichReco::fTrackDirection
private

Definition at line 37 of file PndRichReco.h.

TVector3 PndRichReco::fTrackPosition
private

Definition at line 36 of file PndRichReco.h.

Double_t PndRichReco::fTrackTime
private

Definition at line 43 of file PndRichReco.h.

Referenced by BetaPeakFinding(), HitSelection(), and RichFullReconstruction().

Double_t PndRichReco::fZamid
private

Definition at line 42 of file PndRichReco.h.

Referenced by Init(), and RichFullReconstruction().

TVectorT<double> PndRichReco::gResVect
private

Definition at line 44 of file PndRichReco.h.

Referenced by Init(), and RichFullReconstruction().

TMatrixT<double> PndRichReco::gRotMatr
private

Definition at line 45 of file PndRichReco.h.

Referenced by Init(), and RichFullReconstruction().


The documentation for this class was generated from the following files: