Skip to content
Snippets Groups Projects
Commit 48a62e27 authored by chekanov's avatar chekanov
Browse files

Added templates for EIC (A.Kiselev)

parent 582d55db
Branches
No related tags found
No related merge requests found
Showing
with 11835 additions and 2 deletions
ProMC 1.6 Update 2016 (November 27)
Includes a templates for the EIC project (Alexander Kiselev)
authors: S.Chekanov, A.Kiselev
ProMC 1.5.2 Update 2016 (Oct)
install script makes shared library $PROMC/lib/libpromc.so (Alexander Kiselev)
Java GUI viewer is updated to be able to read mirrors
......
No preview for this file type
......@@ -40,6 +40,13 @@ $protocxx --cpp_out=src/pronlo $PRFILE.proto # for release 1.5
$protocxx --python_out=src/pronlo $PRFILE.proto # for release 1.5
rm -f $PRFILE.proto
echo "ProNLO: $PRFILE file for EIC data"
ln -s proto/proeic/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
$protocxx --cpp_out=src/proeic $PRFILE.proto # for release 1.6
$protocxx --python_out=src/proeic $PRFILE.proto # for release 1.6
rm -f $PRFILE.proto
echo "ProReco: $PRFILE file for Reconstructed data"
ln -s proto/proreco/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
......@@ -60,7 +67,6 @@ $protocxx --python_out=src/promc $PRFILE.proto
cp -f src/*.h inc/
rm -f $PRFILE.proto
echo "ProNLO: $PRFILE for NLO data"
ln -s proto/pronlo/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
......@@ -68,6 +74,14 @@ $protocxx --cpp_out=src/pronlo $PRFILE.proto # for release 1.5
$protocxx --python_out=src/pronlo $PRFILE.proto # for release 1.5
rm -f $PRFILE.proto
echo "ProEIC: $PRFILE for EIC data"
ln -s proto/proeic/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
$protocxx --cpp_out=src/proeic $PRFILE.proto # for release 1.6
$protocxx --python_out=src/proeic $PRFILE.proto # for release 1.6
rm -f $PRFILE.proto
echo "ProReco: $PRFILE for Reco data"
ln -s proto/proreco/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
......@@ -97,6 +111,14 @@ $protocxx --python_out=src/pronlo $PRFILE.proto
rm -f $PRFILE.proto
echo "ProEIC: $PRFILE for EIC data"
ln -s proto/proeic/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
$protocxx --cpp_out=src/proeic $PRFILE.proto # for release 1.5
$protocxx --python_out=src/proeic $PRFILE.proto
rm -f $PRFILE.proto
echo "ProNLO: $PRFILE for Reco data"
ln -s proto/proreco/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
......@@ -124,6 +146,13 @@ $protocxx --java_out=java/src $PRFILE.proto
$protocxx --python_out=src/pronlo $PRFILE.proto
rm -f $PRFILE.proto
echo "ProEIC: $PRFILE for EIC data"
ln -s proto/proeic/$PRFILE.proto .
$protocxx --cpp_out=src/proeic $PRFILE.proto # for release 1.6
$protocxx --java_out=java/src $PRFILE.proto
$protocxx --python_out=src/pronlo $PRFILE.proto
rm -f $PRFILE.proto
echo "ProNLO: $PRFILE for Reco data"
ln -s proto/proreco/$PRFILE.proto .
$protocxx --java_out=java/src $PRFILE.proto
......@@ -132,7 +161,6 @@ $protocxx --python_out=src/proreco $PRFILE.proto
rm -f $PRFILE.proto
echo "#### AUX functions ####"
PRFILE="HEvent"
echo "Process $PRFILE proto file"
......@@ -161,6 +189,7 @@ cp -f proto/ProMCBook.* src/
cp -f proto/ProMCBook.* src/promc/
cp -f proto/ProMCBook.* src/proreco/
cp -f proto/ProMCBook.* src/pronlo/
cp -f preic/ProMCBook.* src/proeic/
PROMC_LIB="-L./share/lib -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz"
INCLUD1=-I./share/include
......@@ -203,6 +232,23 @@ else
echo "$AR_LIB was build"
fi
echo "--> Build ProEIC library.."
AR_LIB=share/lib/libproeic.a
XDIR=./src/proeic
for f in $XDIR/*.cc
do
echo "Compiling $f.."
obj=${f%.cc}.o
$CXX $CPP_FLAGS -c $f -o $obj $INCLUD1 $INCLUD2 $INCLUD3 $INCLUD4
$AR rcs $AR_LIB $obj
done
if [ ! -e "$AR_LIB" ]; then
echo "Error! File $AR_LIB does not exist!!!"
else
chmod 755 $AR_LIB
echo "$AR_LIB was build"
fi
echo "--> Build ProReco library.."
AR_LIB=share/lib/libproreco.a
......
// ProMC event record for EIC.
// See: https://atlaswww.hep.anl.gov/asc/promc/
// This is a template for Monte Carlo event record based on variable number of bytes
// Authors:
// S.Chekanov (ANL) and A.Kiselev
package promc;
option java_package = "proeic.io";
option java_outer_classname = "ProMC";
message ProMCEvent {
// Event information
message Event {
optional int32 Number = 1; // Number
optional int32 Process_ID = 2; // ID unique signal process id
optional int32 MPI = 3; // MPI number of multi parton interactions
optional int32 ID1 = 4; // ID1 flavour code of first parton
optional int32 ID2 = 5; // ID2 flavour code of second parton
optional float PDF1 = 6; // PDF1 PDF (id1, x1, Q)
optional float PDF2 = 7; // PDF2 PDF (id2, x2, Q)
optional float X1 = 8; // X1 fraction of beam momentum carried by first parton ("beam side")
optional float X2 = 9; // X2 fraction of beam momentum carried by second parton ("target side")
optional float Scale_PDF = 10; // Scale PDF Q-scale used in evaluation of PDF's (in GeV) |
optional float Alpha_QED = 11; // AlphaQED QED coupling, see hep-ph/0109068
optional float Scale = 12; // Scale energy scale, see hep-ph/0109068
optional float Alpha_QCD = 13; // QCD coupling, see hep-ph/0109068
optional double Weight = 14; // event weight
optional float X = 15; // bjorken x_bj for DIS
optional float Q2 = 16; // Q2 for DIS
repeated float fdata = 17; // event info as you want (array, float)
repeated sint64 idata = 18; // event info as you want (array, varint)
}
// Generator (truth) particles
message Particles {
repeated uint32 id=1 [packed=true]; // ID in the generator
repeated sint32 pdg_id=2 [packed=true]; // unique integer ID specifying the particle type
repeated uint32 status=3 [packed=true]; // integer specifying the particle’s status (i.e. decayed or not)
repeated float mass=4 [packed=true]; // mass
repeated float Px=5 [packed=true]; // pX
repeated float Py=6 [packed=true]; // pY
repeated float Pz=7 [packed=true]; // pZ
repeated uint32 mother1=8 [packed=true]; // first mother
repeated uint32 mother2=9 [packed=true]; // second mother
repeated uint32 daughter1=10 [packed=true]; // first daughter
repeated uint32 daughter2=11 [packed=true]; // second daughter
repeated sint32 barcode=12 [packed=true]; // barcode if used
repeated float X=13 [packed=true]; // vertex X position
repeated float Y=14 [packed=true]; // vertex Y position
repeated float Z=15 [packed=true]; // vertex Z position
repeated float T=16 [packed=true]; // time
repeated float weight=17 [packed=true]; // particle weight
repeated sint32 charge=18 [packed=true]; // Charge
repeated float energy=19 [packed=true]; // Energy
}
// even record for this event
optional Event event = 1; // information on event
optional Particles particles = 2; // information on generator-level particles
}
// ProMC description record.
// See: https://atlaswww.hep.anl.gov/asc/promc/
// This is a template for Monte Carlo event record based on variable number of bytes
// Authors:
// S.Chekanov (ANL) and A.Kiselev
package promc;
option java_package = "proeic.io";
option java_outer_classname = "ProMCDescriptionFile";
message ProMCDescription {
required uint64 version=1; // ProMC version
required uint64 events=2; // number of events
required string description=3; // description
required uint64 timestamp=4; // timestamp since 1970
optional int32 generator=5; // generator type
}
// ProMC header record for EIC.
// See: https://atlaswww.hep.anl.gov/asc/promc/
// This is a template for Monte Carlo event record based on variable number of bytes
// Authors:
// S.Chekanov (ANL) and A.Kiselev
package promc;
option java_package = "proeic.io";
option java_outer_classname = "ProMCHeaderFile";
message ProMCHeader {
// used to store the global information for all events
optional int32 id1=1; // flavour code of first parton
optional int32 id2=2; // flavour code of second parton
optional int32 pdf_id1=3; // LHAPDF set id of first parton
optional int32 pdf_id2=4; // LHAPDF set id of second parton
optional double x1=5; // fraction of beam momentum carried by first parton (”beam side”)
optional double x2=6; // fraction of beam momentum carried by second parton (”target side”)
optional double scalepdf=7; // Q-scale used in evaluation of PDF’s (in GeV)
optional int32 pdf1=8; // PDF (id1, x1, Q) This should be of the form x*f(x)
optional int32 pdf2=9; // PDF (id2, x2, Q) This should be of the form x*f(x)
optional double eCM=10; // CM energy
optional double s=11; // CM energy
optional string name=12; // process name
optional int32 code=13; // process code
optional double cross_section=14; // cross section in pb
optional double cross_section_error=15; // error associated with this cross section in pb
optional int32 MomentumUnit=16; // values are MEV or GEV
optional int32 LengthUnit=17; // values are MM or CM
optional string NameMomentumUnit=18; // return the unit designation as a string
optional string NameLengthUnit=19; // return the unit designation as a string
optional double weight=20; // event weight
optional double requested_events=21; // total number of requested events
// map to store particle data (names, mass)
message ParticleData {
required sint32 id =1; // PID of particle
required double mass =2; // its mass
required string name =3; // name of the particle
optional float width =4; // width
optional float lifetime =5; // lifetime
optional sint32 charge =6; // charge
}
// map to store orbitrary data as key-int value
message MetaInt {
required string key = 1; // key for integer value
required sint64 value = 2; // value
}
// map to store orbitrary data as key-int value
message MetaFloat {
required string key = 1; // key for integer value
required double value = 2; // value
}
repeated ParticleData particleData = 30; // keep all particle information
repeated MetaInt metaInt = 31; // keep metadata as key-value (int)
repeated MetaFloat metaFloat = 32; // keep metadata as key-value (double)
}
// ProMC statistics record for EIC.
// See: https://atlaswww.hep.anl.gov/asc/promc/
// This is a template for Monte Carlo event record based on variable number of bytes
// Authors:
// S.Chekanov (ANL) and A.Kisele
package promc;
option java_package = "proeic.io";
option java_outer_classname = "ProMCStatFile";
message ProMCStat {
optional int32 nevents_requested=1; // events requested
optional int32 nevents_failed=2; // events failed
optional double cross_section_accumulated=3; // cross section in pb (accumulated after all events)
optional double cross_section_error_accumulated=4; // error associated with this cross section in pb
optional double luminosity_accumulated=5; // accumulated luminosity in pb
optional int32 nTried=6; // tried events
optional int32 nSelected=7; // selected events
optional int32 nAccepted=8; // accepted events
// store generated processes
message ProcessData {
required sint32 id = 1; // process ID
required double cross_section = 2; // process cross section (in pb)
required double cross_section_error = 3; // error on cross section
required string name = 4; // name of the process
}
// map to store orbitrary data as key-int value
message MetaInt {
required string key = 1; // key for integer value
required sint64 value = 2; // value
}
// map to store orbitrary data as key-int value
message MetaFloat {
required string key = 1; // key for integer value
required double value = 2; // value
}
repeated ProcessData processData = 10;
repeated MetaInt metaInt = 11; // keep metadata as key-value (int)
repeated MetaFloat metaFloat = 12; // keep metadata as key-value (double)
}
No preview for this file type
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
This diff is collapsed.
File added
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: ProMCDescription.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = _descriptor.FileDescriptor(
name='ProMCDescription.proto',
package='promc',
serialized_pb='\n\x16ProMCDescription.proto\x12\x05promc\"n\n\x10ProMCDescription\x12\x0f\n\x07version\x18\x01 \x02(\x04\x12\x0e\n\x06\x65vents\x18\x02 \x02(\x04\x12\x13\n\x0b\x64\x65scription\x18\x03 \x02(\t\x12\x11\n\ttimestamp\x18\x04 \x02(\x04\x12\x11\n\tgenerator\x18\x05 \x01(\x05\x42!\n\tproeic.ioB\x14ProMCDescriptionFile')
_PROMCDESCRIPTION = _descriptor.Descriptor(
name='ProMCDescription',
full_name='promc.ProMCDescription',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='version', full_name='promc.ProMCDescription.version', index=0,
number=1, type=4, cpp_type=4, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='events', full_name='promc.ProMCDescription.events', index=1,
number=2, type=4, cpp_type=4, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='description', full_name='promc.ProMCDescription.description', index=2,
number=3, type=9, cpp_type=9, label=2,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp', full_name='promc.ProMCDescription.timestamp', index=3,
number=4, type=4, cpp_type=4, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='generator', full_name='promc.ProMCDescription.generator', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=33,
serialized_end=143,
)
DESCRIPTOR.message_types_by_name['ProMCDescription'] = _PROMCDESCRIPTION
class ProMCDescription(_message.Message):
__metaclass__ = _reflection.GeneratedProtocolMessageType
DESCRIPTOR = _PROMCDESCRIPTION
# @@protoc_insertion_point(class_scope:promc.ProMCDescription)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), '\n\tproeic.ioB\024ProMCDescriptionFile')
# @@protoc_insertion_point(module_scope)
This diff is collapsed.
This diff is collapsed.
File added
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment