FairRoot/PandaRoot
Functions | Variables
GammaSpectraAnalysis.C File Reference
#include <vector>

Go to the source code of this file.

Functions

gSystem Load ("libHypGe")
 
timer Start ()
 
b SetBranchAddress ("HypGePoint",&hit_bar)
 
b SetBranchAddress ("MCTrack",&mc_bar)
 
cout<< b-> GetEntriesFast ()
 
gamTde Draw ()
 
timer Stop ()
 

Variables

TStopwatch timer
 
TFile * g = new TFile("sim_hypGe_BgUrqmd2.root")
 
TTree * b =(TTree *) g->Get("pndsim")
 
TClonesArray * hit_bar =new TClonesArray("PndHypGePoint")
 
TClonesArray * mc_bar =new TClonesArray("PndMCTrack")
 
TH1D * gamTde = new TH1D("gamTde","total gam energy deposit ",500,0.006,0.0012)
 
bool verbose = false
 
Int_t MotherId
 
Int_t Motherpdg
 
TVector3 vecs
 
TVector3 pos
 
int mcpdg = -1
 
int ev
 
Double_t mult
 
Double_t En
 
Double_t Eng
 
Double_t Enth
 
int count
 
TCanvas * can3 = new TCanvas("can3","germanium detector",0,0,1000,1000)
 
Double_t rtime = timer.RealTime()
 
Double_t ctime = timer.CpuTime()
 

Function Documentation

gamTde Draw ( )

Definition at line 64 of file NHitsPerEvent.C.

64  {
65 
66  std::cout << "mvdHitArray: " << mvdHitArray->GetEntries() << " projectedHitArray " << mvdProjectedArray->GetEntries() << std::endl;
67 
68 // gHitPoints->Clear();
71  //if (gHitPoints->GetN() != x.size()) gHitPoints->Expand(x.size());
72 
73  std::cout << "NHits: " << gHitPoints->GetN() << std::endl;
74  gHitPoints->Draw("apl");
75  gProjections->Draw("pl");
76 }
void ExtractData(TClonesArray *array, TGraph *g)
Definition: NHitsPerEvent.C:78
TGraph * gHitPoints
Definition: NHitsPerEvent.C:15
TClonesArray * mvdHitArray
Definition: NHitsPerEvent.C:12
TClonesArray * mvdProjectedArray
Definition: NHitsPerEvent.C:13
TGraph * gProjections
Definition: NHitsPerEvent.C:16
cout<<b-> GetEntriesFast ( )

Definition at line 49 of file GammaSpectraAnalysis.C.

References Double_t, PndHypGePoint::GetEnergyLoss(), PndHypGePoint::GetTrackID(), and i.

53  {
54  Eng=0.;
55  b->GetEntry(k);
56  //if(verbose) cout<<"Event No "<<j<<endl;
57  for (Int_t i=0; i<hit_bar->GetEntriesFast(); i++)
58  {
59  PndHypGePoint *hitgam=(PndHypGePoint*)hit_bar->At(i);
60 
61  PndMCTrack *mcgam = (PndMCTrack*)mc_bar->At(hitgam->GetTrackID());
62 
63  Double_t rande;
64  //rande= gRandom->Gaus(hitgam->GetEnergyLoss(),0.000003);
65  //if (sci->Getpdgcode())
66 
67 
68 
69  //if (sci)cout<<sci->GetEnergyLoss()<<endl;
70  //En +=gRandom->Gaus(0,0.000003);
71  //randy= gRandom->Gaus(0,1);
72 
73 
74 
75 
76  Eng =Eng + (hitgam->GetEnergyLoss());
77  //Eng =Eng + (rande);
78 
79  }//end for i (points in event)
80  //count =0;
81  if(Eng>0)gamTde->Fill(Eng);
82 
83 
84 
85  }// end for j (events)
Int_t i
Definition: run_full.C:25
TTree * b
Int_t GetTrackID() const
Definition: PndHypGePoint.h:51
TClonesArray * hit_bar
Double_t
TH1D * gamTde
Double_t Eng
TClonesArray * mc_bar
Double_t GetEnergyLoss() const
Definition: PndHypGePoint.h:62
gSystem Load ( "libHypGe"  )
b SetBranchAddress ( "HypGePoint"  ,
hit_bar 
)
b SetBranchAddress ( "MCTrack"  ,
mc_bar 
)
timer Start ( )
timer Stop ( )

Variable Documentation

TTree* b =(TTree *) g->Get("pndsim")

Definition at line 24 of file GammaSpectraAnalysis.C.

Referenced by KFParticleBase::AddDaughterWithEnergyCalc(), KFParticleBase::AddDaughterWithEnergyFit(), KFParticleBase::AddDaughterWithEnergyFitMC(), AllNeutronAnalysis(), AllNeutronAnalysis_job(), AllNeutronAnalysis_job_edit(), anaclust(), AnalyseThetaRadiusCorrelation(), PndTrkTrackFinder::Apollonius(), PndLmdSensorAligner::applyDynamicCut(), PndFtsLineApproximator::approxInnerLine(), PndFtsLineApproximator::approxOuterLine(), autocutx(), PndLmdStripClusterTask::Backmap(), PndSdsStripClusterTask::Backmap(), PndRichReco::BetaPeakFinding(), BOOST_AUTO_TEST_CASE(), PndHypGeSpectrumAnalyser::Calibrate(), PndTrkTrackFinder::CircleBy3Points(), RhoCandidate::CloneInTree(), PndTrackCombiner::combine(), config_pad(), KFParticleSIMD::Construct(), Photospp::PhotosBranch::createBranches(), GeCluster::CreateCluster(), createRootGeometry_DIRC(), createRootGeometry_DIRC_fsEVdroplens_MCPs(), createRootGeometry_DIRC_sepEV_06_2013(), createRootGeometry_DIRC_sepEV_MCPs(), createRootGeometry_DIRC_updated_06_2013(), PndTrkLegendreSecTask::CreateSkewHitList(), PndTrkLegendreTask::CreateSkewHitList(), PndTrkLegendreSecTask2::CreateSkewHitList(), PndTrkTrackFinder::CreateSkewHitList(), cutfinderx(), PndFTSCADisplay::DrawGBHits(), DrawOriginTrackLipse(), PndFTSCADisplay::DrawParticleGlobal(), emc_module4_StraightGeo24_ste(), eventDisplay(), PndSttHelixHitProducer::Exec(), PndHypStripClusterTask::Exec(), PndHypKalmanTask::Exec(), PndTrkTrackFinder::Exec(), PndHypDPatternRecoTask::Exec(), PndBarrelTrackFinder::FindInterestingRegions(), PndTrkCTGeometryCalculations::FindTrackEntranceExitHexagonCircleLeft(), PndSttTrackFinderReal::FindTrackEntranceExitHexagonCircleLeft(), PndTrkCTGeometryCalculations::FindTrackEntranceExitHexagonCircleLeft2(), PndTrkCTGeometryCalculations::FindTrackEntranceExitHexagonCircleRight(), PndSttTrackFinderReal::FindTrackEntranceExitHexagonCircleRight(), PndTrkCTGeometryCalculations::FindTrackEntranceExitHexagonCircleRight2(), PndSttMvdGemTracking::Fit(), RhoKalmanVtxFitter::FitNode(), PndEmcPSAParabolic::FitPeak(), PndEmcPSAParabolicBaseline::FitPeak(), for(), GammaSpectraAnalysis_CableTest(), GammaSpectraAnalysis_NoH(), GammaSpectraAnalysis_NoH_Split(), gem_material_ana1(), PndFTSTopoReconstructor::GetChiToPrimVertex(), PndSttHitProducerIdeal::GetClostestApproachToWire(), PndFtsHitProducerIdeal::GetClostestApproachToWire(), KFParticleBase::GetDStoParticleBy(), KFParticleBaseSIMD::GetDStoParticleBy(), KFParticleBase::GetDStoParticleBz(), KFParticleBaseSIMD::GetDStoParticleBz(), KFParticleBase::GetEta(), KFParticleBaseSIMD::GetEta(), PndSttHelixTrackFitter::GetHoughResponse(), PndEmcCluster::GetMcList(), KFParticleBase::GetMeasurement(), KFParticleBaseSIMD::GetMeasurement(), RhoVtxPoca::GetPocaChargedToNeutral(), RhoVtxPoca::GetPocaTwoNeutral(), RhoVtxPoca::GetPocaVtx(), PndSttTrackFinderIdeal::GetTrackletCircular(), getX(), PndSttHelixTrackFitter::Hough(), HypHitAnasigBg_AR(), if(), PndWayFollower::init(), GFFieldManager::init(), genfit::FieldManager::init(), PndTrkCTGeometryCalculations::IntersectionCircle_Segment(), PndSttTrackFinderReal::IntersectionCircle_Segment(), PndTrkCTGeometryCalculations::IntersectionCircle_Segment_forScitil(), PndTrkCTGeometryCalculations::IntersectionsWithClosedbiHexagonLeft(), PndSttTrackFinderReal::IntersectionsWithClosedbiHexagonLeft(), PndTrkCTGeometryCalculations::IntersectionsWithClosedbiHexagonRight(), PndSttTrackFinderReal::IntersectionsWithClosedbiHexagonRight(), PndTrkCTGeometryCalculations::IntersectionsWithClosedPolygon(), PndSttTrackFinderReal::IntersectionsWithClosedPolygon(), PndLineApproximation::linearRegression(), PndGemFindHits::MakeSets(), materialana(), minFunct(), mz_linear_extrapolation(), NeutronAnalysis(), NeutronAnalysis_COSY(), NeutronAnalysis_COSY_CrossSec(), NeutronAnalysis_COSY_edit(), RhoFactory::NewCandidate(), RhoCandList::OccurrencesOf(), FTSCAElementsOnStation< T >::operator+(), TTracksCatCounters< int >::operator/(), PndSttTrackFinderReal::PndSttTrkFindCircles(), PndMvdDigiAna::PrintHistograms(), PndDrc::ProcessHits(), Photospp::Photos::processParticle(), QAmacro_mvd_ana(), genfit::Exception::quiet(), GFException::quiet(), PndRestGas::ReadDD(), MyMainFrame::ReadParameters(), RhoCandList::Remove(), RhoCandList::RemoveClones(), RhoCandList::RemoveFamily(), rotate(), PndKFParticleFinderQA::SaveMCParticles(), PndKFParticleFinderQA::SaveParticles(), KFParticle::SetAtProductionVertex(), PndRecoKalmanTask2::SetBusyCut(), PndRecoMultiKalmanTask::SetBusyCut(), PndRecoKalmanTask::SetBusyCut(), genfit::Exception::setFatal(), GFException::setFatal(), RhoCandidate::SetFit(), KFParticleBase::SetMassConstraint(), KFParticleBaseSIMD::SetMassConstraint(), DecayTreeFitter::DecayChain::setOwner(), RhoColumn::SetUseDefValue(), RhoError::Similarity(), TMVAApply(), KFParticleBase::TransportBz(), RhoKinHyperonVtxFitter::TransportToPoca(), VarCorrP(), PndSttHelixTrackFitter::XYFit(), PndSttHelixTrackFitter::ZFinder(), and PndSttHelixTrackFitter::ZFinderThroughOrigin().

TCanvas* can3 = new TCanvas("can3","germanium detector",0,0,1000,1000)
int count

Definition at line 48 of file GammaSpectraAnalysis.C.

Referenced by AllNeutronAnalysis(), PndMvdEventAna::AnaEvents(), AnalyseThetaRadiusCorrelation(), PndMvdRiemannTrackFinderTaskCutPar::CalcRiemannTracks(), PndEmcMultiWaveformSimulator::CallModifiers(), PndSttMvdGemTracking::CheckCombinatorial(), PndMvdRiemannVertexFinderTask::CheckRecoTrack(), PndMvdRiemannTrackFinderTaskEff::CheckRecoTrack(), PndSttCellTrackletGenerator::CombineTrackletsMultiStagesRecursive(), convolutionAnalysis(), PndTrkTrackFinder::Exec(), PndSciTAnaIdeal::Exec(), GeaneTrackRep::extrapolate(), GeaneTrackRep::extrapolateToPoint(), PndMvdTsEvent::FillGiQdcValues(), PndMvdTsEvent::FillGiTdcValues(), PndMvdTsEvent::FillQdcValues(), PndMvdTsEvent::FillScalerValues(), PndMvdTsEvent::FillSiHits(), PndMvdTsEvent::FillTdcValues(), fittest(), Photospp::Photos::forceBremForBranch(), Photospp::Photos::forceBremForDecay(), GammaSpectraAnalysis_CableTest(), GammaSpectraAnalysis_NoH(), GammaSpectraAnalysis_NoH_Split(), GeaneTrackRep::GeaneTrackRep(), Genfit2Track2PndTrack(), GenfitTrack2PndTrack(), PndMQSdsChargeWeightedPixelMapping::GetCluster(), PndSdsChargeWeightedPixelMapping::GetCluster(), PndMvdTopixHitProducer::GetHit(), PndMQTopixHitProducer::GetHit(), mrftools::getIteratorItemCount(), GeaneTrackRep::getPocaOnLine(), PndEmcMultiWaveformSimulator::GetTotalScale(), NeutronAnalysis(), operator<<(), raytrace_x(), raytrace_z(), PndPattern::SetPatternCount(), Photospp::Photos::suppressBremForBranch(), Photospp::Photos::suppressBremForDecay(), trapmap_barrel(), and trapmap_disc().

Double_t ctime = timer.CpuTime()

Definition at line 100 of file GammaSpectraAnalysis.C.

Double_t Eng
Double_t Enth
int ev
TFile* g = new TFile("sim_hypGe_BgUrqmd2.root")
TH1D* gamTde = new TH1D("gamTde","total gam energy deposit ",500,0.006,0.0012)
TClonesArray* hit_bar =new TClonesArray("PndHypGePoint")
TClonesArray* mc_bar =new TClonesArray("PndMCTrack")
int mcpdg = -1
Int_t MotherId
Int_t Motherpdg
Double_t mult
TVector3 pos

Definition at line 43 of file GammaSpectraAnalysis.C.

Referenced by PndDrcLutNode::AddEntry(), PndDrc::AddHit(), PndDskCerenkov::AddPWay(), PndModuleCombiner::addUnusedHits(), AllNeutronAnalysis(), AnalyseThetaRadiusCorrelation(), anaRadLength(), bestSepEvt(), DecayTreeFitter::ParticleBase::bFieldOverC(), PndSttCellTrackletGenerator::CalcDeviation(), PndSttCellTrackletGenerator::CalcDeviationOfRiemannTrack(), PndMvdRiemannTrackFinderTaskCutPar::CalcParHists(), RhoKalmanVtxFitter::CalcPrgParams(), PndTrkTrack::ComputeMomentumAtPosition(), PndGemFindHits::ConfirmHits2(), PndGemTrackFinderOnHits::CreateTracks(), PndMvdGemTrackFinderOnHits::CreateTracks(), PndGemTrackFinderOnHitsTB::CreateTracks(), PndSttTubeMapCreatorRoot::CreateTubeMap(), PndEmcDigi::depthPosition(), PndGemDigitize::DigitizeEvent(), PndRiemannTrack::distCircle(), PndGemTrackFinderIdeal::DoFind(), PndSttTrackFinderIdeal::DoFind(), PndSttCellTrackFinderAnalysisTask::DrawCombiRiemannPlots(), PndSttCellTrackFinderAnalysisTask::DrawFirstRiemannPlots(), PndTrkGemCombinatorial::DrawMCPoints(), PndMdtHitProducerIdeal::Exec(), PndRichRecoTask::Exec(), PndDrcAccuDigiPixelDraw::Exec(), PndFtsHitProducerRealFast::Exec(), PndMdtHitProducer::Exec(), PndRichHitProducer::Exec(), PndFtsHitProducerMcPointCoordinates::Exec(), PndSttHitProducerRealFast::Exec(), PndSttHelixHitProducer::Exec(), PndFtsHitProducerRealFull::Exec(), PndSttHitProducerRealFull::Exec(), PndMixBackgroundEvents::Exec(), PndSttHitProducerIdeal::Exec(), PndHypIdealTrackingTask::Exec(), PndFtsHitProducerIdeal::Exec(), PndGemIdealHitProducer::Exec(), PndHypMicroIdealWriter::Exec(), PndHypMicroWriter::Exec(), PndLmdDigiProducer::Exec(), PndRichHitFinder::Exec(), PndGemSmearingTask::Exec(), PndHypIdealRecoTask::Exec(), PndMvdIdealRecoTask::Exec(), PndFastSim::Exec(), PndLmdPixelHitProducerFast::Exec(), PndTrkTrackFinder::Exec(), PndHypDKalmanTask::Exec(), PndSciTAnaIdeal::Exec(), PndSdsHitProducerIdeal::Exec(), PndHypDPatternRecoTask::Exec(), PndEmcAnalysis::Exec(), PndSdsIdealRecoTask::Exec(), PndMdtHitProducer::Exec_old(), GeaneTrackRep::extrapolate(), RKTrackRep::extrapolate(), GFTrack::fillGeoTrack(), PndGemFindHits::FindHits(), PndGemFindHits::FindHits2(), for(), GammaSpectraAnalysis_CableTest(), GammaSpectraAnalysis_NoH(), GammaSpectraAnalysis_NoH_Split(), PndLmdDim::Get_matrix_difference(), GFTools::getBiasedSmoothedPos(), PndMQSdsChargeWeightedPixelMapping::GetCluster(), PndSdsChargeWeightedPixelMapping::GetCluster(), PndSttCellTrackletGenerator::GetDeviationCount(), PndMQTopixHitProducer::GetHit(), PndSciTAnaIdeal::GetRiemannTrack(), PndSttTubeIdMapCreatorRoot::GetRow(), PndSttTubeIdMapCreatorRoot::GetSector(), GFTools::getSmoothedChiSqu(), GFTools::getSmoothedPos(), PndStringVector::GetString(), PndStringSeparator::GetString(), PndEmcDigiCaloDraw::GetVector(), PndEmcHitCaloDraw::GetVector(), PndSttCellTrackFinderTask::Init(), NeutronAnalysis(), RhoCalculationTools::P6FromTrajectory(), plotHoughTrackCand(), PndEmcStructure::PndEmcStructure(), PndRiemannTrackFinder::PndRiemannTrackFinder(), PndSttCellTrackFinderData::PndSttCellTrackFinderData(), PndBurstContainer::ProcessData(), PndMQMvdPixelDigiProcessorBursts::ProcessData(), PndDisc::ProcessHits(), PndEmcApd::ProcessHits(), PndEmc::ProcessHits(), PndHypGe::ProcessHits(), PndDsk::ProcessHitsCerenkov_FLG(), PndTrackDraw::PropagateTrack(), PndTrackDraw::PropagateTrackHelix(), PndAnalysis::Propagator(), PndRichReco::RichFullReconstruction(), RKTrackRep::RKutta(), PndMQFileSinkBursts::Run(), PndDskCerenkov::Set5RefPosition(), GFTrackCand::setComplTrackSeed(), PndTrackingQualityRecoInfo::SetMCVertex(), PndRichPhoton::SetMirrRefPos(), RhoKinVtxFitter::SetOutput(), RhoKinFitter::SetOutput(), RhoKinHyperonFitter::SetOutput(), RhoKinHyperonVtxFitter::SetOutput(), PndDrcLutNode::SetPos(), PndMdtDigi::SetPosition(), PndTrkIndivisibleHit::SetPosition(), PndTrkHit::SetPosition(), PndEmcCluster::SetPosition(), PndRichBarPoint::SetPosition0(), PndTrackingQualityMCInfo::SetPositionFirst(), PndTrackingQualityRecoInfo::SetPositionFirst(), PndTrackingQualityMCInfo::SetPositionLast(), PndTrackingQualityRecoInfo::SetPositionLast(), PndSciTAnaIdeal::SetSciTEventCorr(), PndRichPhoton::SetTrackPos(), PndRichRecoTask::SetTrackPosition(), PndRichRecoTask::SetTrackPositionSecond(), GFTrackCand::setTrackSeed(), PndLmdTrackFinderCATask::SortHitsByZ(), PndLmdTrackFinderTask::SortHitsByZ(), PndStraightLineTrackFinderTask::SortHitsByZ(), PndFts2::Split(), PndFts::Split(), PndStt::Split(), RhoCalculationTools::StateFromTrajectory(), toy_core(), toy_core_ntp(), RhoCalculationTools::TransportToZ(), DecayTreeFitter::Fitter::updateCand(), DecayTreeFitter::RecoComposite::updCache(), PndEmcClusterProperties::Where(), and PndSttMvdGemTracking::ZFind().

Double_t rtime = timer.RealTime()

Definition at line 99 of file GammaSpectraAnalysis.C.

TStopwatch timer

Definition at line 13 of file GammaSpectraAnalysis.C.

TVector3 vecs
bool verbose = false

Definition at line 38 of file GammaSpectraAnalysis.C.