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

#include <PndDrcRecoLookupMap.h>

Inheritance diagram for PndDrcRecoLookupMap:

Public Member Functions

 PndDrcRecoLookupMap ()
 
 PndDrcRecoLookupMap (Int_t verbose)
 
virtual ~PndDrcRecoLookupMap ()
 
virtual InitStatus Init ()
 
virtual void Exec (Option_t *option)
 
virtual void Finish ()
 
void SetHistoWidth (double wid=0.01)
 
void SetNSigma (double nsig=3.)
 
void SetMagneticField (double mag=0.)
 
void SetOutputFile (TString outName="PndDrcRecoLookupMap_output.root")
 
void SetPlotStyle ()
 
void DrawDetectorLayout ()
 

Private Member Functions

void ProcessPhotonHit ()
 
void ProcessPhotonMC ()
 
void WriteToFile ()
 
void CreateHisto ()
 
void DrawHisto ()
 
void ProcessBarHit ()
 
virtual void SetParContainers ()
 
Double_t InBarCoordSyst (TVector3, TVector3 *, TVector3 *, TVector3 *, TVector3 *)
 
Double_t SectorNum (Double_t, Double_t)
 
Int_t NumberOfBounces (TVector3, TVector3, Int_t)
 
Double_t FindOutPoint (Double_t, Double_t, Double_t, Double_t *, Bool_t)
 
Double_t CherenkovPhi (TVector3, TVector3, Double_t *, Double_t *)
 
Double_t RecoAmbigTime (TVector3, TVector3, Double_t *, Bool_t)
 
void DrawBarBox (TVector3, TVector3, TVector3, TVector3)
 
void SetDefaultParameters ()
 

Private Attributes

Double_t fpi
 
Double_t fR
 
Double_t fzup
 
Double_t fzdown
 
Double_t fHThick
 
Double_t fBboxNum
 
Double_t fBarNum
 
Double_t fPipehAngle
 
Double_t fBarBoxGap
 
Double_t fLSide
 
Double_t fBarWidth
 
Double_t fDphi
 
PndDrcDigiParfDigiPar
 
Int_t fDetectorID
 
TClonesArray * fBarPointArray
 
TClonesArray * fPDPointArray
 
TClonesArray * fHitArray
 
TClonesArray * fPDHitArray
 
TClonesArray * fMCArray
 
TClonesArray * fDigiArray
 
TClonesArray * fDrcLutInfoArray
 
TList * fHistoList
 
PndGeoDrcfGeo
 Basic geometry data of barrel DRC. More...
 
PndGeoHandlingfGeoH
 
Int_t fVerbose
 
Int_t nevents
 
TString fOutputName
 
Double_t fWidth
 
Double_t fPixelSize
 
Double_t fHAngleInBDeg
 
Double_t fCHrecoMin
 
Double_t fCHrecoMax
 
Double_t fNSigma
 
Double_t fB
 
TVector3 fnX1
 
TVector3 fnY1
 
Double_t flambdah
 
Double_t fpixID
 
Double_t fxbar
 
Double_t fybar
 
Double_t fxPHit
 
Double_t fyPHit
 
Double_t fzPHit
 
Double_t ftime
 
Double_t ftime0
 
Double_t fPhiRot
 
TVector3 fPMo
 
TVector3 fPMoB
 
TVector3 fPphoInit
 
TVector3 fkBar
 
Double_t fWeight
 
Int_t fBarId
 
Bool_t print
 
Int_t NHitPix
 
Int_t NPixPar
 
Int_t NAmb
 
Double_t fkxBar
 
Double_t fkyBar
 
Double_t fkzBar
 
Double_t fPxMoBar
 
Double_t fPyMoBar
 
Double_t fPzMoBar
 
Double_t fxnew
 
Double_t fynew
 
Double_t CHexp
 
Double_t CHreal
 
TVector3 fPphoB
 
TVector3 fStartVertex
 
TVector3 fPphoPD
 
Double_t fPath
 
TVector3 fBBver1
 
TVector3 fBBver2
 
TVector3 fBBver3
 
TVector3 fBBver4
 
std::vector< TH1F * > PhiThetaPoints
 
std::vector< TH1F * > PhiThetaPointsCut
 
std::vector< TH1F * > PhiThetaPointsWeight
 
std::vector< TH1F * > NboPoints
 
TH2F * fMapHist
 
TH2F * fSigHist
 
TH2F * fCheHist
 
TH2F * fkBarXHist
 
TH2F * fkBarYHist
 
TF1 * timeres
 
TH1D * fhPDTime
 
TH2D * fhPDHits
 
TH1F * fhDiff
 
TH2F * fhRecoT1
 
TH1F * fhCHreal
 
TH1F * fhLam
 
TH2F * fhNboLam
 

Detailed Description

PndDrcRecoLookupMap.h

Class for Analysising DRC Cherenkov Photons with lookup tables for CHerenkov photons directions

Definition at line 49 of file PndDrcRecoLookupMap.h.

Constructor & Destructor Documentation

PndDrcRecoLookupMap::PndDrcRecoLookupMap ( )

Default constructor

Definition at line 55 of file PndDrcRecoLookupMap.cxx.

References fDigiPar, fGeo, and fGeoH.

56 :FairTask("PndDrcRecoLookupMap")
57 {
58  fGeo = new PndGeoDrc();
59  fGeoH=NULL;
60  fDigiPar = NULL;
61 }
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
PndDrcDigiPar * fDigiPar
PndGeoHandling * fGeoH
PndDrcRecoLookupMap::PndDrcRecoLookupMap ( Int_t  verbose)

Constructor with verbosity

Definition at line 64 of file PndDrcRecoLookupMap.cxx.

References fDigiPar, fGeo, fGeoH, fVerbose, and verbose.

65  :FairTask("PndDrcRecoLookupMap")
66 {
67  fVerbose = verbose;
68  fGeo = new PndGeoDrc();
69  fGeoH=NULL;
70  fDigiPar = NULL;
71 }
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
#define verbose
PndDrcDigiPar * fDigiPar
PndGeoHandling * fGeoH
PndDrcRecoLookupMap::~PndDrcRecoLookupMap ( )
virtual

Destructor

Definition at line 73 of file PndDrcRecoLookupMap.cxx.

References fGeo, fGeoH, and fHistoList.

74 {
75  if (fGeo) delete fGeo;
76  if (fGeoH) delete fGeoH;
77  fHistoList->Delete();
78  delete fHistoList;
79 }
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
PndGeoHandling * fGeoH

Member Function Documentation

Double_t PndDrcRecoLookupMap::CherenkovPhi ( TVector3  ,
TVector3  ,
Double_t ,
Double_t  
)
private
void PndDrcRecoLookupMap::CreateHisto ( )
private

Definition at line 809 of file PndDrcRecoLookupMap.cxx.

References fCheHist, fhCHreal, fhDiff, fHistoList, fhLam, fhNboLam, fhPDHits, fhPDTime, fhRecoT1, fkBarXHist, fkBarYHist, fMapHist, fPixelSize, fSigHist, and fWidth.

Referenced by Init().

810 {
811  // Histogram list
812  fHistoList = new TList();
813 
814  fhPDTime = new TH1D("fhPDTime","Time of photons in ns",1000,0,100);
815  fhRecoT1 = new TH2F("fhRecoT1","Reconstructed group velocity using MC track path [ns]", 500, 200.,700., 1000, 0., 40.);
816  fhPDHits = new TH2D("fhPDHits","Photon hits on the PD plane", 2500, -250, 250, 2500, -250, 250);
817 
818  fhDiff = new TH1F("fhDiff","Difference btw reco and expected Cherenkov Angle", 50, -fWidth, fWidth);
819 
820  fhCHreal = new TH1F("fhCHreal","Generated cherenkov angle", 100, 0.7, 0.9);
821  fhLam = new TH1F("fhLam","Lambda of detected Cherenkov photons", 480, 200., 800.);
822 
823  fhNboLam = new TH2F("fhNboLam", "Nbo as a function of lambda", 600, 200.,800., 100, 0.,500.);
824 
825  fHistoList->Add(fhPDTime);
826  fHistoList->Add(fhPDHits);
827  fHistoList->Add(fhDiff);
828  fHistoList->Add(fhCHreal);
829  fHistoList->Add(fhLam);
830  // also add temp histos
831  fHistoList->Add(fhRecoT1);
832  fHistoList->Add(fhNboLam);
833 
834  fPixelSize = 0.65;
835 
836  fMapHist = new TH2F("fMapHist","Photon yield",30,2.5,152.5,20,0.35,20.35);// 3 bars 41,0.35,20.85); //25,0.5,25.5);
837  fSigHist = new TH2F("fSigHist","fSigHist",30,2.5,152.5, 20,0.35,20.35);// 3 bars 41,0.35,20.85);//7 bars("fSigHist","fSigHist",30,2.5,152.5, 25,0.5,25.5);// 5 bars in bar box
838  fCheHist = new TH2F("fCheHist","fCheHist",30,2.5,152.5, 20,0.35,20.35);// 3 bars 41,0.35,20.85); //("fCheHist","fCheHist",30,2.5,152.5, 25,0.5,25.5);
839  fkBarXHist = new TH2F("fkBarXHist","fkBarXHist",200,-1.,1.,200,-1.,1.);
840  fkBarYHist = new TH2F("fkBarYHist","fkBarYHist",200,-1.,1.,200,-1.,1.);
841  fHistoList->Add(fMapHist);
842  fHistoList->Add(fSigHist);
843  fHistoList->Add(fCheHist);
844  fHistoList->Add(fkBarXHist);
845  fHistoList->Add(fkBarYHist);
846 }
void PndDrcRecoLookupMap::DrawBarBox ( TVector3  v1,
TVector3  v2,
TVector3  v3,
TVector3  v4 
)
private

Definition at line 752 of file PndDrcRecoLookupMap.cxx.

References Double_t.

752  {
753  Double_t xx[5];
754  Double_t yy[5];
755  xx[0] = v1.X(); xx[1] = v2.X(); xx[2] = v3.X(); xx[3] = v4.X(); xx[4] = v1.X();
756  yy[0] = v1.Y(); yy[1] = v2.Y(); yy[2] = v3.Y(); yy[3] = v4.Y(); yy[4] = v1.Y();
757  TPolyLine *p6 =new TPolyLine(5,xx,yy);
758  p6->SetLineWidth(2);
759  p6->Draw("same");
760 }
Double_t
TVector3 v1
Definition: bump_analys.C:40
TVector3 v2
Definition: bump_analys.C:40
void PndDrcRecoLookupMap::DrawDetectorLayout ( )
inline

Definition at line 88 of file PndDrcRecoLookupMap.h.

References PndGeoDrc::BBoxNum(), cos(), Double_t, fGeo, i, p1, p2, PndGeoDrc::PipehAngle(), sin(), and theta.

89  {
90  // drawing of detector layout
91  Double_t theta = (180. - 2*fGeo->PipehAngle())/ fGeo->BBoxNum()/180.*3.1415; //[rad]
92  //std::cout<<"-I- DrawLayout: theta = "<<theta<<std::endl;
93  Double_t rad_out=102.6; //104.0; // PD outer radius
94  Double_t rad_in=49.15; //50.53; // PD inner radius
95  Double_t rp_out=rad_out/cos(theta);
96  Double_t rp_in=rad_in/cos(theta);
97  Double_t xout[4], yout[4], xin[4], yin[4];
98  for(Int_t i=0; i<4; i++){
99  xout[i]=rp_out*cos(2.0*(i-1)*theta);
100  yout[i]=rp_out*sin(2.0*(i-1)*theta);
101  xin[i]=rp_in*cos(2.0*(i-1)*theta);
102  yin[i]=rp_in*sin(2.0*(i-1)*theta);
103  TLine *l1 =new TLine(xout[i],yout[i],xin[i],yin[i]);
104  l1->Draw("same");
105  }
106  TPolyLine *p1 =new TPolyLine(4,xout,yout);
107  p1->SetFillColor(kYellow);
108  p1->Draw("same");
109  TPolyLine *p2 =new TPolyLine(4,xin,yin);
110  p2->SetFillColor(0);
111  p2->Draw("same");
112  //--------------------------
113  }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Double_t BBoxNum()
Definition: PndGeoDrc.h:136
Int_t i
Definition: run_full.C:25
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
Double_t PipehAngle()
Definition: PndGeoDrc.h:139
Double_t
TPad * p2
Definition: hist-t7.C:117
TPad * p1
Definition: hist-t7.C:116
void PndDrcRecoLookupMap::DrawHisto ( )
private

Definition at line 934 of file PndDrcRecoLookupMap.cxx.

References fCheHist, fhCHreal, fhDiff, fhLam, fhPDHits, fhPDTime, fhRecoT1, fkBarXHist, fkBarYHist, fMapHist, fSigHist, and SetPlotStyle().

Referenced by Finish().

935 {
936 gStyle->SetOptFit(0111);
937 
938 TCanvas *C1 = new TCanvas("C1","Time", 500,500);
939 C1->Divide(1,2);
940 C1->cd(1);
941 fhPDTime->Draw();
942 C1->cd(2);
943 fhRecoT1->Draw();
944 
945 TCanvas *C2 = new TCanvas("C2","PD Plane", 500, 500);
946 fhPDHits->SetMarkerStyle(20);
947 fhPDHits->SetMarkerSize(0.25);
948 //fhPDHits->SetMarkerColor(2);
949 fhPDHits->Draw();
950 
951 TCanvas *C3 = new TCanvas("C3","Diff", 500,500);
952 fhDiff->GetXaxis()->SetTitle("[rad]");
953 fhDiff->SetLineWidth(3);
954 fhDiff->Draw();
955 
956 // C A N V A S W I T H M A P S (lambda and NEntries of pixels)
957 
958 TCanvas *C8= new TCanvas("C8","Nentries map",500,500);
959 SetPlotStyle();
960 gStyle->SetOptStat(11);
961 fMapHist->GetXaxis()->SetTitle("#Theta_{track} [degrees]");
962 fMapHist->GetYaxis()->SetTitle("#phi_{track} [degrees]");
963 fMapHist->GetZaxis()->SetTitle("nEntries");
964 //fMapHist->Draw("LEGO2Z");
965 fMapHist->Scale(0.05);
966 fMapHist->Draw("COL2Z");
967 //DrawDetectorLayout();
968 //DrawBarBox(fBBver1,fBBver2,fBBver3,fBBver4);
969 
970 
971 TCanvas *C9= new TCanvas("C9","Mean CHreco map",500,500);
972 SetPlotStyle();
973 gStyle->SetOptStat(11);
974 fCheHist->GetXaxis()->SetTitle("#theta track angle [degrees]");
975 fCheHist->GetYaxis()->SetTitle("#phi track angle [degrees]");
976 fCheHist->GetZaxis()->SetTitle("<CHreco - CHexp> [rad]");
977 //fCheHist->Draw("LEGO2Z");
978 fCheHist->Draw("COL2Z");
979 //DrawDetectorLayout();
980 //DrawBarBox(fBBver1,fBBver2,fBBver3,fBBver4);
981 
982 TCanvas *C10= new TCanvas("C10","Sigma map",500,500);
983 SetPlotStyle();
984 gStyle->SetOptStat(11);
985 //fSigHist->SetMinimum(-0.2);
986 //fSigHist->SetMaximum(0.2);
987 fSigHist->GetXaxis()->SetTitle("#theta track angle [degrees]");
988 fSigHist->GetYaxis()->SetTitle("#phi track angle [degrees]");
989 fSigHist->GetZaxis()->SetTitle("#sigma_{CHreco - CHexp}");
990 fSigHist->Draw("COL2Z");
991 //DrawDetectorLayout();
992 //DrawBarBox(fBBver1,fBBver2,fBBver3,fBBver4);
993 
994 TCanvas *C11= new TCanvas("C11","kBar LUT & kBar gen",500,500);
995 C11->Divide(2,1);
996 C11->cd(1);
997 fkBarXHist->GetXaxis()->SetTitle("kxBar from LUT");
998 fkBarXHist->GetYaxis()->SetTitle("kxBar generated");
999 fkBarXHist->Draw();
1000 TLine *l1 =new TLine(1.,1.,-1.,-1.);
1001 TLine *l2 = new TLine(-1.,1.,1.,-1.);
1002 l1->SetLineColor(8);
1003 l2->SetLineColor(8);
1004 l1->Draw("same");
1005 l2->Draw("same");
1006 C11->cd(2);
1007 fkBarYHist->GetXaxis()->SetTitle("kyBar from LUT");
1008 fkBarYHist->GetYaxis()->SetTitle("kyBar generated");
1009 fkBarYHist->Draw();
1010 l1->Draw("same");
1011 l2->Draw("same");
1012 
1013 TCanvas *C12= new TCanvas("C12","Lam & CHreal",500,500);
1014 C12->Divide(1,2);
1015 C12->cd(1);
1016 fhCHreal->Draw();
1017 C12->cd(2);
1018 fhLam->Draw();
1019 
1020 }
void PndDrcRecoLookupMap::Exec ( Option_t *  option)
virtual

Executed task

Definition at line 200 of file PndDrcRecoLookupMap.cxx.

References fDetectorID, fGeoH, fVerbose, nevents, ProcessPhotonHit(), and PndGeoHandling::SetVerbose().

201 {
202  //if ( ! fChPhoArray ) Fatal("Exec", "No fChPhoArray");
203  //fChPhoArray->Clear();
205 
206  nevents++;
207  fDetectorID = 0;
208 
209  cout<<"EVENT # "<<nevents<<endl;
210  // fNHits = 0;
211  //ProcessBarHit();
213  //ProcessPhotonMC();
214 }
void SetVerbose(Int_t v)
PndGeoHandling * fGeoH
Double_t PndDrcRecoLookupMap::FindOutPoint ( Double_t  x0,
Double_t  xEn,
Double_t  a,
Double_t NN,
Bool_t  printt 
)
private

Definition at line 718 of file PndDrcRecoLookupMap.cxx.

References a, Double_t, m, and n.

Referenced by NumberOfBounces().

718  {
719  Double_t m=99.;
720  Double_t n=TMath::Floor(x0/a);
721  m = n;
722  if(printt){std::cout<<"n = "<<n<<", NN = "<<*NN<<", x0 = "<<x0<<", a = "<<a<<std::endl;}
723  Double_t x1 = x0 - n*a;
724  if(x0 < 0.){x1 = x0 - (n+1)*a;}
725  if(printt){std::cout<<"xy = "<< x1<<std::endl;}
726  Double_t xK = 0.;
727  if((m/2. - TMath::Floor(m/2.)) == 0.) { // 4etnoe
728  if(print){std::cout<<"odd==0"<<std::endl;}
729  if(x0 >= 0. && x1 + xEn <= a){xK = x1 + xEn;}
730  if(x0 >= 0. && x1 + xEn > a){xK = 2*a - x1 - xEn; n = 1. + n;}
731  if(x0 < 0. && x1 + xEn >= 0.){xK = a - (x1 + xEn); n = -1. -n;}
732  if(x0 < 0. && x1 + xEn < 0.) {xK = a + x1 + xEn; n = -n;}
733  if(printt){std::cout<<"xK = "<< xK<<", n = "<<n<<std::endl;}
734 
735  }
736 
737  if((m/2. - TMath::Floor(m/2.)) != 0.) { // ne4etnoe
738  if(print){std::cout<<"even!=0"<<std::endl;}
739  if(x0 >= 0. && x1 + xEn <= a){xK = a - (x1 + xEn);}
740  if(x0 >= 0. && x1 + xEn > a){xK = x1 + xEn - a; n = 1. + n;}
741  if(x0 < 0. && x1 + xEn >= 0.){xK = x1 + xEn; n = -1. -n;}
742  if(x0 < 0. && x1 + xEn < 0.) {xK = - (x1 + xEn); n = -n;}
743  if(printt){std::cout<<"xK = "<< xK<<", n = "<<n<<std::endl;}
744 
745  }
746 
747  *NN = n;
748  return xK;
749 }
Double_t x0
Definition: checkhelixhit.C:70
__m128 m
Definition: P4_F32vec4.h:28
int n
Int_t a
Definition: anaLmdDigi.C:126
Double_t
void PndDrcRecoLookupMap::Finish ( )
virtual

Finish task

Definition at line 888 of file PndDrcRecoLookupMap.cxx.

References Double_t, DrawHisto(), fabs(), fCheHist, fHAngleInBDeg, fSigHist, i, PhiThetaPoints, TString, and WriteToFile().

889 {
890  cout << "-I- PndDrcRecoLookupMap: Finish" << endl;
891 
892  // creating a map in every pixel
893  Double_t sig = 0., chr = 0.;
894  TString hnam, num1, num2, num3;
895  Float_t xx, yy;
896  for(int i=0; i<PhiThetaPoints.size(); i++){
897 
898  TF1* fit = new TF1("fit","gaus(0)+pol1(3)");
899  fit->SetParameters(10.,-0.001,0.017,1.,1.);
900  PhiThetaPoints[i]->Fit("fit","V","");
901  sig = fabs(fit->GetParameter(2));
902  chr = fit->GetParameter(1);
903  hnam = PhiThetaPoints[i]->GetName();
904  //cout<<"hnam - "<<hnam<<endl;
905  num1 = hnam;
906  num1.Remove(0,1);
907  num1.Remove(num1.Index("_"), (num1.Length()-num1.Index("_")));
908  xx = num1.Atof();
909  //cout<<"t = "<<xx<<endl;
910  num2 = hnam;
911  num2.Remove(0,num2.Index("i")+1);
912  yy = num2.Atof()/100.-fHAngleInBDeg;
913  //cout<<"phi = "<<yy<<endl;
914  cout<<"i = "<<i<<endl;
915  fSigHist->Fill(xx,yy,sig);
916  cout<<"SigHIST was filled with "<<sig<<" in phi = "<<yy <<", theta - "<<xx <<endl;
917  fCheHist->Fill(xx, yy, chr);
918  }
919 /*
920  // fill diff map with low value to avoid the background color
921  for(Int_t i=0; i<fMapHist->GetXaxis()->GetNbins(); i++){
922  for(Int_t j=0; j<fMapHist->GetYaxis()->GetNbins(); j++){
923  if(fMapHist->GetBinContent(i+1,j+1) == 0.){
924  fMapHist->SetBinContent(i+1, j+1, -10.);
925  }
926  }
927  }
928 */
929  WriteToFile();
930  DrawHisto();
931 }
Int_t i
Definition: run_full.C:25
std::vector< TH1F * > PhiThetaPoints
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Double_t PndDrcRecoLookupMap::InBarCoordSyst ( TVector3  start,
TVector3 *  v1,
TVector3 *  v2,
TVector3 *  v3,
TVector3 *  v4 
)
private

Definition at line 612 of file PndDrcRecoLookupMap.cxx.

References Double_t, fDphi, fHThick, fLSide, fpi, fPipehAngle, and fR.

Referenced by ProcessPhotonHit().

612  {
613  Double_t startPhi = start.Phi()/fpi*180.; // [degrees]
614  //cout<<"-I- InBarCoordinateSystem: start phi = "<<start.Phi()/fpi*180.<<endl;
615  if(startPhi < 0.){startPhi = 360. + startPhi;}
616  //if(startPhi > 360.){startPhi = startPhi - 360.;}
617  //cout<<"-I- InBarCoordinateSystem: start phi = "<<startPhi<<endl;
618  //Double_t dphi = 2.*(180. - 2*fPipehAngle)/ fBboxNum; //[degrees]
619  //cout<<"-I- InBarCoordinateSystem: dphi = "<<dphi<<endl;
620  Double_t PhiRot = 0.; //[degrees]
621  if(startPhi >= 0. && startPhi < 90.){
622  PhiRot = TMath::Floor(startPhi/fDphi) *fDphi + fDphi/2.;
623  }
624  if(startPhi >= 90. && startPhi < 270.){
625  PhiRot = 90. + fPipehAngle + TMath::Floor((startPhi-90.-fPipehAngle)/fDphi) *fDphi + fDphi/2.;
626  }
627  if(startPhi >= 270. && startPhi < 360.){
628  PhiRot = 270. + fPipehAngle + TMath::Floor((startPhi-270.-fPipehAngle)/fDphi) *fDphi + fDphi/2.;
629  }
630  //cout<<"-I- InBarCoordinateSystem: PhiRot = "<<PhiRot<<endl;
631 
632  TVector3 ver1, ver2, ver3, ver4;
633  ver1.SetXYZ(fR-(fHThick), fLSide/2. ,0.);
634  ver2.SetXYZ(fR+(fHThick), fLSide/2. ,0.);
635  ver3.SetXYZ(fR+(fHThick), -fLSide/2. ,0.);
636  ver4.SetXYZ(fR-(fHThick), -fLSide/2. ,0.);
637 
638  ver1.RotateZ(PhiRot/180.*fpi);
639  ver2.RotateZ(PhiRot/180.*fpi);
640  ver3.RotateZ(PhiRot/180.*fpi);
641  ver4.RotateZ(PhiRot/180.*fpi);
642 
643  *v1 = ver1;
644  *v2 = ver2;
645  *v3 = ver3;
646  *v4 = ver4;
647 
648  return PhiRot/180.*fpi;
649 }
Double_t
TVector3 v1
Definition: bump_analys.C:40
TVector3 v2
Definition: bump_analys.C:40
InitStatus PndDrcRecoLookupMap::Init ( )
virtual

Definition at line 82 of file PndDrcRecoLookupMap.cxx.

References PndGeoDrc::barBoxZDown(), PndGeoDrc::barBoxZUp(), PndGeoDrc::barHalfThick(), PndGeoDrc::barNum(), PndGeoDrc::BarWidth(), PndGeoDrc::BBoxGap(), PndGeoDrc::BBoxNum(), CreateHisto(), fBarBoxGap, fBarNum, fBarPointArray, fBarWidth, fBboxNum, fDigiArray, fDphi, fDrcLutInfoArray, fGeo, fHThick, fLSide, fMCArray, fnX1, fnY1, fPDHitArray, fPDPointArray, fpi, fPipehAngle, fR, fzdown, fzup, PndGeoDrc::Lside(), nevents, Pi, PndGeoDrc::PipehAngle(), PndGeoDrc::radius(), and timeres.

83 {
84  cout << " ---------- INITIALIZATION ------------" << endl;
85  nevents = 0;
86  // Get RootManager
87  FairRootManager* ioman = FairRootManager::Instance();
88  if ( ! ioman ) {
89  cout << "-E- PndDrcRecoLookupMap::Init: "
90  << "RootManager not instantiated!" << endl;
91  return kFATAL;
92  }
93 
94  // Get input array
95  fMCArray = (TClonesArray*) ioman->GetObject("MCTrack");
96  if ( ! fMCArray ) {
97  cout << "-W- PndDrcRecoLookupMap::Init: "
98  << "No MCTrack array!" << endl;
99  return kERROR;
100  }
101  // Get input array
102  fBarPointArray = (TClonesArray*) ioman->GetObject("DrcBarPoint");
103  if ( ! fBarPointArray ) {
104  cout << "-W- PndDrcRecoLookupMap::Init: "
105  << "No DrcBarPoint array!" << endl;
106  return kERROR;
107  }
108  // Get Photon point array
109  fPDPointArray = (TClonesArray*) ioman->GetObject("DrcPDPoint");
110  if ( ! fPDPointArray ) {
111  cout << "-W- PndDrcRecoLookupMap::Init: "
112  << "No DrcPDPoint array!" << endl;
113  return kERROR;
114  }
115 /* // Get input array
116  fHitArray = (TClonesArray*) ioman->GetObject("DrcHit");
117  if ( ! fHitArray ) {
118  cout << "-W- PndDrcRecoLookupMap::Init: "
119  << "No DrcHit array!" << endl;
120  return kERROR;
121  }
122 */
123 
124  // Get digi array
125  fDigiArray = (TClonesArray*) ioman->GetObject("DrcDigi");
126  if ( ! fDigiArray ) {
127  cout << "-W- PndDrcRecoLookupMap::Init: " << "No DrcDigi array!" << endl;
128  return kERROR;
129  }
130 
131  // Get input array
132  fPDHitArray = (TClonesArray*) ioman->GetObject("DrcPDHit");
133  if ( ! fPDHitArray ) {
134  cout << "-W- PndDrcRecoLookupMap::Init: "
135  << "No DrcPDHit array!" << endl;
136  return kERROR;
137  }
138 
139  // Create and register output array
140  // fChPhoArray = new TClonesArray("PndChPho");
141  // ioman->Register("ChPho","Drc",fChPhoArray, kTRUE);
142  fDrcLutInfoArray = new TClonesArray("PndDrcLutInfo");
143  ioman->Register("DrcLutInfo","Drc",fDrcLutInfoArray, kTRUE);
144 
145  // Get parameters:
146  fpi = TMath::Pi();
147 
148  fR = fGeo->radius();
149  fzup = fGeo->barBoxZUp();
150  fzdown = fGeo->barBoxZDown();
152  fBboxNum = fGeo->BBoxNum();
153  fBarNum = fGeo->barNum();
155  fBarBoxGap = fGeo->BBoxGap();
156  //fLength = (180. - 2.*fPipehAngle - fBarBoxGap/fR*(fBboxNum/2. - 1.)/fpi*180.)/(fBboxNum/2.) * fR/ 180.*fpi;
157  fDphi = 2.*(180. - 2*fPipehAngle)/ fBboxNum; //[degrees]
158  fLSide = fGeo->Lside();//(180. - 2.*fPipehAngle - fBarBoxGap/fR*(fBboxNum/2. - 1.)/fpi*180.)/(fBboxNum/2.) * fR/ 180.*fpi;
159  fBarWidth = fGeo->BarWidth();//fLSide/fBarNum;
160 
161  // vectors of bar surfaces:
162  fnX1.SetXYZ(-1., 0.,0.);
163  fnY1.SetXYZ( 0., 1.,0.);
164 
165  // Time resolution as a function of photon path
166  timeres = new TF1("timeres","[0] + [1]*x", 0., 1000.);
167  timeres->SetParameters(23.2773, 1.11008);
168 
169  cout << "-I- PndDrcRecoLookupMap: Intialization successfull" << endl;
170  CreateHisto();
171  return kSUCCESS;
172 
173 }
TClonesArray * fPDPointArray
Double_t BBoxNum()
Definition: PndGeoDrc.h:136
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
Double_t Lside()
Definition: PndGeoDrc.h:184
Double_t BarWidth()
Definition: PndGeoDrc.h:100
Double_t BBoxGap()
Definition: PndGeoDrc.h:130
Double_t barBoxZDown()
Definition: PndGeoDrc.h:104
Double_t PipehAngle()
Definition: PndGeoDrc.h:139
TClonesArray * fDrcLutInfoArray
Double_t barBoxZUp()
Definition: PndGeoDrc.h:108
TClonesArray * fBarPointArray
Double_t barHalfThick()
Definition: PndGeoDrc.h:96
TClonesArray * fPDHitArray
Double_t Pi
Double_t barNum()
Definition: PndGeoDrc.h:124
Double_t radius()
Definition: PndGeoDrc.h:92
Int_t PndDrcRecoLookupMap::NumberOfBounces ( TVector3  start,
TVector3  dir,
Int_t  barId 
)
private

Definition at line 682 of file PndDrcRecoLookupMap.cxx.

References CAMath::Cos(), Double_t, fabs(), fBarWidth, fGeoH, fHThick, FindOutPoint(), fzdown, fzup, PndGeoHandling::MasterToLocalShortId(), CAMath::Sin(), and CAMath::Tan().

Referenced by ProcessPhotonHit().

682  {
683  // start - photon production point in global coord system
684  // dir - photon direction in bar coord system
685 
686  //cout<<"-I- NumberOfBounces: dir"<<endl;
687  //dir.Print();
688  //cout<<"-I- NumberOfBounces: start"<<endl;
689  //start.Print();
690 
691  // Find coordinates of X0, Y0:
692  Double_t Z0, X0, Y0;
693  if(dir.Theta() < 3.1415/2.){
694  Z0 = -(fabs(fzup) + 2.*fzdown - start.Z());
695  }
696  if(dir.Theta() >= 3.1415/2.){
697  Z0 = -(start.Z() - fzup);
698  }
699  X0 = Z0*TMath::Tan(dir.Theta())*TMath::Cos(dir.Phi());
700  Y0 = Z0*TMath::Tan(dir.Theta())*TMath::Sin(dir.Phi());
701  //cout<<"-I- NumberOfBounces: tan th = "<<TMath::Tan(dir.Theta())<<", sin ph = "<<TMath::Sin(dir.Phi())<<", cos ph = "<<TMath::Cos(dir.Phi())<<endl;
702  //cout<<"-I- NumberOfBounces: X0 = "<<X0<<", Y0 = "<<Y0<<", Z0 = "<<Z0<<endl;
703 
704  // Find the start position of the photon with respect to the middle of the bar:
705  TVector3 startLocal = fGeoH->MasterToLocalShortId(start, barId);
706  //cout<<"-I- NumberOfBounces: Xen = "<<startLocal.X() + fBarWidth/2.<<", Yen = "<<startLocal.Y() + fHThick<<endl;
707 
708  // Find the number of bounces in each direction
709  Double_t N1, N2;
710  FindOutPoint(X0, startLocal.X() + fBarWidth/2., fBarWidth, &N1, 0);
711  FindOutPoint(Y0, startLocal.Y() + fHThick, 2.*fHThick, &N2, 0);
712  //cout<<"-I- NumberOfBounces: N1 = "<<N1<<", N2 = "<<N2<<endl;
713 
714  return (Int_t)N1+N2;
715 }
static T Sin(const T &x)
Definition: PndCAMath.h:42
float Tan(float x)
Definition: PndCAMath.h:165
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t)
PndGeoHandling * fGeoH
void PndDrcRecoLookupMap::ProcessBarHit ( )
private

Definition at line 227 of file PndDrcRecoLookupMap.cxx.

References fBarPointArray, fHitArray, fMCArray, PndDrcHit::GetRefIndex(), hit, pt(), and tr.

228 {
229  PndDrcBarPoint* pt=NULL;
230  PndDrcHit* hit=NULL;
231  PndMCTrack* tr = NULL;
232 
233  for(Int_t j=0; j<fHitArray->GetEntriesFast(); j++) {
234  hit = (PndDrcHit*)fHitArray->At(j);
235  Int_t mcRef= hit->GetRefIndex();
236  pt= (PndDrcBarPoint*)fBarPointArray->At(mcRef);
237 
238  Int_t chtrID= pt->GetTrackID();
239  tr = (PndMCTrack*)fMCArray->At(chtrID);
240 
241  cout<<"nother track px = "<<pt->GetPx()<<", py = "<<pt->GetPy()<<endl;
242 
243  }
244 }
TString pt(TString pts, TString exts="px py pz")
Definition: invexp.C:133
TClonesArray * fBarPointArray
virtual Int_t GetRefIndex()
Definition: PndDrcHit.h:44
PndSdsMCPoint * hit
Definition: anasim.C:70
void PndDrcRecoLookupMap::ProcessPhotonHit ( )
private

Definition at line 247 of file PndDrcRecoLookupMap.cxx.

References acos(), PndDrcLutInfo::AddAngle(), PndDrcLutInfo::AddChDiff(), PndDrcLutInfo::AddNOfBounces(), PndDrcLutInfo::AddPath(), PndDrcLutInfo::AddTime(), CHexp, CHreal, Double_t, exp(), fabs(), fB, fBarId, fBarPointArray, fBBver1, fBBver2, fBBver3, fBBver4, fDigiPar, fDrcLutInfoArray, fGeo, fGeoH, fHAngleInBDeg, fhCHreal, fhDiff, fhLam, fhNboLam, fhPDHits, fhPDTime, fhRecoT1, fkBar, fkBarXHist, fkBarYHist, fkxBar, fkyBar, fkzBar, flambdah, fMapHist, fMCArray, fNSigma, fnX1, fnY1, fPath, fPDHitArray, fPDPointArray, fPhiRot, fpi, fpixID, fPMo, fPMoB, fPphoB, fPphoInit, fPphoPD, fPxMoBar, fPyMoBar, fPzMoBar, fR, fStartVertex, ftime, ftime0, fVerbose, fWeight, fWidth, fxPHit, fyPHit, fzPHit, PndDrcPDPoint::GetBarPointID(), PndMCTrack::GetMomentum(), PndMCTrack::GetMotherID(), PndDrcDigiPar::GetNAmbiguities(), PndDrcDigiPar::GetNHitPixels(), PndDrcDigiPar::GetNPixelParam(), PndDrcDigiPar::GetParamsForPixel(), PndMCTrack::GetPdgCode(), PndDrcPDHit::GetRefIndex(), PndMCTrack::GetStartTime(), PndMCTrack::GetStartVertex(), PndDrcPDHit::GetTime(), i, InBarCoordSyst(), PndGeoHandling::MasterToLocalShortId(), NAmb, nbins, NboPoints, NHitPix, NPixPar, PndGeoDrc::nQuartz(), NumberOfBounces(), par, PhiThetaPoints, PhiThetaPointsCut, PhiThetaPointsWeight, Pi, RecoAmbigTime(), PndDrcLutInfo::SetCherenkovMC(), PndDrcLutInfo::SetCherenkovReal(), PndDrcLutInfo::SetChPartDir(), PndDrcLutInfo::SetChPartDirInBar(), PndDrcLutInfo::SetChPartDirInBar2(), PndDrcLutInfo::SetChPartPdg(), sqrt(), timeres, tr, and TString.

Referenced by Exec().

248 {
249  //Int_t nofChPho = 0;
250  PndDrcLutInfo lutinfo;
251 
252  PndDrcPDPoint* Ppt=NULL;
253  PndDrcPDHit* pdhit=NULL;
254  PndMCTrack* tr = NULL;
255  PndMCTrack* trMr;
256 
257  if (fVerbose > 0) {
258  cout <<"PndDrcRecoLookupMap: Number of Detected Photon MCPDPoints : "<<fPDPointArray->GetEntries()<<endl;
259  cout <<"PndDrcRecoLookupMap: Number of Detected Photon PDHits : "<<fPDHitArray->GetEntries()<<endl;
260  }
261 
262  // Loop over PndDrcPDHits
263  for(Int_t k=0; k<fPDHitArray->GetEntriesFast(); k++) {
264 
265  pdhit = (PndDrcPDHit*)fPDHitArray->At(k);
266 
267  Int_t mcPDRef= pdhit->GetRefIndex();
268 
269  Ppt = (PndDrcPDPoint*)fPDPointArray->At(mcPDRef);
270 
271  PndDrcBarPoint *fBarPoint= (PndDrcBarPoint*)fBarPointArray->At(Ppt->GetBarPointID());
272  fBarId = fBarPoint->GetDetectorID();
273  //cout<<"bar name - "<<fGeoH->GetPath(fBarId)<<endl;
274 
275  Int_t trID= Ppt->GetTrackID();
276  tr = (PndMCTrack*)fMCArray->At(trID);
277 
278  Int_t trMID=tr->GetMotherID();
279 
280  //if(trMID > -1){
281  trMr = (PndMCTrack*)fMCArray->At(trMID);
282  trMr->GetMomentum().Print();
283 
284  Int_t trMpdg=trMr->GetPdgCode();
285 
286  if(trMr->GetMotherID()==-1){ // charged track is a primary
287 
288  lutinfo.SetChPartPdg(trMpdg);
289 
290  // expected cherenkov angle
291  Double_t Mrmass;
292  Int_t MoSign;
293  if(fabs(trMpdg) == 11){Mrmass = 0.000511; MoSign = 1;}
294  if(fabs(trMpdg) == 13){Mrmass = 0.105658; MoSign = 1;}
295  if(fabs(trMpdg) == 211){Mrmass = 0.139570; MoSign = -1;}
296  if(fabs(trMpdg) == 321){Mrmass = 0.49368; MoSign = -1;}
297  if(fabs(trMpdg) == 2212){Mrmass = 0.938; MoSign = -1;}
298  if(fabs(trMpdg) == 50000050){Mrmass = 0.0; MoSign = -1;}
299  Double_t Mrmom = trMr->GetMomentum().Mag();
300  CHexp = acos(sqrt(pow(Mrmom,2) + pow(Mrmass,2))/Mrmom/fGeo->nQuartz());
301  lutinfo.SetCherenkovMC(CHexp);
302  cout<<"+++++++++++++++++++++++++++"<<endl;
303  cout<<"CH expected = "<<CHexp<<endl;
304 
305  fxPHit= pdhit->GetX();
306  fyPHit= pdhit->GetY();
307  fzPHit= pdhit->GetZ();
308  ftime = pdhit->GetTime();
309 
310  //get the pixel id
311  fpixID = pdhit->GetDetectorID();
312  cout<<"hit id "<<fpixID<<", x = "<<pdhit->GetX()<<", y = "<<pdhit->GetY()<<", time = "<<ftime<<endl;
313 
314  Double_t xPPoi= Ppt->GetX();
315  Double_t yPPoi= Ppt->GetY();
316 
317  lutinfo.SetPath(Ppt->GetLength());
318 
319  // momentum of a photon on the PD Plane
320  fPphoPD.SetXYZ(Ppt->GetPx(), Ppt->GetPy(), Ppt->GetPz());
321  //cout<<"Photon momentum on the PDplane: "<<endl;
322  //fPphoPD.Print();
323 
324  {
325  // mother momentum/direction
326  fPMo.SetXYZ(trMr->GetMomentum().X(), trMr->GetMomentum().Y(), trMr->GetMomentum().Z());
327  //fPMo.Print();
328  lutinfo.SetChPartDir(fPMo);
329  cout<<"mother phi = "<<fPMo.Phi()/3.1415*180.<<endl;
330  if(fB > 0.){
331  Double_t PtMo = sqrt(pow(trMr->GetMomentum().X(),2)+pow(trMr->GetMomentum().Y(),2));
332  Double_t Rratio = fR*fR/2./pow((PtMo/0.29979/fB)*100.,2);
333  //Double_t phi_extra = fPMo.Phi() + trMpdg/fabs(trMpdg) * acos(1. - Rratio); // muon - ; proton +
334  Double_t phi_extra = fPMo.Phi() + MoSign * trMpdg/fabs(trMpdg) * acos(1. - Rratio); // muon - ; proton +
335  //fHAngleInBDeg = 0.5 * trMpdg/fabs(trMpdg) * (acos(1. - Rratio) /TMath::Pi())*180.;
336  fHAngleInBDeg = 0.5 * MoSign * trMpdg/fabs(trMpdg) * (acos(1. - Rratio) /TMath::Pi())*180.;
337  // cout<<"B = "<<fB<<", R = "<<fR<<", trMpdg = "<<trMpdg<<", half angle in B = "<<fHAngleInBDeg<<endl;
338  fPMo.SetPhi(phi_extra);
339  }
340  lutinfo.SetChPartDirInBar2(fPMo);
341  }
342 
343  {
344  fBarPoint->Momentum(fPMo);
345  lutinfo.SetChPartDirInBar(fPMo);
346  }
347 
348 
349  cout<<"Mother vector (global cs) : "<<endl;
350  TVector3 motherMom = fPMo.Unit();
351  motherMom.Print();
352 
353  // initial momentum of the photon
354  fPphoInit.SetXYZ(tr->GetMomentum().X(), tr->GetMomentum().Y(), tr->GetMomentum().Z());
355  cout<<"Initial momentum of the photon :"<<endl;
356  fPphoInit.Print();
357 
358  // real = generated cherenkov angle
359  CHreal = fPphoInit.Angle(fPMo);
360  lutinfo.SetCherenkovReal(CHreal);
361  //cout<<"CH real (generated) = "<<CHreal<<endl;
362 
363  Double_t etot = sqrt(pow(fPphoPD.X(),2) + pow(fPphoPD.Y(),2) +pow(fPphoPD.Z(),2));
364  flambdah=197.0*2.0*TMath::Pi()/(etot*1.0E9);//wavelength of photon in nm
365  lutinfo.SetLambda(flambdah);
366 
367  // production point of the photon
369 
370  //cout<<"start: phi = "<<fStartVertex.Phi()<<endl;
371  //fStartVertex.Print();
372  ftime0 = tr->GetStartTime()/1.0E9;
373  lutinfo.SetTime(ftime-ftime0);
374 
375  //cout<<"fstart time = "<<ftime0<<endl;
376  //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
377  // proceed only if photon was born in the bar for which the LUT is used!!!
378  //if(fStartVertex.Phi() >0./180.*fpi && fStartVertex.Phi() < 6./180.*fpi){
379  if(fPphoInit.Z() > 0. || fPphoInit.Z() < 0.){ // reflected photons
380 
381  // Transformation of the photon initial direction to the local bar coodr system:
382  // to get to the bar coord system.
384  cout<<"PhiRot = "<<fPhiRot/fpi*180.<<", Mother phi = "<<fPMo.Phi()/fpi*180.<<endl;
385 
386  // Photon initial momentum in the bar coord. syst.
387  fPphoB = fPphoInit.Unit();
388  fPphoB.RotateZ(-fPhiRot);
389  fkxBar = -fPphoB.Y();
390  fkyBar = fPphoB.X();
391  fkzBar = fPphoB.Z();
392  fPphoB.SetXYZ(fkxBar, fkyBar, fkzBar);
393  cout<<"photon momentum in the bar = "<<endl;
394  fPphoB.Print();
395  TVector3 fPpB = (fGeoH->MasterToLocalShortId(fPphoInit, fBarId) - fGeoH->MasterToLocalShortId((0.,0.,0.),fBarId)).Unit();
396  fPpB.Print();
397 
398  // mother momentum in the bar' (and bar) coord syst:
399  fPMoB = fPMo.Unit();
400  fPMoB.RotateZ(-fPhiRot);
401  cout<<"Mother vector (bar' cs): "<<endl;
402  fPMoB.Print();
403  fPxMoBar = -fPMoB.Y();
404  fPyMoBar = fPMoB.X();
405  fPzMoBar = fPMoB.Z();
406  TVector3 PMoBar;
407  PMoBar.SetXYZ(fPxMoBar, fPyMoBar, fPzMoBar);
408  TVector3 PMBar = (fGeoH->MasterToLocalShortId(fPMo, fBarId) - fGeoH->MasterToLocalShortId((0.,0.,0.),fBarId)).Unit();
409  PMBar.Print();
410 
411  // to find Cherenkov Phi (NOT THETA!!!):
412  TVector3 kB;
413  kB.SetXYZ(fkxBar, fkyBar, fkzBar);
414 
415  // use lookups to get the kXbar and kYbar of photons:
417  //cout<<"N pixels = "<<NHitPix<<endl;
419  cout<<"N amb = "<<NAmb<<endl;
421  Double_t par[NPixPar];
422 
423  if (fDigiPar->GetParamsForPixel(fpixID, par) == kFALSE) {
424  cout<<"NO SUCH HIT IN LUT!!!"<<endl;
425  continue;
426  }
427 
428  cout<<"LOOKUP!!!!"<<endl;
429  //cout<<"N Hit Pix = "<<NHitPix<<endl;
430  //cout<<"N Amb = "<<NAmb<<endl;
431  cout<<"NPixPar = "<<NPixPar<<endl;
432 /* cout<<"par 0 = "<<par[0]<<endl; // kx
433  cout<<"par 1 = "<<par[1]<<endl; // ky
434  cout<<"par 2 = "<<par[2]<<endl; // kxB
435  cout<<"par 3 = "<<par[3]<<endl; // kyB
436  cout<<"par 4 = "<<par[4]<<endl; // kxU1
437  cout<<"par 5 = "<<par[5]<<endl; // kyU1
438  cout<<"par 6 = "<<par[6]<<endl; // kxU2
439  cout<<"par 7 = "<<par[7]<<endl; // kyU2
440  cout<<"par 8 = "<<par[8]<<endl; // kxU3
441  cout<<"par 9 = "<<par[9]<<endl; // kyU3
442  cout<<"par 10 = "<<par[10]<<endl; // kxBU1
443  cout<<"par 11 = "<<par[11]<<endl; // kyBU1
444  cout<<"par 12 = "<<par[12]<<endl; // kxBU2
445  cout<<"par 13 = "<<par[13]<<endl; // kyBU2
446  cout<<"par 14 = "<<par[14]<<endl; // kxBU3
447  cout<<"par 15 = "<<par[15]<<endl; // kyBU3
448  cout<<"par 16 = "<<par[16]<<endl; // kxUB
449  cout<<"par 17 = "<<par[17]<<endl; // kyUB
450  cout<<"par 18= "<<par[18]<<endl; // kxUU
451  cout<<"par 19= "<<par[19]<<endl; // kyUU
452  cout<<"par 20= "<<par[20]<<endl; // kxUUU
453  cout<<"par 21= "<<par[21]<<endl; // kyUUU
454  cout<<"par 22= "<<par[22]<<endl; // kxBUU
455  cout<<"par 23= "<<par[23]<<endl; // kyBUU
456  cout<<"par 24= "<<par[24]<<endl; // kxBUB
457  cout<<"par 25= "<<par[25]<<endl; // kyBUB
458  cout<<"par 26= "<<par[26]<<endl; // kxUBU
459  cout<<"par 27= "<<par[27]<<endl; // kyUBU
460 */
461  // fill in NPixPar/2 * 1 ambiguities:
462  Double_t kX, kY, kZ;
463  std::vector<TVector3> ambig;
464  std::vector<Double_t> CHreco;
465  std::vector<Double_t> Tamb;
466  std::vector<Double_t> Path;
467 
468  // length of the vector should be the same as NumAmb*8 !!!!!
469  Int_t NumAmb = NAmb; //=14
470  TVectorD CHdiff(8*NumAmb);
471  TVectorD Adiff(8*NumAmb); // vector to store angle diff btw real and reco photons
472 
473  for(Int_t i=0; i<NumAmb; i++){
474  // in bar' coordinate system
475  kX = par[i*2]; // kXD
476  kY = par[i*2 + 1]; // kYD
477  kZ = -sqrt(1. - pow(kX,2.) - pow(kY,2.));
478  //cout<<"mom: x = "<<fPMoB.X()<<", y = "<<fPMoB.Y()<<", z = "<<fPMoB.Z()<<endl;
479  fkBar.SetXYZ(kX, kY, kZ);
480  //cout<<"photon from LUT in bar' coordinate system: "<<endl;
481  fkBar.Print();
482 
483  for(Int_t jamb=0; jamb <8; jamb++){
484  if(jamb == 1){fkBar.SetXYZ(-kX, kY, kZ);}
485  if(jamb == 2){fkBar.SetXYZ(kX, -kY, kZ);}
486  if(jamb == 3){fkBar.SetXYZ(kX, kY, -kZ);}
487  if(jamb == 4){fkBar.SetXYZ(-kX, -kY, kZ);}
488  if(jamb == 5){fkBar.SetXYZ(kX, -kY, -kZ);}
489  if(jamb == 6){fkBar.SetXYZ(-kX, kY, -kZ);}
490  if(jamb == 7){fkBar.SetXYZ(-kX, -kY, -kZ);}
491 
492  // check if there is such enrty in the LUT and if the ambiguity fulfills the total internal reflection requitrement
493  if((kX != 0. && kY != 0.) && ((fkBar.Cross(fnX1)).Mag() > 1.00028/fGeo->nQuartz() ||
494  (fkBar.Cross(fnY1)).Mag() > 1.00028/fGeo->nQuartz())){
495  ambig.push_back(fkBar);
496  CHreco.push_back(fkBar.Angle(PMoBar));
497  CHdiff(8*i+jamb) = fabs(CHreco[8*i+jamb] - CHexp);
498  Tamb.push_back(RecoAmbigTime(fkBar, fStartVertex, &fPath, 0));
499  Path.push_back(fPath);
500  Adiff(8*i+jamb) = fkBar.Angle(fPphoB);
501  //cout<<"reco ch angle = "<<fkBar.Angle(PMoBar)<<endl;
502  //cout<<"number of bounces = "<<NumberOfBounces(fStartVertex, fPphoB, fBarId)<<endl;
503  //cout<<"CHdiff = "<<CHdiff(8*i+jamb)<<", CHreco"<<8*i+jamb<<" = "<<CHreco[8*i+jamb]<<endl;
504 
505  //fill lutinfo only with credible information:
506  lutinfo.AddAngle(fkBar.Angle(PMoBar));
507  lutinfo.AddTime(RecoAmbigTime(fkBar, fStartVertex, &fPath, 0));
508  lutinfo.AddPath(fPath);
509  lutinfo.AddChDiff(CHreco[8*i+jamb] - CHexp);
510  //cout<<"fkBar = "<<endl;
511  //fkBar.Print();
512  lutinfo.AddNOfBounces(NumberOfBounces(fStartVertex, fkBar/*fPphoB*/, fBarId));
513 
514  fkBarXHist->Fill(kX, fPphoB.X());
515  fkBarYHist->Fill(kY, fPphoB.Y());
516  }else{
517  ambig.push_back((0.,0.,0.));
518  CHreco.push_back(-999.);
519  CHdiff(8*i+jamb) = -999.;
520  Tamb.push_back(-999.);
521  Path.push_back(-999.);
522  Adiff(8*i+jamb) = -999.;
523  }
524  }// for
525  }
526 
527  // F I L L T H E H I S T O S
528  fhPDHits->Fill(xPPoi, yPPoi);//(fxPHit, fyPHit);
529  fhPDTime->Fill(ftime-ftime0); // substract production time of a photon
530 
531  fhRecoT1->Fill(flambdah, Ppt->GetLength()/(ftime-ftime0));
532 
533  fhCHreal->Fill(CHreal);
534  fhLam->Fill(flambdah);
535 
536  if(fB > 0.){
537  fMapHist->Fill(fPMo.Theta()/fpi*180.,fPMo.Phi()/fpi*180. - fHAngleInBDeg); // assuming that R = 50 cm
538  }
539  if(fB == 0.){
540  fMapHist->Fill(fPMo.Theta()/fpi*180.,fPMo.Phi()/fpi*180.);
541  }
542  cout<<"fMAPHIST is filled in theta="<<fPMo.Theta()/fpi*180.<<", phi ="<<fPMo.Phi()/fpi*180. - fHAngleInBDeg<<endl;
543  cout<<"mother phi angle = "<<fPMo.Phi()/fpi*180.<<endl;
544  cout<<"mother phi in the name of histo = "<<(Int_t)(fPMo.Phi()/fpi*180.*100.)<<endl;
545  //#############################################
546  TString PhiT = Form("t%g_phi%d", fPMo.Theta()/fpi*180., (Int_t)(fPMo.Phi()/fpi*180.*100.));
547  TString PhiTCut = Form("t%g_phi%d_cut", fPMo.Theta()/fpi*180., (Int_t)(fPMo.Phi()/fpi*180.*100.));
548  TString PhiTWeight = Form("t%g_phi%d_weight", fPMo.Theta()/fpi*180., (Int_t)(fPMo.Phi()/fpi*180.*100.));
549  TString Nbo = Form("t%g_phi%d_nbo", fPMo.Theta()/fpi*180., (Int_t)(fPMo.Phi()/fpi*180.*100.));
550 
551  Int_t currPhiTh = PhiThetaPoints.size();
552  for ( Int_t ihi = 0 ; ihi < PhiThetaPoints.size() ; ihi++ ) {
553  if ( PhiT == PhiThetaPoints[ihi]->GetName() ) {
554  currPhiTh = ihi;
555  break;
556  }
557  }
558  if ( currPhiTh == PhiThetaPoints.size() ) {
559  Int_t nbins = (Int_t)(2.*fWidth/0.005);
560  TH1F* newThetaPhiPoint = new TH1F(PhiT.Data(),"Cherenkov angle difference for theta", nbins, -fWidth,fWidth);
561  PhiThetaPoints.push_back(newThetaPhiPoint);
562  TH1F* newThetaPhiPointCut = new TH1F(PhiTCut.Data(),"Cherenkov angle difference for theta with time cut", nbins, -fWidth,fWidth);
563  PhiThetaPointsCut.push_back(newThetaPhiPointCut);
564  TH1F* newThetaPhiPointWeight = new TH1F(PhiTWeight.Data(),"Cherenkov angle difference for theta with time weights", nbins, -fWidth,fWidth);
565  PhiThetaPointsWeight.push_back(newThetaPhiPointWeight);
566  TH1F* newNbo = new TH1F(Nbo.Data(), "Number of bounces", 1000,0.,500.);
567  NboPoints.push_back(newNbo);
568  }
569  //PhiThetaPoints[currPhiTh]->Fill();
570  //#############################################
571 
572  // fill N bounces for all photons:
573  NboPoints[currPhiTh]->Fill(NumberOfBounces(fStartVertex, fPphoB, fBarId));
575  // fill all the ambiguities with weights:
576  // WEIGHTS ARE BASED ON TIMING!!!!!
577  for(Int_t j=0; j< CHreco.size(); j++){
578  fWeight = exp(- pow(Tamb[j] - ftime + ftime0, 2.)/2./pow(timeres->Eval(Path[j])/1000.,2.));
579  //cout<<"CHreco = "<<CHreco[j]<<", d time = "<<Tamb[j]-ftime + ftime0<<", weight = "<<fWeight<<endl;
580 
581  // using time cuts
582  if(fabs(CHdiff(j)) < fWidth){
583  PhiThetaPoints[currPhiTh]->Fill(CHreco[j]-CHexp,1.);
584  //fhDiff->Fill(CHreco(j)-CHexp,1./fInvSum/CHdiff(j));
585  fhDiff->Fill(CHreco[j]-CHexp,1.);
586  //fhDTime->Fill(Tamb[j] - ftime + ftime0);
587  //cout<<"CHreco = "<<CHreco[j]<<", time = "<<Tamb[j]<<", path = "<<Path[j]<<endl;
588  //cout<<"time resolution at this path = "<<timeres->Eval(Path[j])/1000.<<", d t = "<<Tamb[j] - ftime + ftime0<<endl;
589  //cout<<"histo "<<PhiThetaPoints[currPhiTh]->GetName()<<" filled with"<<CHreco[j]-CHexp<<endl;
590  // using time cuts
591  if(fabs(Tamb[j] - ftime + ftime0) < fNSigma* timeres->Eval(Path[j])/1000.){
592  PhiThetaPointsCut[currPhiTh]->Fill(CHreco[j]-CHexp);
593  //fhDTimeCut->Fill(Tamb[j] - ftime + ftime0);
594  }
595  //using weights based on time
596  PhiThetaPointsWeight[currPhiTh]->Fill(CHreco[j]-CHexp, fWeight);
597  //fhDTimeWeight->Fill(Tamb[j] - ftime + ftime0, fWeight);
598 
599  //cout<<"diff was filled with "<<CHreco(j)-CHexp<<endl;
600  }
601  }
602 
603  // new ((*fChPhoArray)[nofChPho++]) PndChPho(fxPHit,fyPHit,fzPHit,ftime,flambdah, // fPphoB,fPMo,fPphoInit,fPphoPD);
604  //} // if kxBar
605  } // if start vertex lies within the right bar!
606  }// photon from primary particle
607 
608  }// photon hits
609  new ((*fDrcLutInfoArray)[fDrcLutInfoArray->GetEntriesFast()]) PndDrcLutInfo(lutinfo);
610 }
void SetChPartDirInBar2(TVector3 val)
friend F32vec4 acos(const F32vec4 &a)
Definition: P4_F32vec4.h:113
void AddChDiff(Double_t val)
Int_t GetNPixelParam()
Definition: PndDrcDigiPar.h:45
TClonesArray * fPDPointArray
friend F32vec4 exp(const F32vec4 &a)
Definition: P4_F32vec4.h:109
Int_t i
Definition: run_full.C:25
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Bool_t GetParamsForPixel(Int_t, Double_t *)
Int_t GetPdgCode() const
Definition: PndMCTrack.h:73
Double_t RecoAmbigTime(TVector3, TVector3, Double_t *, Bool_t)
Double_t par[3]
TVector3 GetMomentum() const
Definition: PndMCTrack.h:78
void SetChPartPdg(Int_t val)
void SetChPartDirInBar(TVector3 val)
std::vector< TH1F * > PhiThetaPointsCut
std::vector< TH1F * > PhiThetaPoints
virtual Double_t GetTime()
Definition: PndDrcPDHit.h:55
void SetCherenkovReal(Double_t val)
Int_t GetBarPointID() const
Definition: PndDrcPDPoint.h:56
virtual Int_t GetRefIndex()
Definition: PndDrcPDHit.h:57
PndDrcDigiPar * fDigiPar
TClonesArray * fDrcLutInfoArray
void AddAngle(Double_t val)
void SetChPartDir(TVector3 val)
std::vector< TH1F * > PhiThetaPointsWeight
Double_t
Double_t nQuartz()
Definition: PndGeoDrc.h:70
void AddTime(Double_t val)
void AddNOfBounces(Double_t val)
int nbins
Definition: full_core_ntp.C:33
TClonesArray * fBarPointArray
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void SetCherenkovMC(Double_t val)
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
Double_t InBarCoordSyst(TVector3, TVector3 *, TVector3 *, TVector3 *, TVector3 *)
Int_t GetNAmbiguities()
Definition: PndDrcDigiPar.h:44
Int_t GetNHitPixels()
Definition: PndDrcDigiPar.h:43
TClonesArray * fPDHitArray
PndGeoHandling * fGeoH
void AddPath(Double_t val)
TVector3 GetStartVertex() const
Definition: PndMCTrack.h:76
Int_t GetMotherID() const
Definition: PndMCTrack.h:74
std::vector< TH1F * > NboPoints
Int_t NumberOfBounces(TVector3, TVector3, Int_t)
Double_t Pi
Double_t GetStartTime() const
Definition: PndMCTrack.h:77
void PndDrcRecoLookupMap::ProcessPhotonMC ( )
private

Definition at line 217 of file PndDrcRecoLookupMap.cxx.

References fMCArray, and fVerbose.

218 {
219  if (fVerbose > 0) {
220  cout <<"PndDrcRecoLookupMap: Number of Detected MC Tracks : "<<fMCArray->GetEntries()<<endl;
221  PndMCTrack* ptr = NULL;
222  PndMCTrack* trMr=NULL;
223 
224  }
225 }
Double_t PndDrcRecoLookupMap::RecoAmbigTime ( TVector3  kb,
TVector3  start,
Double_t l,
Bool_t  printout 
)
private

Definition at line 763 of file PndDrcRecoLookupMap.cxx.

References PndGeoDrc::barBoxZDown(), PndGeoDrc::barBoxZUp(), cos(), Double_t, PndGeoDrc::EVlen(), fabs(), fGeo, fpi, L1, PndGeoDrc::nEV(), PndGeoDrc::nQuartz(), and sin().

Referenced by ProcessPhotonHit().

763  { // [ns]
764 
765  // group velocities for oil and quartz for Noil and Nquartz assuming that mean lambda = 410 nm:
766  //Double_t nOil = fGeo->nEV();
767  Double_t u_oil = 19.8;//30./nOil;
768  //Double_t u_quartz = 30./1.46907; // for lambda = 410 nm
769  //Double_t u_quartz = 30./1.47012; // for lambda = 400 nm
770  //Double_t u_quartz = 30./1.46838; // for lambda = 417 nm
771  //Double_t u_quartz = 30./1.47125; // for lambda = 390 nm
772  //Double_t u_quartz = 30./1.47248; // for lambda = 380 nm
773  Double_t u_quartz = 19.8;//30./fNquartz;//1.47805; // for lambda = 370 nm
774 
775  // kb - photon momentum at the production point, first calculate path in QUARTZ BAR:
776  // assume that there are only DIRECT photons!!!
777 
778  // path in quartz:
779  Double_t Z0 = 0.;
780  Double_t kz = 0.;
781  if(kb.Z() < 0.){Z0 = start.Z() - fGeo->barBoxZUp(); kz = kb.Z();}
782  if(kb.Z() >= 0.){Z0 = 2.*fGeo->barBoxZDown() - fGeo->barBoxZUp() - start.Z(); kz = -kb.Z();}
783 
784  if(printout){
785  cout<<"-I- Reco ambig Time: Zstart = "<<start.Z()<<", Z0 = "<<Z0<<endl;
786  }
787 
788  Double_t L0 = Z0/fabs(cos(kb.Theta()));
789  kb.SetZ(kz);
790  Double_t thetaOil = asin(fGeo->nQuartz()/fGeo->nEV()*sin(kb.Theta()));
791  if(printout){
792  cout<<"RECO ambig TIME: thetas are: quartz = "<<kb.Theta()/fpi*180.<<", oil = "<<thetaOil/fpi*180.<<endl;
793  }
794  kb.SetTheta(thetaOil);
795  Double_t Z1 = fGeo->EVlen();
796  Double_t L1 = Z1/fabs(cos(kb.Theta())); // path in oil
797 
798  if(printout){
799  cout<<"-I- Reco ambig Time: Zev = "<<fGeo->EVlen()<<endl;
800  cout<<"-I- Reco ambig Time: L0 = "<<L0<<", L1 = "<<L1<<endl;
801  cout<<"-I- Reco ambig Time: time is "<< L0/u_quartz + L1/u_oil <<endl; // 19.5 cm/ns - average (lambda) group speed
802  }
803 
804  *l = L0 + L1;
805 
806  return L0/u_quartz + L1/u_oil; //[ns]
807 }
Double_t nEV()
Definition: PndGeoDrc.h:76
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
Double_t EVlen()
Definition: PndGeoDrc.h:127
Double_t barBoxZDown()
Definition: PndGeoDrc.h:104
Double_t barBoxZUp()
Definition: PndGeoDrc.h:108
Double_t
Double_t nQuartz()
Definition: PndGeoDrc.h:70
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Int_t L1[1]
Definition: Pnd_Hc_ee7G.C:50
Double_t PndDrcRecoLookupMap::SectorNum ( Double_t  xhit,
Double_t  yhit 
)
private

Definition at line 651 of file PndDrcRecoLookupMap.cxx.

References Double_t, fDphi, fpi, fPipehAngle, hit, and phi.

651  {
652 
653  // this function is used for photon hits to create LUTs, so that hits in front of target pipe area
654  // are treated as additional small LUTs
655 
656  TVector3 hit;
657  hit.SetXYZ(xhit, yhit, 0.);
658  Double_t phi = hit.Phi()*180./fpi;
659  if(phi < 0.){phi = 360. + hit.Phi()*180./fpi;}
660  if(phi >= 0. && phi < 90.-fPipehAngle){
661  //return 13.+TMath::Floor(phi/fDphi);
662  return 1.+TMath::Floor((90.-fPipehAngle-phi)/fDphi);
663  }
664  if(phi >= 90.+fPipehAngle && phi<270.-fPipehAngle){
665  //return TMath::Floor((phi-2.*fPipehAngle)/fDphi) - 3.;
666  return 9.+TMath::Floor((270.-fPipehAngle-phi)/fDphi);
667  }
668  if(phi >= 270.+fPipehAngle){
669  //return TMath::Floor((phi-4.*fPipehAngle)/fDphi) - 3.;
670  return 5.+TMath::Floor((360.-phi)/fDphi);
671  }
672  // small areas in front of the target pipe:
673  if(phi >= 90.-fPipehAngle && phi < 90.+fPipehAngle){
674  return 17.;
675  }
676  if(phi >= 270.-fPipehAngle && phi < 270.-fPipehAngle){
677  return 18.;
678  }
679 }
Double_t
PndSdsMCPoint * hit
Definition: anasim.C:70
void PndDrcRecoLookupMap::SetDefaultParameters ( )
private

Set the parameters to the default values.

void PndDrcRecoLookupMap::SetHistoWidth ( double  wid = 0.01)
inline

Definition at line 70 of file PndDrcRecoLookupMap.h.

References fWidth.

70 {fWidth = wid;} // 0.01
void PndDrcRecoLookupMap::SetMagneticField ( double  mag = 0.)
inline

Definition at line 72 of file PndDrcRecoLookupMap.h.

References fB.

72 {fB = mag;} // [Tesla]
void PndDrcRecoLookupMap::SetNSigma ( double  nsig = 3.)
inline

Definition at line 71 of file PndDrcRecoLookupMap.h.

References fNSigma, and nsig.

71 {fNSigma = nsig;}
int nsig
Definition: toy_core.C:46
void PndDrcRecoLookupMap::SetOutputFile ( TString  outName = "PndDrcRecoLookupMap_output.root")
inline

Definition at line 73 of file PndDrcRecoLookupMap.h.

References fOutputName.

73 {fOutputName = outName;}
void PndDrcRecoLookupMap::SetParContainers ( )
privatevirtual

Definition at line 176 of file PndDrcRecoLookupMap.cxx.

References fDigiPar, fGeoH, fVerbose, PndDrcDigiPar::GetNAmbiguities(), PndGeoHandling::Instance(), run, and PndGeoHandling::SetParContainers().

176  {
177 
178  // Get run and runtime database
179  FairRunAna* run = FairRunAna::Instance();
180  if ( ! run ) Fatal("SetParContainers", "No analysis run");
181 
182  FairRuntimeDb* db = run->GetRuntimeDb();
183  if ( ! db ) Fatal("SetParContainers", "No runtime database");
184 
185  // Get DIRC digitisation parameter container
186  fDigiPar = (PndDrcDigiPar*)(db->getContainer("DIRCLookupTable"));
187  cout << "-I- PndDrcRecoLookupMap::SetParContainers(). read parameters" << endl;
188  cout<<"read them!"<<endl;
189  //cout << "-I- PndDrcRecoLookupMap: Number of hit pixels "<< fDigiPar->GetNHitPixels()<< endl;
190  cout << "-I- PndDrcRecoLookupMap: Number of hit pixels "<< fDigiPar->GetNAmbiguities()<< endl;
191 
192  if ( fGeoH == NULL ) fGeoH = PndGeoHandling::Instance();
194  if(fVerbose>1) Info("SetParContainers","done.");
195  return;
196 }
Int_t run
Definition: autocutx.C:47
virtual void SetParContainers()
PndDrcDigiPar * fDigiPar
static PndGeoHandling * Instance()
Int_t GetNAmbiguities()
Definition: PndDrcDigiPar.h:44
Digitization Parameter Class for DIRC barrel part.
Definition: PndDrcDigiPar.h:29
PndGeoHandling * fGeoH
void PndDrcRecoLookupMap::SetPlotStyle ( )
inline

Definition at line 75 of file PndDrcRecoLookupMap.h.

References Double_t.

Referenced by DrawHisto().

76  {
77  const Int_t NRGBs = 5;
78  const Int_t NCont = 255;
79 
80  Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
81  Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
82  Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
83  Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
84  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
85  gStyle->SetNumberContours(NCont);
86  }
Double_t
void PndDrcRecoLookupMap::WriteToFile ( )
private

Definition at line 849 of file PndDrcRecoLookupMap.cxx.

References fHistoList, fOutputName, i, NboPoints, next, PhiThetaPoints, PhiThetaPointsCut, and PhiThetaPointsWeight.

Referenced by Finish().

850 {
851  fOutputName.Append(":/");
852  gDirectory->cd(fOutputName);
853  //gDirectory->cd("13_t90_500ev_l0_oil_5_HIT.root:/");
854 
855  gDirectory->mkdir("diff");
856  gDirectory->cd("diff");
857  for(int i=0; i<PhiThetaPoints.size();i++){
858  PhiThetaPoints[i]->Write();
859  }
860 
861  gDirectory->cd("../");
862  gDirectory->mkdir("diffCut");
863  gDirectory->cd("diffCut");
864  for(int i=0; i<PhiThetaPointsCut.size();i++){
865  PhiThetaPointsCut[i]->Write();
866  }
867 
868  gDirectory->cd("../");
869  gDirectory->mkdir("diffWeight");
870  gDirectory->cd("diffWeight");
871  for(int i=0; i<PhiThetaPointsWeight.size();i++){
872  PhiThetaPointsWeight[i]->Write();
873  }
874 
875  gDirectory->cd("../");
876  gDirectory->mkdir("Nbounces");
877  gDirectory->cd("Nbounces");
878  for(int i=0; i<NboPoints.size();i++){
879  NboPoints[i]->Write();
880  }
881  gDirectory->cd("../");
882  TIter next(fHistoList);
883  while ( TH1* histo = ((TH1*)next()) ) histo->Write();
884 
885 }
Int_t i
Definition: run_full.C:25
std::vector< TH1F * > PhiThetaPointsCut
std::vector< TH1F * > PhiThetaPoints
std::vector< TH1F * > PhiThetaPointsWeight
static int next[96]
Definition: ranlxd.cxx:374
std::vector< TH1F * > NboPoints

Member Data Documentation

Double_t PndDrcRecoLookupMap::CHexp
private

Definition at line 217 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::CHreal
private

Definition at line 218 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fB
private

Definition at line 185 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit(), and SetMagneticField().

Double_t PndDrcRecoLookupMap::fBarBoxGap
private

Definition at line 136 of file PndDrcRecoLookupMap.h.

Referenced by Init().

Int_t PndDrcRecoLookupMap::fBarId
private

Definition at line 205 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fBarNum
private

Definition at line 134 of file PndDrcRecoLookupMap.h.

Referenced by Init().

TClonesArray* PndDrcRecoLookupMap::fBarPointArray
private

Definition at line 154 of file PndDrcRecoLookupMap.h.

Referenced by Init(), ProcessBarHit(), and ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fBarWidth
private

Definition at line 138 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and NumberOfBounces().

Double_t PndDrcRecoLookupMap::fBboxNum
private

Definition at line 133 of file PndDrcRecoLookupMap.h.

Referenced by Init().

TVector3 PndDrcRecoLookupMap::fBBver1
private

Definition at line 225 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fBBver2
private

Definition at line 226 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fBBver3
private

Definition at line 227 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fBBver4
private

Definition at line 228 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TH2F* PndDrcRecoLookupMap::fCheHist
private

Definition at line 236 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and Finish().

Double_t PndDrcRecoLookupMap::fCHrecoMax
private

Definition at line 183 of file PndDrcRecoLookupMap.h.

Double_t PndDrcRecoLookupMap::fCHrecoMin
private

Definition at line 182 of file PndDrcRecoLookupMap.h.

Int_t PndDrcRecoLookupMap::fDetectorID
private

Definition at line 152 of file PndDrcRecoLookupMap.h.

Referenced by Exec().

TClonesArray* PndDrcRecoLookupMap::fDigiArray
private

Definition at line 159 of file PndDrcRecoLookupMap.h.

Referenced by Init().

PndDrcDigiPar* PndDrcRecoLookupMap::fDigiPar
private

Definition at line 143 of file PndDrcRecoLookupMap.h.

Referenced by PndDrcRecoLookupMap(), ProcessPhotonHit(), and SetParContainers().

Double_t PndDrcRecoLookupMap::fDphi
private

Definition at line 139 of file PndDrcRecoLookupMap.h.

Referenced by InBarCoordSyst(), Init(), and SectorNum().

TClonesArray* PndDrcRecoLookupMap::fDrcLutInfoArray
private

Definition at line 162 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and ProcessPhotonHit().

PndGeoDrc* PndDrcRecoLookupMap::fGeo
private

Basic geometry data of barrel DRC.

Definition at line 166 of file PndDrcRecoLookupMap.h.

Referenced by DrawDetectorLayout(), Init(), PndDrcRecoLookupMap(), ProcessPhotonHit(), RecoAmbigTime(), and ~PndDrcRecoLookupMap().

PndGeoHandling* PndDrcRecoLookupMap::fGeoH
private
Double_t PndDrcRecoLookupMap::fHAngleInBDeg
private

Definition at line 180 of file PndDrcRecoLookupMap.h.

Referenced by Finish(), and ProcessPhotonHit().

TH1F* PndDrcRecoLookupMap::fhCHreal
private

Definition at line 248 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TH1F* PndDrcRecoLookupMap::fhDiff
private

Definition at line 245 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TList* PndDrcRecoLookupMap::fHistoList
private

Definition at line 164 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), WriteToFile(), and ~PndDrcRecoLookupMap().

TClonesArray* PndDrcRecoLookupMap::fHitArray
private

Definition at line 156 of file PndDrcRecoLookupMap.h.

Referenced by ProcessBarHit().

TH1F* PndDrcRecoLookupMap::fhLam
private

Definition at line 249 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TH2F* PndDrcRecoLookupMap::fhNboLam
private

Definition at line 251 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), and ProcessPhotonHit().

TH2D* PndDrcRecoLookupMap::fhPDHits
private

Definition at line 244 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TH1D* PndDrcRecoLookupMap::fhPDTime
private

Definition at line 243 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TH2F* PndDrcRecoLookupMap::fhRecoT1
private

Definition at line 247 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fHThick
private

Definition at line 132 of file PndDrcRecoLookupMap.h.

Referenced by InBarCoordSyst(), Init(), and NumberOfBounces().

TVector3 PndDrcRecoLookupMap::fkBar
private

Definition at line 203 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TH2F* PndDrcRecoLookupMap::fkBarXHist
private

Definition at line 237 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TH2F* PndDrcRecoLookupMap::fkBarYHist
private

Definition at line 238 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fkxBar
private

Definition at line 214 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fkyBar
private

Definition at line 214 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fkzBar
private

Definition at line 214 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::flambdah
private

Definition at line 190 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fLSide
private

Definition at line 137 of file PndDrcRecoLookupMap.h.

Referenced by InBarCoordSyst(), and Init().

TH2F* PndDrcRecoLookupMap::fMapHist
private

Definition at line 234 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and ProcessPhotonHit().

TClonesArray* PndDrcRecoLookupMap::fMCArray
private

Definition at line 158 of file PndDrcRecoLookupMap.h.

Referenced by Init(), ProcessBarHit(), ProcessPhotonHit(), and ProcessPhotonMC().

Double_t PndDrcRecoLookupMap::fNSigma
private

Definition at line 184 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit(), and SetNSigma().

TVector3 PndDrcRecoLookupMap::fnX1
private

Definition at line 187 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fnY1
private

Definition at line 188 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and ProcessPhotonHit().

TString PndDrcRecoLookupMap::fOutputName
private

Definition at line 177 of file PndDrcRecoLookupMap.h.

Referenced by SetOutputFile(), and WriteToFile().

Double_t PndDrcRecoLookupMap::fPath
private

Definition at line 222 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TClonesArray* PndDrcRecoLookupMap::fPDHitArray
private

Definition at line 157 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and ProcessPhotonHit().

TClonesArray* PndDrcRecoLookupMap::fPDPointArray
private

Definition at line 155 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fPhiRot
private

Definition at line 199 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fpi
private
Double_t PndDrcRecoLookupMap::fPipehAngle
private

Definition at line 135 of file PndDrcRecoLookupMap.h.

Referenced by InBarCoordSyst(), Init(), and SectorNum().

Double_t PndDrcRecoLookupMap::fPixelSize
private

Definition at line 179 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto().

Double_t PndDrcRecoLookupMap::fpixID
private

Definition at line 191 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fPMo
private

Definition at line 200 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fPMoB
private

Definition at line 201 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fPphoB
private

Definition at line 219 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fPphoInit
private

Definition at line 202 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

TVector3 PndDrcRecoLookupMap::fPphoPD
private

Definition at line 221 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fPxMoBar
private

Definition at line 215 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fPyMoBar
private

Definition at line 215 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fPzMoBar
private

Definition at line 215 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fR
private

Definition at line 129 of file PndDrcRecoLookupMap.h.

Referenced by InBarCoordSyst(), Init(), and ProcessPhotonHit().

TH2F* PndDrcRecoLookupMap::fSigHist
private

Definition at line 235 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), DrawHisto(), and Finish().

TVector3 PndDrcRecoLookupMap::fStartVertex
private

Definition at line 220 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::ftime
private

Definition at line 197 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::ftime0
private

Definition at line 198 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Int_t PndDrcRecoLookupMap::fVerbose
private

Verbosity level

Definition at line 173 of file PndDrcRecoLookupMap.h.

Referenced by Exec(), PndDrcRecoLookupMap(), ProcessPhotonHit(), ProcessPhotonMC(), and SetParContainers().

Double_t PndDrcRecoLookupMap::fWeight
private

Definition at line 204 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fWidth
private

Definition at line 178 of file PndDrcRecoLookupMap.h.

Referenced by CreateHisto(), ProcessPhotonHit(), and SetHistoWidth().

Double_t PndDrcRecoLookupMap::fxbar
private

Definition at line 192 of file PndDrcRecoLookupMap.h.

Double_t PndDrcRecoLookupMap::fxnew
private

Definition at line 216 of file PndDrcRecoLookupMap.h.

Double_t PndDrcRecoLookupMap::fxPHit
private

Definition at line 194 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fybar
private

Definition at line 193 of file PndDrcRecoLookupMap.h.

Double_t PndDrcRecoLookupMap::fynew
private

Definition at line 216 of file PndDrcRecoLookupMap.h.

Double_t PndDrcRecoLookupMap::fyPHit
private

Definition at line 195 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fzdown
private

Definition at line 131 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and NumberOfBounces().

Double_t PndDrcRecoLookupMap::fzPHit
private

Definition at line 196 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Double_t PndDrcRecoLookupMap::fzup
private

Definition at line 130 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and NumberOfBounces().

Int_t PndDrcRecoLookupMap::NAmb
private

Definition at line 212 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

std::vector<TH1F*> PndDrcRecoLookupMap::NboPoints
private

Definition at line 233 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit(), and WriteToFile().

Int_t PndDrcRecoLookupMap::nevents
private

Definition at line 175 of file PndDrcRecoLookupMap.h.

Referenced by Exec(), and Init().

Int_t PndDrcRecoLookupMap::NHitPix
private

Definition at line 210 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

Int_t PndDrcRecoLookupMap::NPixPar
private

Definition at line 211 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit().

std::vector<TH1F*> PndDrcRecoLookupMap::PhiThetaPoints
private

Definition at line 230 of file PndDrcRecoLookupMap.h.

Referenced by Finish(), ProcessPhotonHit(), and WriteToFile().

std::vector<TH1F*> PndDrcRecoLookupMap::PhiThetaPointsCut
private

Definition at line 231 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit(), and WriteToFile().

std::vector<TH1F*> PndDrcRecoLookupMap::PhiThetaPointsWeight
private

Definition at line 232 of file PndDrcRecoLookupMap.h.

Referenced by ProcessPhotonHit(), and WriteToFile().

Bool_t PndDrcRecoLookupMap::print
private

Definition at line 207 of file PndDrcRecoLookupMap.h.

TF1* PndDrcRecoLookupMap::timeres
private

Definition at line 241 of file PndDrcRecoLookupMap.h.

Referenced by Init(), and ProcessPhotonHit().


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