Skip to content

Commit

Permalink
Merge pull request #2 from lopezzot/dev
Browse files Browse the repository at this point in the history
from dev to main for v1.2
  • Loading branch information
lopezzot authored Sep 14, 2021
2 parents 67de77f + d33a2fe commit a0016c7
Show file tree
Hide file tree
Showing 9 changed files with 1,645 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Lorenzo Pezzotti .gitignore configuration
*.swp #vim .swp files
*.pyc #python *.pyc files
*.root #ROOT *.root files
*.swp
*.pyc
**/*.root

#Standard C++ .gitignore configuration below

Expand Down
2 changes: 1 addition & 1 deletion ATLHECTB_init_vis.mac
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#/vis/viewer/set/lineSegmentsPerCircle 100
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 m
/vis/scene/add/axes 0 0 0 1 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
Expand Down
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Ask authors for access to datasets.

| ATLHECTB | Reproduce data | Reproduce analysis | Comments |
| ------------- | ---------- | ----------- | ----------- |
| v1.2 <br /> Dataset #1 <br /> tag 1.2_1 | Geant4.10.07.p01 <br /> ATLHECTB v1.2 <br /> ./ATLHECTB -m runcards/ATLHECTBescan_beam1_run.mac -pl FTFP_BERT | root -l <br /> .x ATLHECTBanalysis1_v1p2.C | Analysis reproducable with v1.2 <br /> results for e- and pi-, assuming Data1/ is alongside root macro, Dataset is identical to tag 1.0_1 but with different beam position |
| v1.0 <br /> Dataset #1 <br /> tag 1.0_1 | Geant4.10.07.p01 <br /> ATLHECTB v1.0 <br /> ./ATLHECTB -m runcards/ATLHECTBescan_run.mac -pl FTFP_BERT | root -l <br /> .x ATLHECTBanalysis1_v1p1.C | Analysis reproducable with v1.1 <br /> results for e- and pi-, assuming Data1/ is alongside root macro, Dataset is identical to v1.0 |
| v1.0 <br /> Dataset #1 <br /> tag 1.0_1 | Geant4.10.07.p01 <br /> ATLHECTB v1.0 <br /> ./ATLHECTB -m runcards/ATLHECTBescan_run.mac -pl FTFP_BERT | root -l <br /> .x ATLHECTBanalysis1_v1p0.C | reproducable with v1.0 <br /> results for e-, assuming Data1/ is alongside root macro |

Expand Down Expand Up @@ -147,7 +148,40 @@ Parser options
```sh
condor_wait -status log/*.log
```

6. additional info from HTCondor (optional) \
rm all your jobs
```sh
condor_rm username
```
inspect your accounting group
```sh
condor_q owner $LOGNAME -long | grep '^AccountingGroup' | sort | uniq -c
```
display all accounting groups
```sh
haggis group list
```
display your accounting groups
```sh
haggis rights
```
check what accounting group a job has
```sh
condor_q jobid.0 -af AccountingGroup
```
specify the accounting group for yout job, to be added in the .sub file
```sh
+AccountingGroup = "group_u_*"
```
check job CPU usage
```sh
condor_q -l jobid.0 | grep CPUsUsage
```
ssh to machine where job is running
```sh
condor_ssh_to_job jobid.0
```

### Get ATLAS HEC geo parameters from mysql database
Caveat: ATLHECTB geo parameters are hardcoded in the DetectorConstruction, instructions to get geo parameters from ATLAS mysql database are intended for comparisons only.

Expand Down Expand Up @@ -212,5 +246,5 @@ Here is my standard Geant4 installation (example with Geant4.10.7.p01) starting

<!--Selected ATLAS HEC references-->
## Selected ATLAS HEC references
- Geant4 evaluation with test-beam data (NIM A560 (2006)): [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://www.sciencedirect.com/science/article/pii/S0168900205026835)
- Beam tests performance (NIM A482 (2002)): [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://www.sciencedirect.com/science/article/pii/S0168900201013389)
- <em>GEANT4 physics evaluation with testbeam data of the ATLAS hadronic end-cap calorimeter</em>, NIM A560 (2006): [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://www.sciencedirect.com/science/article/pii/S0168900205026835)
- <em>Performance of the ATLAS hadronic end-cap calorimeter in beam tests</em>, NIM A482 (2002): [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://www.sciencedirect.com/science/article/pii/S0168900201013389)
53 changes: 53 additions & 0 deletions analysis/v1.2/ATLHECTBanalysis1_v1p2.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//**************************************************
// \file ATLHECTBanalysis1_v1p2.cc
// \brief: Analysis #1 of ATLHECTB v1.2
// \author: Lorenzo Pezzotti (CERN EP-SFT-sim)
// @lopezzot
// \start date: 13 September 2021
//**************************************************

//Includers from C++
//
#include <string>
#include <array>

//Includers from project files
//
#include "emanalysis.h"
#include "pianalysis.h"
#include "ecalibrate.h"
#include "picalibrate.h"

void ATLHECTBanalysis1_v1p2(){

// Analysis of e- data
// energies 20, 40, 50, 80, 100, 119.1, 147.8 GeV
//
vector<double> emenergies = {20.,40.,50.,80.,100.,119.1,147.8};
vector<string> emfiles;
for ( unsigned int i=11; i<18; i++ ){
emfiles.push_back( "ATLHECTBout_Run"+std::to_string(i)+".root" );
}
emanalysis( emenergies, emfiles );

// Analysis of pi- data
// energies 20, 30, 40, 50, 60, 80, 100, 120, 150, 180, 200 GeV
//
vector<double> pienergies = {20.,30.,40.,50.,60.,80.,100.,120.,150.,180.,200.};
vector<string> pifiles;
for ( unsigned int i=0; i<11; i++ ){
pifiles.push_back( "ATLHECTBout_Run"+std::to_string(i)+".root" );
}
pianalysis( pienergies, pifiles );

//Analysis to select channels for pi- analysis
//
picalibrate(180., "ATLHECTBout_Run9.root");

//Analysis to select channels for e- analysis
//
ecalibrate(147.8,"ATLHECTBout_Run17.root");

}

//**************************************************
122 changes: 122 additions & 0 deletions analysis/v1.2/ecalibrate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
//**************************************************
// \file ecalibrate.h
// \brief: Analysis #1 of ATLHECTB v1.2
// for e- channels
// \author: Lorenzo Pezzotti (CERN EP-SFT-sim)
// @lopezzot
// \start date: 13 September 2021
//**************************************************

#ifndef ecalibrate_H
#define ecalibrate_H

void ecalibrate( const double& eenergy, const string& efile ){

//Initiate objects through all the analysis
//
cout<<"ATLHECTB analysis of channels to be selected with e- runs"<<endl;
cout<<"---> Analysis at energy(GeV) "<<eenergy<<endl;

string filename = "Data1/"+efile;
TFile* file = TFile::Open( filename.c_str(), "READ" );
TTree* tree = (TTree*)file->Get( "ATLHECTBout" );

vector<double>* M1L1BelAr = NULL;
tree->SetBranchAddress( "M1L1BirkeLayer", &M1L1BelAr );
vector<double>* M1L2BelAr = NULL;
tree->SetBranchAddress( "M1L2BirkeLayer", &M1L2BelAr );
vector<double>* M1L3BelAr = NULL;
tree->SetBranchAddress( "M1L3BirkeLayer", &M1L3BelAr );
vector<double>* M1L4BelAr = NULL;
tree->SetBranchAddress( "M1L4BirkeLayer", &M1L4BelAr );
vector<double>* M2L1BelAr = NULL;
tree->SetBranchAddress( "M2L1BirkeLayer", &M2L1BelAr );
vector<double>* M2L2BelAr = NULL;
tree->SetBranchAddress( "M2L2BirkeLayer", &M2L2BelAr );
vector<double>* M2L3BelAr = NULL;
tree->SetBranchAddress( "M2L3BirkeLayer", &M2L3BelAr );
vector<double>* M2L4BelAr = NULL;
tree->SetBranchAddress( "M2L4BirkeLayer", &M2L4BelAr );
vector<double>* M3L1BelAr = NULL;
tree->SetBranchAddress( "M3L1BirkeLayer", &M3L1BelAr );
vector<double>* M3L2BelAr = NULL;
tree->SetBranchAddress( "M3L2BirkeLayer", &M3L2BelAr );
vector<double>* M3L3BelAr = NULL;
tree->SetBranchAddress( "M3L3BirkeLayer", &M3L3BelAr );
vector<double>* M3L4BelAr = NULL;
tree->SetBranchAddress( "M3L4BirkeLayer", &M3L4BelAr );

double M1L1avg[24]; memset( M1L1avg, 0., 24*sizeof(double));
double M2L1avg[24]; memset( M2L1avg, 0., 24*sizeof(double));
double M3L1avg[24]; memset( M3L1avg, 0., 24*sizeof(double));

double M1L2avg[23]; memset( M1L2avg, 0., 23*sizeof(double));
double M2L2avg[23]; memset( M2L2avg, 0., 23*sizeof(double));
double M3L2avg[23]; memset( M3L2avg, 0., 23*sizeof(double));

double M1L3avg[21]; memset( M1L3avg, 0., 21*sizeof(double));
double M2L3avg[21]; memset( M2L3avg, 0., 21*sizeof(double));
double M3L3avg[21]; memset( M3L3avg, 0., 21*sizeof(double));

double M1L4avg[20]; memset( M1L4avg, 0., 20*sizeof(double));
double M2L4avg[20]; memset( M2L4avg, 0., 20*sizeof(double));
double M3L4avg[20]; memset( M3L4avg, 0., 20*sizeof(double));

//loop over events
//
for (unsigned int evtNo = 0; evtNo<tree->GetEntries(); evtNo++){
tree->GetEntry(evtNo);

for (unsigned int i = 0; i<24; i++){
M2L1avg[i] += M2L1BelAr->at(i)/tree->GetEntries();
M1L1avg[i] += M1L1BelAr->at(i)/tree->GetEntries();
M3L1avg[i] += M3L1BelAr->at(i)/tree->GetEntries();
}
for (unsigned int i = 0; i<23; i++){
M2L2avg[i] += M2L2BelAr->at(i)/tree->GetEntries();
M1L2avg[i] += M1L2BelAr->at(i)/tree->GetEntries();
M3L2avg[i] += M3L2BelAr->at(i)/tree->GetEntries();
}
for (unsigned int i = 0; i<21; i++){
M2L3avg[i] += M2L3BelAr->at(i)/tree->GetEntries();
M1L3avg[i] += M1L3BelAr->at(i)/tree->GetEntries();
M3L3avg[i] += M3L3BelAr->at(i)/tree->GetEntries();
}
for (unsigned int i = 0; i<20; i++){
M2L4avg[i] += M2L4BelAr->at(i)/tree->GetEntries();
M1L4avg[i] += M1L4BelAr->at(i)/tree->GetEntries();
M3L4avg[i] += M3L4BelAr->at(i)/tree->GetEntries();
}
}
double ecut = 9.0;
int channels = 0;

cout<<"List of channels with avg signal above cut"<<endl;
for (unsigned int i = 0; i<24; i++){
if (M2L1avg[i]>ecut){cout<<"M2L1 "<<i<<" "<<M2L1avg[i]<<endl;channels=channels+1;}
if (M1L1avg[i]>ecut){cout<<"M1L1 "<<i<<" "<<M1L1avg[i]<<endl;channels=channels+1;}
if (M3L1avg[i]>ecut){cout<<"M3L1 "<<i<<" "<<M3L1avg[i]<<endl;channels=channels+1;}
}
for (unsigned int i = 0; i<M2L2BelAr->size(); i++){
if (M2L2avg[i]>ecut){cout<<"M2L2 "<<i<<" "<<M2L2avg[i]<<endl;channels=channels+1;}
if (M1L2avg[i]>ecut){cout<<"M1L2 "<<i<<" "<<M1L2avg[i]<<endl;channels=channels+1;}
if (M3L2avg[i]>ecut){cout<<"M3L2 "<<i<<" "<<M3L2avg[i]<<endl;channels=channels+1;}
}
for (unsigned int i = 0; i<M2L3BelAr->size(); i++){
if (M2L3avg[i]>ecut){cout<<"M2L3 "<<i<<" "<<M2L3avg[i]<<endl;channels=channels+1;}
if (M1L3avg[i]>ecut){cout<<"M1L3 "<<i<<" "<<M1L3avg[i]<<endl;channels=channels+1;}
if (M3L3avg[i]>ecut){cout<<"M3L3 "<<i<<" "<<M3L3avg[i]<<endl;channels=channels+1;}
}
for (unsigned int i = 0; i<M2L4BelAr->size(); i++){
if (M2L4avg[i]>ecut){cout<<"M2L4 "<<i<<" "<<M2L4avg[i]<<endl;channels=channels+1;}
if (M1L4avg[i]>ecut){cout<<"M1L4 "<<i<<" "<<M1L4avg[i]<<endl;channels=channels+1;}
if (M3L4avg[i]>ecut){cout<<"M3L4 "<<i<<" "<<M3L4avg[i]<<endl;channels=channels+1;}
}
cout<<"Number of channels above cut: "<<channels<<endl;
cout<<"take first 7 with highest average signal"<<endl;

}

#endif

//**************************************************
Loading

0 comments on commit a0016c7

Please sign in to comment.