/[PAMELA software]/PamCut/CollectionActions/Histo2DActions/ZenVsAzAngleHistoAction/ZenVsAzAngleHistoAction.cpp
ViewVC logotype

Annotation of /PamCut/CollectionActions/Histo2DActions/ZenVsAzAngleHistoAction/ZenVsAzAngleHistoAction.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Mon Apr 5 10:45:47 2010 UTC (14 years, 8 months ago) by pam-mep
Branch: yoyo, MAIN
CVS Tags: Root_V8, start, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.1: +0 -0 lines
first release 

1 pam-mep 1.1 /*
2     * ZenVsAzAngleHistoAction.cpp
3     *
4     * Created on: 28-marth-2010
5     * Author: Vitaly Malakhov
6     */
7    
8     /*! @file ZenVsAzAngleHistoAction.cpp The ZenVsAzAbnleHistoAction class implementation file. */
9    
10     #include "ZenVsAzAngleHistoAction.h"
11     #include "TMath.h"
12    
13     ZenVsAzAngleHistoAction::ZenVsAzAngleHistoAction(const char *actionName, TString outFileBase, TString mode,
14     bool outRoot, bool outText, TString title) :
15     Histo2DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText){
16    
17     }
18    
19     void ZenVsAzAngleHistoAction::OnGood(PamLevel2 *event) {
20     PamTrack *track;
21     track = event->GetTrack(0);
22     Float_t Aaxv = TMath::Abs(track->GetTrkTrack()->axv[0])*TMath::DegToRad();
23     Float_t Aayv = TMath::Abs(track->GetTrkTrack()->ayv[0])*TMath::DegToRad();
24     Float_t PamZenith = TMath::RadToDeg()*asin(sqrt(pow(sin(Aayv), 2) + pow(sin(Aaxv), 2)));
25    
26     Float_t axv = -track->GetTrkTrack()->axv[0] * TMath::DegToRad();
27     Float_t ayv = -track->GetTrkTrack()->ayv[0] * TMath::DegToRad();
28     Float_t angle = atan(sin(TMath::Abs(ayv))/sin(TMath::Abs(axv))) * TMath::RadToDeg();
29    
30     Float_t PamAzim = 360. - angle;
31     if(axv>=0 && ayv >=0) PamAzim = angle;
32     if(axv<0 && ayv >0) PamAzim = 180. - angle;
33     if(axv<0 && ayv <0) PamAzim = 180. + angle;
34    
35     PamAzim = PamAzim * TMath::DegToRad();
36     PamZenith = (180 - PamZenith) * TMath::DegToRad();
37    
38     Fill(TMath::RadToDeg()*PamAzim, TMath::RadToDeg()*PamZenith);
39     }

  ViewVC Help
Powered by ViewVC 1.1.23