-
Notifications
You must be signed in to change notification settings - Fork 484
separate T0 and V0 directory, V0 geometry and hits #1818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ddb7303
first separation T0 V0
AllaMaevskaya 5496722
T0 simulation works with this
AllaMaevskaya e6994b8
move Hit to common
AllaMaevskaya ed0027c
T0 digitzation as a part of FIT
AllaMaevskaya cf67921
add run_reco_t0
AllaMaevskaya 871f075
first separation T0 V0
AllaMaevskaya 4756db1
T0 simulation works with this
AllaMaevskaya dd9f370
move Hit to common
AllaMaevskaya 3f3e7d2
T0 digitzation as a part of FIT
AllaMaevskaya e22a6c9
add run_reco_t0
AllaMaevskaya 74f0306
merge with dev 21.03.2019
AllaMaevskaya f95e36f
MCLabels added again
AllaMaevskaya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Libraries | ||
| add_subdirectory(base) | ||
| add_subdirectory(simulation) | ||
| add_subdirectory(reconstruction) | ||
| add_subdirectory(common) | ||
| add_subdirectory(T0) | ||
| #add_subdirectory(V0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Libraries | ||
| add_subdirectory(base) | ||
| add_subdirectory(simulation) | ||
| add_subdirectory(reconstruction) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| set(MODULE_NAME "T0Base") | ||
|
|
||
| O2_SETUP(NAME ${MODULE_NAME}) | ||
|
|
||
| set(SRCS | ||
| src/Geometry.cxx | ||
| ) | ||
|
|
||
| set(HEADERS | ||
| include/${MODULE_NAME}/Geometry.h | ||
| ) | ||
|
|
||
| Set(LINKDEF src/T0BaseLinkDef.h) | ||
| Set(LIBRARY_NAME ${MODULE_NAME}) | ||
| set(BUCKET_NAME fit_base_bucket) | ||
|
|
||
| O2_GENERATE_LIBRARY() | ||
|
|
||
| install( | ||
| DIRECTORY files | ||
| DESTINATION share/Detectors/T0/ | ||
| ) |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| #ifdef __CLING__ | ||
|
|
||
| #pragma link off all globals; | ||
| #pragma link off all classes; | ||
| #pragma link off all functions; | ||
|
|
||
| #pragma link C++ class o2::t0::Geometry + ; | ||
|
|
||
| #endif |
19 changes: 19 additions & 0 deletions
19
Detectors/FIT/T0/base/src/T0BaseLinkDef.h~first separation T0 V0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright CERN and copyright holders of ALICE O2. This software is | ||
| // distributed under the terms of the GNU General Public License v3 (GPL | ||
| // Version 3), copied verbatim in the file "COPYING". | ||
| // | ||
| // See http://alice-o2.web.cern.ch/license for full licensing information. | ||
| // | ||
| // In applying this license CERN does not waive the privileges and immunities | ||
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
|
|
||
| #ifdef __CLING__ | ||
|
|
||
| #pragma link off all globals; | ||
| #pragma link off all classes; | ||
| #pragma link off all functions; | ||
|
|
||
| #pragma link C++ class o2::t0::Geometry + ; | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| #if !defined(__CLING__) || defined(__ROOTCLING__) | ||
| #include "FITSimulation/Detector.h" | ||
| #include "FITBase/Digit.h" | ||
| #include <TH2F.h> | ||
| #endif | ||
|
|
||
| void readHitsDigits() | ||
| { | ||
| using namespace o2::fit; | ||
| // using namespace o2::fit::Digit; | ||
|
|
||
| // Create histograms | ||
| TDirectory* cwd = gDirectory; | ||
| gDirectory = 0x0; | ||
|
|
||
| TH2F* hMultHit = new TH2F("hMultHits", "photons Hits ", 210, 0, 210, 500, 0, 5000); | ||
| TH2F* hTimeHit = new TH2F("hTimeAChit", "Time Hits", 210, 0, 210, 1000, 0, 15); | ||
| TH2F* hMultDig = new TH2F("hMultDig", "photons Digits ", 210, 0, 210, 500, 0, 20); | ||
| TH2F* hTimeDig = new TH2F("hTimeDig", "Time Digits", 210, 0, 210, 300, 0, 15); | ||
|
|
||
| gDirectory = cwd; | ||
|
|
||
| TFile* fhit = new TFile("o2sim.root"); | ||
| TTree* hitTree = (TTree*)fhit->Get("o2sim"); | ||
| std::vector<HitType>* hitArray = nullptr; | ||
| hitTree->SetBranchAddress("FITHit", &hitArray); | ||
| Int_t nevH = hitTree->GetEntries(); // hits are stored as one event per entry | ||
| std::cout << "Found " << nevH << " events with hits " << std::endl; | ||
|
|
||
| Double_t hit_time[240]; | ||
| Int_t countE[240]; | ||
| // Event ------------------------- LOOP | ||
| for (Int_t ievent = 0; ievent < nevH; ievent++) { | ||
| hitTree->GetEntry(ievent); | ||
| for (int ii = 0; ii < 240; ii++) { | ||
| countE[ii] = 0; | ||
| hit_time[ii] = 0; | ||
| } | ||
| for (auto& hit : *hitArray) { | ||
| Int_t detID = hit.GetDetectorID(); | ||
| hit_time[detID] = hit.GetTime(); | ||
| hTimeHit->Fill(detID, hit_time[detID]); | ||
| if (hit_time[detID] < 10 && detID < 96) | ||
| std::cout << ievent << " " << detID << " time " << hit_time[detID] << endl; | ||
|
|
||
| countE[detID]++; | ||
| } | ||
| for (int ii = 0; ii < 208; ii++) { | ||
| if (countE[ii] > 100) { | ||
| hMultHit->Fill(ii, countE[ii]); | ||
| // std::cout<<ii<<" "<<countE[ii]<<endl; | ||
| } | ||
| } | ||
| } | ||
| TFile* fdig = TFile::Open("o2sim_digi.root"); | ||
| std::cout << " Open digits file " << std::endl; | ||
| TTree* digTree = (TTree*)fdig->Get("o2sim"); | ||
| o2::fit::Digit* digArr = new Digit; | ||
| digTree->SetBranchAddress("FITDigit", &digArr); | ||
| Int_t nevD = digTree->GetEntries(); // digits in cont. readout may be grouped as few events per entry | ||
| std::cout << "Found " << nevD << " events with digits " << std::endl; | ||
| Float_t cfd[208], amp[208]; | ||
| for (Int_t iev = 0; iev < nevD; iev++) { | ||
| digTree->GetEvent(iev); | ||
| for (int ii = 0; ii < 208; ii++) { | ||
| cfd[ii] = amp[ii] = 0; | ||
| } | ||
| for (const auto& d : digArr->getChDgData()) { | ||
| Int_t mcp = d.ChId; | ||
| cfd[mcp] = d.CFDTime; | ||
| amp[mcp] = d.QTCAmpl; | ||
| // cout<<iev<<" "<<mcp<<" "<< cfd[mcp]<<" "<< amp[mcp]<<endl; | ||
| hMultDig->Fill(Float_t(mcp), amp[mcp]); | ||
| hTimeDig->Fill(Float_t(mcp), cfd[mcp]); | ||
| } | ||
| } | ||
| TFile* Hfile = new TFile("FigFit_dig_pp.root", "RECREATE"); | ||
| printf("Writting histograms to root file \n"); | ||
| Hfile->cd(); | ||
| //Create a canvas, set the view range, show histograms | ||
| // TCanvas *c1 = new TCanvas("c1","Alice T0 Time ",400,10,600,600); | ||
| hTimeHit->Write(); | ||
| hMultHit->Write(); | ||
| hTimeDig->Write(); | ||
| hMultDig->Write(); | ||
|
|
||
| } // end of macro | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| #if !defined(__CLING__) || defined(__ROOTCLING__) | ||
| #include "FITSimulation/Detector.h" | ||
| #include "FITBase/Digit.h" | ||
| #include "FITReconstruction/RecPoints.h" | ||
| #include <TH2F.h> | ||
| #endif | ||
| void readRecPoints() | ||
| { | ||
| using namespace o2::fit; | ||
| // using namespace o2::fit::Digit; | ||
|
|
||
| // Create histograms | ||
| TDirectory* cwd = gDirectory; | ||
| gDirectory = 0x0; | ||
|
|
||
| TH2F* hMultRec = new TH2F("hMultRec", "photons Recits ", 210, 0, 210, 500, 0, 1000); | ||
| TH2F* hTimeRec = new TH2F("hTimeRec", "Time Recits", 210, 0, 210, 1000, 1, 13); | ||
| TH1F* ht0AC = new TH1F("hT0AC", "T0AC", 100, -1, 1); | ||
|
|
||
| gDirectory = cwd; | ||
|
|
||
| TFile* frec = TFile::Open("o2reco_fit.root"); | ||
| std::cout << " Open rec file " << std::endl; | ||
| TTree* recTree = (TTree*)frec->Get("o2sim"); | ||
| o2::fit::RecPoints* recArr = new RecPoints; | ||
| recTree->SetBranchAddress("FITRecPoints", &recArr); | ||
| Int_t nevD = recTree->GetEntries(); // recits in cont. readout may be grouped as few events per entry | ||
| std::cout << "Found " << nevD << " events with recits " << std::endl; | ||
| Float_t cfd[208], amp[208]; | ||
| for (Int_t iev = 0; iev < nevD; iev++) { | ||
| recTree->GetEvent(iev); | ||
|
|
||
| Float_t t0AC = recArr->GetCollisionTime(0); | ||
| Float_t eventtime = recArr->GetTimeFromDigit(); | ||
| ht0AC->Fill(t0AC - eventtime); | ||
| std::cout << iev << " AC " << recArr->GetCollisionTime(0) << " " << eventtime << std::endl; | ||
| for (int ii = 0; ii < 208; ii++) { | ||
| cfd[ii] = amp[ii] = 0; | ||
| } | ||
| for (const auto& d : recArr->getChDgData()) { | ||
| Int_t mcp = d.ChId; | ||
| cfd[mcp] = d.CFDTime; | ||
| amp[mcp] = d.QTCAmpl; | ||
| // cout<<iev<<" "<<mcp<<" "<< cfd[mcp]<<" "<< amp[mcp]<<endl; | ||
| hMultRec->Fill(Float_t(mcp), amp[mcp]); | ||
| hTimeRec->Fill(Float_t(mcp), cfd[mcp]); | ||
| } | ||
| } | ||
| TFile* Hfile = new TFile("FigFit_rec_pp.root", "RECREATE"); | ||
| printf("Writting histograms to root file \n"); | ||
| Hfile->cd(); | ||
| //Create a canvas, set the view range, show histograms | ||
| // TCanvas *c1 = new TCanvas("c1","Alice T0 Time ",400,10,600,600); | ||
| hTimeRec->Write(); | ||
| hMultRec->Write(); | ||
| ht0AC->Write(); | ||
|
|
||
| } // end of macro |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you nee o2::fit namespace declaration here? Below you use explicitly
o2::fit::Digit.