Skip to content
Snippets Groups Projects
Commit 72b1d7f9 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* progress on shift macro

parent 74dd664f
No related branches found
No related tags found
No related merge requests found
Pipeline #77546 passed
......@@ -8,7 +8,7 @@
/*****************************************************************************
* Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk *
* *
* Creation Date : march 2012 *
* Creation Date : july 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
......@@ -75,8 +75,8 @@ void Analysis::TreatEvent(){
TVector3 OuterPos2 = Strasse->GetOuterPositionOfInteraction(1);
TVector3 Proton2 = OuterPos2-InnerPos2;
double deltaPhi = abs(Proton1.Phi()/deg-Proton2.Phi()/deg);
double sumTheta = Proton1.Theta()/deg+Proton2.Theta()/deg;
deltaPhi = abs(Proton1.Phi()/deg-Proton2.Phi()/deg);
sumTheta = Proton1.Theta()/deg+Proton2.Theta()/deg;
Theta12 = Proton1.Angle(Proton2)/deg;
// reject event that make no physical sense
......@@ -136,6 +136,9 @@ void Analysis::InitOutputBranch() {
RootOutput::getInstance()->GetTree()->Branch("deltaX",&deltaX,"deltaX/D");
RootOutput::getInstance()->GetTree()->Branch("deltaY",&deltaY,"deltaY/D");
RootOutput::getInstance()->GetTree()->Branch("deltaZ",&deltaZ,"deltaZ/D");
RootOutput::getInstance()->GetTree()->Branch("deltaPhi",&deltaPhi,"deltaPhi/D");
RootOutput::getInstance()->GetTree()->Branch("sumTheta",&sumTheta,"sumTheta/D");
RootOutput::getInstance()->GetTree()->Branch("Distance",&Distance,"Distance/D");
RootOutput::getInstance()->GetTree()->Branch("InteractionCoordinates","TInteractionCoordinates",&DC);
......@@ -160,6 +163,8 @@ void Analysis::ReInitValue(){
deltaY=-1000;
deltaZ=-1000;
Distance=-1000;
sumTheta=-1000;
deltaPhi=-1000;
}
......
......@@ -62,6 +62,8 @@ class Analysis: public NPL::VAnalysis{
double deltaY;
double deltaZ;
double Distance;
double deltaPhi;
double sumTheta;
TLorentzVector LV_A;
TLorentzVector LV_T;
TLorentzVector LV_B;
......
......@@ -3,12 +3,22 @@ void Shift(){
TFile* file_shifted = TFile::Open("../../Outputs/Analysis/strasse_shifted.root");
TTree* ok= (TTree*) file_ok->FindObjectAny("PhysicsTree");
TTree* shifted= (TTree*) file_shifted->FindObjectAny("PhysicsTree");
TCanvas* ctheta= new TCanvas("ControlTheta","ControlTheta",1000,1000);
TCanvas* ctheta= new TCanvas("ControlTheta","ControlTheta",2000,1000);
ctheta->Divide(2,1);
ctheta->cd(1);
string cond = "Theta12!=-1000";
ok->Draw("Theta12>>ht(5000)",cond.c_str(),"") ;
shifted->Draw("Theta12>>hts(5000)",cond.c_str(),"same") ;
TH1* hts= (TH1*) gDirectory->FindObjectAny("hts");
hts->SetFillColor(kOrange-3);
hts->SetLineColor(kOrange-3);
ctheta->cd(2);
cond = "deltaPhi!=-1000";
ok->Draw("deltaPhi>>hp(5000)",cond.c_str(),"") ;
shifted->Draw("deltaPhi>>hps(5000)",cond.c_str(),"same") ;
TH1* hps= (TH1*) gDirectory->FindObjectAny("hps");
hps->SetFillColor(kOrange-3);
hps->SetLineColor(kOrange-3);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment