FairRoot/PandaRoot
Functions | Variables
anaMvdDigi.C File Reference

Go to the source code of this file.

Functions

gROOT Macro ("$VMCWORKDIR/gconfig/rootlogon.C")
 
gROOT LoadMacro ("../Tools.C")
 
 LoadPandaStyle ()
 
timer Start ()
 
picture ReplaceAll (".root",".ps")
 
t AddFriend ("pndsim", digiFile.c_str())
 
t SetBranchAddress ("MVDPoint",&mc_array)
 
t SetBranchAddress ("MVDPixelDigis",&digiPixel_array)
 
t SetBranchAddress ("MVDStripDigis",&digiStrip_array)
 
hisxy SetTitle ("MVD MC Point, xy view;x / cm;y / cm")
 
hisrz SetTitle ("MVD MC Point, rz view;z / cm;r/ cm")
 
hisStripChargeTop SetLineColor (kBlue)
 
hisStripChargeBot SetLineColor (kRed)
 
PndMvdCalcFePixel pixelcalc (76, 84, 10)
 
 if (verbose)
 
hisPixelCol Fill (col)
 
hisPixelRow Fill (row)
 
hisPixelFE Fill (fe)
 
hisPixelCharge Fill (pixeldigi->GetCharge())
 
pixelcalc CalcSensorColRow (col, row, fe)
 
hisStripStrip Fill (strip)
 
hisStripCharge Fill (stripdigi->GetCharge())
 
 if (strip<=nrStrips)
 
can1 Divide (a, b)
 
can1 cd (1)
 
mypad Divide (2, 2)
 
 DrawNice2DHisto (hisxy)
 
mypad cd (2)
 
 DrawNice2DHisto (hisrz)
 
mypad cd (3)
 
gPad SetLogy ()
 
hisde DrawCopy ()
 
mypad cd (4)
 
mypad Divide (2, 3)
 
mypad cd (5)
 
mypad cd (6)
 
 DrawNice2DHisto (hisStripTop)
 
 DrawNice2DHisto (hisStripBot)
 
hisStripChargeTop DrawCopy ("sames")
 
can1 Update ()
 
 BetterStatBox (mypad)
 
timer Stop ()
 

Variables

bool verbose = false
 
TStopwatch timer
 
PndFileNameCreator namecreator ("../data/Lars/MvdDtsSim.root")
 
std::string inFile = namecreator.GetSimFileName(false)
 
std::string digiFile = namecreator.GetDigiFileName(false)
 
std::string parfile = "../data/Lars/MvdDtsParams.root"
 
TString picture = namecreator.GetDigiFileName(false)
 
TFile * f = new TFile(inFile.c_str())
 
TTree * t =(TTree *) f->Get("pndsim")
 
TClonesArray * mc_array =new TClonesArray("PndSdsMCPoint")
 
TClonesArray * digiPixel_array =new TClonesArray("PndSdsDigiPixel")
 
TClonesArray * digiStrip_array =new TClonesArray("PndSdsDigiStrip")
 
TGeoManager * geoMan = (TGeoManager*) gDirectory->Get("FAIRGeom")
 
TH2D * hisxy = new TH2D("hisxy","",400,-15.,15.,400,-15.,15.)
 
TH2D * hisrz = new TH2D("hisrz","",400,-20.,20.,400,-15.,25.)
 
TH1D * hisde = new TH1D("hisde","MVD MC Points, Energyloss",100,0.,0.002)
 
TH1D * hismom = new TH1D("hismom","MVD MC Points, momentum",100,0.,1.5)
 
int n = 100
 
int low = 0
 
TH1I * hisPixelCol = new TH1I("hispixelcol","Pixel column channel number on FE",n,low,low+n)
 
TH1I * hisPixelRow = new TH1I("hispixelrow","Pixel row channel number on FE",n,low,low+n)
 
TH1I * hisPixelFE = new TH1I("hispixelfe","Pixel FE number",n,low,low+n)
 
TH1I * hisCol = new TH1I("hiscol","column number",1001,0,1000)
 
TH1I * hisRow = new TH1I("hisrow","row number",1001,0,1000)
 
TH1D * hisPixelCharge = new TH1D("hispixelcharge","Pixel Charge content",100,0.,1e5)
 
TH2I * hisStripTop = new TH2I("hisstriptop","Strip Top channel&fe numbers",20,0,20,130,0,130)
 
TH2I * hisStripBot = new TH2I("hisstripbot","Strip Bot channel&fe numbers",20,0,20,130,0,130)
 
TH1I * hisStripStrip = new TH1I("hisstripstrip","Strip numbers",15*128,0,15*128)
 
TH1D * hisStripCharge = new TH1D("hisstripcharge","Strip Charge content",100,0.,1e5)
 
TH1D * hisStripChargeTop = new TH1D("hisstripchargetop","Strip Charge content",100,0.,1e5)
 
TH1D * hisStripChargeBot = new TH1D("hisstripchargebot","Strip Charge content",100,0.,1e5)
 
TVector3 vecmc
 
TVector3 mommc
 
Double_t tmpx
 
Double_t tmpy
 
Double_t tmpz
 
TVector2 locals
 
TVector2 localmc
 
TVector2 localdiff
 
int col = pixeldigi->GetPixelColumn()
 
int row = pixeldigi->GetPixelRow()
 
int fe = pixeldigi->GetFE()
 
double x
 
double y
 
TFile * parDB = new TFile(parfile.c_str())
 
PndMvdStripDigiPar * par = (PndMvdStripDigiPar*)gROOT->FindObject("MVDStripDigiParRect")
 
int nrFeChannels =par->GetNrFECh()
 
int nrStrips =par->GetNrTopFE()*nrFeChannels
 
int strip = fe * nrFeChannels + col
 
 else
 
Int_t a = 2
 
Int_t b = 2
 
TCanvas * can1 = new TCanvas("MvdTestPlot","MCHit view in MVD",0,0,a*400,b*400)
 
TPad * mypad =0
 
Double_t rtime = timer.RealTime()
 
Double_t ctime = timer.CpuTime()
 

Function Documentation

t AddFriend ( "pndsim"  ,
digiFile.  c_str() 
)
BetterStatBox ( mypad  )
pixelcalc CalcSensorColRow ( col  ,
row  ,
fe   
)
can1 cd ( )
mypad cd ( )
mypad cd ( )
mypad cd ( )
mypad cd ( )
mypad cd ( )
can1 Divide ( a  ,
b   
)
mypad Divide ( ,
 
)
mypad Divide ( ,
 
)
hisde DrawCopy ( )
hisStripChargeTop DrawCopy ( "sames"  )
DrawNice2DHisto ( hisxy  )
DrawNice2DHisto ( hisrz  )
DrawNice2DHisto ( hisStripTop  )
DrawNice2DHisto ( hisStripBot  )
hisCol Fill ( col  )
hisRow Fill ( row  )
hisPixelFE Fill ( fe  )
else fHChgMCPix Fill ( pixeldigi->  GetCharge())
hisStripStrip Fill ( strip  )
else fHChgMC Fill ( stripdigi->  GetCharge())
if ( verbose  )

Definition at line 97 of file anaMvdDigi.C.

References i, and point.

101  {
102  if(verbose) cout<<"Point No "<<i<<endl;
104  vecmc.SetXYZ(point->GetX(),point->GetY(),point->GetZ());
105  mommc.SetXYZ(point->GetPx(),point->GetPy(),point->GetPz());
106  hisxy->Fill(vecmc.x(),vecmc.y());
107  if(vecmc.y() > 0.) hisrz->Fill(vecmc.z(),vecmc.Perp());
108  else hisrz->Fill(vecmc.z(),-1.*vecmc.Perp());
109  hisde->Fill(point->GetEnergyLoss());
110  hismom->Fill(mommc.Mag());
111  }
TH1D * hisde
Definition: anaLmdDigi.C:44
Int_t i
Definition: run_full.C:25
#define verbose
TVector3 mommc
Definition: anaLmdDigi.C:64
TClonesArray * mc_array
Definition: anaLmdCluster.C:25
TH1D * hismom
Definition: anaMvdDigi.C:49
TVector3 vecmc
Definition: anaLmdCluster.C:52
TH2D * hisxy
Definition: anaLmdDigi.C:38
TH2D * hisrz
Definition: anaLmdDigi.C:41
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
if ( strip<=  nrStrips)

Definition at line 138 of file anaMvdDigi.C.

References PndSdsDigi::GetCharge().

139  {
140  hisStripTop->Fill(fe,col);
141  hisStripChargeTop->Fill(stripdigi->GetCharge());
142  } else {
int col
Definition: anaLmdDigi.C:67
TH1D * hisStripChargeTop
Definition: anaLmdDigi.C:58
int fe
Definition: anaLmdDigi.C:67
TH2I * hisStripTop
Definition: anaLmdDigi.C:48
gROOT LoadMacro ( "../Tools.C"  )
LoadPandaStyle ( )
gROOT Macro ( "$VMCWORKDIR/gconfig/rootlogon.C )
PndMvdCalcFePixel pixelcalc ( 76  ,
84  ,
10   
)
picture ReplaceAll ( ".root"  ,
".ps"   
)
t SetBranchAddress ( "MVDPoint"  ,
mc_array 
)
t SetBranchAddress ( "MVDPixelDigis"  ,
digiPixel_array 
)
t SetBranchAddress ( "MVDStripDigis"  ,
digiStrip_array 
)
hisStripChargeTop SetLineColor ( kBlue  )
hisStripChargeBot SetLineColor ( kRed  )
gPad SetLogy ( )
hisSensxy SetTitle ( "MVD MC  Point,
xy view;x/cm;y/cm  
)
hisSensrz SetTitle ( "MVD MC  Point,
rz view;z/cm;r/cm  
)
timer Start ( )
timer Stop ( )
can1 Update ( )

Variable Documentation

Int_t a = 2

Definition at line 150 of file anaMvdDigi.C.

Int_t b = 2

Definition at line 150 of file anaMvdDigi.C.

TCanvas* can1 = new TCanvas("MvdTestPlot","MCHit view in MVD",0,0,a*400,b*400)

Definition at line 152 of file anaMvdDigi.C.

col = pixeldigi->GetPixelColumn()

Definition at line 84 of file anaMvdDigi.C.

Double_t ctime = timer.CpuTime()

Definition at line 201 of file anaMvdDigi.C.

std::string digiFile = namecreator.GetDigiFileName(false)

Definition at line 19 of file anaMvdDigi.C.

TClonesArray* digiPixel_array =new TClonesArray("PndSdsDigiPixel")

Definition at line 31 of file anaMvdDigi.C.

Referenced by anaclust(), and QAmacro_mvd_ana().

TClonesArray* digiStrip_array =new TClonesArray("PndSdsDigiStrip")

Definition at line 34 of file anaMvdDigi.C.

else
Initial value:
{
int col
Definition: anaLmdDigi.C:67
int fe
Definition: anaLmdDigi.C:67
TH2I * hisStripBot
Definition: anaLmdDigi.C:50

Definition at line 142 of file anaMvdDigi.C.

TFile* f = new TFile(inFile.c_str())

Definition at line 24 of file anaMvdDigi.C.

fe = pixeldigi->GetFE()

Definition at line 84 of file anaMvdDigi.C.

TGeoManager* geoMan = (TGeoManager*) gDirectory->Get("FAIRGeom")

Definition at line 37 of file anaMvdDigi.C.

TH1I* hisCol = new TH1I("hiscol","column number",1001,0,1000)

Definition at line 59 of file anaMvdDigi.C.

TH1D* hisde = new TH1D("hisde","MVD MC Points, Energyloss",100,0.,0.002)

Definition at line 47 of file anaMvdDigi.C.

TH1D* hismom = new TH1D("hismom","MVD MC Points, momentum",100,0.,1.5)

Definition at line 49 of file anaMvdDigi.C.

Referenced by ana_MCOpt(), and ana_MCpid().

TH1D* hisPixelCharge = new TH1D("hispixelcharge","Pixel Charge content",100,0.,1e5)

Definition at line 63 of file anaMvdDigi.C.

TH1I* hisPixelCol = new TH1I("hispixelcol","Pixel column channel number on FE",n,low,low+n)

Definition at line 53 of file anaMvdDigi.C.

TH1I* hisPixelFE = new TH1I("hispixelfe","Pixel FE number",n,low,low+n)

Definition at line 57 of file anaMvdDigi.C.

TH1I* hisPixelRow = new TH1I("hispixelrow","Pixel row channel number on FE",n,low,low+n)

Definition at line 55 of file anaMvdDigi.C.

TH1I* hisRow = new TH1I("hisrow","row number",1001,0,1000)

Definition at line 61 of file anaMvdDigi.C.

TH2D* hisrz = new TH2D("hisrz","",400,-20.,20.,400,-15.,25.)

Definition at line 44 of file anaMvdDigi.C.

TH2I* hisStripBot = new TH2I("hisstripbot","Strip Bot channel&fe numbers",20,0,20,130,0,130)

Definition at line 67 of file anaMvdDigi.C.

TH1D* hisStripCharge = new TH1D("hisstripcharge","Strip Charge content",100,0.,1e5)

Definition at line 71 of file anaMvdDigi.C.

TH1D* hisStripChargeBot = new TH1D("hisstripchargebot","Strip Charge content",100,0.,1e5)

Definition at line 76 of file anaMvdDigi.C.

TH1D* hisStripChargeTop = new TH1D("hisstripchargetop","Strip Charge content",100,0.,1e5)

Definition at line 73 of file anaMvdDigi.C.

TH1I* hisStripStrip = new TH1I("hisstripstrip","Strip numbers",15*128,0,15*128)

Definition at line 69 of file anaMvdDigi.C.

TH2I* hisStripTop = new TH2I("hisstriptop","Strip Top channel&fe numbers",20,0,20,130,0,130)

Definition at line 65 of file anaMvdDigi.C.

TH2D* hisxy = new TH2D("hisxy","",400,-15.,15.,400,-15.,15.)

Definition at line 41 of file anaMvdDigi.C.

std::string inFile = namecreator.GetSimFileName(false)

Definition at line 18 of file anaMvdDigi.C.

TVector2 localdiff

Definition at line 83 of file anaMvdDigi.C.

TVector2 localmc

Definition at line 83 of file anaMvdDigi.C.

TVector2 locals

Definition at line 83 of file anaMvdDigi.C.

int low = 0

Definition at line 51 of file anaMvdDigi.C.

Referenced by plotTrackCands(), and toy_core_ntp().

TClonesArray* mc_array =new TClonesArray("PndSdsMCPoint")

Definition at line 28 of file anaMvdDigi.C.

TVector3 mommc

Definition at line 81 of file anaMvdDigi.C.

mypad =0

Definition at line 154 of file anaMvdDigi.C.

int n = 100

Definition at line 51 of file anaMvdDigi.C.

PndFileNameCreator namecreator("../data/Lars/MvdDtsSim.root")
int nrFeChannels =par->GetNrFECh()

Definition at line 91 of file anaMvdDigi.C.

int nrStrips =par->GetNrTopFE()*nrFeChannels

Definition at line 92 of file anaMvdDigi.C.

PndMvdStripDigiPar* par = (PndMvdStripDigiPar*)gROOT->FindObject("MVDStripDigiParRect")

Definition at line 88 of file anaMvdDigi.C.

TFile* parDB = new TFile(parfile.c_str())

Definition at line 87 of file anaMvdDigi.C.

std::string parfile = "../data/Lars/MvdDtsParams.root"

Definition at line 20 of file anaMvdDigi.C.

TString picture = namecreator.GetDigiFileName(false)

Definition at line 21 of file anaMvdDigi.C.

Referenced by anaclust(), and QAmacro_mvd_ana().

row = pixeldigi->GetPixelRow()

Definition at line 84 of file anaMvdDigi.C.

Double_t rtime = timer.RealTime()

Definition at line 200 of file anaMvdDigi.C.

int strip = fe * nrFeChannels + col
TTree* t =(TTree *) f->Get("pndsim")

Definition at line 25 of file anaMvdDigi.C.

TStopwatch timer

Definition at line 12 of file anaMvdDigi.C.

Double_t tmpx

Definition at line 82 of file anaMvdDigi.C.

Double_t tmpy

Definition at line 82 of file anaMvdDigi.C.

Double_t tmpz

Definition at line 82 of file anaMvdDigi.C.

TVector3 vecmc

Definition at line 81 of file anaMvdDigi.C.

bool verbose = false

Definition at line 4 of file anaMvdDigi.C.

double x

Definition at line 85 of file anaMvdDigi.C.

double y

Definition at line 85 of file anaMvdDigi.C.